diff --git a/deps/npm/bin/node-gyp-bin/node-gyp b/deps/npm/bin/node-gyp-bin/node-gyp deleted file mode 100755 index 70efb6f339f768..00000000000000 --- a/deps/npm/bin/node-gyp-bin/node-gyp +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env sh -if [ "x$npm_config_node_gyp" = "x" ]; then - node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@" -else - "$npm_config_node_gyp" "$@" -fi diff --git a/deps/npm/bin/node-gyp-bin/node-gyp.cmd b/deps/npm/bin/node-gyp-bin/node-gyp.cmd deleted file mode 100755 index 1ef2ae0c68fc4b..00000000000000 --- a/deps/npm/bin/node-gyp-bin/node-gyp.cmd +++ /dev/null @@ -1,5 +0,0 @@ -if not defined npm_config_node_gyp ( - node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %* -) else ( - node "%npm_config_node_gyp%" %* -) diff --git a/deps/npm/bin/npm b/deps/npm/bin/npm index a131a535434044..a08b4d113c444a 100755 --- a/deps/npm/bin/npm +++ b/deps/npm/bin/npm @@ -1,4 +1,8 @@ #!/usr/bin/env bash + +# This is used by the Node.js installer, which expects the cygwin/mingw +# shell script to already be present in the npm dependency folder. + (set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix basedir=`dirname "$0"` @@ -19,7 +23,6 @@ fi # kind of paths Node.js thinks it's using, typically win32 paths. CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)')" NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js" - NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` if [ $? -ne 0 ]; then # if this didn't work, then everything else below will fail diff --git a/deps/npm/bin/npx b/deps/npm/bin/npx index a34e3459b5a701..c51ad45cb68aea 100755 --- a/deps/npm/bin/npx +++ b/deps/npm/bin/npx @@ -19,17 +19,17 @@ if ! [ -x "$NODE_EXE" ]; then NODE_EXE=node fi -# these paths are passed to node.exe, so they need to match whatever +# this path is passed to node.exe, so it needs to match whatever # kind of paths Node.js thinks it's using, typically win32 paths. CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)')" +NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js" +NPX_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npx-cli.js" +NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` if [ $? -ne 0 ]; then # if this didn't work, then everything else below will fail echo "Could not determine Node.js install directory" >&2 exit 1 fi -NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js" -NPX_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npx-cli.js" -NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js" # a path that will fail -f test on any posix bash diff --git a/deps/npm/bin/npx-cli.js b/deps/npm/bin/npx-cli.js index 75090aed41f1fb..17d96fb26267c7 100755 --- a/deps/npm/bin/npx-cli.js +++ b/deps/npm/bin/npx-cli.js @@ -24,7 +24,7 @@ const removed = new Set([ ...removedOpts, ]) -const { definitions, shorthands } = require('../lib/utils/config/index.js') +const { definitions, shorthands } = require('@npmcli/config/lib/definitions') const npmSwitches = Object.entries(definitions) .filter(([key, { type }]) => type === Boolean || (Array.isArray(type) && type.includes(Boolean))) diff --git a/deps/npm/docs/content/commands/npm-install-test.md b/deps/npm/docs/content/commands/npm-install-test.md index a2136fd52f3974..587a0a15ec6318 100644 --- a/deps/npm/docs/content/commands/npm-install-test.md +++ b/deps/npm/docs/content/commands/npm-install-test.md @@ -160,6 +160,22 @@ will also prevent _writing_ `package-lock.json` if `save` is true. +#### `package-lock-only` + +* Default: false +* Type: Boolean + +If set to true, the current operation will only use the `package-lock.json`, +ignoring `node_modules`. + +For `update` this means only the `package-lock.json` will be updated, +instead of checking `node_modules` and downloading dependencies. + +For `list` this means the output will be based on the tree described by the +`package-lock.json`, rather than the contents of `node_modules`. + + + #### `foreground-scripts` * Default: false diff --git a/deps/npm/docs/content/commands/npm-install.md b/deps/npm/docs/content/commands/npm-install.md index 627d016fe1c193..31f8261132d9ea 100644 --- a/deps/npm/docs/content/commands/npm-install.md +++ b/deps/npm/docs/content/commands/npm-install.md @@ -550,6 +550,22 @@ will also prevent _writing_ `package-lock.json` if `save` is true. +#### `package-lock-only` + +* Default: false +* Type: Boolean + +If set to true, the current operation will only use the `package-lock.json`, +ignoring `node_modules`. + +For `update` this means only the `package-lock.json` will be updated, +instead of checking `node_modules` and downloading dependencies. + +For `list` this means the output will be based on the tree described by the +`package-lock.json`, rather than the contents of `node_modules`. + + + #### `foreground-scripts` * Default: false diff --git a/deps/npm/docs/content/commands/npm-ls.md b/deps/npm/docs/content/commands/npm-ls.md index 3091ebfdeca70a..274c45361042d3 100644 --- a/deps/npm/docs/content/commands/npm-ls.md +++ b/deps/npm/docs/content/commands/npm-ls.md @@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For example, running `npm ls promzard` in npm's source tree will show: ```bash -npm@9.7.1 /path/to/npm +npm@9.7.2 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 ``` diff --git a/deps/npm/docs/content/commands/npm.md b/deps/npm/docs/content/commands/npm.md index 4cd80b802510a7..eafb7474e439b2 100644 --- a/deps/npm/docs/content/commands/npm.md +++ b/deps/npm/docs/content/commands/npm.md @@ -14,7 +14,7 @@ Note: This command is unaware of workspaces. ### Version -9.7.1 +9.7.2 ### Description diff --git a/deps/npm/docs/content/configuring-npm/package-json.md b/deps/npm/docs/content/configuring-npm/package-json.md index ff06a872d38c5d..28f0ad26bf8e6c 100644 --- a/deps/npm/docs/content/configuring-npm/package-json.md +++ b/deps/npm/docs/content/configuring-npm/package-json.md @@ -279,9 +279,6 @@ it will. The `.npmignore` file works just like a `.gitignore`. If there is a `.gitignore` file, and `.npmignore` is missing, `.gitignore`'s contents will be used instead. -Files included with the "package.json#files" field _cannot_ be excluded -through `.npmignore` or `.gitignore`. - Certain files are always included, regardless of settings: * `package.json` diff --git a/deps/npm/docs/output/commands/npm-install-test.html b/deps/npm/docs/output/commands/npm-install-test.html index 5c0fb7cf08484b..d707d68d220efa 100644 --- a/deps/npm/docs/output/commands/npm-install-test.html +++ b/deps/npm/docs/output/commands/npm-install-test.html @@ -142,7 +142,7 @@

npm-install-test

Table of contents

-
+

Synopsis

@@ -259,6 +259,17 @@

package-lock

If set to false, then ignore package-lock.json files when installing. This will also prevent writing package-lock.json if save is true.

+

package-lock-only

+ +

If set to true, the current operation will only use the package-lock.json, +ignoring node_modules.

+

For update this means only the package-lock.json will be updated, +instead of checking node_modules and downloading dependencies.

+

For list this means the output will be based on the tree described by the +package-lock.json, rather than the contents of node_modules.

foreground-scripts

If set to false, then ignore package-lock.json files when installing. This will also prevent writing package-lock.json if save is true.

+

package-lock-only

+ +

If set to true, the current operation will only use the package-lock.json, +ignoring node_modules.

+

For update this means only the package-lock.json will be updated, +instead of checking node_modules and downloading dependencies.

+

For list this means the output will be based on the tree described by the +package-lock.json, rather than the contents of node_modules.

foreground-scripts