Skip to content

Commit 052b0ba

Browse files
npm-cli-botrichardlau
authored andcommitted
deps: upgrade npm to 10.5.1
PR-URL: #52351 Reviewed-By: Luke Karrys <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Ulises GascΓ³n <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 209823d commit 052b0ba

File tree

219 files changed

+1600
-1081
lines changed

Some content is hidden

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

219 files changed

+1600
-1081
lines changed

β€Ždeps/npm/bin/npm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ if [ $? -ne 0 ]; then
4141
fi
4242
no_node_dir
4343
fi
44+
NPM_PREFIX_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-prefix.js"
4445
NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js"
45-
NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
46+
NPM_PREFIX=`"$NODE_EXE" "$NPM_PREFIX_JS"`
4647
if [ $? -ne 0 ]; then
4748
no_node_dir
4849
fi

β€Ždeps/npm/bin/npm-prefix.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env node
2+
// This is a single-use bin to help windows discover the proper prefix for npm
3+
// without having to load all of npm first
4+
// It does not accept argv params
5+
6+
const path = require('path')
7+
const Config = require('@npmcli/config')
8+
const { definitions, flatten, shorthands } = require('@npmcli/config/lib/definitions')
9+
const config = new Config({
10+
npmPath: path.dirname(__dirname),
11+
// argv is explicitly not looked at since prefix is not something that can be changed via argv
12+
argv: [],
13+
definitions,
14+
flatten,
15+
shorthands,
16+
excludeNpmCwd: false,
17+
})
18+
19+
async function main () {
20+
try {
21+
await config.load()
22+
// eslint-disable-next-line no-console
23+
console.log(config.globalPrefix)
24+
} catch (err) {
25+
// eslint-disable-next-line no-console
26+
console.error(err)
27+
process.exit(1)
28+
}
29+
}
30+
main()

β€Ždeps/npm/bin/npm.cmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ IF NOT EXIST "%NODE_EXE%" (
88
SET "NODE_EXE=node"
99
)
1010

11+
SET "NPM_PREFIX_JS=%~dp0\node_modules\npm\bin\npm-prefix.js"
1112
SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
12-
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (
13+
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_PREFIX_JS%"') DO (
1314
SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js"
1415
)
1516
IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" (

β€Ždeps/npm/bin/npm.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ if ($nodebin -eq $null) {
1717
}
1818
$nodedir = $(New-Object -ComObject Scripting.FileSystemObject).GetFile("$nodebin").ParentFolder.Path
1919

20-
$npmclijs="$nodedir/node_modules/npm/bin/npm-cli.js"
21-
$npmprefix=(& $nodeexe $npmclijs prefix -g)
20+
$npmprefixjs="$nodedir/node_modules/npm/bin/npm-prefix.js"
21+
$npmprefix=(& $nodeexe $npmprefixjs)
2222
if ($LASTEXITCODE -ne 0) {
2323
Write-Host "Could not determine Node.js install directory"
2424
exit 1

β€Ždeps/npm/bin/npx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ if [ $? -ne 0 ]; then
4141
fi
4242
no_node_dir
4343
fi
44-
NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js"
44+
NPM_PREFIX_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-prefix.js"
4545
NPX_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npx-cli.js"
46-
NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
46+
NPM_PREFIX=`"$NODE_EXE" "$NPM_PREFIX_JS"`
4747
if [ $? -ne 0 ]; then
4848
no_node_dir
4949
fi

β€Ždeps/npm/bin/npx.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ IF NOT EXIST "%NODE_EXE%" (
88
SET "NODE_EXE=node"
99
)
1010

11-
SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
11+
SET "NPM_PREFIX_JS=%~dp0\node_modules\npm\bin\npm-prefix.js"
1212
SET "NPX_CLI_JS=%~dp0\node_modules\npm\bin\npx-cli.js"
13-
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (
13+
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_PREFIX_JS%"') DO (
1414
SET "NPM_PREFIX_NPX_CLI_JS=%%F\node_modules\npm\bin\npx-cli.js"
1515
)
1616
IF EXIST "%NPM_PREFIX_NPX_CLI_JS%" (

β€Ždeps/npm/bin/npx.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ if ($nodebin -eq $null) {
1717
}
1818
$nodedir = $(New-Object -ComObject Scripting.FileSystemObject).GetFile("$nodebin").ParentFolder.Path
1919

20-
$npmclijs="$nodedir/node_modules/npm/bin/npm-cli.js"
21-
$npmprefix=(& $nodeexe $npmclijs prefix -g)
20+
$npmprefixjs="$nodedir/node_modules/npm/bin/npm-prefix.js"
21+
$npmprefix=(& $nodeexe $npmprefixjs)
2222
if ($LASTEXITCODE -ne 0) {
2323
Write-Host "Could not determine Node.js install directory"
2424
exit 1

β€Ždeps/npm/docs/content/commands/npm-audit.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ Registry signatures can be verified using the following `audit` command:
4949
$ npm audit signatures
5050
```
5151

52+
The `audit signatures` command will also verify the provenance attestations of
53+
downloaded packages. Because provenance attestations are such a new feature,
54+
security features may be added to (or changed in) the attestation format over
55+
time. To ensure that you're always able to verify attestation signatures check
56+
that you're running the latest version of the npm CLI. Please note this often
57+
means updating npm beyond the version that ships with Node.js.
58+
5259
The npm CLI supports registry signatures and signing keys provided by any registry if the following conventions are followed:
5360

5461
1. Signatures are provided in the package's `packument` in each published version within the `dist` object:
@@ -89,7 +96,7 @@ Keys response:
8996
- `scheme`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI
9097
- `key`: base64 encoded public key
9198

92-
See this [example key's response from the public npm registry](https://registry.npmjs.org/-/npm/v1/keys").
99+
See this [example key's response from the public npm registry](https://registry.npmjs.org/-/npm/v1/keys).
93100

94101
### Audit Endpoints
95102

β€Ž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-
[email protected].0 /path/to/npm
30+
[email protected].1 /path/to/npm
3131
└─┬ [email protected]
3232
└── [email protected]
3333
```

β€Ždeps/npm/docs/content/commands/npm-search.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@ Show the description in `npm search`
9191

9292

9393

94+
#### `searchlimit`
95+
96+
* Default: 20
97+
* Type: Number
98+
99+
Number of items to limit search results to. Will not apply at all to legacy
100+
searches.
101+
102+
103+
94104
#### `searchopts`
95105

96106
* Default: ""

0 commit comments

Comments
Β (0)