Skip to content

Commit bc531d1

Browse files
darcyclarkeruyadorno
authored andcommitted
deps: upgrade npm to 7.8.0
PR-URL: #38030 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruy Adorno <[email protected]>
1 parent cc4ee6c commit bc531d1

File tree

132 files changed

+2164
-4290
lines changed

Some content is hidden

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

132 files changed

+2164
-4290
lines changed

Diff for: deps/npm/CHANGELOG.md

+49
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
1+
## v7.8.0 (2021-04-01)
2+
### FEATURES
3+
4+
5+
* [`8bcc5d73f`](https://github.com/npm/cli/commit/8bcc5d73f35434e781ff56419dd7f0c380efd072)
6+
[#2972](https://github.com/npm/cli/issues/2972)
7+
feat(workspaces): add repo and docs
8+
([@wraithgar](https://github.com/wraithgar))
9+
* [`ec520ce32`](https://github.com/npm/cli/commit/ec520ce32d5e834a32ebd58491df4200e01ce690)
10+
[#2998](https://github.com/npm/cli/issues/2998)
11+
feat(set-script): implement workspaces
12+
* [`32717a60e`](https://github.com/npm/cli/commit/32717a60eb55fcf8c7e5016223bfee78a6daba0e)
13+
[#3001](https://github.com/npm/cli/issues/3001)
14+
feat(view): add workspace support
15+
([@wraithgar](https://github.com/wraithgar))
16+
* [`7b177e43f`](https://github.com/npm/cli/commit/7b177e43f3bfb558bcd8723cdb2166a3df19647a)
17+
[#3014](https://github.com/npm/cli/issues/3014)
18+
feat(config): add 'envExport' flag
19+
([@isaacs](https://github.com/isaacs))
20+
21+
### BUG FIXES
22+
23+
* [`4c4252348`](https://github.com/npm/cli/commit/4c4252348c538246e1072421d65f4558dc948080)
24+
[#3016](https://github.com/npm/cli/issues/3016)
25+
fix(usage): specify the key each time for multiples
26+
([@isaacs](https://github.com/isaacs))
27+
* [`9237d375b`](https://github.com/npm/cli/commit/9237d375b0b7d34c7dc5ba70aec7f616f4133732)
28+
[#3013](https://github.com/npm/cli/issues/3013)
29+
fix(docs): add workspaces configuration
30+
([@wraithgar](https://github.com/wraithgar))
31+
* [`cb6eb0d20`](https://github.com/npm/cli/commit/cb6eb0d206b7e2f63d5c7a7a17bea4aed1b9f2bf)
32+
[#3015](https://github.com/npm/cli/issues/3015)
33+
fix(ERESOLVE): better errors when current is missing
34+
([@isaacs](https://github.com/isaacs))
35+
36+
### DEPENDENCIES
37+
38+
* [`61da39beb`](https://github.com/npm/cli/commit/61da39beb5373320e2b591b61ecd6596eeaba6ed)
39+
40+
* feat(config): add support for envExport:false
41+
* [`fb095a708`](https://github.com/npm/cli/commit/fb095a708a1f930bbd0195446ac611b82bfeff14)
42+
`@npmcli/[email protected]`:
43+
* [#2896](https://github.com/npm/cli/issues/2896) Provide currentEdge in
44+
ERESOLVE if known, and address self-linking edge case.
45+
* Add/remove dependencies to/from workspaces when set, not root project
46+
* Only reify the portions of the dependency graph identified by the
47+
`workspace` configuration value.
48+
* Do not recursively `chown` the project root path.
49+
150
## v7.7.6 (2021-03-29)
251

352
### BUG FIXES

Diff for: deps/npm/docs/content/commands/npm-docs.md

+13
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,19 @@ Set to `true` to use default system URL opener.
4141
4242
The base URL of the npm package registry.
4343
44+
#### workspaces
45+
46+
Enables workspaces context while searching the `package.json` in the
47+
current folder. Documentation urls for the packages named in each
48+
workspace will be opened.
49+
50+
#### workspace
51+
52+
Enables workspaces context and limits results to only those specified by
53+
this config item. Only the documentation urls for the packages named in
54+
the workspaces given here will be opened.
55+
56+
4457
### See Also
4558
4659
* [npm view](/commands/npm-view)

Diff for: deps/npm/docs/content/commands/npm-repo.md

+13
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ terminal.
3131
3232
Set to `true` to use default system URL opener.
3333
34+
#### workspaces
35+
36+
Enables workspaces context while searching the `package.json` in the
37+
current folder. Repo urls for the packages named in each workspace will
38+
be opened.
39+
40+
#### workspace
41+
42+
Enables workspaces context and limits results to only those specified by
43+
this config item. Only the repo urls for the packages named in the
44+
workspaces given here will be opened.
45+
46+
3447
### See Also
3548
3649
* [npm docs](/commands/npm-docs)

Diff for: deps/npm/docs/content/commands/npm-set-script.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Set tasks in the scripts section of package.json
55
---
66

77
### Synopsis
8-
An npm command that lets you create a task in the scripts section of the package.json.
8+
An npm command that lets you create a task in the `scripts` section of the `package.json`.
99

1010
```bash
1111
npm set-script [<script>] [<command>]
@@ -26,6 +26,19 @@ npm set-script [<script>] [<command>]
2626
}
2727
```
2828

29+
### Configuration
30+
31+
#### workspaces
32+
33+
Enables workspaces context. Tasks will be created in the `scripts` section
34+
of the `package.json` of each workspace.
35+
36+
#### workspace
37+
38+
Enables workspaces context and limits creating a task to the
39+
`package.json` files of the workspaces given.
40+
41+
2942
### See Also
3043

3144
* [npm run-script](/commands/npm-run-script)

Diff for: deps/npm/docs/content/commands/npm-view.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ aliases: info, show, v
1414

1515
### Description
1616

17-
This command shows data about a package and prints it to the stream
18-
referenced by the `outfd` config, which defaults to stdout.
17+
This command shows data about a package and prints it to stdout.
1918

2019
As an example, to view information about the `connect` package from the registry, you would run:
2120

Diff for: deps/npm/docs/content/using-npm/config.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ registry and all registries configured for scopes. See the documentation for
185185
#### `audit-level`
186186

187187
* Default: null
188-
* Type: "info", "low", "moderate", "high", "critical", "none", or null
188+
* Type: null, "info", "low", "moderate", "high", "critical", or "none"
189189

190190
The minimum level of vulnerability for `npm audit` to exit with a non-zero
191191
exit code.
@@ -1333,6 +1333,8 @@ Valid values for the `workspace` config are either: - Workspace names - Path
13331333
to a workspace directory - Path to a parent workspace directory (will result
13341334
to selecting all of the nested workspaces)
13351335

1336+
This value is not exported to the environment for child processes.
1337+
13361338
#### `workspaces`
13371339

13381340
* Default: false
@@ -1341,6 +1343,8 @@ to selecting all of the nested workspaces)
13411343
Enable running a command in the context of **all** the configured
13421344
workspaces.
13431345

1346+
This value is not exported to the environment for child processes.
1347+
13441348
#### `yes`
13451349

13461350
* Default: null

Diff for: deps/npm/docs/output/commands/npm-docs.html

+9-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ <h1 id="npm-docs">npm-docs</h1>
141141

142142
<section id="table_of_contents">
143143
<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="#configuration">Configuration</a></li><ul><li><a href="#browser">browser</a></li><li><a href="#registry">registry</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
144+
<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="#browser">browser</a></li><li><a href="#registry">registry</a></li><li><a href="#workspaces">workspaces</a></li><li><a href="#workspace">workspace</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
145145
</section>
146146

147147
<div id="_content"><h3 id="synopsis">Synopsis</h3>
@@ -171,6 +171,14 @@ <h4 id="registry">registry</h4>
171171
<li>Type: url</li>
172172
</ul>
173173
<p>The base URL of the npm package registry.</p>
174+
<h4 id="workspaces">workspaces</h4>
175+
<p>Enables workspaces context while searching the <code>package.json</code> in the
176+
current folder. Documentation urls for the packages named in each
177+
workspace will be opened.</p>
178+
<h4 id="workspace">workspace</h4>
179+
<p>Enables workspaces context and limits results to only those specified by
180+
this config item. Only the documentation urls for the packages named in
181+
the workspaces given here will be opened.</p>
174182
<h3 id="see-also">See Also</h3>
175183
<ul>
176184
<li><a href="../commands/npm-view.html">npm view</a></li>

Diff for: deps/npm/docs/output/commands/npm-ls.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ <h3 id="description">Description</h3>
159159
the results to only the paths to the packages named. Note that nested
160160
packages will <em>also</em> show the paths to the specified packages. For
161161
example, running <code>npm ls promzard</code> in npm’s source tree will show:</p>
162-
<pre lang="bash"><code>npm@7.7.6 /path/to/npm
162+
<pre lang="bash"><code>npm@7.8.0 /path/to/npm
163163
164164
165165
</code></pre>

Diff for: deps/npm/docs/output/commands/npm-repo.html

+9-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ <h1 id="npm-repo">npm-repo</h1>
141141

142142
<section id="table_of_contents">
143143
<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="#configuration">Configuration</a></li><ul><li><a href="#browser">browser</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
144+
<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="#browser">browser</a></li><li><a href="#workspaces">workspaces</a></li><li><a href="#workspace">workspace</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
145145
</section>
146146

147147
<div id="_content"><h3 id="synopsis">Synopsis</h3>
@@ -162,6 +162,14 @@ <h4 id="browser">browser</h4>
162162
<p>Set to <code>false</code> to suppress browser behavior and instead print urls to
163163
terminal.</p>
164164
<p>Set to <code>true</code> to use default system URL opener.</p>
165+
<h4 id="workspaces">workspaces</h4>
166+
<p>Enables workspaces context while searching the <code>package.json</code> in the
167+
current folder. Repo urls for the packages named in each workspace will
168+
be opened.</p>
169+
<h4 id="workspace">workspace</h4>
170+
<p>Enables workspaces context and limits results to only those specified by
171+
this config item. Only the repo urls for the packages named in the
172+
workspaces given here will be opened.</p>
165173
<h3 id="see-also">See Also</h3>
166174
<ul>
167175
<li><a href="../commands/npm-docs.html">npm docs</a></li>

Diff for: deps/npm/docs/output/commands/npm-set-script.html

+9-2
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ <h1 id="npm-set-script">npm-set-script</h1>
141141

142142
<section id="table_of_contents">
143143
<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="#see-also">See Also</a></li></ul></div>
144+
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#workspaces">workspaces</a></li><li><a href="#workspace">workspace</a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
145145
</section>
146146

147147
<div id="_content"><h3 id="synopsis">Synopsis</h3>
148-
<p>An npm command that lets you create a task in the scripts section of the package.json.</p>
148+
<p>An npm command that lets you create a task in the <code>scripts</code> section of the <code>package.json</code>.</p>
149149
<pre lang="bash"><code>npm set-script [&lt;script&gt;] [&lt;command&gt;]
150150
</code></pre>
151151
<p><strong>Example:</strong></p>
@@ -160,6 +160,13 @@ <h2 id="table-of-contents">Table of contents</h2>
160160
}
161161
}
162162
</code></pre>
163+
<h3 id="configuration">Configuration</h3>
164+
<h4 id="workspaces">workspaces</h4>
165+
<p>Enables workspaces context. Tasks will be created in the <code>scripts</code> section
166+
of the <code>package.json</code> of each workspace.</p>
167+
<h4 id="workspace">workspace</h4>
168+
<p>Enables workspaces context and limits creating a task to the
169+
<code>package.json</code> files of the workspaces given.</p>
163170
<h3 id="see-also">See Also</h3>
164171
<ul>
165172
<li><a href="../commands/npm-run-script.html">npm run-script</a></li>

Diff for: deps/npm/docs/output/commands/npm-view.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ <h2 id="table-of-contents">Table of contents</h2>
150150
aliases: info, show, v
151151
</code></pre>
152152
<h3 id="description">Description</h3>
153-
<p>This command shows data about a package and prints it to the stream
154-
referenced by the <code>outfd</code> config, which defaults to stdout.</p>
153+
<p>This command shows data about a package and prints it to stdout.</p>
155154
<p>As an example, to view information about the <code>connect</code> package from the registry, you would run:</p>
156155
<pre lang="bash"><code>npm view connect
157156
</code></pre>

Diff for: deps/npm/docs/output/commands/npm.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ <h2 id="table-of-contents">Table of contents</h2>
148148
<pre lang="bash"><code>npm &lt;command&gt; [args]
149149
</code></pre>
150150
<h3 id="version">Version</h3>
151-
<p>7.7.6</p>
151+
<p>7.8.0</p>
152152
<h3 id="description">Description</h3>
153153
<p>npm is the package manager for the Node JavaScript platform. It puts
154154
modules in place so that node can find them, and manages dependency

Diff for: deps/npm/docs/output/using-npm/config.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ <h4 id="audit"><code>audit</code></h4>
297297
<h4 id="audit-level"><code>audit-level</code></h4>
298298
<ul>
299299
<li>Default: null</li>
300-
<li>Type: “info”, “low”, “moderate”, “high”, “critical”, “none”, or null</li>
300+
<li>Type: null, “info”, “low”, “moderate”, “high”, “critical”, or “none”</li>
301301
</ul>
302302
<p>The minimum level of vulnerability for <code>npm audit</code> to exit with a non-zero
303303
exit code.</p>
@@ -1262,13 +1262,15 @@ <h4 id="workspace"><code>workspace</code></h4>
12621262
<p>Valid values for the <code>workspace</code> config are either: - Workspace names - Path
12631263
to a workspace directory - Path to a parent workspace directory (will result
12641264
to selecting all of the nested workspaces)</p>
1265+
<p>This value is not exported to the environment for child processes.</p>
12651266
<h4 id="workspaces"><code>workspaces</code></h4>
12661267
<ul>
12671268
<li>Default: false</li>
12681269
<li>Type: Boolean</li>
12691270
</ul>
12701271
<p>Enable running a command in the context of <strong>all</strong> the configured
12711272
workspaces.</p>
1273+
<p>This value is not exported to the environment for child processes.</p>
12721274
<h4 id="yes"><code>yes</code></h4>
12731275
<ul>
12741276
<li>Default: null</li>

Diff for: deps/npm/lib/base-command.js

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class BaseCommand {
2727
usage = `${usage}${this.constructor.usage.map(u => `npm ${this.constructor.name} ${u}`).join('\n')}`
2828

2929
if (this.constructor.params)
30+
// TODO word wrap this along params boundaries
3031
usage = `${usage}\n\nOptions:\n[${this.constructor.params.map(p => ConfigDefinitions[p].usage).join('] [')}]`
3132

3233
// Mostly this just appends aliases, this could be more clear

Diff for: deps/npm/lib/docs.js

+16
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const log = require('npmlog')
22
const pacote = require('pacote')
33
const openUrl = require('./utils/open-url.js')
44
const hostedFromMani = require('./utils/hosted-git-info-from-manifest.js')
5+
const getWorkspaces = require('./workspaces/get-workspaces.js')
56

67
const BaseCommand = require('./base-command.js')
78
class Docs extends BaseCommand {
@@ -15,6 +16,11 @@ class Docs extends BaseCommand {
1516
return 'docs'
1617
}
1718

19+
/* istanbul ignore next - see test/lib/load-all-commands.js */
20+
static get params () {
21+
return ['browser', 'registry', 'workspace', 'workspaces']
22+
}
23+
1824
/* istanbul ignore next - see test/lib/load-all-commands.js */
1925
static get usage () {
2026
return ['[<pkgname> [<pkgname> ...]]']
@@ -24,13 +30,23 @@ class Docs extends BaseCommand {
2430
this.docs(args).then(() => cb()).catch(cb)
2531
}
2632

33+
execWorkspaces (args, filters, cb) {
34+
this.docsWorkspaces(args, filters).then(() => cb()).catch(cb)
35+
}
36+
2737
async docs (args) {
2838
if (!args || !args.length)
2939
args = ['.']
3040

3141
await Promise.all(args.map(pkg => this.getDocs(pkg)))
3242
}
3343

44+
async docsWorkspaces (args, filters) {
45+
const workspaces =
46+
await getWorkspaces(filters, { path: this.npm.localPrefix })
47+
return this.docs([...workspaces.values()])
48+
}
49+
3450
async getDocs (pkg) {
3551
const opts = { ...this.npm.flatOptions, fullMetadata: true }
3652
const mani = await pacote.manifest(pkg, opts)

Diff for: deps/npm/lib/exec.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ class Exec extends BaseCommand {
5353
return 'Run a command from a local or remote npm package'
5454
}
5555

56+
/* istanbul ignore next - see test/lib/load-all-commands.js */
57+
static get params () {
58+
return ['workspace', 'workspaces']
59+
}
60+
5661
/* istanbul ignore next - see test/lib/load-all-commands.js */
5762
static get name () {
5863
return 'exec'
@@ -339,12 +344,9 @@ class Exec extends BaseCommand {
339344
.slice(0, 16)
340345
}
341346

342-
async workspaces (filters) {
343-
return getWorkspaces(filters, { path: this.npm.localPrefix })
344-
}
345-
346347
async _execWorkspaces (args, filters) {
347-
const workspaces = await this.workspaces(filters)
348+
const workspaces =
349+
await getWorkspaces(filters, { path: this.npm.localPrefix })
348350
const getLocationMsg = async path => {
349351
const color = this.npm.config.get('color')
350352
const colorize = color ? chalk : nocolor

0 commit comments

Comments
 (0)