Skip to content

Commit 90f35fc

Browse files
npm-robottargos
authored andcommitted
deps: upgrade npm to 8.1.4
PR-URL: #40865 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 1482c44 commit 90f35fc

File tree

353 files changed

+8547
-7424
lines changed

Some content is hidden

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

353 files changed

+8547
-7424
lines changed

deps/npm/bin/npx-cli.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const removed = new Set([
2626

2727
const { definitions, shorthands } = require('../lib/utils/config/index.js')
2828
const npmSwitches = Object.entries(definitions)
29-
.filter(([key, {type}]) => type === Boolean ||
29+
.filter(([key, { type }]) => type === Boolean ||
3030
(Array.isArray(type) && type.includes(Boolean)))
3131
.map(([key]) => key)
3232

@@ -65,9 +65,9 @@ let i
6565
let sawRemovedFlags = false
6666
for (i = 3; i < process.argv.length; i++) {
6767
const arg = process.argv[i]
68-
if (arg === '--')
68+
if (arg === '--') {
6969
break
70-
else if (/^-/.test(arg)) {
70+
} else if (/^-/.test(arg)) {
7171
const [key, ...v] = arg.replace(/^-+/, '').split('=')
7272

7373
switch (key) {
@@ -87,8 +87,9 @@ for (i = 3; i < process.argv.length; i++) {
8787
// resolve shorthands and run again
8888
if (shorthands[key] && !removed.has(key)) {
8989
const a = [...shorthands[key]]
90-
if (v.length)
90+
if (v.length) {
9191
a.push(v.join('='))
92+
}
9293
process.argv.splice(i, 1, ...a)
9394
i--
9495
continue
@@ -109,8 +110,9 @@ for (i = 3; i < process.argv.length; i++) {
109110
if (removed.has(key)) {
110111
// also remove the value for the cut key.
111112
process.argv.splice(i + 1, 1)
112-
} else
113+
} else {
113114
i++
115+
}
114116
}
115117
} else {
116118
// found a positional arg, put -- in front of it, and we're done
@@ -119,7 +121,8 @@ for (i = 3; i < process.argv.length; i++) {
119121
}
120122
}
121123

122-
if (sawRemovedFlags)
124+
if (sawRemovedFlags) {
123125
console.error('See `npm help exec` for more information')
126+
}
124127

125128
cli(process)

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ into a tarball (b).
5858

5959
* `npm install` (in a package directory, no arguments):
6060

61-
Install the dependencies in the local `node_modules` folder.
61+
Install the dependencies to the local `node_modules` folder.
6262

6363
In global mode (ie, with `-g` or `--global` appended to the command),
6464
it installs the current package context (ie, the current working

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

+2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ need to add them to `.npmignore` explicitly:
119119
* `._*`
120120
* `.DS_Store`
121121
* `.git`
122+
* `.gitignore`
122123
* `.hg`
124+
* `.npmignore`
123125
* `.npmrc`
124126
* `.lock-wscript`
125127
* `.svn`

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

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<html><head>
1+
<!DOCTYPE html><html><head>
2+
<meta charset="utf-8">
23
<title>npm-access</title>
34
<style>
45
body {
@@ -181,7 +182,7 @@ <h3 id="description">Description</h3>
181182
<li>
182183
<p>ls-packages:
183184
Show all of the packages a user or a team is able to access, along with the
184-
access level, except for read-only public packages (it wont print the whole
185+
access level, except for read-only public packages (it won't print the whole
185186
registry listing)</p>
186187
</li>
187188
<li>
@@ -209,7 +210,7 @@ <h3 id="details">Details</h3>
209210
<li>You have been given read-write privileges for a package, either as a member
210211
of a team or directly as an owner.</li>
211212
</ul>
212-
<p>If you have two-factor authentication enabled then youll be prompted to
213+
<p>If you have two-factor authentication enabled then you'll be prompted to
213214
provide an otp token, or may use the <code>--otp=...</code> option to specify it on
214215
the command line.</p>
215216
<p>If your account is not paid, then attempts to publish scoped packages will
@@ -222,7 +223,7 @@ <h3 id="configuration">Configuration</h3>
222223
<!-- raw HTML omitted -->
223224
<h4 id="registry"><code>registry</code></h4>
224225
<ul>
225-
<li>Default: <a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a></li>
226+
<li>Default: "<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a>"</li>
226227
<li>Type: URL</li>
227228
</ul>
228229
<p>The base URL of the npm registry.</p>
@@ -233,7 +234,7 @@ <h4 id="otp"><code>otp</code></h4>
233234
<li>Default: null</li>
234235
<li>Type: null or String</li>
235236
</ul>
236-
<p>This is a one-time password from a two-factor authenticator. Its needed
237+
<p>This is a one-time password from a two-factor authenticator. It's needed
237238
when publishing or changing package permissions with <code>npm access</code>.</p>
238239
<p>If not set, and a registry response fails with a challenge for a one-time
239240
password, npm will prompt on the command line for one.</p>

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<html><head>
1+
<!DOCTYPE html><html><head>
2+
<meta charset="utf-8">
23
<title>npm-adduser</title>
34
<style>
45
body {
@@ -168,15 +169,15 @@ <h3 id="configuration">Configuration</h3>
168169
<!-- raw HTML omitted -->
169170
<h4 id="registry"><code>registry</code></h4>
170171
<ul>
171-
<li>Default: <a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a></li>
172+
<li>Default: "<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a>"</li>
172173
<li>Type: URL</li>
173174
</ul>
174175
<p>The base URL of the npm registry.</p>
175176
<!-- raw HTML omitted -->
176177
<!-- raw HTML omitted -->
177178
<h4 id="scope"><code>scope</code></h4>
178179
<ul>
179-
<li>Default: the scope of the current project, if any, or “”</li>
180+
<li>Default: the scope of the current project, if any, or ""</li>
180181
<li>Type: String</li>
181182
</ul>
182183
<p>Associate an operation with a scope for a scoped registry.</p>

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

+14-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<html><head>
1+
<!DOCTYPE html><html><head>
2+
<meta charset="utf-8">
23
<title>npm-audit</title>
34
<style>
45
body {
@@ -159,13 +160,13 @@ <h3 id="description">Description</h3>
159160
<p>The command will exit with a 0 exit code if no vulnerabilities were found.</p>
160161
<p>Note that some vulnerabilities cannot be fixed automatically and will
161162
require manual intervention or review. Also note that since <code>npm audit fix</code> runs a full-fledged <code>npm install</code> under the hood, all configs that
162-
apply to the installer will also apply to <code>npm install</code> so things like
163+
apply to the installer will also apply to <code>npm install</code> -- so things like
163164
<code>npm audit fix --package-lock-only</code> will work as expected.</p>
164165
<p>By default, the audit command will exit with a non-zero code if any
165166
vulnerability is found. It may be useful in CI environments to include the
166167
<code>--audit-level</code> parameter to specify the minimum vulnerability level that
167168
will cause the command to fail. This option does not filter the report
168-
output, it simply changes the commands failure threshold.</p>
169+
output, it simply changes the command's failure threshold.</p>
169170
<h3 id="audit-endpoints">Audit Endpoints</h3>
170171
<p>There are two audit endpoints that npm may use to fetch vulnerability
171172
information: the <code>Bulk Advisory</code> endpoint and the <code>Quick Audit</code> endpoint.</p>
@@ -203,7 +204,7 @@ <h4 id="quick-audit-endpoint">Quick Audit Endpoint</h4>
203204
<p>All packages in the tree are submitted to the Quick Audit endpoint.
204205
Omitted dependency types are skipped when generating the report.</p>
205206
<h4 id="scrubbing">Scrubbing</h4>
206-
<p>Out of an abundance of caution, npm versions 5 and 6 would scrub any
207+
<p>Out of an abundance of caution, npm versions 5 and 6 would "scrub" any
207208
packages from the submitted report if their name contained a <code>/</code> character,
208209
so as to avoid leaking the names of potentially private packages or git
209210
URLs.</p>
@@ -215,12 +216,12 @@ <h4 id="scrubbing">Scrubbing</h4>
215216
<h4 id="calculating-meta-vulnerabilities-and-remediations">Calculating Meta-Vulnerabilities and Remediations</h4>
216217
<p>npm uses the
217218
<a href="http://npm.im/@npmcli/metavuln-calculator"><code>@npmcli/metavuln-calculator</code></a>
218-
module to turn a set of security advisories into a set of vulnerability
219-
objects. A meta-vulnerability is a dependency that is vulnerable by
219+
module to turn a set of security advisories into a set of "vulnerability"
220+
objects. A "meta-vulnerability" is a dependency that is vulnerable by
220221
virtue of dependence on vulnerable versions of a vulnerable package.</p>
221222
<p>For example, if the package <code>foo</code> is vulnerable in the range <code>&gt;=1.0.2 &lt;2.0.0</code>, and the package <code>bar</code> depends on <code>foo@^1.1.0</code>, then that version
222223
of <code>bar</code> can only be installed by installing a vulnerable version of <code>foo</code>.
223-
In this case, <code>bar</code> is a metavulnerability.</p>
224+
In this case, <code>bar</code> is a "metavulnerability".</p>
224225
<p>Once metavulnerabilities for a given package are calculated, they are
225226
cached in the <code>~/.npm</code> folder and only re-evaluated if the advisory range
226227
changes, or a new version of the package is published (in which case, the
@@ -275,7 +276,7 @@ <h3 id="configuration">Configuration</h3>
275276
<h4 id="audit-level"><code>audit-level</code></h4>
276277
<ul>
277278
<li>Default: null</li>
278-
<li>Type: null, info”, “low”, “moderate”, “high”, “critical, or none</li>
279+
<li>Type: null, "info", "low", "moderate", "high", "critical", or "none"</li>
279280
</ul>
280281
<p>The minimum level of vulnerability for <code>npm audit</code> to exit with a non-zero
281282
exit code.</p>
@@ -286,7 +287,7 @@ <h4 id="dry-run"><code>dry-run</code></h4>
286287
<li>Default: false</li>
287288
<li>Type: Boolean</li>
288289
</ul>
289-
<p>Indicates that you dont want npm to make any changes and that it should
290+
<p>Indicates that you don't want npm to make any changes and that it should
290291
only report what it would have done. This can be passed into any of the
291292
commands that modify your local installation, eg, <code>install</code>, <code>update</code>,
292293
<code>dedupe</code>, <code>uninstall</code>, as well as <code>pack</code> and <code>publish</code>.</p>
@@ -316,7 +317,7 @@ <h4 id="force"><code>force</code></h4>
316317
<li>Implicitly set <code>--yes</code> during <code>npm init</code>.</li>
317318
<li>Allow clobbering existing values in <code>npm pkg</code></li>
318319
</ul>
319-
<p>If you dont have a clear idea of what you want to do, it is strongly
320+
<p>If you don't have a clear idea of what you want to do, it is strongly
320321
recommended that you do not use this option!</p>
321322
<!-- raw HTML omitted -->
322323
<!-- raw HTML omitted -->
@@ -348,9 +349,9 @@ <h4 id="package-lock-only"><code>package-lock-only</code></h4>
348349
<!-- raw HTML omitted -->
349350
<h4 id="omit"><code>omit</code></h4>
350351
<ul>
351-
<li>Default: dev if the <code>NODE_ENV</code> environment variable is set to
352-
production, otherwise empty.</li>
353-
<li>Type: dev”, “optional, or peer (can be set multiple times)</li>
352+
<li>Default: 'dev' if the <code>NODE_ENV</code> environment variable is set to
353+
'production', otherwise empty.</li>
354+
<li>Type: "dev", "optional", or "peer" (can be set multiple times)</li>
354355
</ul>
355356
<p>Dependency types to omit from the installation tree on disk.</p>
356357
<p>Note that these dependencies <em>are</em> still resolved and added to the

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<html><head>
1+
<!DOCTYPE html><html><head>
2+
<meta charset="utf-8">
23
<title>npm-bin</title>
34
<style>
45
body {
@@ -159,7 +160,7 @@ <h4 id="global"><code>global</code></h4>
159160
<li>Default: false</li>
160161
<li>Type: Boolean</li>
161162
</ul>
162-
<p>Operates in global mode, so that packages are installed into the <code>prefix</code>
163+
<p>Operates in "global" mode, so that packages are installed into the <code>prefix</code>
163164
folder instead of the current working directory. See
164165
<a href="../configuring-npm/folders.html">folders</a> for more on the differences in behavior.</p>
165166
<ul>

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<html><head>
1+
<!DOCTYPE html><html><head>
2+
<meta charset="utf-8">
23
<title>npm-bugs</title>
34
<style>
45
body {
@@ -150,7 +151,7 @@ <h2 id="table-of-contents">Table of contents</h2>
150151
aliases: issues
151152
</code></pre>
152153
<h3 id="description">Description</h3>
153-
<p>This command tries to guess at the likely location of a packages bug
154+
<p>This command tries to guess at the likely location of a package's bug
154155
tracker URL or the <code>mailto</code> URL of the support email, and then tries to
155156
open it using the <code>--browser</code> config param. If no package name is provided, it
156157
will search for a <code>package.json</code> in the current folder and use the <code>name</code> property.</p>
@@ -171,7 +172,7 @@ <h4 id="browser"><code>browser</code></h4>
171172
<!-- raw HTML omitted -->
172173
<h4 id="registry"><code>registry</code></h4>
173174
<ul>
174-
<li>Default: <a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a></li>
175+
<li>Default: "<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a>"</li>
175176
<li>Type: URL</li>
176177
</ul>
177178
<p>The base URL of the npm registry.</p>

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

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<html><head>
1+
<!DOCTYPE html><html><head>
2+
<meta charset="utf-8">
23
<title>npm-cache</title>
34
<style>
45
body {
@@ -141,7 +142,7 @@ <h1 id="npm-cache">npm-cache</h1>
141142

142143
<section id="table_of_contents">
143144
<h2 id="table-of-contents">Table of contents</h2>
144-
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><li><a href="#details">Details</a></li><li><a href="#a-note-about-the-caches-design">A note about the caches design</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#cache"><code>cache</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
145+
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><li><a href="#details">Details</a></li><li><a href="#a-note-about-the-caches-design">A note about the cache's design</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#cache"><code>cache</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
145146
</section>
146147

147148
<div id="_content"><h3 id="synopsis">Synopsis</h3>
@@ -168,7 +169,7 @@ <h3 id="description">Description</h3>
168169
<li>
169170
<p>clean:
170171
Delete all data out of the cache folder. Note that this is typically
171-
unnecessary, as npms cache is self-healing and resistant to data
172+
unnecessary, as npm's cache is self-healing and resistant to data
172173
corruption issues.</p>
173174
</li>
174175
<li>
@@ -195,7 +196,7 @@ <h3 id="details">Details</h3>
195196
used directly.</p>
196197
<p>npm will not remove data by itself: the cache will grow as new packages are
197198
installed.</p>
198-
<h3 id="a-note-about-the-caches-design">A note about the caches design</h3>
199+
<h3 id="a-note-about-the-caches-design">A note about the cache's design</h3>
199200
<p>The npm cache is strictly a cache: it should not be relied upon as a
200201
persistent and reliable data store for package data. npm makes no guarantee
201202
that a previously-cached piece of data will be available later, and will
@@ -212,7 +213,7 @@ <h4 id="cache"><code>cache</code></h4>
212213
<li>Default: Windows: <code>%LocalAppData%\npm-cache</code>, Posix: <code>~/.npm</code></li>
213214
<li>Type: Path</li>
214215
</ul>
215-
<p>The location of npms cache directory. See <a href="../commands/npm-cache.html"><code>npm cache</code></a></p>
216+
<p>The location of npm's cache directory. See <a href="../commands/npm-cache.html"><code>npm cache</code></a></p>
216217
<!-- raw HTML omitted -->
217218
<!-- raw HTML omitted -->
218219
<!-- raw HTML omitted -->

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

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<html><head>
1+
<!DOCTYPE html><html><head>
2+
<meta charset="utf-8">
23
<title>npm-ci</title>
34
<style>
45
body {
@@ -149,9 +150,9 @@ <h2 id="table-of-contents">Table of contents</h2>
149150
</code></pre>
150151
<h3 id="description">Description</h3>
151152
<p>This command is similar to <a href="../commands/npm-install.html"><code>npm install</code></a>, except
152-
its meant to be used in automated environments such as test platforms,
153-
continuous integration, and deployment or any situation where you want
154-
to make sure youre doing a clean install of your dependencies.</p>
153+
it's meant to be used in automated environments such as test platforms,
154+
continuous integration, and deployment -- or any situation where you want
155+
to make sure you're doing a clean install of your dependencies.</p>
155156
<p><code>npm ci</code> will be significantly faster when:</p>
156157
<ul>
157158
<li>There is a <code>package-lock.json</code> or <code>npm-shrinkwrap.json</code> file.</li>
@@ -199,7 +200,7 @@ <h4 id="audit"><code>audit</code></h4>
199200
<li>Default: true</li>
200201
<li>Type: Boolean</li>
201202
</ul>
202-
<p>When true submit audit reports alongside the current npm command to the
203+
<p>When "true" submit audit reports alongside the current npm command to the
203204
default registry and all registries configured for scopes. See the
204205
documentation for <a href="../commands/npm-audit.html"><code>npm audit</code></a> for details on what is
205206
submitted.</p>
@@ -219,7 +220,7 @@ <h4 id="ignore-scripts"><code>ignore-scripts</code></h4>
219220
<!-- raw HTML omitted -->
220221
<h4 id="script-shell"><code>script-shell</code></h4>
221222
<ul>
222-
<li>Default: /bin/sh on POSIX systems, cmd.exe on Windows</li>
223+
<li>Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows</li>
223224
<li>Type: null or String</li>
224225
</ul>
225226
<p>The shell to use for scripts run with the <code>npm exec</code>, <code>npm run</code> and <code>npm init &lt;pkg&gt;</code> commands.</p>

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<html><head>
1+
<!DOCTYPE html><html><head>
2+
<meta charset="utf-8">
23
<title>npm-completion</title>
34
<style>
45
body {
@@ -162,7 +163,7 @@ <h3 id="description">Description</h3>
162163
<code>/etc/bash_completion.d/npm</code> if you have a system that will read
163164
that file for you.</p>
164165
<p>When <code>COMP_CWORD</code>, <code>COMP_LINE</code>, and <code>COMP_POINT</code> are defined in the
165-
environment, <code>npm completion</code> acts in plumbing mode, and outputs
166+
environment, <code>npm completion</code> acts in "plumbing mode", and outputs
166167
completions based on the arguments.</p>
167168
<h3 id="see-also">See Also</h3>
168169
<ul>

0 commit comments

Comments
 (0)