Skip to content

Commit 68671f4

Browse files
npm-cli-botRafaelGSS
authored andcommitted
deps: upgrade npm to 11.4.2
PR-URL: #58696 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
1 parent d94b184 commit 68671f4

File tree

381 files changed

+7285
-2045
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

381 files changed

+7285
-2045
lines changed

deps/npm/bin/npm.ps1

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,27 @@ if (Test-Path $NPM_PREFIX_NPM_CLI_JS) {
2222
$NPM_CLI_JS=$NPM_PREFIX_NPM_CLI_JS
2323
}
2424

25-
# Support pipeline input
26-
if ($MyInvocation.ExpectingInput) {
25+
if ($MyInvocation.ExpectingInput) { # takes pipeline input
2726
$input | & $NODE_EXE $NPM_CLI_JS $args
28-
} else {
27+
} elseif (-not $MyInvocation.Line) { # used "-File" argument
2928
& $NODE_EXE $NPM_CLI_JS $args
29+
} else { # used "-Command" argument
30+
if ($MyInvocation.Statement) {
31+
$NPM_ORIGINAL_COMMAND = $MyInvocation.Statement
32+
} else {
33+
$NPM_ORIGINAL_COMMAND = (
34+
[Management.Automation.InvocationInfo].GetProperty('ScriptPosition', [Reflection.BindingFlags] 'Instance, NonPublic')
35+
).GetValue($MyInvocation).Text
36+
}
37+
38+
$NODE_EXE = $NODE_EXE.Replace("``", "````")
39+
$NPM_CLI_JS = $NPM_CLI_JS.Replace("``", "````")
40+
41+
$NPM_NO_REDIRECTS_COMMAND = [Management.Automation.Language.Parser]::ParseInput($NPM_ORIGINAL_COMMAND, [ref] $null, [ref] $null).
42+
EndBlock.Statements.PipelineElements.CommandElements.Extent.Text -join ' '
43+
$NPM_ARGS = $NPM_NO_REDIRECTS_COMMAND.Substring($MyInvocation.InvocationName.Length).Trim()
44+
45+
Invoke-Expression "& `"$NODE_EXE`" `"$NPM_CLI_JS`" $NPM_ARGS"
3046
}
3147

3248
exit $LASTEXITCODE

deps/npm/bin/npx.ps1

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,27 @@ if (Test-Path $NPM_PREFIX_NPX_CLI_JS) {
2222
$NPX_CLI_JS=$NPM_PREFIX_NPX_CLI_JS
2323
}
2424

25-
# Support pipeline input
26-
if ($MyInvocation.ExpectingInput) {
25+
if ($MyInvocation.ExpectingInput) { # takes pipeline input
2726
$input | & $NODE_EXE $NPX_CLI_JS $args
28-
} else {
27+
} elseif (-not $MyInvocation.Line) { # used "-File" argument
2928
& $NODE_EXE $NPX_CLI_JS $args
29+
} else { # used "-Command" argument
30+
if ($MyInvocation.Statement) {
31+
$NPX_ORIGINAL_COMMAND = $MyInvocation.Statement
32+
} else {
33+
$NPX_ORIGINAL_COMMAND = (
34+
[Management.Automation.InvocationInfo].GetProperty('ScriptPosition', [Reflection.BindingFlags] 'Instance, NonPublic')
35+
).GetValue($MyInvocation).Text
36+
}
37+
38+
$NODE_EXE = $NODE_EXE.Replace("``", "````")
39+
$NPX_CLI_JS = $NPX_CLI_JS.Replace("``", "````")
40+
41+
$NPX_NO_REDIRECTS_COMMAND = [Management.Automation.Language.Parser]::ParseInput($NPX_ORIGINAL_COMMAND, [ref] $null, [ref] $null).
42+
EndBlock.Statements.PipelineElements.CommandElements.Extent.Text -join ' '
43+
$NPX_ARGS = $NPX_NO_REDIRECTS_COMMAND.Substring($MyInvocation.InvocationName.Length).Trim()
44+
45+
Invoke-Expression "& `"$NODE_EXE`" `"$NPX_CLI_JS`" $NPX_ARGS"
3046
}
3147

3248
exit $LASTEXITCODE

deps/npm/docs/content/commands/npm-adduser.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Create a new user in the specified registry, and save the credentials to
2020
the `.npmrc` file. If no registry is specified, the default registry
2121
will be used (see [`registry`](/using-npm/registry)).
2222

23+
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).
24+
2325
When using `legacy` for your `auth-type`, the username, password, and
2426
email are read in from prompts.
2527

deps/npm/docs/content/commands/npm-audit.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,9 @@ but can be useful for debugging.
402402
If true, npm does not run scripts specified in package.json files.
403403

404404
Note that commands explicitly intended to run a particular script, such as
405-
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
406-
will still run their intended script if `ignore-scripts` is set, but they
407-
will *not* run any pre- or post-scripts.
405+
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
406+
run their intended script if `ignore-scripts` is set, but they will *not*
407+
run any pre- or post-scripts.
408408

409409

410410

deps/npm/docs/content/commands/npm-ci.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ but can be useful for debugging.
190190
If true, npm does not run scripts specified in package.json files.
191191

192192
Note that commands explicitly intended to run a particular script, such as
193-
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
194-
will still run their intended script if `ignore-scripts` is set, but they
195-
will *not* run any pre- or post-scripts.
193+
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
194+
run their intended script if `ignore-scripts` is set, but they will *not*
195+
run any pre- or post-scripts.
196196

197197

198198

deps/npm/docs/content/commands/npm-dedupe.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ the order in which omit/include are specified on the command-line.
190190
If true, npm does not run scripts specified in package.json files.
191191
192192
Note that commands explicitly intended to run a particular script, such as
193-
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
194-
will still run their intended script if `ignore-scripts` is set, but they
195-
will *not* run any pre- or post-scripts.
193+
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
194+
run their intended script if `ignore-scripts` is set, but they will *not*
195+
run any pre- or post-scripts.
196196
197197
198198

deps/npm/docs/content/commands/npm-exec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ project.
355355

356356
### See Also
357357

358-
* [npm run-script](/commands/npm-run-script)
358+
* [npm run](/commands/npm-run)
359359
* [npm scripts](/using-npm/scripts)
360360
* [npm test](/commands/npm-test)
361361
* [npm start](/commands/npm-start)

deps/npm/docs/content/commands/npm-find-dupes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ the order in which omit/include are specified on the command-line.
130130
If true, npm does not run scripts specified in package.json files.
131131

132132
Note that commands explicitly intended to run a particular script, such as
133-
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
134-
will still run their intended script if `ignore-scripts` is set, but they
135-
will *not* run any pre- or post-scripts.
133+
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
134+
run their intended script if `ignore-scripts` is set, but they will *not*
135+
run any pre- or post-scripts.
136136

137137

138138

deps/npm/docs/content/commands/npm-init.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ Generate it without having it ask any questions:
9292
$ npm init -y
9393
```
9494

95+
Set the private flag to `true` in package.json:
96+
```bash
97+
$ npm init --init-private -y
98+
```
99+
95100
### Workspaces support
96101

97102
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.
216221

217222

218223

224+
#### `init-private`
225+
226+
* Default: false
227+
* Type: Boolean
228+
229+
The value `npm init` should use by default for the package's private flag.
230+
231+
232+
219233
#### `yes`
220234

221235
* Default: null

deps/npm/docs/content/commands/npm-install-ci-test.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ but can be useful for debugging.
136136
If true, npm does not run scripts specified in package.json files.
137137

138138
Note that commands explicitly intended to run a particular script, such as
139-
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
140-
will still run their intended script if `ignore-scripts` is set, but they
141-
will *not* run any pre- or post-scripts.
139+
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
140+
run their intended script if `ignore-scripts` is set, but they will *not*
141+
run any pre- or post-scripts.
142142

143143

144144

deps/npm/docs/content/commands/npm-install-test.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ but can be useful for debugging.
213213
If true, npm does not run scripts specified in package.json files.
214214

215215
Note that commands explicitly intended to run a particular script, such as
216-
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
217-
will still run their intended script if `ignore-scripts` is set, but they
218-
will *not* run any pre- or post-scripts.
216+
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
217+
run their intended script if `ignore-scripts` is set, but they will *not*
218+
run any pre- or post-scripts.
219219

220220

221221

deps/npm/docs/content/commands/npm-install.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,9 @@ but can be useful for debugging.
601601
If true, npm does not run scripts specified in package.json files.
602602
603603
Note that commands explicitly intended to run a particular script, such as
604-
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
605-
will still run their intended script if `ignore-scripts` is set, but they
606-
will *not* run any pre- or post-scripts.
604+
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
605+
run their intended script if `ignore-scripts` is set, but they will *not*
606+
run any pre- or post-scripts.
607607
608608
609609

deps/npm/docs/content/commands/npm-link.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ the order in which omit/include are specified on the command-line.
263263
If true, npm does not run scripts specified in package.json files.
264264

265265
Note that commands explicitly intended to run a particular script, such as
266-
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
267-
will still run their intended script if `ignore-scripts` is set, but they
268-
will *not* run any pre- or post-scripts.
266+
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
267+
run their intended script if `ignore-scripts` is set, but they will *not*
268+
run any pre- or post-scripts.
269269

270270

271271

deps/npm/docs/content/commands/npm-login.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Verify a user in the specified registry, and save the credentials to the
1818
`.npmrc` file. If no registry is specified, the default registry will be
1919
used (see [`config`](/using-npm/config)).
2020

21+
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).
22+
2123
When using `legacy` for your `auth-type`, the username and password, are
2224
read in from prompts.
2325

deps/npm/docs/content/commands/npm-ls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For
2727
example, running `npm ls promzard` in npm's source tree will show:
2828

2929
```bash
30-
npm@11.3.0 /path/to/npm
30+
npm@11.4.2 /path/to/npm
3131
3232
3333
```

deps/npm/docs/content/commands/npm-outdated.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ In the output:
3939
included in `package.json` are always marked `dependencies`.
4040
* `homepage` (when using `--long` / `-l`) is the `homepage` value contained
4141
in the package's packument
42+
* `depended by location` (when using `--long` / `-l`) shows location of the package that depends on the displayed dependency
4243
* Red means there's a newer version matching your semver requirements, so
4344
you should update now.
4445
* Yellow indicates that there's a newer version _above_ your semver

deps/npm/docs/content/commands/npm-pack.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ This value is not exported to the environment for child processes.
111111
If true, npm does not run scripts specified in package.json files.
112112

113113
Note that commands explicitly intended to run a particular script, such as
114-
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
115-
will still run their intended script if `ignore-scripts` is set, but they
116-
will *not* run any pre- or post-scripts.
114+
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
115+
run their intended script if `ignore-scripts` is set, but they will *not*
116+
run any pre- or post-scripts.
117117

118118

119119

deps/npm/docs/content/commands/npm-prune.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ but can be useful for debugging.
120120
If true, npm does not run scripts specified in package.json files.
121121

122122
Note that commands explicitly intended to run a particular script, such as
123-
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
124-
will still run their intended script if `ignore-scripts` is set, but they
125-
will *not* run any pre- or post-scripts.
123+
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
124+
run their intended script if `ignore-scripts` is set, but they will *not*
125+
run any pre- or post-scripts.
126126

127127

128128

deps/npm/docs/content/commands/npm-rebuild.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ but can be useful for debugging.
9393
If true, npm does not run scripts specified in package.json files.
9494

9595
Note that commands explicitly intended to run a particular script, such as
96-
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
97-
will still run their intended script if `ignore-scripts` is set, but they
98-
will *not* run any pre- or post-scripts.
96+
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
97+
run their intended script if `ignore-scripts` is set, but they will *not*
98+
run any pre- or post-scripts.
9999

100100

101101

deps/npm/docs/content/commands/npm-restart.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ npm restart [-- <args>]
1212

1313
### Description
1414

15-
This restarts a project. It is equivalent to running `npm run-script
15+
This restarts a project. It is equivalent to running `npm run
1616
restart`.
1717

1818
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
4444
If true, npm does not run scripts specified in package.json files.
4545

4646
Note that commands explicitly intended to run a particular script, such as
47-
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
48-
will still run their intended script if `ignore-scripts` is set, but they
49-
will *not* run any pre- or post-scripts.
47+
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
48+
run their intended script if `ignore-scripts` is set, but they will *not*
49+
run any pre- or post-scripts.
5050

5151

5252

@@ -62,7 +62,7 @@ init <package-spec>` commands.
6262

6363
### See Also
6464

65-
* [npm run-script](/commands/npm-run-script)
65+
* [npm run](/commands/npm-run)
6666
* [npm scripts](/using-npm/scripts)
6767
* [npm test](/commands/npm-test)
6868
* [npm start](/commands/npm-start)

deps/npm/docs/content/commands/npm-run-script.md renamed to deps/npm/docs/content/commands/npm-run.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
2-
title: npm-run-script
2+
title: npm-run
33
section: 1
44
description: Run arbitrary package scripts
55
---
66

77
### Synopsis
88

99
```bash
10-
npm run-script <command> [-- <args>]
10+
npm run <command> [-- <args>]
1111

12-
aliases: run, rum, urn
12+
aliases: run-script, rum, urn
1313
```
1414

1515
### Description
@@ -195,10 +195,10 @@ This value is not exported to the environment for child processes.
195195
* Default: false
196196
* Type: Boolean
197197

198-
If true, npm will not exit with an error code when `run-script` is invoked
199-
for a script that isn't defined in the `scripts` section of `package.json`.
200-
This option can be used when it's desirable to optionally run a script when
201-
it's present and fail if the script fails. This is useful, for example, when
198+
If true, npm will not exit with an error code when `run` is invoked for a
199+
script that isn't defined in the `scripts` section of `package.json`. This
200+
option can be used when it's desirable to optionally run a script when it's
201+
present and fail if the script fails. This is useful, for example, when
202202
running scripts that may only apply for some builds in an otherwise generic
203203
CI setup.
204204

@@ -212,9 +212,9 @@ This value is not exported to the environment for child processes.
212212
If true, npm does not run scripts specified in package.json files.
213213

214214
Note that commands explicitly intended to run a particular script, such as
215-
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
216-
will still run their intended script if `ignore-scripts` is set, but they
217-
will *not* run any pre- or post-scripts.
215+
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
216+
run their intended script if `ignore-scripts` is set, but they will *not*
217+
run any pre- or post-scripts.
218218

219219

220220

deps/npm/docs/content/commands/npm-shrinkwrap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ design and purpose of package locks in npm, see
2424
### See Also
2525

2626
* [npm install](/commands/npm-install)
27-
* [npm run-script](/commands/npm-run-script)
27+
* [npm run](/commands/npm-run)
2828
* [npm scripts](/using-npm/scripts)
2929
* [package.json](/configuring-npm/package-json)
3030
* [package-lock.json](/configuring-npm/package-lock-json)

deps/npm/docs/content/commands/npm-start.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ the file specified in a package's `"main"` attribute when evoking with
2323
`node .`
2424

2525
As of [`[email protected]`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can
26-
use custom arguments when executing scripts. Refer to [`npm run-script`](/commands/npm-run-script) for more details.
26+
use custom arguments when executing scripts. Refer to [`npm run`](/commands/npm-run) for more details.
2727

2828
### Example
2929

@@ -55,9 +55,9 @@ npm start
5555
If true, npm does not run scripts specified in package.json files.
5656

5757
Note that commands explicitly intended to run a particular script, such as
58-
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
59-
will still run their intended script if `ignore-scripts` is set, but they
60-
will *not* run any pre- or post-scripts.
58+
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still
59+
run their intended script if `ignore-scripts` is set, but they will *not*
60+
run any pre- or post-scripts.
6161

6262

6363

@@ -73,7 +73,7 @@ init <package-spec>` commands.
7373

7474
### See Also
7575

76-
* [npm run-script](/commands/npm-run-script)
76+
* [npm run](/commands/npm-run)
7777
* [npm scripts](/using-npm/scripts)
7878
* [npm test](/commands/npm-test)
7979
* [npm restart](/commands/npm-restart)

0 commit comments

Comments
 (0)