-
Notifications
You must be signed in to change notification settings - Fork 47k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Peer dependency change between use-subscription 1.4.1 and 1.5.0 #20224
Comments
Happy to take a PR that fixes this by making the range more permissible. I think we need a bump after that to increase the major and simply keep If you send a PR like this, please check if any of the other React packages had a similar problem with 17. |
Sure, I'll send a PR. I noticed a few similar cases in #19373 but they all seemed to be for "internal"/"experimental" packages:
Do you care about fixing any of these since they (AFAIK) don't really have public consumers? |
(Retitling per your comment vercel/next.js#18518 (comment) and my reply vercel/next.js#18518 (comment). Sorry about that.) |
|
React version:
use-subscription@1.5.0
Steps To Reproduce
npm install react@16.14.0 use-subscription@1.4.1
.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 onreact@^16.8.0
whereasuse-subscription@1.5.0
peer-depends onreact@^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.)
The expected behavior
Here are two potential solutions:
use-subscription@1.5.1
that peer-depends on^16.8.0 || ^17.0.0
, strictly widening the peer dep range from that of 1.4.1.use-subscription@2
that peer-depends on^17.0.0
, and cut a release ofuse-subscription@1.5.1
that reverts its peer dependency to^16.8.0
.The text was updated successfully, but these errors were encountered: