-
Notifications
You must be signed in to change notification settings - Fork 49.9k
Closed
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug
Description
React version: use-subscription@1.5.0
Steps To Reproduce
- Run
npm install react@16.14.0 use-subscription@1.4.1. - Run
npm install use-subscription@1.5.0. Note the React peer dependency error.
Notably, this currently affects npm install react@16 next@10 (see vercel/next.js#18518). npm@7 will refuse to perform this installation entirely.
The current behavior
use-subscription@1.4.1 peer-depends on react@^16.8.0 whereas use-subscription@1.5.0 peer-depends on react@^17.0.0, which is generally considered a breaking change in a minor version. This might have been an oversight in how #20062 interacted with #19373?
(It's considered a breaking change because a package.json like the below should always result in a valid install.)
{
"dependencies": {
"react": "^16.14.0",
"use-subscription": "^1.4.1"
}
}The expected behavior
Here are two potential solutions:
- Cut a release of
use-subscription@1.5.1that peer-depends on^16.8.0 || ^17.0.0, strictly widening the peer dep range from that of 1.4.1. - Cut a major release of
use-subscription@2that peer-depends on^17.0.0, and cut a release ofuse-subscription@1.5.1that reverts its peer dependency to^16.8.0.
jaydenseric
Metadata
Metadata
Assignees
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug