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

adding ability to use package.json version in comparison #324

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mansona
Copy link
Contributor

@mansona mansona commented Jan 7, 2019

This adds the functionality to allow you to update packages not based on what is currently installed in node_modules, but instead based on what is currently defined in the package.json.

Scenario:

I have just cloned a project that has "@myorg/common-dep": "^1.0.4" defined in the package.json. The latest version of @myorg/common-dep that has been published is v1.23.4 and because we are using ^ in the package.json npm will install v1.23.4 for me (which is what I expect).

Now if I run npm-check -y nothing will happen. This is because my installed version (in node_modules) is currently the same version as the latest. This is potentially unexpected behaviour but it is a perfectly reasonable architectural decision to make 👍

This PR caters for the case where someone might want to update the package.json to the latest even though they might have the latest version installed locally. One reason for that is potentially v1.23.3 has a security bug in it and they want to make sure that anyone who has the project checked out locally updates their package ASAP and make sure that it is explicit in the package.json and not just something that the package-lock.json or yarn.lock files communicated 👍

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

Successfully merging this pull request may close these issues.

1 participant