fix(changeset): stop lockstep group forcing a whole-stack major release#2788
Merged
Conversation
The ADR-0090 changeset marked `@objectstack/spec: major`. Because every publishable package sits in one Changesets `fixed` (lockstep) group, that single `major` promotes the ENTIRE monorepo (~70 packages) to a new major version — 14.2.0 → 15.0.0 — even though every other changeset was minor/patch. That is why versioning "always wants a major" despite no major being intended. - Downgrade the spec bump to `minor` per the launch-window convention (breaking changes ship as minor while the stack versions in lockstep; the changeset body still documents the break). Next release computes 14.3.0. - Add `scripts/check-changeset-no-major.mjs` (zero-dep) and run it in the `changeset-check` CI job so an accidental `major` can never again silently turn a PR into a whole-stack major release. Escape hatch: the `allow-major` PR label skips the guard when a major is genuinely intended. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018yGgQz1UdeGQN4PX29LNVz
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
os-zhuang
marked this pull request as ready for review
July 10, 2026 12:22
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.
Why "it always wants a major"
The pending
.changeset/adr-0090-docs-audience-enforcement.mddeclared:Every publishable package is enumerated in a single Changesets
fixed(lockstep) group in.changeset/config.json. Changesets applies the highest bump found anywhere in the group to every package in it. So that onemajoronspecpromotes the entire monorepo (~70 packages) from14.2.0→15.0.0— even though every other changeset wasminor/patch. That is the source of "明明没提交 major,却每次想发大版本".Changes
@objectstack/spectominorin the ADR-0090 changeset, per the launch-window convention (breaking changes ship asminorwhile the stack versions in lockstep — they don't burn a major version number). The changeset body still documents the break. Next release now computes14.3.0instead of15.0.0.scripts/check-changeset-no-major.mjs— a zero-dependency guard that fails if any changeset declares amajorbump — and run it in thechangeset-checkCI job. This prevents an accidental/over-strictmajorfrom ever again silently turning a PR into a whole-stack major release.allow-majorlabel, for when a whole-stack major release is genuinely intended.Verification
node scripts/check-changeset-no-major.mjs→ passes on the current changesets (nomajorremaining).majorchangeset makes the guard exit1with a clear offender list.🤖 Generated with Claude Code
Generated by Claude Code