Skip to content

What is the rationale for putting save-exact into .npmrc? #3244

Answered by beerose
vincentrolfs asked this question in Q&A
Discussion options

You must be logged in to vote

This is a PR that introduced it: #500

Even with yarn.lock/package.lock etc you still may need it as save-exact=true makes sure that no sliding versions (with ~ or ^ ) will not be installed.

Example:

  • you have "some-package": "^1.2.3" in your package.json
  • you have the same version in a lock file
  • then you deleted node_modules and want to install dependencies again
  • and in the meantime there's a new minor version of some-package, e.g. 1.8.0
  • package manager will install 1.8.0 if you don't have save-exact=true.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by beerose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants