-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When updating dependencies we need an extra check when filtering nodes to be updated that ensures we do not override semver ranges that are pointing to an exact version. e.g: =1.0.0, 1.0.0 Fixes: #4329
- Loading branch information
Showing
6 changed files
with
145 additions
and
0 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
54 changes: 54 additions & 0 deletions
54
workspaces/arborist/test/fixtures/reify-cases/update-exact-version.js
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// generated from test/fixtures/update-exact-version | ||
module.exports = t => { | ||
const path = t.testdir({ | ||
"node_modules": { | ||
"abbrev": { | ||
"package.json": JSON.stringify({ | ||
"name": "abbrev", | ||
"version": "1.0.4", | ||
"description": "Like ruby's abbrev module, but in js", | ||
"author": "Isaac Z. Schlueter <i@izs.me>", | ||
"main": "./lib/abbrev.js", | ||
"scripts": { | ||
"test": "node lib/abbrev.js" | ||
}, | ||
"repository": "http://github.com/isaacs/abbrev-js", | ||
"license": { | ||
"type": "MIT", | ||
"url": "https://github.com/isaacs/abbrev-js/raw/master/LICENSE" | ||
} | ||
}) | ||
} | ||
}, | ||
"package-lock.json": JSON.stringify({ | ||
"name": "update-exact-version", | ||
"lockfileVersion": 2, | ||
"requires": true, | ||
"packages": { | ||
"": { | ||
"dependencies": { | ||
"abbrev": "1.0.4" | ||
} | ||
}, | ||
"node_modules/abbrev": { | ||
"version": "1.0.4", | ||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.4.tgz", | ||
"integrity": "sha1-vVWuXkE7oXIu5Mq6H26hBBSlns0=" | ||
} | ||
}, | ||
"dependencies": { | ||
"abbrev": { | ||
"version": "1.0.4", | ||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.4.tgz", | ||
"integrity": "sha1-vVWuXkE7oXIu5Mq6H26hBBSlns0=" | ||
} | ||
} | ||
}), | ||
"package.json": JSON.stringify({ | ||
"dependencies": { | ||
"abbrev": "1.0.4" | ||
} | ||
}) | ||
}) | ||
return path | ||
} |
15 changes: 15 additions & 0 deletions
15
workspaces/arborist/test/fixtures/update-exact-version/node_modules/abbrev/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
workspaces/arborist/test/fixtures/update-exact-version/package-lock.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
workspaces/arborist/test/fixtures/update-exact-version/package.json
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"abbrev": "1.0.4" | ||
} | ||
} |