diff options
author | Gar <gar+gh@danger.computer> | 2021-09-28 20:05:08 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-09-28 20:05:08 +0300 |
commit | e94ddeaca1e75ecc8f54ebcb3df222965e3635d1 (patch) | |
tree | b2ec351450e8392bebd0410fe6367101a1e1b4b2 /node_modules/@npmcli/arborist/lib/shrinkwrap.js | |
parent | 075fe50565ae5c66df727cdd7df9dd5ed8cd4015 (diff) |
deps: @npmcli/arborist@2.9.0
* fix: avoid infinite loops in peer dep replacements
* fix: use Intl.Collator for string sorting when available
* feat(vuln): expose isDirect
Diffstat (limited to 'node_modules/@npmcli/arborist/lib/shrinkwrap.js')
-rw-r--r-- | node_modules/@npmcli/arborist/lib/shrinkwrap.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/node_modules/@npmcli/arborist/lib/shrinkwrap.js b/node_modules/@npmcli/arborist/lib/shrinkwrap.js index 6e7e0e31f..ed2813024 100644 --- a/node_modules/@npmcli/arborist/lib/shrinkwrap.js +++ b/node_modules/@npmcli/arborist/lib/shrinkwrap.js @@ -9,6 +9,7 @@ // We cannot bump to v3 until npm v6 is out of common usage, and // definitely not before npm v8. +const localeCompare = require('@isaacs/string-locale-compare')('en') const lockfileVersion = 2 // for comparing nodes to yarn.lock entries @@ -911,7 +912,7 @@ class Shrinkwrap { /* istanbul ignore next - sort calling order is indeterminate */ return aloc.length > bloc.length ? 1 : bloc.length > aloc.length ? -1 - : aloc[aloc.length - 1].localeCompare(bloc[bloc.length - 1], 'en') + : localeCompare(aloc[aloc.length - 1], bloc[bloc.length - 1]) })[0] const res = consistentResolve(node.resolved, this.path, this.path, true) |