-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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: [email protected] incorrectly peer-depends on react@^16.0.0 #20063
Comments
Yeah there was some awkwardness here because |
|
No, it definitely uses it: https://unpkg.com/browse/[email protected]/shallow.js You mean to look at 16.14, not 16.4? |
Oh, my bad, I was looking in the (And yeah, "16.4" was a typo; I meant "16.14". See the output of |
enzymejs/react-shallow-renderer#93 will usually work but it will break backwards compatibility in certain situations. Specifically, it's possible to end up with a deps tree that npm considers valid but that will break at runtime, e.g.:
This produces the following tree, with conflicting versions of
In general, this will happen any time that a version of Maybe you consider this too unlikely to warrant fixing? |
Why do you think this would break at runtime? That module is stateless. |
Should be fixed. |
Thanks; sorry for the assertive framing without context. I looked more closely at react-test-renderer and I see that it only ever uses (The problem I was imagining is if it were using something like |
React version:
[email protected]
Steps To Reproduce
npm view [email protected] dependencies
.react-shallow-renderer@^16.13.1
.npm view [email protected] peerDependencies
.react@^16.0.0
.Alternatively, in an empty project:
npm install react@17 react-test-renderer@17
.The current behavior
It doesn't make sense for
react-test-renderer@17
to transitively peer-depend onreact@16
. I assume this was an oversight in the release.The expected behavior
One should be able to install
react@17
andreact-test-renderer@17
and have the peer dependencies line up.The text was updated successfully, but these errors were encountered: