fix(calver): minor bumps are no longer treated as major bumps #3395
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 are these changes introduced?
Context on how Hydrogen versioning works
Fixes issue reported here
When a changeset declares a
minorbump for@shopify/hydrogenor@shopify/hydrogen-react, the release system incorrectly produces version2025.10.0instead of the expected2025.7.3.Root cause: Semantic collision between standard semver and CalVer:
'@shopify/hydrogen': minor2025.7.2→2025.8.0(increment middle, reset last)getBumpType("2025.7.2", "2025.8.0")sees7 !== 8in the "major" position → returns'major'2025.10.0The key insight is that changeset
.mdfiles are deleted afterchangeset versionruns, soenforce-calver-ci.jscouldn't read them directly to determine the actual bump intent.WHAT is this pull request doing?
Pre-computes the bump type BEFORE changesets consumes the files, then passes this to
enforce-calver-ci.jsvia a temp file.Files changed:
.changeset/detect-calver-bump-type.js.changeset/enforce-calver-ci.js.changeset/calver-bump-type.test.jspackage.jsonversionscript to run detection first.gitignoreVersion script flow (new):
For CalVer,
minorandpatchboth increment within the quarter (e.g.,2025.7.2→2025.7.3). Onlymajoradvances to the next quarter.HOW to test your changes?
Run the unit tests:
Expected: 17 tests pass
Run the local dry-run test:
Expected: Shows
2025.7.2 → 2025.7.3(not2025.10.0)Test with existing changesets in this repo:
node .changeset/detect-calver-bump-type.js # Should output: CalVer bump type detected: patchChecklist