This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 PR-URL: #145 Credit: @isaacs Close: #145 Reviewed-by: @isaacs
- Loading branch information
Showing
3 changed files
with
16 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27051,7 +27051,7 @@ Object { | |
"dependencies": Object { | ||
"a": "github:foo/bar#baz", | ||
"b": "^1.2.3", | ||
"d": "npm:c@^1.2.3", | ||
"d": "npm:c@1.x <1.9.9", | ||
}, | ||
"devDependencies": Object { | ||
"c": "git+ssh://[email protected]:a/b/c.git#master", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -814,7 +814,7 @@ t.test('saving the ideal tree', t => { | |
dependencies: { | ||
a: 'git+ssh://[email protected]:foo/bar#baz', | ||
b: '', | ||
d: 'd@npm:[email protected]', | ||
d: 'd@npm:[email protected] <1.9.9', | ||
}, | ||
devDependencies: { | ||
c: `git+ssh://[email protected]:a/b/c.git#master`, | ||
|
@@ -868,7 +868,7 @@ t.test('saving the ideal tree', t => { | |
a[kResolvedAdd] = [ | ||
npa('a@git+ssh://[email protected]:foo/bar#baz'), | ||
npa('b'), | ||
npa('d@npm:[email protected]'), | ||
npa('d@npm:[email protected] <1.9.9'), | ||
npa(`c@git+ssh://[email protected]:a/b/c.git#master`), | ||
] | ||
return a[kSaveIdealTree]({ | ||
|
@@ -881,7 +881,7 @@ t.test('saving the ideal tree', t => { | |
dependencies: { | ||
a: 'github:foo/bar#baz', | ||
b: '^1.2.3', | ||
d: 'npm:c@^1.2.3', | ||
d: 'npm:c@1.x <1.9.9', | ||
}, | ||
devDependencies: { | ||
c: 'git+ssh://[email protected]:a/b/c.git#master', | ||
|