diff --git a/deps/npm/bin/npm.ps1 b/deps/npm/bin/npm.ps1 index 04a1fd478ef9dd..77bc9a5777c80d 100644 --- a/deps/npm/bin/npm.ps1 +++ b/deps/npm/bin/npm.ps1 @@ -22,11 +22,34 @@ if (Test-Path $NPM_PREFIX_NPM_CLI_JS) { $NPM_CLI_JS=$NPM_PREFIX_NPM_CLI_JS } -# Support pipeline input -if ($MyInvocation.ExpectingInput) { - $input | & $NODE_EXE $NPM_CLI_JS $args -} else { - & $NODE_EXE $NPM_CLI_JS $args +if ($MyInvocation.Line) { # used "-Command" argument + if ($MyInvocation.Statement) { + $NPM_ARGS = $MyInvocation.Statement.Substring($MyInvocation.InvocationName.Length).Trim() + } else { + $NPM_OG_COMMAND = ( + [System.Management.Automation.InvocationInfo].GetProperty('ScriptPosition', [System.Reflection.BindingFlags] 'Instance, NonPublic') + ).GetValue($MyInvocation).Text + $NPM_ARGS = $NPM_OG_COMMAND.Substring($MyInvocation.InvocationName.Length).Trim() + } + + $NODE_EXE = $NODE_EXE.Replace("``", "````") + $NPM_CLI_JS = $NPM_CLI_JS.Replace("``", "````") + + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input = (@($input) -join "`n").Replace("``", "````") + + Invoke-Expression "Write-Output `"$input`" | & `"$NODE_EXE`" `"$NPM_CLI_JS`" $NPM_ARGS" + } else { + Invoke-Expression "& `"$NODE_EXE`" `"$NPM_CLI_JS`" $NPM_ARGS" + } +} else { # used "-File" argument + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & $NODE_EXE $NPM_CLI_JS $args + } else { + & $NODE_EXE $NPM_CLI_JS $args + } } exit $LASTEXITCODE diff --git a/deps/npm/bin/npx.ps1 b/deps/npm/bin/npx.ps1 index 28dae51b22ca93..e89536bf3542a0 100644 --- a/deps/npm/bin/npx.ps1 +++ b/deps/npm/bin/npx.ps1 @@ -22,11 +22,34 @@ if (Test-Path $NPM_PREFIX_NPX_CLI_JS) { $NPX_CLI_JS=$NPM_PREFIX_NPX_CLI_JS } -# Support pipeline input -if ($MyInvocation.ExpectingInput) { - $input | & $NODE_EXE $NPX_CLI_JS $args -} else { - & $NODE_EXE $NPX_CLI_JS $args +if ($MyInvocation.Line) { # used "-Command" argument + if ($MyInvocation.Statement) { + $NPX_ARGS = $MyInvocation.Statement.Substring($MyInvocation.InvocationName.Length).Trim() + } else { + $NPX_OG_COMMAND = ( + [System.Management.Automation.InvocationInfo].GetProperty('ScriptPosition', [System.Reflection.BindingFlags] 'Instance, NonPublic') + ).GetValue($MyInvocation).Text + $NPX_ARGS = $NPX_OG_COMMAND.Substring($MyInvocation.InvocationName.Length).Trim() + } + + $NODE_EXE = $NODE_EXE.Replace("``", "````") + $NPX_CLI_JS = $NPX_CLI_JS.Replace("``", "````") + + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input = (@($input) -join "`n").Replace("``", "````") + + Invoke-Expression "Write-Output `"$input`" | & `"$NODE_EXE`" `"$NPX_CLI_JS`" $NPX_ARGS" + } else { + Invoke-Expression "& `"$NODE_EXE`" `"$NPX_CLI_JS`" $NPX_ARGS" + } +} else { # used "-File" argument + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & $NODE_EXE $NPX_CLI_JS $args + } else { + & $NODE_EXE $NPX_CLI_JS $args + } } exit $LASTEXITCODE diff --git a/deps/npm/docs/content/commands/npm-adduser.md b/deps/npm/docs/content/commands/npm-adduser.md index e19b3e3a3f85d9..a42ac6b863915e 100644 --- a/deps/npm/docs/content/commands/npm-adduser.md +++ b/deps/npm/docs/content/commands/npm-adduser.md @@ -20,6 +20,8 @@ Create a new user in the specified registry, and save the credentials to the `.npmrc` file. If no registry is specified, the default registry will be used (see [`registry`](/using-npm/registry)). +When you run `npm adduser`, the CLI automatically generates a legacy token of `publish` type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens). + When using `legacy` for your `auth-type`, the username, password, and email are read in from prompts. diff --git a/deps/npm/docs/content/commands/npm-audit.md b/deps/npm/docs/content/commands/npm-audit.md index a7e0db7474315a..17af3a686cb456 100644 --- a/deps/npm/docs/content/commands/npm-audit.md +++ b/deps/npm/docs/content/commands/npm-audit.md @@ -402,9 +402,9 @@ but can be useful for debugging. If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. diff --git a/deps/npm/docs/content/commands/npm-ci.md b/deps/npm/docs/content/commands/npm-ci.md index d74922ff7e18bd..e9e00271684181 100644 --- a/deps/npm/docs/content/commands/npm-ci.md +++ b/deps/npm/docs/content/commands/npm-ci.md @@ -190,9 +190,9 @@ but can be useful for debugging. If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. diff --git a/deps/npm/docs/content/commands/npm-dedupe.md b/deps/npm/docs/content/commands/npm-dedupe.md index 1e8a4bc5d0262a..1ff142ec4f806f 100644 --- a/deps/npm/docs/content/commands/npm-dedupe.md +++ b/deps/npm/docs/content/commands/npm-dedupe.md @@ -190,9 +190,9 @@ the order in which omit/include are specified on the command-line. If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. diff --git a/deps/npm/docs/content/commands/npm-exec.md b/deps/npm/docs/content/commands/npm-exec.md index fa8d80cffc9713..7869befcdd1bf4 100644 --- a/deps/npm/docs/content/commands/npm-exec.md +++ b/deps/npm/docs/content/commands/npm-exec.md @@ -355,7 +355,7 @@ project. ### See Also -* [npm run-script](/commands/npm-run-script) +* [npm run](/commands/npm-run) * [npm scripts](/using-npm/scripts) * [npm test](/commands/npm-test) * [npm start](/commands/npm-start) diff --git a/deps/npm/docs/content/commands/npm-find-dupes.md b/deps/npm/docs/content/commands/npm-find-dupes.md index 6710760471824e..bf1a474033cc6d 100644 --- a/deps/npm/docs/content/commands/npm-find-dupes.md +++ b/deps/npm/docs/content/commands/npm-find-dupes.md @@ -130,9 +130,9 @@ the order in which omit/include are specified on the command-line. If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. diff --git a/deps/npm/docs/content/commands/npm-init.md b/deps/npm/docs/content/commands/npm-init.md index bbf0fd8518386f..9e0e6e0f42b913 100644 --- a/deps/npm/docs/content/commands/npm-init.md +++ b/deps/npm/docs/content/commands/npm-init.md @@ -92,6 +92,11 @@ Generate it without having it ask any questions: $ npm init -y ``` +Set the private flag to `true` in package.json: +```bash +$ npm init --init-private -y +``` + ### Workspaces support It's possible to create a new workspace within your project by using the @@ -216,6 +221,15 @@ number, if not already set in package.json. +#### `init-private` + +* Default: false +* Type: Boolean + +The value `npm init` should use by default for the package's private flag. + + + #### `yes` * Default: null diff --git a/deps/npm/docs/content/commands/npm-install-ci-test.md b/deps/npm/docs/content/commands/npm-install-ci-test.md index 1519ffa8e9a8a1..8b2f03e418a839 100644 --- a/deps/npm/docs/content/commands/npm-install-ci-test.md +++ b/deps/npm/docs/content/commands/npm-install-ci-test.md @@ -136,9 +136,9 @@ but can be useful for debugging. If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. diff --git a/deps/npm/docs/content/commands/npm-install-test.md b/deps/npm/docs/content/commands/npm-install-test.md index 3d97af00b262a7..f2696429002b0d 100644 --- a/deps/npm/docs/content/commands/npm-install-test.md +++ b/deps/npm/docs/content/commands/npm-install-test.md @@ -213,9 +213,9 @@ but can be useful for debugging. If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. diff --git a/deps/npm/docs/content/commands/npm-install.md b/deps/npm/docs/content/commands/npm-install.md index ec933394b1a726..5bedfaca078f70 100644 --- a/deps/npm/docs/content/commands/npm-install.md +++ b/deps/npm/docs/content/commands/npm-install.md @@ -601,9 +601,9 @@ but can be useful for debugging. If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. diff --git a/deps/npm/docs/content/commands/npm-link.md b/deps/npm/docs/content/commands/npm-link.md index 34b893e471afa1..b7677f06937bea 100644 --- a/deps/npm/docs/content/commands/npm-link.md +++ b/deps/npm/docs/content/commands/npm-link.md @@ -263,9 +263,9 @@ the order in which omit/include are specified on the command-line. If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. diff --git a/deps/npm/docs/content/commands/npm-login.md b/deps/npm/docs/content/commands/npm-login.md index 531dc71ae3926a..d9499f712cbc87 100644 --- a/deps/npm/docs/content/commands/npm-login.md +++ b/deps/npm/docs/content/commands/npm-login.md @@ -18,6 +18,8 @@ Verify a user in the specified registry, and save the credentials to the `.npmrc` file. If no registry is specified, the default registry will be used (see [`config`](/using-npm/config)). +When you run `npm login`, the CLI automatically generates a legacy token of `publish` type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens). + When using `legacy` for your `auth-type`, the username and password, are read in from prompts. diff --git a/deps/npm/docs/content/commands/npm-ls.md b/deps/npm/docs/content/commands/npm-ls.md index 4d7c952c061c8c..6ec5fe373b5c6f 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@11.3.0 /path/to/npm +npm@11.4.0 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 ``` diff --git a/deps/npm/docs/content/commands/npm-outdated.md b/deps/npm/docs/content/commands/npm-outdated.md index b1a1c62688e650..857a4c6753fec3 100644 --- a/deps/npm/docs/content/commands/npm-outdated.md +++ b/deps/npm/docs/content/commands/npm-outdated.md @@ -39,6 +39,7 @@ In the output: included in `package.json` are always marked `dependencies`. * `homepage` (when using `--long` / `-l`) is the `homepage` value contained in the package's packument +* `depended by location` (when using `--long` / `-l`) shows location of the package that depends on the displayed dependency * Red means there's a newer version matching your semver requirements, so you should update now. * Yellow indicates that there's a newer version _above_ your semver diff --git a/deps/npm/docs/content/commands/npm-pack.md b/deps/npm/docs/content/commands/npm-pack.md index 2d3e3453d36886..6488180543a20d 100644 --- a/deps/npm/docs/content/commands/npm-pack.md +++ b/deps/npm/docs/content/commands/npm-pack.md @@ -111,9 +111,9 @@ This value is not exported to the environment for child processes. If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. diff --git a/deps/npm/docs/content/commands/npm-prune.md b/deps/npm/docs/content/commands/npm-prune.md index 3a5894cb734a53..0b0922fe8d0980 100644 --- a/deps/npm/docs/content/commands/npm-prune.md +++ b/deps/npm/docs/content/commands/npm-prune.md @@ -120,9 +120,9 @@ but can be useful for debugging. If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. diff --git a/deps/npm/docs/content/commands/npm-rebuild.md b/deps/npm/docs/content/commands/npm-rebuild.md index d22a7a5f9d3e90..ff88f613f415ff 100644 --- a/deps/npm/docs/content/commands/npm-rebuild.md +++ b/deps/npm/docs/content/commands/npm-rebuild.md @@ -93,9 +93,9 @@ but can be useful for debugging. If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. diff --git a/deps/npm/docs/content/commands/npm-restart.md b/deps/npm/docs/content/commands/npm-restart.md index 545315c742fd02..7c0957f2852c13 100644 --- a/deps/npm/docs/content/commands/npm-restart.md +++ b/deps/npm/docs/content/commands/npm-restart.md @@ -12,7 +12,7 @@ npm restart [-- ] ### Description -This restarts a project. It is equivalent to running `npm run-script +This restarts a project. It is equivalent to running `npm run restart`. If the current project has a `"restart"` script specified in @@ -44,9 +44,9 @@ If it does _not_ have a `"restart"` script specified, but it does have If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. @@ -62,7 +62,7 @@ init ` commands. ### See Also -* [npm run-script](/commands/npm-run-script) +* [npm run](/commands/npm-run) * [npm scripts](/using-npm/scripts) * [npm test](/commands/npm-test) * [npm start](/commands/npm-start) diff --git a/deps/npm/docs/content/commands/npm-run-script.md b/deps/npm/docs/content/commands/npm-run.md similarity index 93% rename from deps/npm/docs/content/commands/npm-run-script.md rename to deps/npm/docs/content/commands/npm-run.md index 56fcdb70411da6..90a0c633ff9d8a 100644 --- a/deps/npm/docs/content/commands/npm-run-script.md +++ b/deps/npm/docs/content/commands/npm-run.md @@ -1,5 +1,5 @@ --- -title: npm-run-script +title: npm-run section: 1 description: Run arbitrary package scripts --- @@ -7,9 +7,9 @@ description: Run arbitrary package scripts ### Synopsis ```bash -npm run-script [-- ] +npm run [-- ] -aliases: run, rum, urn +aliases: run-script, rum, urn ``` ### Description @@ -195,10 +195,10 @@ This value is not exported to the environment for child processes. * Default: false * Type: Boolean -If true, npm will not exit with an error code when `run-script` is invoked -for a script that isn't defined in the `scripts` section of `package.json`. -This option can be used when it's desirable to optionally run a script when -it's present and fail if the script fails. This is useful, for example, when +If true, npm will not exit with an error code when `run` is invoked for a +script that isn't defined in the `scripts` section of `package.json`. This +option can be used when it's desirable to optionally run a script when it's +present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup. @@ -212,9 +212,9 @@ This value is not exported to the environment for child processes. If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. diff --git a/deps/npm/docs/content/commands/npm-shrinkwrap.md b/deps/npm/docs/content/commands/npm-shrinkwrap.md index 6786229469d2ce..de05c32d9c5c86 100644 --- a/deps/npm/docs/content/commands/npm-shrinkwrap.md +++ b/deps/npm/docs/content/commands/npm-shrinkwrap.md @@ -24,7 +24,7 @@ design and purpose of package locks in npm, see ### See Also * [npm install](/commands/npm-install) -* [npm run-script](/commands/npm-run-script) +* [npm run](/commands/npm-run) * [npm scripts](/using-npm/scripts) * [package.json](/configuring-npm/package-json) * [package-lock.json](/configuring-npm/package-lock-json) diff --git a/deps/npm/docs/content/commands/npm-start.md b/deps/npm/docs/content/commands/npm-start.md index cf9392c605c33f..dc1ab617c66e51 100644 --- a/deps/npm/docs/content/commands/npm-start.md +++ b/deps/npm/docs/content/commands/npm-start.md @@ -23,7 +23,7 @@ the file specified in a package's `"main"` attribute when evoking with `node .` As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can -use custom arguments when executing scripts. Refer to [`npm run-script`](/commands/npm-run-script) for more details. +use custom arguments when executing scripts. Refer to [`npm run`](/commands/npm-run) for more details. ### Example @@ -55,9 +55,9 @@ npm start If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. @@ -73,7 +73,7 @@ init ` commands. ### See Also -* [npm run-script](/commands/npm-run-script) +* [npm run](/commands/npm-run) * [npm scripts](/using-npm/scripts) * [npm test](/commands/npm-test) * [npm restart](/commands/npm-restart) diff --git a/deps/npm/docs/content/commands/npm-stop.md b/deps/npm/docs/content/commands/npm-stop.md index 6075b4363c2fa7..ee8974c18a4b09 100644 --- a/deps/npm/docs/content/commands/npm-stop.md +++ b/deps/npm/docs/content/commands/npm-stop.md @@ -48,9 +48,9 @@ npm stop If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. @@ -66,7 +66,7 @@ init ` commands. ### See Also -* [npm run-script](/commands/npm-run-script) +* [npm run](/commands/npm-run) * [npm scripts](/using-npm/scripts) * [npm test](/commands/npm-test) * [npm start](/commands/npm-start) diff --git a/deps/npm/docs/content/commands/npm-test.md b/deps/npm/docs/content/commands/npm-test.md index 72a7822b59fc3c..f72a817f8ede84 100644 --- a/deps/npm/docs/content/commands/npm-test.md +++ b/deps/npm/docs/content/commands/npm-test.md @@ -45,9 +45,9 @@ npm test If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. @@ -63,7 +63,7 @@ init ` commands. ### See Also -* [npm run-script](/commands/npm-run-script) +* [npm run](/commands/npm-run) * [npm scripts](/using-npm/scripts) * [npm start](/commands/npm-start) * [npm restart](/commands/npm-restart) diff --git a/deps/npm/docs/content/commands/npm-update.md b/deps/npm/docs/content/commands/npm-update.md index 25272f8f13ba02..d1775a8955bdb0 100644 --- a/deps/npm/docs/content/commands/npm-update.md +++ b/deps/npm/docs/content/commands/npm-update.md @@ -314,9 +314,9 @@ but can be useful for debugging. If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. diff --git a/deps/npm/docs/content/commands/npm-version.md b/deps/npm/docs/content/commands/npm-version.md index bc31b4a12a7324..c543f90d2cf2e9 100644 --- a/deps/npm/docs/content/commands/npm-version.md +++ b/deps/npm/docs/content/commands/npm-version.md @@ -229,7 +229,7 @@ deletes the `build/temp` directory. ### See Also * [npm init](/commands/npm-init) -* [npm run-script](/commands/npm-run-script) +* [npm run](/commands/npm-run) * [npm scripts](/using-npm/scripts) * [package.json](/configuring-npm/package-json) * [config](/using-npm/config) diff --git a/deps/npm/docs/content/commands/npm.md b/deps/npm/docs/content/commands/npm.md index 0b78d4f4e5aabb..2f44e1a4b53a54 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 -11.3.0 +11.4.0 ### Description diff --git a/deps/npm/docs/content/commands/npx.md b/deps/npm/docs/content/commands/npx.md index e596baa5da4793..02a208503d2625 100644 --- a/deps/npm/docs/content/commands/npx.md +++ b/deps/npm/docs/content/commands/npx.md @@ -158,7 +158,7 @@ This resulted in some shifts in its functionality: ### See Also -* [npm run-script](/commands/npm-run-script) +* [npm run](/commands/npm-run) * [npm scripts](/using-npm/scripts) * [npm test](/commands/npm-test) * [npm start](/commands/npm-start) diff --git a/deps/npm/docs/content/configuring-npm/package-json.md b/deps/npm/docs/content/configuring-npm/package-json.md index 418ba7a8e66c64..5dac28fa61b1c0 100644 --- a/deps/npm/docs/content/configuring-npm/package-json.md +++ b/deps/npm/docs/content/configuring-npm/package-json.md @@ -378,7 +378,7 @@ file in the `bin` field, so it is available to run by `name` or `name.cmd` (on Windows PowerShell). When this package is installed as a dependency in another package, the file will be linked where it will be available to that package either directly by `npm exec` or by name in other scripts when invoking them -via `npm run-script`. +via `npm run`. For example, myapp could have this: @@ -951,7 +951,7 @@ resolution. Published packages may dictate their resolutions by pinning dependencies or using an [`npm-shrinkwrap.json`](/configuring-npm/npm-shrinkwrap-json) file. -To make sure the package `foo` is always installed as version `1.0.0` no matter +To make sure the package `@npm/foo` is always installed as version `1.0.0` no matter what version your dependencies rely on: ```json diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md index 9d089f081825d6..b4307351efeda0 100644 --- a/deps/npm/docs/content/using-npm/config.md +++ b/deps/npm/docs/content/using-npm/config.md @@ -698,10 +698,10 @@ library. * Default: false * Type: Boolean -If true, npm will not exit with an error code when `run-script` is invoked -for a script that isn't defined in the `scripts` section of `package.json`. -This option can be used when it's desirable to optionally run a script when -it's present and fail if the script fails. This is useful, for example, when +If true, npm will not exit with an error code when `run` is invoked for a +script that isn't defined in the `scripts` section of `package.json`. This +option can be used when it's desirable to optionally run a script when it's +present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup. @@ -715,9 +715,9 @@ This value is not exported to the environment for child processes. If true, npm does not run scripts specified in package.json files. Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. +`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still +run their intended script if `ignore-scripts` is set, but they will *not* +run any pre- or post-scripts. @@ -809,6 +809,15 @@ more information, or [npm init](/commands/npm-init). +#### `init-private` + +* Default: false +* Type: Boolean + +The value `npm init` should use by default for the package's private flag. + + + #### `init-type` * Default: "commonjs" @@ -1355,7 +1364,7 @@ Ignored if `--save-peer` is set, since peerDependencies cannot be bundled. Save installed packages to a package.json file as `devDependencies`. - +This config can not be used with: `save-optional`, `save-peer`, `save-prod` #### `save-exact` @@ -1374,7 +1383,7 @@ rather than using npm's default semver range operator. Save installed packages to a package.json file as `optionalDependencies`. - +This config can not be used with: `save-dev`, `save-peer`, `save-prod` #### `save-peer` @@ -1383,7 +1392,7 @@ Save installed packages to a package.json file as `optionalDependencies`. Save installed packages to a package.json file as `peerDependencies` - +This config can not be used with: `save-dev`, `save-optional`, `save-prod` #### `save-prefix` @@ -1412,7 +1421,7 @@ you want to move it to be a non-optional production dependency. This is the default behavior if `--save` is true, and neither `--save-dev` or `--save-optional` are true. - +This config can not be used with: `save-dev`, `save-optional`, `save-peer` #### `sbom-format` diff --git a/deps/npm/docs/content/using-npm/developers.md b/deps/npm/docs/content/using-npm/developers.md index b97ca038b4a4ba..0d1096203fc36c 100644 --- a/deps/npm/docs/content/using-npm/developers.md +++ b/deps/npm/docs/content/using-npm/developers.md @@ -139,7 +139,6 @@ The following paths and files are never ignored, so adding them to * `package.json` * `README` (and its variants) -* `CHANGELOG` (and its variants) * `LICENSE` / `LICENCE` If, given the structure of your project, you find `.npmignore` to be a diff --git a/deps/npm/docs/content/using-npm/scripts.md b/deps/npm/docs/content/using-npm/scripts.md index 3945c0e75abdc8..5cd2ce7ec7497c 100644 --- a/deps/npm/docs/content/using-npm/scripts.md +++ b/deps/npm/docs/content/using-npm/scripts.md @@ -9,7 +9,7 @@ description: How npm handles the "scripts" field The `"scripts"` property of your `package.json` file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts. These all can be executed by running -`npm run-script ` or `npm run ` for short. *Pre* and *post* +`npm run ` or `npm run ` for short. *Pre* and *post* commands with matching names will be run for those as well (e.g. `premyscript`, `myscript`, `postmyscript`). Scripts from dependencies can be run with `npm explore -- npm run `. @@ -46,6 +46,7 @@ situations. These scripts happen in addition to the `pre`, `post`, and `npm pack` * Runs on local `npm install` without any arguments * Runs AFTER `prepublish`, but BEFORE `prepublishOnly` +* Runs for a package if it's being installed as a link through `npm install ` * NOTE: If a package being installed through git contains a `prepare` script, its `dependencies` and `devDependencies` will be installed, and @@ -179,7 +180,7 @@ If there is a `restart` script defined, these events are run, otherwise * `restart` * `postrestart` -#### [`npm run `](/commands/npm-run-script) +#### [`npm run `](/commands/npm-run) * `pre` * `` @@ -357,7 +358,7 @@ file. ### See Also -* [npm run-script](/commands/npm-run-script) +* [npm run](/commands/npm-run) * [package.json](/configuring-npm/package-json) * [npm developers](/using-npm/developers) * [npm install](/commands/npm-install) diff --git a/deps/npm/docs/content/using-npm/workspaces.md b/deps/npm/docs/content/using-npm/workspaces.md index cb545c0b46bf12..34819b801e5fbc 100644 --- a/deps/npm/docs/content/using-npm/workspaces.md +++ b/deps/npm/docs/content/using-npm/workspaces.md @@ -221,6 +221,6 @@ npm run test --workspaces --if-present * [npm install](/commands/npm-install) * [npm publish](/commands/npm-publish) -* [npm run-script](/commands/npm-run-script) +* [npm run](/commands/npm-run) * [config](/using-npm/config) diff --git a/deps/npm/docs/output/commands/npm-access.html b/deps/npm/docs/output/commands/npm-access.html index c31f56b4747b72..879fa129b7f615 100644 --- a/deps/npm/docs/output/commands/npm-access.html +++ b/deps/npm/docs/output/commands/npm-access.html @@ -141,9 +141,9 @@
-

+

npm-access - @11.3.0 + @11.4.0

Set access level on published packages
@@ -256,7 +256,7 @@

See Also