Description
Affected Packages
TBH I'm not sure which package handles this. @changesets/assemble-release-plan?
Problem
There are two packages in a monorepo, foo and bar. Notice that their version have major version 0 and that bar depends on foo via peer dependnecy:
{
"name": "foo",
"version": "0.1.0"
}{
"name": "bar",
"version": "0.1.0",
"peerDependencies": {
"foo": "^0.1.0"
}
}Let's create new changeset:
---
'foo': minor
---
New feature makes Foo better!
When running npx changeset version, foo is bumped to 0.2.0, that means peer dependency in bar/package.json must change to ^0.2.0, which is a breaking change (because that's how caret ranges work in https://www.npmjs.com/package/semver), so bar version is bumped too - to 1.0.0. But since we're still in 0.x versions, bumping bar to 0.2.0 would suffice (it is allowed to make breaking changes when major version is zero according to https://semver.org/).
Proposed solution
In this situation, bar is bumped to 0.2.0, not 1.0.0.
Activity
R-Bower commentedon Sep 27, 2023
Related: #1011
chore: patch @changesets/assemble-release-plan to fix changesets/chan…
chore: ignore nestjs-crud and next in changesets
chore: ignore nestjs-crud and next in changesets (#54)
fix changeset release to avoid bump package to 1.x when peer dependen…
theoephraim commentedon Apr 17, 2026
OK so there is a larger problem around these bumps in general BUT today I learned that in semver v0 has different treatment.
The
^operator on any v0 version has the same behaviour as~concretely:
^0.2.3=>=0.2.3 || <0.3<- WTF^1.2.3=>=1.2.3 || <2<- what I think most people expectSo a minor version bump on a 0.x package will (unexpectedly) trigger a bump on dependency that is using
^