-
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
Do not upgrade a package if its peer dependencies are not currently met #1418
Comments
Hi, thanks for reporting. I can confirm that this is a bug in https://github.com/raineorshine/npm-check-updates/blob/main/src/lib/upgradePackageDefinitions.ts. It seems that when Unfortunately I'm not super familiar with this feature, since I wasn't the original implementator. It's tricky because when any dependency is upgraded, the peerDependencies need to be checked again. I'm wondering if we should be upgrading dependencies one at a time and checking peerDependencies immediately after, rather than trying to upgrade them all and then iterating until peerDependencies do not change. The next step would be to create a breaking unit test for this test case. Then we can attempt a solution. I don't have the bandwidth for this at the moment, but hopefully someone with some free time can take a stab at it. |
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
… are not currently met raineorshine#1418
Steps to Reproduce
.ncurc.js:
Dependencies:
Current Behavior
If you have the dependencies above, and you set
-pre
eslint
package will not get upgraded to v9 because:But
eslint-plugin-unused-imports
will be upgraded to 4.0.0.Version 4.0.0 has
eslint
set in its peer dependencies as 9. This renders the generated package.json file unusable.Expected Behavior
I would expect that with the
pre
flag set, if an upgraded package has unmet peer deps, it will not get upgradedThe text was updated successfully, but these errors were encountered: