Repository navigation
feat: let a last release: vX.Y.Z commit set the release version - #606
Merged
Merged
Conversation
When the newest commit in the release range (first-parent order, skipping the bot's version-bump and lint/format autofix commits; a PR merge counts as the PR's newest commit) is a plain `release: vX.Y.Z`, that version wins over every other commit in the range, breaking ones included. A release commit anywhere else keeps the old behaviour, so an old master release commit never pins a later release. An explicit version at or below the released version now fails the release-PR refresh instead of opening a downgrade or same-version release, and the already-bumped check covers explicit versions too.
Shinrai
approved these changes
Nov 29, 2026
Shinrai
added a commit
that referenced
this pull request
Nov 29, 2026
## 🚀 What's Changed ### 💥 Breaking Changes _No breaking changes_ ### ✨ Features _No new features_ ### 🐛 Bug Fixes _No bug fixes_ ### 📦 Dependencies _No dependency updates_ ### 🔧 Other Changes - docs: cover #606 in the v4.48.0 changelog (123d714) <details> <summary>👥 Contributors</summary> - @Shinrai </details>
cldmv-bot Bot
added a commit
that referenced
this pull request
Nov 29, 2026
…sion # v4.48.0 — 2026-11-29 Minor release: a `release: vX.Y.Z` commit at the end of the release range now sets the version outright, even over breaking commits earlier in the range. The package-layout CommonJS shim keeps `.default` and the ESM names on a single exported value, and the PR-title step replaces a title that no longer matches any of the PR's commits. ## Features - **A last `release: vX.Y.Z` commit sets the release version.** Before, a breaking commit anywhere in the range forced a major, and an explicit version only counted when the release commit was the only commit. Now, when the newest commit in the range is a plain `release: vX.Y.Z` (optionally ` - <description>` or ` (#N)`), that version wins over every other commit. "Newest" is first-parent order on the branch, skipping the bot's version-bump and lint/format autofix commits; for a PR merge commit the PR's own newest commit counts, so the commit can be pushed straight to `next`/`hotfixes` or merged through a `release/X.Y.Z` PR. A release commit anywhere else in the range keeps the old behaviour, so an old `master` release commit never pins a later release. A version at or below the released version fails the release-PR refresh with an error instead of opening a downgrade or a same-version release, and the already-bumped check now covers explicit versions too. `docs/conventions/release-flow-v4.md` §5.3 describes it. ([#606](#606)) ## Bug Fixes - **The CJS shim keeps `.default` and every ESM name on a single exported value.** When every export of `src/index.mjs` was one function or class (a default plus a named alias, or a single named export), `examples/package-layout/src/index.cjs` returned the bare value, so `require(x).default`, `require(x).Name` and `const { Name } = require(x)` stopped working. The shim now sets `.default` and each exported name on that value, which is the usual CommonJS shape, and leaves a name the value already has (a static of the same name) alone. Entries that export more than one distinct value, or a single primitive, still get the module object. `docs/conventions/package-layout.md` describes the new shape, and `examples/package-layout/index-cjs.test.mjs` covers it from `npm test`. ([#603](#603)) - **A PR title whose summary matches no commit is replaced.** `normalize-pr-title` kept any title whose type still conformed to the PR's commits. When a branch was rewritten (a commit folded into another and force-pushed), the PR kept a title none of its commits had, and the merge commit carried it. A conforming title now also has to match the summary of one of the commit subjects; otherwise it is rebuilt from the highest commit, as a non-conforming title is. A title picked from one of several commits, or one that raises a commit's type, is still kept. Fixes [#601](#601) ([#602](#602)) ## Documentation - `docs/conventions/package-layout.md`: the shim table and the rule on attaching names ([#603](#603)). - `docs/conventions/release-flow-v4.md` §5.3: setting the version with a `release:` commit ([#606](#606)). - `docs/conventions/release-flow-v4.md` §6.4: the title normalizer's keep and rewrite rules ([#602](#602)). - **NEW:** [docs/changelogs/v4.48.0.md](https://github.com/CLDMV/.github/blob/v4.48.0/docs/changelogs/v4.48.0.md), this changelog. - README What's New promoted to v4.48.0. ## Upgrade notes - Repos that copied the old shim body update their `src/index.cjs` from `examples/package-layout/src/index.cjs`. For a package whose ESM entry exports a single function or class, `require()` gains `.default` and the export names. Other packages see no change. - To set a release's version by hand, merge everything else (the changelog included) first, then push `release: vX.Y.Z` as the last commit on `next`. - Nothing else to change in consumer repos. The title rule applies on the next push to a feature branch once `@v4` moves. <details> <summary>👥 Contributors</summary> - @Shinrai </details> <!-- co-authors --> Co-authored-by: Shinrai <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 What's Changed
💥 Breaking Changes
No breaking changes
✨ Features
No new features
🐛 Bug Fixes
No bug fixes
📦 Dependencies
No dependency updates
🔧 Other Changes
No other changes