-
Notifications
You must be signed in to change notification settings - Fork 325
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
update peer dependencies on upgrade and retry #874
Conversation
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.
Thanks for the additional contribution and excellent explanation! Makes perfect sense. I'd love to add your description to a markdown file that documents for users how the --peer
feature works.
I just have a few requests for some simplifications and conforming to a more functional programming paradigm. Thanks and let me know if you have any questions!
Thank you! Published in |
@raineorshine : Are you interested in a functionality for Example 1:
Example 2:
Background: I've made a PR for I could move that code from |
Looks nice!
|
Yes.
Oh, sorry. The section "Ignored updates" is a special thing of |
Yes, I like it! |
This is a follow-up of #869 and improves the situation, where updated packages have different peer dependencies. Here is an example:
The package
ncu-test-peer-update
is published with two versions:1.0.0
has peer dependency"ncu-test-return-version": "1.0.x"
1.1.0
has peer dependency"ncu-test-return-version": "1.1.x"
Our test app has the following dependencies:
Before (i.e. with
ncu
version 11.5.1)A call of
ncu --peer
will propose the following updates:There is not update suggestion for
ncu-test-return-version
to1.1.0
, since the installed version ofncu-test-peer-update
requires version1.0.x
. This means, I would have to runnpm install
afterwards and then againncu --peer
to get all updates.After (i.e. with this PR)
Now,
ncu
will get the new peer dependencies from the registry and check again for updates. I.e., the resulting update suggestion will contain all compatible updates.Without
--peer
optionJust as comparison: without using the
--peer
option,ncu
will suggest incompatible updates in both cases (with and without this PR):