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

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

@isaacs

Description

@isaacs

re: npm/cli#193

If the user provides an install range, and savePrefix + resolvedVersion is not a subset of that supplied version range, then we should save the supplied version range rather than using the savePrefix.

For example:

npm i foo@'1.x <1.2'
# resolves to [email protected], should save as '1.x <1.2' rather than '^1.1.2', because not a subset

npm i foo@'>1.0.0'
# resolves to [email protected], should save as '^1.1.2', because that's a subset of supplied range

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixing

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions