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 <luigipinca@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
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

0 commit comments

Comments
 (0)