question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexpected peerdependent bump to 1.0.0 in pre mode

See original GitHub issue

Problem

I have a branch in pre mode, and I don’t understand why Changesets is planning on bumping this peerdependent to 1.0.0, even if the dependency’s new version perfectly satisfies the specified range (0.11 is >= 0.9, right?)

image

I would have expected the specified peer dependency range to remain intact, and the dependent’s version not to be bumped to 1.0.0.

To clarify, bumping the peer dependency range would be acceptable (even if I did not expect it), but the bump to 1.0.0 is not.

My config.json:

{
  "$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json",
  "changelog": "@changesets/cli/changelog",
  "commit": false,
  "fixed": [],
  "linked": [],
  "access": "public",
  "baseBranch": "main",
  "updateInternalDependencies": "minor",
  "ignore": [],
  "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
    "onlyUpdatePeerDependentsWhenOutOfRange": true
  }
}

Version of changesets in use is 2.24.4.

Link to PR and repository: https://github.com/hmans/miniplex/pull/126/files

Thanks!

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
alvarosabucommented, Nov 14, 2022

I’m having the same issue, pkgB has pkgA as peerDependency.

PkgB is bumped to 1.0.0 instead of next minor version.

PkgA is bumped to next minor correctly.

2reactions
Andaristcommented, Oct 6, 2022

One additional idea is that perhaps for the >= range we could “upgrade” it to smth like “>=0.9.0 || >=0.11.0-0.next.0”:

require('semver').satisfies('0.11.0-next.0', '>=0.9.0 || >=0.11.0-next.0') // true

Then we could even “bring back” the original range when exiting the premode.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Version bumped because of peerDependencies even if the ...
Currently we bump the major version of a package if it has a peerDependency on another package even if the version range still...
Read more >
Changelog | skuba - GitHub Pages
template/lambda-sqs-worker*: Bump Node.js version to 18 (#1049). This release contains some breaking changes to the Lambda runtime such as the removal of ...
Read more >
JupyterLab Changelog — JupyterLab 3.6.0b0 documentation
The Simple Interface mode (previously Single Document Mode) is now more streamlined. JupyterLab now supports showing the current file in use in the...
Read more >
Npm Including all range of pre-release when defining peer ...
The need is basically ^1.0.0 with everything including pre-releases that happens to have 1 as major as peer dependency.
Read more >
npm-update
So the highest-sorting version that satisfies ~1.1.1 is used, which is 1.1.2 . Caret Dependencies below 1.0.0. Suppose app ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found