Skip to content

fix(release): pick the version after collecting changes/, so an Added fragment gives a minor - #210

Merged
leemour merged 3 commits into
mainfrom
fix/release-level-after-fragments
Nov 21, 2026
Merged

leemour merged 3 commits into
mainfrom
fix/release-level-after-fragments

Conversation

@leemour

@leemour leemour commented Nov 21, 2026

Copy link
Copy Markdown
Member

Why

FIND-2860: wordpress-cli's bin/release picked 0.1.3 for a release whose changes/ fragment was Added. It asked changelog level --next before the fragments were in the changelog, so it saw only Fixed; version:check then refused the release pull request, and the version was raised to 0.2.0 by hand (WireCatLabs/wordpress-cli#8).

What

  • bin/release: the raise moves into a renumber function. When npm has the version, it renumbers to the next free one, collects the fragments, reads the level from the section that now holds them, and renumbers again when it needs more (an Added is a minor).
  • The same for a version dated by hand: fragments merged since then that need a higher level raise it, through a chore(release) pull request.
  • scripts/release.test.ts runs bin/release in a temporary repository with npm, pnpm and gh stubbed: a taken 0.1.2 with an Added fragment gives 0.2.0, with a Fixed one 0.1.3, and a hand-dated 0.1.3 with an Added fragment gives 0.2.0. It is in template.json files, so upgrade keeps it next to bin/release.
  • Fragment changes/fix-release-level-after-fragments.md.

Testing

  • scripts/release.test.ts: 3 pass; the Added case fails on the old bin/release.
  • pnpm test (the placeholder test caught a clidev-like name in the first draft, fixed), lint, typecheck, docs:check pass.
  • A fresh-agent review ran; its findings (the hand-dated branch, the test not upgrading, the PR wording) are fixed in the second commit.

🤖 Generated with Claude Code

leemour and others added 3 commits November 21, 2026 05:10
… fragment gives a minor

When npm already had the version, bin/release asked `changelog level --next` before the changes/ fragments were in
the changelog, so a fragment with Added still gave the next patch; version:check then refused the release pull
request (wordpress-cli 0.1.3, raised to 0.2.0 by hand, FIND-2860). The fragments are now collected first, the level
is read from the section that holds them, and the version is raised once more when it needs to be. The raise itself
moves into a function, called for both steps.

scripts/release.test.ts runs bin/release in a temporary repository with npm, pnpm and gh stubbed: an Added fragment
raises a taken 0.1.2 to 0.2.0, a Fixed one to 0.1.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s need more; the test upgrades with bin/release; review

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…it passes

The published CLIs still register account-remove.unknown-profile and account-rename.unknown-profile; cli-base
0.126.1 lists the pair as a shared difference. The help snapshot gains Linear in the family list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​wirecat/​cli-core@​0.710.0 ⏵ 0.718.098 +1100100 +19670
Updated@​wirecat/​cli-base@​0.125.2 ⏵ 0.126.198 +1100100 +196 +170

View full report

@leemour
leemour merged commit 7285f6f into main Nov 21, 2026
16 checks passed
@leemour
leemour deleted the fix/release-level-after-fragments branch November 21, 2026 04:43
leemour added a commit that referenced this pull request Nov 23, 2026
)

bin/release takes the release lock with flock. macOS and Windows runners do not
ship it, so the three tests from #210 failed there with empty output and stopped
the 0.33.1 release run 45100386778.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant