Repository navigation
fix(version): Keep auto and pre below 1.0.0 on breaking changes - #962
Merged
Merged
Conversation
Contributor
|
BYK
approved these changes
Nov 5, 2026
8 tasks done
BYK
added a commit
to getsentry/junior
that referenced
this pull request
Nov 5, 2026
> [!WARNING] > **Merge this only after a Craft 3.x release that includes getsentry/craft#962 is out.** Until then, Craft's default categories make `bump=auto` (the default) release **1.0.0** on the next `type!:` commit. This deletes `.github/release.yml`, so Craft uses its default changelog categories. BYK asked for this on #2745: use the defaults and fix Craft instead of keeping a local override. The file was a copy of Craft's defaults with one difference: breaking changes were `semver: minor`, so `auto` couldn't release 1.0.0 while Junior is 0.x. getsentry/craft#962 builds that rule into Craft. Below 1.0.0, `auto` and `pre` treat a breaking change as a minor bump, and only an explicit `major` or exact version releases 1.0.0. The release workflow uses the floating `getsentry/craft@v3` tag, so the fix reaches Junior as soon as Craft releases it. Nothing else referenced the file. `releasing.md` already says breaking changes bump the minor version, and that stays true once the fix is released. **Verification** - `pnpm release:check` and prettier pass. - On a test repo at 0.5.0 with a `feat!:` commit: - Craft with #962: `auto` → 0.6.0, `pre` → 0.6.0-alpha.0, `major` → 1.0.0. - Released Craft 3.9.0: `auto` → 1.0.0. That's why this PR must wait. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Ac8d3ce009cefcaeb24db801614e507ab --> -- [View Session in Sentry](https://sentry.sentry.io/explore/conversations/agent%3Ac8d3ce009cefcaeb24db801614e507ab/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <126780+BYK@users.noreply.github.com>
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.
Right now
craft prepare autoreleases1.0.0from a0.xversion as soon as one breaking-change commit (type!:) lands. Before 1.0.0, a breaking change should bump the minor version. Shipping 1.0.0 should be an explicit choice. Requested by BYK in getsentry/junior#2745.With this change, when the current version is below
1.0.0,autoandpreturn amajorbump picked from the commits intominorand log why.majorand exact versions passed on purpose still release1.0.0.0.5.0plus afeat!:commitcraft prepare auto1.0.00.6.0craft prepare pre1.0.0-alpha.00.6.0-alpha.0craft prepare major1.0.01.0.0currentVersionis now computed before the bump type so the check can read it. The value is the same as before. The versioning docs describe the new rule.There's no
minVersiongate. Today a 0.x repo onautoeither never has breaking commits or gets an accidental 1.0.0.Known gap:
craft changelog --format jsonand the PR changelog preview still report the rawmajorbump type. I left them unchanged to keep this fix small.Verification
prepare-dry-run.e2e.test.tscoverauto,preandmajorafter0.5.0plusfeat!:. I couldn't run that file in my sandbox, because its git wrapper rejects the test repos' commit identity. CI runs them.dist/craft:auto:0.5.0 -> 0.6.0pre:0.5.0 -> 0.6.0-alpha.0major:0.5.0 -> 1.0.0auto:0.5.0 -> 1.0.0prepare.test.tsandautoVersion.test.tspass (29 tests). tsc, eslint and prettier pass.via @BYK.
--
View Session in Sentry