changesets / changesets

🦋 A way to manage your versioning and changelogs with a focus on monorepos
MIT License
8.36k stars 507 forks source link

peerDependency range changing unnecessarily #1359

Open DominicGBauer opened 1 month ago

DominicGBauer commented 1 month ago

Affected Packages

@changesets/cli

Problem

When updating dependent package range is changed unexpectedly

So for example, I have:

  "peerDependencies": {
    "@package/common": "workspace:>= 1.7.0 < 2"
  },

But it get's changed to

  "peerDependencies": {
    "@package/common": "workspace:>=1.9.0"
  },

When @package/common is updated.

How do I stop this from happening since I still want the dependency range to stay the way it was?

kaisermann commented 3 weeks ago

I'm not sure if it's for the same reason, but I have a similar issue happening with a local devDependency. It seems that this line in the apply-release-plan. For example, it returns false when checking if a version such as 4.3.2 satisfies a range like workspace:^4.0.0, when it should be actually true.

edit: moved this to https://github.com/changesets/changesets/issues/1377