-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add --strict-peer-deps
option
#1819
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
Conversation
This is the CLI portion of npm/arborist#136
Continuing the clarification from the linked issue - by default, will |
Yes. If you For example:
If you This is a very common situation. So far, every real-world For
then it will report that the link from |
That seems very unfortunate. One of the best changes in npm 7 was that I'd no longer need to run |
@ljharb One way to get what you're looking for is to add I think there's a strong case to be made to make that the default in npm v8, especially if the more useful warnings help drive people towards correcting these issues. But the feedback we've been getting is that it's too disruptive right now, and this provides an on-ramp to having that functionality there in the first place. Another approach which we could consider, but I don't love, is to let the install proceed and do its thing, but still exit with a non-zero status. The hazard there is that it's going to be just as breaking for anyone running installs in CI, and it's a bit weird to exit with an error code if we successfully did exactly what the user asked for. |
I don't think it's weird. When Can you elaborate on this feedback you've been getting? Is there a public issue where this feedback has been collected? I'd love to understand if the disruption is fixable by fixing invalid peer dep ranges, or if it's a harder problem than that to solve - if the former, I think any disruption is worth it to incentivize properly specifying peer deps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seeing as how all this change does is allow passing the option to arborist, 👍 from me
This is the CLI portion of npm/arborist#136 PR-URL: #1819 Credit: @isaacs Close: #1819 Reviewed-by: @ruyadorno
CI should fail if there are conflicting peerDependencies. See npm/cli#1819 (comment) Signed-off-by: Kevin Locke <[email protected]>
This is the CLI portion of npm/arborist#136