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

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/utils/cmd-list.js')
-rw-r--r--deps/npm/lib/utils/cmd-list.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/deps/npm/lib/utils/cmd-list.js b/deps/npm/lib/utils/cmd-list.js
index 38439542a21..a1f5ece66be 100644
--- a/deps/npm/lib/utils/cmd-list.js
+++ b/deps/npm/lib/utils/cmd-list.js
@@ -1,4 +1,5 @@
const abbrev = require('abbrev')
+const localeCompare = require('@isaacs/string-locale-compare')('en')
// plumbing should not have any aliases
const aliases = {
@@ -69,8 +70,7 @@ const aliases = {
}
// these are filenames in .
-// Keep these sorted so that lib/utils/npm-usage.js outputs in order
-const cmdList = [
+const commands = [
'access',
'adduser',
'audit',
@@ -141,11 +141,13 @@ const cmdList = [
]
const plumbing = ['birthday', 'help-search']
-const abbrevs = abbrev(cmdList.concat(Object.keys(aliases)))
+const allCommands = [...commands, ...plumbing].sort(localeCompare)
+const abbrevs = abbrev(commands.concat(Object.keys(aliases)))
module.exports = {
abbrevs,
aliases,
- cmdList,
+ commands,
plumbing,
+ allCommands,
}