Skip to content

Commit 272e55c

Browse files
npm-cli-bottargos
authored andcommitted
deps: upgrade npm to 10.2.3
PR-URL: #50531 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Debadree Chatterjee <[email protected]>
1 parent 8c918e5 commit 272e55c

File tree

556 files changed

+6990
-44431
lines changed

Some content is hidden

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

556 files changed

+6990
-44431
lines changed

deps/npm/bin/node-gyp-bin/node-gyp

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env sh
2+
if [ "x$npm_config_node_gyp" = "x" ]; then
3+
node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@"
4+
else
5+
"$npm_config_node_gyp" "$@"
6+
fi
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
if not defined npm_config_node_gyp (
2+
node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %*
3+
) else (
4+
node "%npm_config_node_gyp%" %*
5+
)

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ The `sig` is generated using the following template: `${package.name}@${package.
8383

8484
Keys response:
8585

86-
- `expires`: null or a simplified extended <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 format</a>: `YYYY-MM-DDTHH:mm:ss.sssZ`
86+
- `expires`: null or a simplified extended [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601"): `YYYY-MM-DDTHH:mm:ss.sssZ`
8787
- `keydid`: sha256 fingerprint of the public key
8888
- `keytype`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI
8989
- `scheme`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI
9090
- `key`: base64 encoded public key
9191

92-
See this <a href="https://registry.npmjs.org/-/npm/v1/keys" target="_blank">example key's response from the public npm registry</a>.
92+
See this [example key's response from the public npm registry](https://registry.npmjs.org/-/npm/v1/keys").
9393

9494
### Audit Endpoints
9595

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

+1-1
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].3 /path/to/npm
3131
3232
3333
```

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

+23-8
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,29 @@ alias: rb
1414

1515
### Description
1616

17-
This command runs the `npm build` command on the matched folders. This is
18-
useful when you install a new version of node, and must recompile all your
19-
C++ addons with the new binary. It is also useful when installing with
20-
`--ignore-scripts` and `--no-bin-links`, to explicitly choose which
21-
packages to build and/or link bins.
22-
23-
If one or more package specs are provided, then only packages with a
24-
name and version matching one of the specifiers will be rebuilt.
17+
This command does the following:
18+
19+
1. Execute lifecycle scripts (`preinstall`, `install`, `postinstall`, `prepare`)
20+
2. Links bins depending on whether bin links are enabled
21+
22+
This command is particularly useful in scenarios including but not limited to:
23+
24+
1. Installing a new version of **node.js**, where you need to recompile all your C++ add-ons with the updated binary.
25+
2. Installing with `--ignore-scripts` and `--no-bin-links`, to explicitly choose which packages to build and/or link bins.
26+
27+
If one or more package specs are provided, then only packages with a name and version matching one of the specifiers will be rebuilt.
28+
29+
Usually, you should not need to run `npm rebuild` as it is already done for you as part of npm install (unless you suppressed these steps with `--ignore-scripts` or `--no-bin-links`).
30+
31+
If there is a `binding.gyp` file in the root of your package, then npm will use a default install hook:
32+
33+
```
34+
"scripts": {
35+
"install": "node-gyp rebuild"
36+
}
37+
```
38+
39+
This default behavior is suppressed if the `package.json` has its own `install` or `preinstall` scripts. It is also suppressed if the package specifies `"gypfile": false`
2540

2641
### Configuration
2742

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ on your `authtype`.
3333

