Skip to content

Commit 2df1624

Browse files
npm-robotRafaelGSS
authored andcommitted
deps: upgrade npm to 8.9.0
PR-URL: #42968 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 8cfc18e commit 2df1624

File tree

127 files changed

+666
-364
lines changed

Some content is hidden

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

127 files changed

+666
-364
lines changed

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

-4
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,6 @@ this warning is treated as a failure.
147147
If set to false, then ignore `package-lock.json` files when installing. This
148148
will also prevent _writing_ `package-lock.json` if `save` is true.
149149
150-
When package package-locks are disabled, automatic pruning of extraneous
151-
modules will also be disabled. To remove extraneous modules with
152-
package-locks disabled use `npm prune`.
153-
154150
This configuration does not affect `npm ci`.
155151
156152
<!-- automatically generated, do not edit manually -->

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

-4
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ this warning is treated as a failure.
8787
If set to false, then ignore `package-lock.json` files when installing. This
8888
will also prevent _writing_ `package-lock.json` if `save` is true.
8989

90-
When package package-locks are disabled, automatic pruning of extraneous
91-
modules will also be disabled. To remove extraneous modules with
92-
package-locks disabled use `npm prune`.
93-
9490
This configuration does not affect `npm ci`.
9591

9692
<!-- automatically generated, do not edit manually -->

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

-4
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,6 @@ this warning is treated as a failure.
162162
If set to false, then ignore `package-lock.json` files when installing. This
163163
will also prevent _writing_ `package-lock.json` if `save` is true.
164164

165-
When package package-locks are disabled, automatic pruning of extraneous
166-
modules will also be disabled. To remove extraneous modules with
167-
package-locks disabled use `npm prune`.
168-
169165
This configuration does not affect `npm ci`.
170166

171167
<!-- automatically generated, do not edit manually -->

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

-4
Original file line numberDiff line numberDiff line change
@@ -552,10 +552,6 @@ this warning is treated as a failure.
552552
If set to false, then ignore `package-lock.json` files when installing. This
553553
will also prevent _writing_ `package-lock.json` if `save` is true.
554554
555-
When package package-locks are disabled, automatic pruning of extraneous
556-
modules will also be disabled. To remove extraneous modules with
557-
package-locks disabled use `npm prune`.
558-
559555
This configuration does not affect `npm ci`.
560556
561557
<!-- automatically generated, do not edit manually -->

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

-4
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,6 @@ this warning is treated as a failure.
224224
If set to false, then ignore `package-lock.json` files when installing. This
225225
will also prevent _writing_ `package-lock.json` if `save` is true.
226226

227-
When package package-locks are disabled, automatic pruning of extraneous
228-
modules will also be disabled. To remove extraneous modules with
229-
package-locks disabled use `npm prune`.
230-
231227
This configuration does not affect `npm ci`.
232228

233229
<!-- automatically generated, do not edit manually -->

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

+46
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,52 @@ password, npm will prompt on the command line for one.
7373
<!-- automatically generated, do not edit manually -->
7474
<!-- see lib/utils/config/definitions.js -->
7575

76+
#### `workspace`
77+
78+
* Default:
79+
* Type: String (can be set multiple times)
80+
81+
Enable running a command in the context of the configured workspaces of the
82+
current project while filtering by running only the workspaces defined by
83+
this configuration option.
84+
85+
Valid values for the `workspace` config are either:
86+
87+
* Workspace names
88+
* Path to a workspace directory
89+
* Path to a parent workspace directory (will result in selecting all
90+
workspaces within that folder)
91+
92+
When set for the `npm init` command, this may be set to the folder of a
93+
workspace which does not yet exist, to create the folder and set it up as a
94+
brand new workspace within the project.
95+
96+
This value is not exported to the environment for child processes.
97+
98+
<!-- automatically generated, do not edit manually -->
99+
<!-- see lib/utils/config/definitions.js -->
100+
101+
#### `workspaces`
102+
103+
* Default: null
104+
* Type: null or Boolean
105+
106+
Set to true to run the command in the context of **all** configured
107+
workspaces.
108+
109+
Explicitly setting this to false will cause commands like `install` to
110+
ignore workspaces altogether. When not set explicitly:
111+
112+
- Commands that operate on the `node_modules` tree (install, update, etc.)
113+
will link workspaces into the `node_modules` folder. - Commands that do
114+
other things (test, exec, publish, etc.) will operate on the root project,
115+
_unless_ one or more workspaces are specified in the `workspace` config.
116+
117+
This value is not exported to the environment for child processes.
118+
119+
<!-- automatically generated, do not edit manually -->
120+
<!-- see lib/utils/config/definitions.js -->
121+
76122
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
77123

78124
### See Also

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

+8
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ Returned values are always in **json** format.
7676
npm pkg get contributors[0].email
7777
```
7878
79+
For complex fields you can also name a property in square brackets
80+
to specifically select a child field. This is especially helpful
81+
with the exports object:
82+
83+
```bash
84+
npm pkg get "exports[.].require"
85+
```
86+
7987
* `npm pkg set <field>=<value>`
8088
8189
Sets a `value` in your `package.json` based on the `field` value. When

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

-4
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,6 @@ this warning is treated as a failure.
280280
If set to false, then ignore `package-lock.json` files when installing. This
281281
will also prevent _writing_ `package-lock.json` if `save` is true.
282282

283-
When package package-locks are disabled, automatic pruning of extraneous
284-
modules will also be disabled. To remove extraneous modules with
285-
package-locks disabled use `npm prune`.
286-
287283
This configuration does not affect `npm ci`.
288284

289285
<!-- automatically generated, do not edit manually -->

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

-4
Original file line numberDiff line numberDiff line change
@@ -1219,10 +1219,6 @@ The package to install for [`npm exec`](/commands/npm-exec)
12191219
If set to false, then ignore `package-lock.json` files when installing. This
12201220
will also prevent _writing_ `package-lock.json` if `save` is true.
12211221

1222-
When package package-locks are disabled, automatic pruning of extraneous
1223-
modules will also be disabled. To remove extraneous modules with
1224-
package-locks disabled use `npm prune`.
1225-
12261222
This configuration does not affect `npm ci`.
12271223

12281224
<!-- automatically generated, do not edit manually -->

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

-3
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,6 @@ <h4 id="package-lock"><code>package-lock</code></h4>
253253
</ul>
254254
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
255255
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
256-
<p>When package package-locks are disabled, automatic pruning of extraneous
257-
modules will also be disabled. To remove extraneous modules with
258-
package-locks disabled use <code>npm prune</code>.</p>
259256
<p>This configuration does not affect <code>npm ci</code>.</p>
260257
<!-- raw HTML omitted -->
261258
<!-- raw HTML omitted -->

deps/npm/docs/output/commands/npm-find-dupes.html

-3
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,6 @@ <h4 id="package-lock"><code>package-lock</code></h4>
210210
</ul>
211211
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
212212
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
213-
<p>When package package-locks are disabled, automatic pruning of extraneous
214-
modules will also be disabled. To remove extraneous modules with
215-
package-locks disabled use <code>npm prune</code>.</p>
216213
<p>This configuration does not affect <code>npm ci</code>.</p>
217214
<!-- raw HTML omitted -->
218215
<!-- raw HTML omitted -->

deps/npm/docs/output/commands/npm-install-test.html

-3
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,6 @@ <h4 id="package-lock"><code>package-lock</code></h4>
273273
</ul>
274274
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
275275
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
276-
<p>When package package-locks are disabled, automatic pruning of extraneous
277-
modules will also be disabled. To remove extraneous modules with
278-
package-locks disabled use <code>npm prune</code>.</p>
279276
<p>This configuration does not affect <code>npm ci</code>.</p>
280277
<!-- raw HTML omitted -->
281278
<!-- raw HTML omitted -->

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

-3
Original file line numberDiff line numberDiff line change
@@ -599,9 +599,6 @@ <h4 id="package-lock"><code>package-lock</code></h4>
599599
</ul>
600600
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
601601
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
602-
<p>When package package-locks are disabled, automatic pruning of extraneous
603-
modules will also be disabled. To remove extraneous modules with
604-
package-locks disabled use <code>npm prune</code>.</p>
605602
<p>This configuration does not affect <code>npm ci</code>.</p>
606603
<!-- raw HTML omitted -->
607604
<!-- raw HTML omitted -->

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

-3
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,6 @@ <h4 id="package-lock"><code>package-lock</code></h4>
312312
</ul>
313313
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
314314
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
315-
<p>When package package-locks are disabled, automatic pruning of extraneous
316-
modules will also be disabled. To remove extraneous modules with
317-
package-locks disabled use <code>npm prune</code>.</p>
318315
<p>This configuration does not affect <code>npm ci</code>.</p>
319316
<!-- raw HTML omitted -->
320317
<!-- raw HTML omitted -->

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ <h3 id="description">Description</h3>
166166
the results to only the paths to the packages named. Note that nested
167167
packages will <em>also</em> show the paths to the specified packages. For
168168
example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
169-
<pre lang="bash"><code>npm@8.8.0 /path/to/npm
169+
<pre lang="bash"><code>npm@8.9.0 /path/to/npm
170170
└─┬ init-package-json@0.0.4
171171
└── promzard@0.1.5
172172
</code></pre>

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

+40-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ <h1 id="npm-owner">npm-owner</h1>
142142

143143
<section id="table_of_contents">
144144
<h2 id="table-of-contents">Table of contents</h2>
145-
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#registry"><code>registry</code></a></li><li><a href="#otp"><code>otp</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="#configuration">Configuration</a></li><ul><li><a href="#registry"><code>registry</code></a></li><li><a href="#otp"><code>otp</code></a></li><li><a href="#workspace"><code>workspace</code></a></li><li><a href="#workspaces"><code>workspaces</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
146146
</section>
147147

148148
<div id="_content"><h3 id="synopsis">Synopsis</h3>
@@ -198,6 +198,45 @@ <h4 id="otp"><code>otp</code></h4>
198198
password, npm will prompt on the command line for one.</p>
199199
<!-- raw HTML omitted -->
200200
<!-- raw HTML omitted -->
201+
<h4 id="workspace"><code>workspace</code></h4>
202+
<ul>
203+
<li>Default:</li>
204+
<li>Type: String (can be set multiple times)</li>
205+
</ul>
206+
<p>Enable running a command in the context of the configured workspaces of the
207+
current project while filtering by running only the workspaces defined by
208+
this configuration option.</p>
209+
<p>Valid values for the <code>workspace</code> config are either:</p>
210+
<ul>
211+
<li>Workspace names</li>
212+
<li>Path to a workspace directory</li>
213+
<li>Path to a parent workspace directory (will result in selecting all
214+
workspaces within that folder)</li>
215+
</ul>
216+
<p>When set for the <code>npm init</code> command, this may be set to the folder of a
217+
workspace which does not yet exist, to create the folder and set it up as a
218+
brand new workspace within the project.</p>
219+
<p>This value is not exported to the environment for child processes.</p>
220+
<!-- raw HTML omitted -->
221+
<!-- raw HTML omitted -->
222+
<h4 id="workspaces"><code>workspaces</code></h4>
223+
<ul>
224+
<li>Default: null</li>
225+
<li>Type: null or Boolean</li>
226+
</ul>
227+
<p>Set to true to run the command in the context of <strong>all</strong> configured
228+
workspaces.</p>
229+
<p>Explicitly setting this to false will cause commands like <code>install</code> to
230+
ignore workspaces altogether. When not set explicitly:</p>
231+
<ul>
232+
<li>Commands that operate on the <code>node_modules</code> tree (install, update, etc.)
233+
will link workspaces into the <code>node_modules</code> folder. - Commands that do
234+
other things (test, exec, publish, etc.) will operate on the root project,
235+
<em>unless</em> one or more workspaces are specified in the <code>workspace</code> config.</li>
236+
</ul>
237+
<p>This value is not exported to the environment for child processes.</p>
238+
<!-- raw HTML omitted -->
239+
<!-- raw HTML omitted -->
201240
<!-- raw HTML omitted -->
202241
<h3 id="see-also">See Also</h3>
203242
<ul>

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

+5
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ <h3 id="description">Description</h3>
192192
contributor in the list, you can run:</p>
193193
<pre lang="bash"><code>npm pkg get contributors[0].email
194194
</code></pre>
195+
<p>For complex fields you can also name a property in square brackets
196+
to specifically select a child field. This is especially helpful
197+
with the exports object:</p>
198+
<pre lang="bash"><code>npm pkg get "exports[.].require"
199+
</code></pre>
195200
</li>
196201
<li>
197202
<p><code>npm pkg set &lt;field&gt;=&lt;value&gt;</code></p>

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

-3
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,6 @@ <h4 id="package-lock"><code>package-lock</code></h4>
352352
</ul>
353353
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
354354
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
355-
<p>When package package-locks are disabled, automatic pruning of extraneous
356-
modules will also be disabled. To remove extraneous modules with
357-
package-locks disabled use <code>npm prune</code>.</p>
358355
<p>This configuration does not affect <code>npm ci</code>.</p>
359356
<!-- raw HTML omitted -->
360357
<!-- raw HTML omitted -->

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ <h2 id="table-of-contents">Table of contents</h2>
149149
<!-- raw HTML omitted -->
150150
<!-- raw HTML omitted -->
151151
<h3 id="version">Version</h3>
152-
<p>8.8.0</p>
152+
<p>8.9.0</p>
153153
<h3 id="description">Description</h3>
154154
<p>npm is the package manager for the Node JavaScript platform. It puts
155155
modules in place so that node can find them, and manages dependency

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

-3
Original file line numberDiff line numberDiff line change
@@ -1123,9 +1123,6 @@ <h4 id="package-lock"><code>package-lock</code></h4>
11231123
</ul>
11241124
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
11251125
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
1126-
<p>When package package-locks are disabled, automatic pruning of extraneous
1127-
modules will also be disabled. To remove extraneous modules with
1128-
package-locks disabled use <code>npm prune</code>.</p>
11291126
<p>This configuration does not affect <code>npm ci</code>.</p>
11301127
<!-- raw HTML omitted -->
11311128
<!-- raw HTML omitted -->

deps/npm/lib/commands/doctor.js

+12-22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const cacache = require('cacache')
2-
const chalk = require('chalk')
32
const fs = require('fs')
43
const fetch = require('make-fetch-happen')
54
const table = require('text-table')
@@ -102,28 +101,19 @@ class Doctor extends BaseCommand {
102101
messages.push(line)
103102
}
104103

105-
const outHead = ['Check', 'Value', 'Recommendation/Notes'].map(
106-
!this.npm.color ? h => h : h => chalk.underline(h)
107-
)
104+
const outHead = ['Check', 'Value', 'Recommendation/Notes'].map(h => this.npm.chalk.underline(h))
108105
let allOk = true
109-
const outBody = messages.map(
110-
!this.npm.color
111-
? item => {
112-
allOk = allOk && item[1]
113-
item[1] = item[1] ? 'ok' : 'not ok'
114-
item[2] = String(item[2])
115-
return item
116-
}
117-
: item => {
118-
allOk = allOk && item[1]
119-
if (!item[1]) {
120-
item[0] = chalk.red(item[0])
121-
item[2] = chalk.magenta(String(item[2]))
122-
}
123-
item[1] = item[1] ? chalk.green('ok') : chalk.red('not ok')
124-
return item
125-
}
126-
)
106+
const outBody = messages.map(item => {
107+
if (!item[1]) {
108+
allOk = false
109+
item[0] = this.npm.chalk.red(item[0])
110+
item[1] = this.npm.chalk.red('not ok')
111+
item[2] = this.npm.chalk.magenta(String(item[2]))
112+
} else {
113+
item[1] = this.npm.chalk.green('ok')
114+
}
115+
return item
116+
})
127117
const outTable = [outHead, ...outBody]
128118
const tableOpts = {
129119
stringLength: s => ansiTrim(s).length,

deps/npm/lib/commands/exec.js

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ class Exec extends BaseCommand {
7373

7474
return libexec({
7575
...flatOptions,
76+
// we explicitly set packageLockOnly to false because if it's true
77+
// when we try to install a missing package, we won't actually install it
78+
packageLockOnly: false,
7679
args,
7780
call,
7881
localBin,

0 commit comments

Comments
 (0)