diff --git a/deps/npm/bin/npx-cli.js b/deps/npm/bin/npx-cli.js index 7a3fb39837d276..cb05e1cb706c6e 100755 --- a/deps/npm/bin/npx-cli.js +++ b/deps/npm/bin/npx-cli.js @@ -26,7 +26,7 @@ const removed = new Set([ const { definitions, shorthands } = require('../lib/utils/config/index.js') const npmSwitches = Object.entries(definitions) - .filter(([key, {type}]) => type === Boolean || + .filter(([key, { type }]) => type === Boolean || (Array.isArray(type) && type.includes(Boolean))) .map(([key]) => key) @@ -65,9 +65,9 @@ let i let sawRemovedFlags = false for (i = 3; i < process.argv.length; i++) { const arg = process.argv[i] - if (arg === '--') + if (arg === '--') { break - else if (/^-/.test(arg)) { + } else if (/^-/.test(arg)) { const [key, ...v] = arg.replace(/^-+/, '').split('=') switch (key) { @@ -87,8 +87,9 @@ for (i = 3; i < process.argv.length; i++) { // resolve shorthands and run again if (shorthands[key] && !removed.has(key)) { const a = [...shorthands[key]] - if (v.length) + if (v.length) { a.push(v.join('=')) + } process.argv.splice(i, 1, ...a) i-- continue @@ -109,8 +110,9 @@ for (i = 3; i < process.argv.length; i++) { if (removed.has(key)) { // also remove the value for the cut key. process.argv.splice(i + 1, 1) - } else + } else { i++ + } } } else { // found a positional arg, put -- in front of it, and we're done @@ -119,7 +121,8 @@ for (i = 3; i < process.argv.length; i++) { } } -if (sawRemovedFlags) +if (sawRemovedFlags) { console.error('See `npm help exec` for more information') +} cli(process) diff --git a/deps/npm/docs/content/commands/npm-install.md b/deps/npm/docs/content/commands/npm-install.md index a103845d1a6758..83b9af1e4d07f9 100644 --- a/deps/npm/docs/content/commands/npm-install.md +++ b/deps/npm/docs/content/commands/npm-install.md @@ -58,7 +58,7 @@ into a tarball (b). * `npm install` (in a package directory, no arguments): - Install the dependencies in the local `node_modules` folder. + Install the dependencies to the local `node_modules` folder. In global mode (ie, with `-g` or `--global` appended to the command), it installs the current package context (ie, the current working diff --git a/deps/npm/docs/content/using-npm/developers.md b/deps/npm/docs/content/using-npm/developers.md index a76808ca675e61..5fc2e5876e3dd3 100644 --- a/deps/npm/docs/content/using-npm/developers.md +++ b/deps/npm/docs/content/using-npm/developers.md @@ -119,7 +119,9 @@ need to add them to `.npmignore` explicitly: * `._*` * `.DS_Store` * `.git` +* `.gitignore` * `.hg` +* `.npmignore` * `.npmrc` * `.lock-wscript` * `.svn` diff --git a/deps/npm/docs/output/commands/npm-access.html b/deps/npm/docs/output/commands/npm-access.html index bfece57cd7e4b3..cfadcce10c594e 100644 --- a/deps/npm/docs/output/commands/npm-access.html +++ b/deps/npm/docs/output/commands/npm-access.html @@ -1,4 +1,5 @@ - + + npm-access