diff options
author | FallenRiteMonk <fallenritemonk@gmail.com> | 2018-04-05 11:52:34 -0400 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-04-05 16:01:07 -0400 |
commit | 25a816dcda7b1db0929501acfe13f2fe5119759b (patch) | |
tree | d3df4377a11dfb643b5976d2048d9bb4ee527903 /deps/npm/node_modules/libnpx/parse-args.js | |
parent | b29c36b80746733994257b7380245102bc3c4cd6 (diff) | |
download | node-new-25a816dcda7b1db0929501acfe13f2fe5119759b.tar.gz |
deps: upgrade npm to 5.8.0
PR-URL: https://github.com/nodejs/node/pull/19560
Fixes: https://github.com/nodejs/node/issues/19271
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/npm/node_modules/libnpx/parse-args.js')
-rw-r--r-- | deps/npm/node_modules/libnpx/parse-args.js | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/deps/npm/node_modules/libnpx/parse-args.js b/deps/npm/node_modules/libnpx/parse-args.js index 240fdd463f..3f50660550 100644 --- a/deps/npm/node_modules/libnpx/parse-args.js +++ b/deps/npm/node_modules/libnpx/parse-args.js @@ -47,8 +47,8 @@ function parseArgs (argv, defaultNpm) { const parsed = parser.parse(argv.slice(0, cmdIndex)) const parsedCmd = npa(argv[cmdIndex]) parsed.command = parsed.package && parsedCmd.type !== 'directory' - ? argv[cmdIndex] - : guessCmdName(parsedCmd) + ? argv[cmdIndex] + : guessCmdName(parsedCmd) parsed.isLocal = parsedCmd.type === 'directory' parsed.cmdOpts = argv.slice(cmdIndex + 1) if (typeof parsed.package === 'string') { @@ -56,8 +56,8 @@ function parseArgs (argv, defaultNpm) { } parsed.packageRequested = !!parsed.package parsed.cmdHadVersion = parsed.package || parsedCmd.type === 'directory' - ? false - : parsedCmd.name !== parsedCmd.raw + ? false + : parsedCmd.name !== parsedCmd.raw const pkg = parsed.package || [argv[cmdIndex]] parsed.p = parsed.package = pkg.map(p => npa(p).toString()) return parsed @@ -80,13 +80,13 @@ function parseArgs (argv, defaultNpm) { const splitCmd = parsed._.slice(2) const parsedCmd = npa(splitCmd[0]) parsed.command = parsed.package - ? splitCmd[0] - : guessCmdName(parsedCmd) + ? splitCmd[0] + : guessCmdName(parsedCmd) parsed.cmdOpts = splitCmd.slice(1) parsed.packageRequested = !!parsed.package parsed.cmdHadVersion = parsed.package - ? false - : parsedCmd.name !== parsedCmd.raw + ? false + : parsedCmd.name !== parsedCmd.raw const pkg = parsed.package || [splitCmd[0]] parsed.p = parsed.package = pkg.map(p => npa(p).toString()) } @@ -169,65 +169,65 @@ function yargsParser (argv, defaultNpm) { ` return require('yargs') - .usage(Y()`Execute binaries from npm packages.\n${usage}`) - .option('package', { - alias: 'p', - type: 'string', - describe: Y()`Package to be installed.` - }) - .option('cache', { - type: 'string', - describe: Y()`Location of the npm cache.` - }) - .option('no-install', { - type: 'boolean', - describe: Y()`Skip installation if a package is missing.` - }) - .option('userconfig', { - type: 'string', - describe: Y()`Path to user npmrc.` - }) - .option('call', { - alias: 'c', - type: 'string', - describe: Y()`Execute string as if inside \`npm run-script\`.` - }) - .option('shell', { - alias: 's', - type: 'string', - describe: Y()`Shell to execute the command with, if any.`, - default: false - }) - .option('shell-auto-fallback', { - choices: ['', 'bash', 'fish', 'zsh'], - describe: Y()`Generate shell code to use npx as the "command not found" fallback.`, - requireArg: false, - type: 'string' - }) - .option('ignore-existing', { - describe: Y()`Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.`, - type: 'boolean' - }) - .option('quiet', { - alias: 'q', - describe: Y()`Suppress output from npx itself. Subcommands will not be affected.`, - type: 'boolean' - }) - .option('npm', { - describe: Y()`npm binary to use for internal operations.`, - type: 'string', - default: defaultNpm || 'npm' - }) - .option('node-arg', { - alias: 'n', - type: 'string', - describe: Y()`Extra node argument when calling a node binary.` - }) - .version(() => require('./package.json').version) - .alias('version', 'v') - .help() - .alias('help', 'h') - .epilogue(Y()`For the full documentation, see the manual page for npx(1).`) + .usage(Y()`Execute binaries from npm packages.\n${usage}`) + .option('package', { + alias: 'p', + type: 'string', + describe: Y()`Package to be installed.` + }) + .option('cache', { + type: 'string', + describe: Y()`Location of the npm cache.` + }) + .option('no-install', { + type: 'boolean', + describe: Y()`Skip installation if a package is missing.` + }) + .option('userconfig', { + type: 'string', + describe: Y()`Path to user npmrc.` + }) + .option('call', { + alias: 'c', + type: 'string', + describe: Y()`Execute string as if inside \`npm run-script\`.` + }) + .option('shell', { + alias: 's', + type: 'string', + describe: Y()`Shell to execute the command with, if any.`, + default: false + }) + .option('shell-auto-fallback', { + choices: ['', 'bash', 'fish', 'zsh'], + describe: Y()`Generate shell code to use npx as the "command not found" fallback.`, + requireArg: false, + type: 'string' + }) + .option('ignore-existing', { + describe: Y()`Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.`, + type: 'boolean' + }) + .option('quiet', { + alias: 'q', + describe: Y()`Suppress output from npx itself. Subcommands will not be affected.`, + type: 'boolean' + }) + .option('npm', { + describe: Y()`npm binary to use for internal operations.`, + type: 'string', + default: defaultNpm || 'npm' + }) + .option('node-arg', { + alias: 'n', + type: 'string', + describe: Y()`Extra node argument when calling a node binary.` + }) + .version() + .alias('version', 'v') + .help() + .alias('help', 'h') + .epilogue(Y()`For the full documentation, see the manual page for npx(1).`) } var _y |