Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js')
-rw-r--r--node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js b/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js
index c1b64a461..3c1cbd44a 100644
--- a/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js
+++ b/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js
@@ -1,5 +1,7 @@
// add and remove dependency specs to/from pkg manifest
+const localeCompare = require('@isaacs/string-locale-compare')('en')
+
const add = ({pkg, add, saveBundle, saveType, log}) => {
for (const spec of add) {
addSingle({pkg, spec, saveBundle, saveType, log})
@@ -79,7 +81,7 @@ const addSingle = ({pkg, spec, saveBundle, saveType, log}) => {
// keep it sorted, keep it unique
const bd = new Set(pkg.bundleDependencies || [])
bd.add(spec.name)
- pkg.bundleDependencies = [...bd].sort((a, b) => a.localeCompare(b, 'en'))
+ pkg.bundleDependencies = [...bd].sort(localeCompare)
}
}