changesets: Unexpected major version bumps on one package
Problem
Changesets has repeatedly bumped one of my packages’ major version when it only receives patch or minor changes. Sometimes I’m paying attention in the PR and catch it, but at least 3 times it’s gotten past me, so it’s now 3 major versions ahead of other packages in the project.
An example PR (@lo-fi/react
is bumped from 3.0.0 to 4.0.0 despite only having patch changes): https://github.com/a-type/lo-fi/pull/59
I’m not sure if this is intended behavior, but it’s not desired. I’d prefer to have all my packages be in the same version range without having to manually edit changeset PRs.
I’m assuming the source of this behavior is in the main project and not the Github Action, but I could be wrong.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 30
- Comments: 19
Commits related to this issue
- Add a new bump strategy for peers bump, resolve #1011, #960, #822 — committed to thynson/changesets by deleted user a year ago
- Add a new bump strategy for peers bump, resolve #1011, #960, #822 — committed to thynson/changesets by deleted user a year ago
- build: fix peerDependencies versioning oddity from changesets https://github.com/changesets/changesets/issues/1011 — committed to cactuslab/capacitor-native-navigation by karlvr a year ago
- chore(changeset): revert an unwanted major version that has been forcefully updated https://github.com/changesets/changesets/issues/1011 — committed to channel-io/bezier-react by sungik-choi a year ago
- chore(changeset): revert an unwanted major version that has been forcefully updated https://github.com/changesets/changesets/issues/1011 — committed to channel-io/bezier-react by sungik-choi a year ago
- chore(changeset): revert an unwanted major version that has been forcefully updated https://github.com/changesets/changesets/issues/1011 — committed to channel-io/bezier-react by sungik-choi a year ago
- chore(changeset): revert an unwanted major version that has been forcefully updated https://github.com/changesets/changesets/issues/1011 — committed to channel-io/bezier-react by sungik-choi a year ago
- ci(changesets): version packages (#1427) * ci(changesets): version packages * chore(changeset): revert an unwanted major version that has been forcefully updated https://github.com/changesets/c... — committed to channel-io/bezier-react by github-actions[bot] a year ago
- Add a new bump strategy for peers bump, resolve #1011, #960, #822 — committed to thynson/changesets by deleted user a year ago
- Add a new bump strategy for peers bump, resolve #1011, #960, #822 — committed to thynson/changesets by deleted user a year ago
- workaround for https://github.com/changesets/changesets/issues/1011 — committed to aws-amplify/amplify-backend by edwardfoyle 9 months ago
- Version Packages (#6907) This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages w... — committed to highlight/highlight by github-actions[bot] 8 months ago
- Version Packages (#6907) This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages w... — committed to lewisl9029/highlight by github-actions[bot] 8 months ago
- chore: fix for https://github.com/changesets/changesets/issues/1011 — committed to kubb-labs/kubb by stijnvanhulle 6 months ago
- Add a new bump strategy for peers bump, resolve #1011, #960, #822 — committed to thynson/changesets by deleted user a year ago
- build: move @fronntui packages to devDependencies due to changeset issue https://github.com/changesets/changesets/issues/1011 — committed to inniti/fronnt-ui by alexanderkraus 5 months ago
- chore: remove docs peer dependencies A weird workflow (https://github.com/changesets/changesets/issues/1011) in changesets causes packages depending on others in the monorepo through peer dependencie... — committed to swisspost/design-system by gfellerph 3 months ago
I think we need a config options to control this behavior, just leave the decision to the end user.
This is also important to us because we wanted to use peer dependencies between monorepo packages but everything gets major bumped all the time
Hey everyone, just sponsored the changeset organization with $400 for the great work they’re doing! … And also with the hope of allocating some resources to get this annoying issue resolved. 😊 cc @emmatown @Andarist
Seems like it’s more the package manager’s job to warn you if a peer dependency has moved out of range. I use pnpm and it’s very aggressive about this already.
For context I have a core package,
@lo-fi/web
, and an associated React hooks package,@lo-fi/react
, which lists@lo-fi/web
as peer dependency - because it requires web to function, but isn’t very opinionated about exact versions and I don’t want it to have a separate copy of the library, it absolutely has to be the same one used directly the code. I could be mistaken, but I believe that’s the point ofpeerDependencies
.What’s annoying is that now if I update certain things in certain ways, my React package is major bumped, so its version is now wildly out of step with the rest of the package ecosystem it’s a part of.
Might be a good behavior to make optional.
We’ve also run into this issue after implementing changesets (which we love!) but this behaviour seems counter-intuitive and is a point of frustration. Exactly the same situation as @a-type described. We have a design system monorepo with linked dependencies. The core package is a peer dep on the React package, and a minor bump to the core package is causing changesets to apply a major bump to both.
Bumping to a major version feels like it is sending the wrong message and not honouring semver. We haven’t hit v1 yet so don’t want to major bump a feature addition, we want to do a minor bump but currently will have to stick to patch or rework our setup to use fixed versions instead of linked, which would be a shame.
It’s not at all obvious that this would happen just because of peerDependencies, and seems a bit buried in the docs. I’d be massively in favour of this behaviour being made optional via the changesets config. Please? 🙏🏻 😄
Hi, is there any update on this? My packages now even have a higher version than Angular 🥹
It can be opt out if #1132 got merged.
Regular old npm has also become much stricter about this over the last year or so, following a lot of the leads that pnpm started. I would definitely also like to see this behaviour at least be optional as it’s breaking things for us too. We effectively can’t do minor releases to our monorepo using
fixed
to keep all the versions in sync because any minor update cause a peer dependency to change, which triggers a major update and then the whole monorepo gets dragged up to a major version bump as well.someone did solve it? Fome me I’m going to edit .changest/random-file changeing major with what i want each time
Hi any plans to release this soon?
I have also run int this issue and i found that it occurs only when one of
peerDependencies
has a minor version change. When I delete the dependency frompeerDependencies
, it’s ok.I have found the docs here.