Skip to content

fix(calver): skeleton major bumps no longer cascade to hydrogen packages#3452

Merged
kdaviduik merged 1 commit intomainfrom
changeset-bug
Feb 6, 2026
Merged

fix(calver): skeleton major bumps no longer cascade to hydrogen packages#3452
kdaviduik merged 1 commit intomainfrom
changeset-bug

Conversation

@kdaviduik
Copy link
Contributor

WHY are these changes introduced?

Relates to #3451

The [ci] release 2026.1.0 PR incorrectly bumps @shopify/hydrogen and @shopify/hydrogen-react to major version 2026.1.0. The only major changeset is 'skeleton': major in api-version-2025-10.md — hydrogen only has a patch changeset and hydrogen-react has none at all. The skeleton template's major bump should not force the library packages to advance to the next quarter.

WHAT is this pull request doing?

Introduces a CALVER_SYNC_PACKAGES constant to separate two concerns that were conflated:

  • "Which packages use CalVer versioning?"CALVER_PACKAGES (hydrogen, hydrogen-react, skeleton)
  • "Which packages' major bumps trigger cross-package quarter advancement?"CALVER_SYNC_PACKAGES (hydrogen, hydrogen-react only)

The root cause was that detectBumpType() and hasMajorChangesets() treated all three CalVer packages identically for major detection. A skeleton: major changeset would set the global hasMajor flag, which then forced ALL CalVer packages to getNextVersion(baseline, 'major') — advancing them to the next quarter even when they had no major changeset.

Files changed:

File Change
.changeset/calver-shared.js Add CALVER_SYNC_PACKAGES, update hasMajorChangesets() to use it
.changeset/detect-calver-bump-type.js Gate hasMajor detection to sync-eligible packages only
.changeset/calver-bump-type.test.js Add 14 new assertions covering skeleton-major scenarios

The fix is minimal: only 2 files needed code changes. The 4 other consumption points (enforce-calver-ci.js lines 137 and 165-167, enforce-calver-local.js lines 159 and 184) inherit the fix transitively because they call into the corrected functions.

HOW to test your changes?

  1. Run the test suite:

    node .changeset/calver-bump-type.test.js
    

    All 32 tests should pass (18 existing + 14 new).

  2. Verify the CLI command with current changesets:

    node .changeset/calver-shared.js has-major-changesets
    

    Should return false (current changesets include skeleton: major but no hydrogen/hydrogen-react major).

  3. Key test scenarios to verify:

    • skeleton: major alone → detectBumpType() returns 'patch', hasMajorChangesets() returns false
    • @shopify/hydrogen: major alone → returns 'major' and true (no regression)
    • skeleton: major + @shopify/hydrogen: patch → returns 'patch' and false (the exact PR [ci] release 2025.10.1 #3451 scenario)
    • Single changeset file with both skeleton: major and @shopify/hydrogen: patch in the same frontmatter → returns 'patch' and false

Post-merge steps

After merging, the [ci] release PR (#3451) should be regenerated. The changeset workflow will re-run detect-calver-bump-type.js and produce correct versions (skeleton advances to next quarter independently, hydrogen gets a patch bump, hydrogen-react stays unchanged).

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

The CalVer scripts treated `skeleton` identically to `@Shopify/hydrogen`
and `@shopify/hydrogen-react` when detecting major bumps. A skeleton-only
major changeset (eg: API version update) would incorrectly force all
CalVer packages to advance to the next quarter.

Introduces `CALVER_SYNC_PACKAGES` to separate "which packages use CalVer"
from "which packages' major bumps trigger cross-package synchronization".
Only hydrogen and hydrogen-react majors trigger quarter advancement —
skeleton major bumps are now treated as independent patch-level changes.

Four consumption points fixed (2 directly, 2 transitively):
- `detectBumpType()` gates `hasMajor` to sync-eligible packages
- `hasMajorChangesets()` iterates sync packages only
- `enforce-calver-ci.js` inherits fix via detectBumpType() temp file
- `enforce-calver-local.js` inherits fix via hasMajorChangesets()
@shopify
Copy link
Contributor

shopify bot commented Feb 6, 2026

Oxygen deployed a preview of your changeset-bug branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment February 6, 2026 7:13 PM

Learn more about Hydrogen's GitHub integration.

@kdaviduik kdaviduik marked this pull request as ready for review February 6, 2026 19:14
@kdaviduik kdaviduik requested a review from a team as a code owner February 6, 2026 19:14
Copy link
Contributor

@fredericoo fredericoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kdaviduik kdaviduik merged commit 45bed1d into main Feb 6, 2026
14 of 15 checks passed
@kdaviduik kdaviduik deleted the changeset-bug branch February 6, 2026 19:24
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.

3 participants

Comments