3434
* create / destroy:
3535
Create a new team, or destroy an existing one. Note: You cannot remove the
36-
`developers` team, <a href="https://docs.npmjs.com/about-developers-team" target="_blank">learn more.</a>
36+
`developers` team, [learn more.](https://docs.npmjs.com/about-developers-team)
3737

3838
Here's how to create a new team `newteam` under the `org` org:
3939

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ description: Remove a package from the registry
1010
npm unpublish [<package-spec>]
1111
```
1212

13-
To learn more about how the npm registry treats unpublish, see our <a
14-
href="https://docs.npmjs.com/policies/unpublish" target="_blank"
15-
rel="noopener noreferrer"> unpublish policies</a>
13+
To learn more about how the npm registry treats unpublish, see our
14+
[unpublish policies](https://docs.npmjs.com/policies/unpublish).
1615

1716
### Warning
1817

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Note: This command is unaware of workspaces.
1414

1515
### Version
1616

17-
10.2.0
17+
10.2.3
1818

1919
### Description
2020

deps/npm/docs/content/configuring-npm/package-lock-json.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ the npm registry. Lockfiles generated by npm v7 will contain
114114
* `1`: The lockfile version used by npm v5 and v6.
115115
* `2`: The lockfile version used by npm v7 and v8. Backwards compatible to v1
116116
lockfiles.
117-
* `3`: The lockfile version used by npm v9. Backwards compatible to npm v7.
117+
* `3`: The lockfile version used by npm v9 and above. Backwards compatible to npm v7.
118118

119119
npm will always attempt to get whatever data it can out of a lockfile, even
120120
if it is not a version that it was designed to support.

deps/npm/docs/content/using-npm/scripts.md

-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ These are run from the scripts of `<pkg-name>`
159159
* `publish`
160160
* `postpublish`
161161

162-
`prepare` will not run during `--dry-run`
163-
164162
#### [`npm rebuild`](/commands/npm-rebuild)
165163

166164
* `preinstall`

deps/npm/docs/output/commands/npm-audit.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,13 @@ <h3 id="audit-signatures">Audit Signatures</h3>
203203
</code></pre>
204204
<p>Keys response:</p>
205205
<ul>
206-
<li><code>expires</code>: null or a simplified extended ISO 8601 format: <code>YYYY-MM-DDTHH:mm:ss.sssZ</code></li>
206+
<li><code>expires</code>: null or a simplified extended <a href="https://en.wikipedia.org/wiki/ISO_8601%22">ISO 8601 format</a>: <code>YYYY-MM-DDTHH:mm:ss.sssZ</code></li>
207207
<li><code>keydid</code>: sha256 fingerprint of the public key</li>
208208
<li><code>keytype</code>: only <code>ecdsa-sha2-nistp256</code> is currently supported by the npm CLI</li>
209209
<li><code>scheme</code>: only <code>ecdsa-sha2-nistp256</code> is currently supported by the npm CLI</li>
210210
<li><code>key</code>: base64 encoded public key</li>
211211
</ul>
212-
<p>See this example key's response from the public npm registry.</p>
212+
<p>See this <a href="https://registry.npmjs.org/-/npm/v1/keys%22">example key's response from the public npm registry</a>.</p>
213213
<h3 id="audit-endpoints">Audit Endpoints</h3>
214214
<p>There are two audit endpoints that npm may use to fetch vulnerability
215215
information: the <code>Bulk Advisory</code> endpoint and the <code>Quick Audit</code> endpoint.</p>

deps/npm/docs/output/commands/npm-ls.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ <h3 id="description">Description</h3>
160160
the results to only the paths to the packages named. Note that nested
161161
packages will <em>also</em> show the paths to the specified packages. For
162162
example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
163-
<pre><code class="language-bash">[email protected].0 /path/to/npm
163+
<pre><code class="language-bash">[email protected].3 /path/to/npm
164164
165165
166166
</code></pre>

deps/npm/docs/output/commands/npm-rebuild.html

+18-7
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,24 @@ <h2 id="table-of-contents">Table of contents</h2>
151151
alias: rb
152152
</code></pre>
153153
<h3 id="description">Description</h3>
154-
<p>This command runs the <code>npm build</code> command on the matched folders. This is
155-
useful when you install a new version of node, and must recompile all your
156-
C++ addons with the new binary. It is also useful when installing with
157-
<code>--ignore-scripts</code> and <code>--no-bin-links</code>, to explicitly choose which
158-
packages to build and/or link bins.</p>
159-
<p>If one or more package specs are provided, then only packages with a
160-
name and version matching one of the specifiers will be rebuilt.</p>
154+
<p>This command does the following:</p>
155+
<ol>
156+
<li>Execute lifecycle scripts (<code>preinstall</code>, <code>install</code>, <code>postinstall</code>, <code>prepare</code>)</li>
157+
<li>Links bins depending on whether bin links are enabled</li>
158+
</ol>
159+
<p>This command is particularly useful in scenarios including but not limited to:</p>
160+
<ol>
161+
<li>Installing a new version of <strong>node.js</strong>, where you need to recompile all your C++ add-ons with the updated binary.</li>
162+
<li>Installing with <code>--ignore-scripts</code> and <code>--no-bin-links</code>, to explicitly choose which packages to build and/or link bins.</li>
163+
</ol>
164+
<p>If one or more package specs are provided, then only packages with a name and version matching one of the specifiers will be rebuilt.</p>
165+
<p>Usually, you should not need to run <code>npm rebuild</code> as it is already done for you as part of npm install (unless you suppressed these steps with <code>--ignore-scripts</code> or <code>--no-bin-links</code>).</p>
166+
<p>If there is a <code>binding.gyp</code> file in the root of your package, then npm will use a default install hook:</p>
167+
<pre><code>"scripts": {
168+
"install": "node-gyp rebuild"
169+
}
170+
</code></pre>
171+
<p>This default behavior is suppressed if the <code>package.json</code> has its own <code>install</code> or <code>preinstall</code> scripts. It is also suppressed if the package specifies <code>"gypfile": false</code></p>
161172
<h3 id="configuration">Configuration</h3>
162173
<h4 id="global"><code>global</code></h4>
163174
<ul>

deps/npm/docs/output/commands/npm-team.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ <h3 id="description">Description</h3>
168168
<li>
169169
<p>create / destroy:
170170
Create a new team, or destroy an existing one. Note: You cannot remove the
171-
<code>developers</code> team, learn more.</p>
171+
<code>developers</code> team, <a href="https://docs.npmjs.com/about-developers-team">learn more.</a></p>
172172
<p>Here's how to create a new team <code>newteam</code> under the <code>org</code> org:</p>
173173
<pre><code class="language-bash">npm team create @org:newteam
174174
</code></pre>

deps/npm/docs/output/commands/npm-unpublish.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ <h2 id="table-of-contents">Table of contents</h2>
148148
<div id="_content"><h3 id="synopsis">Synopsis</h3>
149149
<pre><code class="language-bash">npm unpublish [&lt;package-spec&gt;]
150150
</code></pre>
151-
<p>To learn more about how the npm registry treats unpublish, see our unpublish policies</p>
151+
<p>To learn more about how the npm registry treats unpublish, see our
152+
<a href="https://docs.npmjs.com/policies/unpublish">unpublish policies</a>.</p>
152153
<h3 id="warning">Warning</h3>
153154
<p>Consider using the <a href="../commands/npm-deprecate.html"><code>deprecate</code></a> command instead,
154155
if your intent is to encourage users to upgrade, or if you no longer

deps/npm/docs/output/commands/npm.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ <h2 id="table-of-contents">Table of contents</h2>
150150
</code></pre>
151151
<p>Note: This command is unaware of workspaces.</p>
152152
<h3 id="version">Version</h3>
153-
<p>10.2.0</p>
153+
<p>10.2.3</p>
154154
<h3 id="description">Description</h3>
155155
<p>npm is the package manager for the Node JavaScript platform. It puts
156156
modules in place so that node can find them, and manages dependency

deps/npm/docs/output/configuring-npm/package-lock-json.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ <h4 id="lockfileversion"><code>lockfileVersion</code></h4>
241241
<li><code>1</code>: The lockfile version used by npm v5 and v6.</li>
242242
<li><code>2</code>: The lockfile version used by npm v7 and v8. Backwards compatible to v1
243243
lockfiles.</li>
244-
<li><code>3</code>: The lockfile version used by npm v9. Backwards compatible to npm v7.</li>
244+
<li><code>3</code>: The lockfile version used by npm v9 and above. Backwards compatible to npm v7.</li>
245245
</ul>
246246
<p>npm will always attempt to get whatever data it can out of a lockfile, even
247247
if it is not a version that it was designed to support.</p>

deps/npm/docs/output/using-npm/scripts.html

-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ <h4 id="npm-publish"><a href="../commands/npm-publish.html"><code>npm publish</c
293293
<li><code>publish</code></li>
294294
<li><code>postpublish</code></li>
295295
</ul>
296-
<p><code>prepare</code> will not run during <code>--dry-run</code></p>
297296
<h4 id="npm-rebuild"><a href="../commands/npm-rebuild.html"><code>npm rebuild</code></a></h4>
298297
<ul>
299298
<li><code>preinstall</code></li>

deps/npm/lib/commands/audit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class VerifySignatures {
5555
// Didn't find any dependencies that could be verified, e.g. only local
5656
// deps, missing version, not on a registry etc.
5757
if (!this.auditedWithKeysCount) {
58-
throw new Error('found no dependencies to audit that where installed from ' +
58+
throw new Error('found no dependencies to audit that were installed from ' +
5959
'a supported registry')
6060
}
6161

deps/npm/lib/commands/link.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ class Link extends ArboristWorkspaceCmd {
109109
// using any of --save-dev or other types
110110
const save =
111111
Boolean(
112-
this.npm.config.find('save') !== 'default' ||
112+
(this.npm.config.find('save') !== 'default' &&
113+
this.npm.config.get('save')) ||
113114
this.npm.config.get('save-optional') ||
114115
this.npm.config.get('save-peer') ||
115116
this.npm.config.get('save-dev') ||
116117
this.npm.config.get('save-prod')
117118
)
118-
119119
// create a new arborist instance for the local prefix and
120120
// reify all the pending names as symlinks there
121121
const localArb = new Arborist({

deps/npm/lib/commands/logout.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const getAuth = require('npm-registry-fetch/lib/auth.js')
21
const npmFetch = require('npm-registry-fetch')
2+
const { getAuth } = npmFetch
33
const log = require('../utils/log-shim')
44
const BaseCommand = require('../base-command.js')
55

@@ -19,10 +19,14 @@ class Logout extends BaseCommand {
1919

2020
const auth = getAuth(reg, this.npm.flatOptions)
2121

22+
const level = this.npm.config.find(`${auth.regKey}:${auth.authKey}`)
23+
24+
// find the config level and only delete from there
2225
if (auth.token) {
2326
log.verbose('logout', `clearing token for ${reg}`)
2427
await npmFetch(`/-/user/token/${encodeURIComponent(auth.token)}`, {
2528
...this.npm.flatOptions,
29+
registry: reg,
2630
method: 'DELETE',
2731
ignoreBody: true,
2832
})
@@ -34,12 +38,12 @@ class Logout extends BaseCommand {
3438
}
3539

3640
if (scope) {
37-
this.npm.config.delete(regRef, 'user')
41+
this.npm.config.delete(regRef, level)
3842
}
3943

40-
this.npm.config.clearCredentialsByURI(reg)
44+
this.npm.config.clearCredentialsByURI(reg, level)
4145

42-
await this.npm.config.save('user')
46+
await this.npm.config.save(level)
4347
}
4448
}
4549
module.exports = Logout

deps/npm/lib/utils/error-message.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ const errorMessage = (er, npm) => {
182182
])
183183
detail.push([
184184
'',
185-
['To correct this please trying logging in again with:', ' npm login'].join('\n'),
185+
['To correct this please try logging in again with:', ' npm login'].join('\n'),
186186
])
187187
} else if (auth.includes('Basic')) {
188188
short.push(['', 'Incorrect or missing password.'])

deps/npm/lib/utils/queryable.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,9 @@ const getter = ({ data, key }) => {
111111
}, {})
112112
return _data
113113
} else {
114-
// if can't find any more values, it means it's just over
115-
// and there's nothing to return
116-
if (!_data[k]) {
114+
if (!Object.hasOwn(_data, k)) {
117115
return undefined
118116
}
119-
120-
// otherwise sets the next value
121117
_data = _data[k]
122118
}
123119

deps/npm/man/man1/npm-access.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-ACCESS" "1" "October 2023" "" ""
1+
.TH "NPM-ACCESS" "1" "November 2023" "" ""
22
.SH "NAME"
33
\fBnpm-access\fR - Set access level on published packages
44
.SS "Synopsis"

deps/npm/man/man1/npm-adduser.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-ADDUSER" "1" "October 2023" "" ""
1+
.TH "NPM-ADDUSER" "1" "November 2023" "" ""
22
.SH "NAME"
33
\fBnpm-adduser\fR - Add a registry user account
44
.SS "Synopsis"

deps/npm/man/man1/npm-audit.1

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-AUDIT" "1" "October 2023" "" ""
1+
.TH "NPM-AUDIT" "1" "November 2023" "" ""
22
.SH "NAME"
33
\fBnpm-audit\fR - Run a security audit
44
.SS "Synopsis"
@@ -78,7 +78,7 @@ Public signing keys are provided at \fBregistry-host.tld/-/npm/v1/keys\fR in the
7878
Keys response:
7979
.RS 0
8080
.IP \(bu 4
81-
\fBexpires\fR: null or a simplified extended ISO 8601 format: \fBYYYY-MM-DDTHH:mm:ss.sssZ\fR
81+
\fBexpires\fR: null or a simplified extended \fBISO 8601 format\fR \fI\(lahttps://en.wikipedia.org/wiki/ISO_8601"\(ra\fR: \fBYYYY-MM-DDTHH:mm:ss.sssZ\fR
8282
.IP \(bu 4
8383
\fBkeydid\fR: sha256 fingerprint of the public key
8484
.IP \(bu 4
@@ -90,7 +90,7 @@ Keys response:
9090
.RE 0
9191

9292
.P
93-
See this example key's response from the public npm registry.
93+
See this \fBexample key's response from the public npm registry\fR \fI\(lahttps://registry.npmjs.org/-/npm/v1/keys"\(ra\fR.
9494
.SS "Audit Endpoints"
9595
.P
9696
There are two audit endpoints that npm may use to fetch vulnerability information: the \fBBulk Advisory\fR endpoint and the \fBQuick Audit\fR endpoint.

deps/npm/man/man1/npm-bugs.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-BUGS" "1" "October 2023" "" ""
1+
.TH "NPM-BUGS" "1" "November 2023" "" ""
22
.SH "NAME"
33
\fBnpm-bugs\fR - Report bugs for a package in a web browser
44
.SS "Synopsis"

deps/npm/man/man1/npm-cache.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-CACHE" "1" "October 2023" "" ""
1+
.TH "NPM-CACHE" "1" "November 2023" "" ""
22
.SH "NAME"
33
\fBnpm-cache\fR - Manipulates packages cache
44
.SS "Synopsis"

deps/npm/man/man1/npm-ci.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-CI" "1" "October 2023" "" ""
1+
.TH "NPM-CI" "1" "November 2023" "" ""
22
.SH "NAME"
33
\fBnpm-ci\fR - Clean install a project
44
.SS "Synopsis"

deps/npm/man/man1/npm-completion.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-COMPLETION" "1" "October 2023" "" ""
1+
.TH "NPM-COMPLETION" "1" "November 2023" "" ""
22
.SH "NAME"
33
\fBnpm-completion\fR - Tab Completion for npm
44
.SS "Synopsis"

deps/npm/man/man1/npm-config.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-CONFIG" "1" "October 2023" "" ""
1+
.TH "NPM-CONFIG" "1" "November 2023" "" ""
22
.SH "NAME"
33
\fBnpm-config\fR - Manage the npm configuration files
44
.SS "Synopsis"

deps/npm/man/man1/npm-dedupe.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-DEDUPE" "1" "October 2023" "" ""
1+
.TH "NPM-DEDUPE" "1" "November 2023" "" ""
22
.SH "NAME"
33
\fBnpm-dedupe\fR - Reduce duplication in the package tree
44
.SS "Synopsis"

deps/npm/man/man1/npm-deprecate.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-DEPRECATE" "1" "October 2023" "" ""
1+
.TH "NPM-DEPRECATE" "1" "November 2023" "" ""
22
.SH "NAME"
33
\fBnpm-deprecate\fR - Deprecate a version of a package
44
.SS "Synopsis"

deps/npm/man/man1/npm-diff.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "NPM-DIFF" "1" "October 2023" "" ""
1+
.TH "NPM-DIFF" "1" "November 2023" "" ""
22
.SH "NAME"
33
\fBnpm-diff\fR - The registry diff command
44
.SS "Synopsis"

0 commit comments

Comments
 (0)