Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

Conversation

isaacs
Copy link
Contributor

@isaacs isaacs commented Sep 28, 2020

based on #144, land that first.

Save provided range if not a subset of savePrefix

If a user installs [email protected] <1.2.3, and we resolve to 1.2.2, then we
should not save it as ^1.2.2, since that would allow versions outside
of the requested range.

Explicit versions and tags are still saved using the savePrefix, since
those are not ranges, and users can set --save-exact if they wish it
to be saved exactly.

Fix: #127
Fix: npm/cli#193
Fix: https://npm.community/t/7005

If a user installs `[email protected] <1.2.3`, and we resolve to `1.2.2`, then we
should not save it as `^1.2.2`, since that would allow versions outside
of the requested range.

Explicit versions and tags are still saved using the savePrefix, since
those are not ranges, and users can set `--save-exact` if they wish it
to be saved exactly.

Fix: #127
Fix: npm/cli#193
Fix: https://npm.community/t/7005
@isaacs isaacs force-pushed the isaacs/save-prefix-subset-check branch from 2e03d95 to 6aa0c2c Compare September 28, 2020 21:19
@isaacs isaacs closed this in 4b8f620 Sep 29, 2020
@wraithgar wraithgar deleted the isaacs/save-prefix-subset-check branch April 22, 2021 17:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] only use savePrefix+version if that's a subset of the supplied version range

2 participants