Repository navigation
chore(release): land 1.5.0 and anchor squash-landed releases - #1580
Merged
Merged
Conversation
1.5.0 is tagged and published, but the publish run could not move v1.x to its bump commit after branch protection landed. This applies the same version and changelog change so v1.x matches what shipped.
v1.x only accepts squash merges, so a release bump landed through a PR gets a new SHA and its tag stays on a commit outside the release line. That is already true for 1.4.2 and 1.5.0. Without this, the next bump anchors to v1.4.1, re-counts their commits, and derives a minor. Tagged versions that are not reachable now resolve to the first-parent commit that set package.json to that version, and the changelog range starts there.
RATTIPONG (BankPansuwan)
approved these changes
Oct 6, 2026
Martin Torp (mtorp)
requested a review
from Benjamin Barslev Nielsen (barslev)
October 7, 2026 05:22
Benjamin Barslev Nielsen (barslev)
approved these changes
Oct 7, 2026
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.
Cleanup for the two v1.x releases that broke when v1.x got branch protection. The process fix itself is in #1579.
What's broken
v1.4.2at8bfe7d4, off v1.x5e0466d, a different SHA)v1.5.0atfaf8b5f, off v1.xThe repo only allows squash merges and tag protection blocks moving
v*tags. So neither tag can ever be reachable from v1.x.What this PR does
package.jsonand CHANGELOG change asfaf8b5f, so v1.x matches what shipped.scripts/release/history.mtsanchors the next release's changelog range to the newest release tag reachable from HEAD. Today that'sv1.4.1. The next bump would re-count every commit from 1.4.2 and 1.5.0, including thefeat:from 📣🤖 feat(fix): add opt-in --allow-overrides flag #1573, and derive 1.6.0 with a changelog that repeats old entries. Now, when a tagged version isn't reachable, the code finds the first-parent commit that setpackage.jsonto that version and uses it as the landed release and the range start. This doesn't depend on the merge commit's title.Checked against the real tags:
5e0466d, the 1.4.2 squash commit.bump.mts --dry-runderives 1.5.1 with an empty range.With #1579, future release PRs get tagged after they're squash-merged, so their tags will be reachable. This fallback only matters for releases landed by squash before that, which today means 1.4.2 and 1.5.0.
After merge
The
npm-publish-v1.4.2andnpm-publish-v1.5.0branches are leftovers from the failed runs. Both tags point at the same commits, so the branches can be deleted safely.Expected reviewer effort: High-level design decisions
Note
Medium Risk
Changes release versioning and changelog derivation logic; incorrect anchoring could mis-bump versions or duplicate changelog entries, though behavior is covered by new tests.
Overview
Lands v1.5.0 on the protected release line by bumping
package.jsonto1.5.0and promoting the existing Unreleased changelog (includingsocket fix --allow-overridesand Coana15.12.0) into a dated 1.5.0 section.Fixes release bump/changelog anchoring when release tags sit on commits that are not reachable from HEAD (e.g. squash merges with immovable
v*tags). Release history now treatsanchorRefas either the newest merged tag or the first-parent commit whosepackage.jsonversion matches an unreachable tag;bump.mtsuses that ref for the commit range so the next version/changelog section does not re-scan already-shipped work.Adds a git fixture test for the off-line-tag squash case and updates existing tests for the renamed
anchorReffield.Reviewed by Cursor Bugbot for commit 4e71152. Configure here.