Skip to content
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

Is there an option to upgrade to the latest minor version of the current dependency? #159

Closed
jduprey opened this issue Oct 28, 2015 · 4 comments
Labels

Comments

@jduprey
Copy link

jduprey commented Oct 28, 2015

If my package.json has a dependency, depAbc, with version 4.0.1. NCU would upgrade to the latest version < 5.0.0. I realize this is the same as specifying ^4.0.1. So maybe ncu -u would change the package.json to be:

depAbc: ^4.7.5
@raineorshine
Copy link
Owner

If you have a dependency "depAbc": "4.0.1", ncu will upgrade to the latest version (even if > 5.0.0). ncu will always upgrade to the latest (or --greatest) version. If you are not wanting to force versions to the latest, it is generally assumed that you are wanting to stay within your version constraints, and should just use npm update to get the latest version within the specified constraint. Does that answer your question?

@jduprey
Copy link
Author

jduprey commented Oct 29, 2015

Yes. That makes sense. Thank you.

@medikoo
Copy link

medikoo commented Sep 11, 2019

npm update doesn't address it really.

npm update updates package.json only if (1) given package is installed in node_modules and (2) is installed at version lower than latest as supported by range.

In many cases it'll be already installed in node_modules at latest supported, that won't force an update to package.json. Clearing node_modules also doesn't help as then (1) is not satisfied

@testerez
Copy link

Old issue but ncu -u -t minor does that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants