zruntime 0.2.0

A simple single-threaded Rust async runtime
Documentation
# release-plz configuration
# https://release-plz.dev/docs/config

[workspace]
# Use the existing tag naming convention without 'v' prefix.
git_tag_name = "{{ package }}-{{ version }}"
git_release_name = "{{ package }}-{{ version }}"

# Enable all release features.
git_release_enable = true
git_tag_enable = true
publish = true
semver_check = true

# Bump minor version for non-bugfix commits.
custom_minor_increment_regex = """\
^(๐ŸŽจ|โšก๏ธ|๐Ÿ”ฅ|โœจ|๐Ÿ’„|๐ŸŽ‰|๐Ÿ”’๏ธ|โฌ‡๏ธ|โฌ†๏ธ|๐Ÿ“Œ|โž•|โž–|๐Ÿ”ง|๐Ÿ‘ฝ๏ธ|๐Ÿ’ฅ|โ™ฟ๏ธ|๐Ÿ’ฌ|๐Ÿ”Š|๐Ÿ”‡|๐Ÿšธ|๐Ÿ—๏ธ|๐Ÿ—‘๏ธ|๐Ÿงต|๐Ÿšฉ)\
"""

# PR configuration.
pr_name = "๐Ÿ”– Releases"

# Changelog configuration for gimoji-based commits.
# See: https://zeenix.github.io/gimoji/
[changelog]

# Changelog body template.
# Each section heading carries the emoji of its category, so the leading emoji is stripped off
# the entries rather than repeated on every line. One regex both recognises and removes it, so
# the two can't disagree. It strips exactly one gimoji plus the whitespace after it, matching the
# commit contract: a subject carries one prefix emoji, and everything after it โ€” another emoji
# included โ€” is title text. So "โœจ ๐ŸŽ‰ Add foo" keeps its ๐ŸŽ‰, and subjects with no separator after
# the prefix ("โšฐ๏ธa Drop โ€ฆ", "โœจ๐Ÿณ๏ธโ€๐ŸŒˆ Rainbow") stay visibly malformed rather than being mangled.
# The alternation is exactly the set of emoji this file routes to a group below; any other emoji
# lands in the catch-all, where nothing is stripped. Keep the two in step when adding a parser.
# The catch-all group is the exception: its heading emoji stands for no particular category, so
# the entry emoji there is information rather than repetition and is kept. Those entries render
# exactly as they did before this template existed.
# `upper_first` applies only when nothing was stripped, and sees the subject untrimmed, exactly
# as it did before. An emoji used to shield the rest of the subject from it; without that guard
# it would rewrite "runtime shouldn't โ€ฆ" into "Runtime shouldn't โ€ฆ" and
# "signature::Fields::len()" into "Signature::Fields::len()".
# Group names are prefixed with an "<!-- NN -->" ordering comment, which `striptags` drops from
# the rendered heading.
# Issue refs are separated by "||" delimiter so we can insert period before them.
body = """

## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}\
{% set first_line = commit.message | split(pat="\n") | first %}\
{% set parts = first_line | split(pat="||") %}\
{% set subject = parts | first %}\
{% if group is ending_with("Other") %}\
{% set title = subject | upper_first %}\
{% else %}\
{% set title = subject | replace_regex(from="^\\s*(?:โœจ|๐ŸŽ‰|๐Ÿšธ|๐Ÿ›|๐Ÿš‘|๐Ÿฉน|๐Ÿฅ…|โšก|๐Ÿ“|๐Ÿ’ก|โ™ป|๐ŸŽจ|๐Ÿšš|๐Ÿ”ง|๐Ÿ—|๐Ÿ’„|๐Ÿ’ฅ|๐Ÿ”ฅ|๐Ÿ—‘|โฌ†|โฌ‡|๐Ÿ“Œ|โž•|โž–|๐Ÿ”’|โœ…|๐Ÿงช|๐Ÿ‘ท|๐Ÿ’š|๐Ÿงต|๐Ÿฆบ|๐Ÿšฉ|๐Ÿšจ|๐Ÿ’ธ|๐Ÿฑ)\\u{FE0F}?\\s+", to="") %}\
{% if title == subject %}{% set title = title | upper_first %}{% endif %}\
{% endif %}\
- {{ title | trim | trim_end_matches(pat=".") }}\
{% if commit.breaking %} (**BREAKING**){% endif %}.\
{% if parts | length > 1 %} {{ parts | last }}{% endif %}
{% endfor %}\
{% endfor %}\
"""

# Protect breaking change commits from being filtered out.
protect_breaking_commits = true

# Commit message preprocessors (applied in order).
# There's no package-prefix to strip here: zruntime is a single crate, so commit subjects carry
# only a gimoji prefix, never a "zr: " style package tag.
commit_preprocessors = [
    # Extract issue refs from commit body using $COMMIT_SHA.
    # Matches: "Fixes #123", "Closes issue #123", "Resolves bug #123", etc.
    # Appends issue ref with "||" delimiter so template can insert period before it.
    { pattern = ".*", replace_command = "sh -c 'title=$(cat); ref=$(git log -1 --format=%b $COMMIT_SHA 2>/dev/null | grep -oE \"(Fixes|Closes|Resolves).*#[0-9]+\" | grep -oE \"#[0-9]+\" | head -1); if [ -n \"$ref\" ]; then printf \"%s||%s\\n\" \"$title\" \"$ref\"; else printf \"%s\\n\" \"$title\"; fi'" },
    # Replace the message of commits carrying a "Changelog: skip" git trailer with a sentinel
    # that the first commit parser below drops (e.g. AI-workflow design docs and plans).
    { pattern = ".*", replace_command = "sh -c 'title=$(cat); if git log -1 --format=\"%(trailers:key=Changelog,valueonly)\" $COMMIT_SHA 2>/dev/null | grep -qix skip; then echo changelog-skip; else printf \"%s\\n\" \"$title\"; fi'" },
]

# Categorize commits based on gimoji emojis.
# See: https://zeenix.github.io/gimoji/
# The "<!-- NN -->" prefix on each group name fixes the order of the changelog sections
# (the template strips it); the emoji right after it becomes the section heading emoji.
commit_parsers = [
    # Skip commits carrying a "Changelog: skip" trailer (see the preprocessor above).
    { message = "^changelog-skip$", skip = true },
    # Skip merge commits, release commits, and empty commits (just emojis).
    { message = "^[Mm]erge", skip = true },
    { message = "^๐Ÿ”–", skip = true },
    { message = "^[\\p{Emoji}\\p{Emoji_Presentation}\\p{Extended_Pictographic}]+$", skip = true },

    # Features.
    { message = "^โœจ", group = "<!-- 00 -->โœจ Added" },
    { message = "^๐ŸŽ‰", group = "<!-- 00 -->โœจ Added" },
    { message = "^๐Ÿšธ", group = "<!-- 00 -->โœจ Added" },

    # Bug fixes.
    { message = "^๐Ÿ›", group = "<!-- 07 -->๐Ÿ› Fixed" },
    { message = "^๐Ÿš‘", group = "<!-- 07 -->๐Ÿ› Fixed" },
    { message = "^๐Ÿฉน", group = "<!-- 07 -->๐Ÿ› Fixed" },
    { message = "^๐Ÿฅ…", group = "<!-- 07 -->๐Ÿ› Fixed" },
    # Validation: a check that turns bad input away.
    { message = "^๐Ÿฆบ", group = "<!-- 07 -->๐Ÿ› Fixed" },

    # Performance.
    { message = "^โšก", group = "<!-- 09 -->โšก๏ธ Performance" },

    # Documentation.
    { message = "^๐Ÿ“", group = "<!-- 06 -->๐Ÿ“ Documentation" },
    { message = "^๐Ÿ’ก", group = "<!-- 06 -->๐Ÿ“ Documentation" },
    # Sponsors, named in the README.
    { message = "^๐Ÿ’ธ", group = "<!-- 06 -->๐Ÿ“ Documentation" },
    # Assets, such as the logo the README and API docs show.
    { message = "^๐Ÿฑ", group = "<!-- 06 -->๐Ÿ“ Documentation" },

    # Refactoring/changes.
    { message = "^โ™ป๏ธ", group = "<!-- 03 -->โ™ป๏ธ Changed" },
    { message = "^๐ŸŽจ", group = "<!-- 03 -->โ™ป๏ธ Changed" },
    { message = "^๐Ÿšš", group = "<!-- 03 -->โ™ป๏ธ Changed" },
    { message = "^๐Ÿ”ง", group = "<!-- 03 -->โ™ป๏ธ Changed" },
    { message = "^๐Ÿ—๏ธ", group = "<!-- 03 -->โ™ป๏ธ Changed" },
    { message = "^๐Ÿ’„", group = "<!-- 03 -->โ™ป๏ธ Changed" },
    # Cargo features.
    { message = "^๐Ÿšฉ", group = "<!-- 03 -->โ™ป๏ธ Changed" },
    # Concurrency work.
    { message = "^๐Ÿงต", group = "<!-- 03 -->โ™ป๏ธ Changed" },

    # Breaking changes/removals.
    { message = "^๐Ÿ’ฅ", group = "<!-- 01 -->๐Ÿ’ฅ Breaking" },
    { message = "^๐Ÿ”ฅ", group = "<!-- 10 -->๐Ÿ”ฅ Removed" },
    { message = "^๐Ÿ—‘๏ธ", group = "<!-- 05 -->๐Ÿ—‘๏ธ Deprecated" },

    # Dependencies.
    { message = "^โฌ†๏ธ", group = "<!-- 04 -->๐Ÿ“ฆ Dependencies" },
    { message = "^โฌ‡๏ธ", group = "<!-- 04 -->๐Ÿ“ฆ Dependencies" },
    { message = "^๐Ÿ“Œ", group = "<!-- 04 -->๐Ÿ“ฆ Dependencies" },
    { message = "^โž•", group = "<!-- 04 -->๐Ÿ“ฆ Dependencies" },
    { message = "^โž–", group = "<!-- 04 -->๐Ÿ“ฆ Dependencies" },

    # Security.
    { message = "^๐Ÿ”’", group = "<!-- 11 -->๐Ÿ”’๏ธ Security" },

    # Testing.
    { message = "^โœ…", group = "<!-- 12 -->โœ… Testing" },
    { message = "^๐Ÿงช", group = "<!-- 12 -->โœ… Testing" },

    # CI/Build.
    { message = "^๐Ÿ‘ท", group = "<!-- 02 -->๐Ÿ‘ท CI" },
    { message = "^๐Ÿ’š", group = "<!-- 02 -->๐Ÿ‘ท CI" },
    # Lints.
    { message = "^๐Ÿšจ", group = "<!-- 02 -->๐Ÿ‘ท CI" },

    # Everything else.
    { message = ".*", group = "<!-- 08 -->โš™๏ธ Other" },
]