Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When I type
npm install package@specifier
, a normalizedspecifier
is what should be saved topackage.json
, no more, no less.Motivation
Currently, if i type
npm install --save-dev eslint@=8.8.0 other
, it installs v8.8.0, but saves^8.8.0
topackage.json
(with the defaultsave-prefix
of^
). (note: i'm intentionally not using--save-exact
here, because i wantother
to install using the defaultsave-prefix
).When no
@version
is provided, or when a dist-tag is provided, it makes perfect sense to resolve that to a version, and save it withsave-prefix
. However, when I've provided a version range -=1.2.3
,~1.2.3
,>= 1.2
- I know what I want, I’ve explicitly told npm I want it, and npm should obey my wishes not just in the reification innode_modules
(which I believe it does), but also in what it saves topackage.json
.