Skip to content

fix: use minor bump for 0.x packages when peer dependency causes major#1936

Open
mixelburg wants to merge 1 commit intochangesets:mainfrom
mixelburg:fix/peer-dep-major-bump-0x
Open

fix: use minor bump for 0.x packages when peer dependency causes major#1936
mixelburg wants to merge 1 commit intochangesets:mainfrom
mixelburg:fix/peer-dep-major-bump-0x

Conversation

@mixelburg
Copy link
Copy Markdown
Contributor

What changed

When a peer dependency change triggers a major bump for a dependent package with a 0.x version, the bump type is now instead of . This avoids prematurely jumping from 0.x.y to 1.0.0.

Why

By semver convention, 0.x packages are allowed to contain breaking changes in minor versions. A peer dependency change that would require a major bump in a stable package should only require a minor bump in a 0.x package. Before this fix, adding a peer dependency to a 0.x package would release 1.0.0, which is not desirable.

How

In , the check now additionally checks if the dependent package's current version starts with . If so, is set to instead of .

Closes #1887

By semver convention, 0.x packages are allowed to contain breaking
changes in minor versions. When a peer dependency change triggers
a major bump for a 0.x dependent, bump minor instead to avoid
prematurely jumping to 1.0.0.

Fixes changesets#1887
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 18, 2026

⚠️ No Changeset found

Latest commit: 8730448

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.81%. Comparing base (5c4731f) to head (8730448).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1936      +/-   ##
==========================================
+ Coverage   83.23%   83.81%   +0.58%     
==========================================
  Files          56       56              
  Lines        2434     2466      +32     
  Branches      734      743       +9     
==========================================
+ Hits         2026     2067      +41     
+ Misses        402      393       -9     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Adding peer dependencies bumps 0.X.Y packages to 1.0.0

1 participant