Skip to content

Commit d5b472b

Browse files
committed
deps: upgrade npm to 7.7.0
PR-URL: #37879 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent b5879ef commit d5b472b

File tree

305 files changed

+14585
-7996
lines changed

Some content is hidden

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

305 files changed

+14585
-7996
lines changed

deps/npm/AUTHORS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,3 +759,9 @@ Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
759759
Bjørn Johansen <bjjohans@microsoft.com>
760760
Fraqe <f@fraqe.ca>
761761
Edward Grech <dwardu@gmail.com>
762+
Kenrick <kenrick95@gmail.com>
763+
Karthik Sundari <karthik_sundari@comcast.com>
764+
Jan Sepke <625043+jansepke@users.noreply.github.com>
765+
Augusto Moura <augusto.borgesm@gmail.com>
766+
Eric Chow <eric.zjp.chow@gmail.com>
767+
kbayrhammer <klaus.bayrhammer@redbull.com>

deps/npm/CHANGELOG.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,79 @@
1+
## v7.7.0 (2021-03-23)
2+
3+
### FEATURES
4+
5+
* [`33c4189f9`](https://github.com/npm/cli/commit/33c4189f939aebdfaf85ea419e6ea01d0977b79d)
6+
[#2864](https://github.com/npm/cli/issues/2864)
7+
add `npm run-script` workspaces support
8+
([@ruyadorno](https://github.com/ruyadorno))
9+
* [`e1b3b318f`](https://github.com/npm/cli/commit/e1b3b318f095a7e1a7cc4b131907de4955275d9d)
10+
[#2886](https://github.com/npm/cli/issues/2886)
11+
add `npm exec` workspaces support
12+
([@ruyadorno](https://github.com/ruyadorno))
13+
* [`41facf643`](https://github.com/npm/cli/commit/41facf6435ced4e416d74111d9c3ff00ee19ab7d)
14+
[#2859](https://github.com/npm/cli/issues/2859)
15+
expanded "Did you mean?" suggestions for missing cmds and scripts
16+
([@wraithgar](https://github.com/wraithgar))
17+
18+
### BUG FIXES
19+
20+
* [`8cce4282f`](https://github.com/npm/cli/commit/8cce4282f7bef11aeeb73cffd532b477b241985e)
21+
[#2865](https://github.com/npm/cli/issues/2865)
22+
`npm publish`: handle case where multiple config list is present
23+
([@kenrick95](https://github.com/kenrick95))
24+
* [`6598bfe86`](https://github.com/npm/cli/commit/6598bfe8697439e827d84981f8504febca64a55a)
25+
mark deprecated configs
26+
([@isaacs](https://github.com/isaacs))
27+
* [`8a38afe77`](https://github.com/npm/cli/commit/8a38afe779ce71a10178ed62b13709d06adf7a66)
28+
[#2881](https://github.com/npm/cli/issues/2881)
29+
docs(package-json): document default main behavior
30+
([@klausbayrhammer](https://github.com/klausbayrhammer))
31+
* [`93a061d73`](https://github.com/npm/cli/commit/93a061d737dc769663652368e8586e4202267b9e)
32+
[#2917](https://github.com/npm/cli/issues/2917)
33+
add action items to `npm run` error output
34+
([@wraithgar](https://github.com/wraithgar))
35+
36+
### DOCUMENTATION
37+
38+
* [`ad65bd910`](https://github.com/npm/cli/commit/ad65bd9101aa8e8b94bc1e48df3ef93deca6d30c)
39+
[#2860](https://github.com/npm/cli/issues/2860)
40+
fix link in configuring-npm
41+
([@varmakarthik12](https://github.com/varmakarthik12))
42+
* [`b419bfb02`](https://github.com/npm/cli/commit/b419bfb0259596fb338d45b2eaeab25a7a0d1f1e)
43+
[#2876](https://github.com/npm/cli/issues/2876)
44+
fix test-coverage command in contributing guide
45+
([@chowkapow](https://github.com/chowkapow))
46+
47+
### DEPENDENCIES
48+
49+
* [`7b5606b93`](https://github.com/npm/cli/commit/7b5606b931083e8a70f5ea094c2b46f0b7a38a18)
50+
`@npmcli/arborist@2.2.9`
51+
* [#254](https://github.com/npm/arborist/pull/254) Honor explicit
52+
prefix when saving dependencies
53+
([@jameschensmith](https://github.com/jameschensmith))
54+
* [#255](https://github.com/npm/arborist/pull/255) Never save to
55+
`bundleDependencies` when saving a `peer` or `peerOptional`
56+
dependency. ([@isaacs](https://github.com/isaacs))
57+
* [`f76e7c21f`](https://github.com/npm/cli/commit/f76e7c21ffd87b08593d8c396a78ab9c5fa790bd)
58+
`pacote@11.3.1`
59+
* increases tarball compression level
60+
* [`4928512bc`](https://github.com/npm/cli/commit/4928512bcefd8448ff5852978cfc7f903e3ae996)
61+
`semver@7.3.5`
62+
* fix handling prereleases/ANY ranges in subset
63+
* [`1924eb457`](https://github.com/npm/cli/commit/1924eb457aea7c93dfaf4a911355a63d84d66eee)
64+
`libnpmversion@1.0.12`
65+
* fix removing undescored-prefixed package.json properties in `npm version`
66+
* [`916623056`](https://github.com/npm/cli/commit/91662305643509eebd2f79ed7e3ff01562aa4968)
67+
`@npmcli/run-script@1.8.4`
68+
* fix expanding windows-style environment variables
69+
* [`a8d0751e4`](https://github.com/npm/cli/commit/a8d0751e4b7c7d8b808c8a49f288fc7272f729b0)
70+
`npm-pick-manifest@6.1.1`
71+
* fix running packages with a single executable binary with `npm exec`
72+
* [`af7eaac50`](https://github.com/npm/cli/commit/af7eaac5018ed821d72d43d08f1d7e49e7491453)
73+
`hosted-git-info@4.0.1`
74+
* [`f52c51db1`](https://github.com/npm/cli/commit/f52c51db13c39cfbaed18dbd13ba7302a4b6a0d9)
75+
`@npmcli/config@2.0.0`
76+
177
## v7.6.3 (2021-03-11)
278

379
### DOCUMENTATION

deps/npm/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ We expect that every new feature or bug fix comes with corresponding tests that
3838
**You can find out what the current test coverage percentage is by running...**
3939

4040
```bash
41-
$ npm run test-coverage
41+
$ npm run check-coverage
4242
```
4343

4444
## Performance & Benchmarks

deps/npm/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ If you're looking to manage multiple versions of **`node`** &/or **`npm`**, cons
2828
* [**`n`**](https://github.com/tj/n)
2929
* [**`volta`**](https://github.com/volta-cli/volta)
3030
* [**`nodenv`**](https://github.com/nodenv/nodenv)
31+
* [**`asdf-nodejs`**](https://github.com/asdf-vm/asdf-nodejs)
3132

3233
### Usage
3334

deps/npm/bin/npx-cli.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ const removed = new Set([
2424
...removedOpts
2525
])
2626

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

3333
// things that don't take a value
3434
const switches = new Set([

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ npm adduser [--registry=url] [--scope=@orgname] [--always-auth] [--auth-type=leg
1212
aliases: login, add-user
1313
```
1414

15+
Note: This command is unaware of workspaces.
16+
1517
### Description
1618

1719
Create or verify a user named `<username>` in the specified registry, and

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: Display npm bin folder
1010
npm bin [-g|--global]
1111
```
1212

13+
Note: This command is unaware of workspaces.
14+
1315
### Description
1416

1517
Print the folder where npm will install executables.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ aliases: npm cache clear, npm cache rm
1818
npm cache verify
1919
```
2020

21+
Note: This command is unaware of workspaces.
22+
2123
### Description
2224

2325
Used to add, list, or clean the npm cache folder.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: Tab Completion for npm
1010
source <(npm completion)
1111
```
1212

13+
Note: This command is unaware of workspaces.
14+
1315
### Description
1416

1517
Enables tab-completion in all npm commands.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ npm get [<key> [<key> ...]]
1818
alias: c
1919
```
2020
21+
Note: This command is unaware of workspaces.
22+
2123
### Description
2224
2325
npm gets its config settings from the command line, environment

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: npm-dedupe
33
section: 1
4-
description: Reduce duplication
4+
description: Reduce duplication in the package tree
55
---
66

77
### Synopsis
@@ -10,7 +10,7 @@ description: Reduce duplication
1010
npm dedupe
1111
npm ddp
1212

13-
aliases: find-dupes, ddp
13+
aliases: ddp
1414
```
1515

1616
### Description
@@ -74,6 +74,7 @@ Using `npm find-dupes` will run the command in `--dry-run` mode.
7474

7575
### See Also
7676

77+
* [npm find-dupes](/cli-commands/find-dupes)
7778
* [npm ls](/cli-commands/ls)
7879
* [npm update](/cli-commands/update)
7980
* [npm install](/cli-commands/install)

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: Deprecate a version of a package
1010
npm deprecate <pkg>[@<version range>] <message>
1111
```
1212

13+
Note: This command is unaware of workspaces.
14+
1315
### Description
1416

1517
This command will update the npm registry entry for a package, providing a

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: Check your npm environment
1010
npm doctor
1111
```
1212

13+
Note: This command is unaware of workspaces.
14+
1315
### Description
1416

1517
`npm doctor` runs a set of checks to ensure that your npm installation has

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: Edit an installed package
1010
npm edit <pkg>
1111
```
1212

13+
Note: This command is unaware of workspaces.
14+
1315
### Description
1416

1517
Selects a dependency in the current project and opens the package folder in

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

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ npm exec -- <pkg>[@<version>] [args...]
1111
npm exec --package=<pkg>[@<version>] -- <cmd> [args...]
1212
npm exec -c '<cmd> [args...]'
1313
npm exec --package=foo -c '<cmd> [args...]'
14+
npm exec [-ws] [-w <workspace-name] [args...]
1415

1516
npx <pkg>[@<specifier>] [args...]
1617
npx -p <pkg>[@<specifier>] <cmd> [args...]
@@ -145,6 +146,68 @@ $ npm x -c 'eslint && say "hooray, lint passed"'
145146
$ npx -c 'eslint && say "hooray, lint passed"'
146147
```
147148

149+
### Workspaces support
150+
151+
You may use the `workspace` or `workspaces` configs in order to run an
152+
arbitrary command from an npm package (either one installed locally, or fetched
153+
remotely) in the context of the specified workspaces.
154+
If no positional argument or `--call` option is provided, it will open an
155+
interactive subshell in the context of each of these configured workspaces one
156+
at a time.
157+
158+
Given a project with configured workspaces, e.g:
159+
160+
```
161+
.
162+
+-- package.json
163+
`-- packages
164+
+-- a
165+
| `-- package.json
166+
+-- b
167+
| `-- package.json
168+
`-- c
169+
`-- package.json
170+
```
171+
172+
Assuming the workspace configuration is properly set up at the root level
173+
`package.json` file. e.g:
174+
175+
```
176+
{
177+
"workspaces": [ "./packages/*" ]
178+
}
179+
```
180+
181+
You can execute an arbitrary command from a package in the context of each of
182+
the configured workspaces when using the `workspaces` configuration options,
183+
in this example we're using **eslint** to lint any js file found within each
184+
workspace folder:
185+
186+
```
187+
npm exec -ws -- eslint ./*.js
188+
```
189+
190+
#### Filtering workspaces
191+
192+
It's also possible to execute a command in a single workspace using the
193+
`workspace` config along with a name or directory path:
194+
195+
```
196+
npm exec --workspace=a -- eslint ./*.js
197+
```
198+
199+
The `workspace` config can also be specified multiple times in order to run a
200+
specific script in the context of multiple workspaces. When defining values for
201+
the `workspace` config in the command line, it also possible to use `-w` as a
202+
shorthand, e.g:
203+
204+
```
205+
npm exec -w a -w b -- eslint ./*.js
206+
```
207+
208+
This last command will run the `eslint` command in both `./packages/a` and
209+
`./packages/b` folders.
210+
148211
### Compatibility with Older npx Versions
149212

150213
The `npx` binary was rewritten in npm v7.0.0, and the standalone `npx`
@@ -195,6 +258,30 @@ requested from the server. To force full offline mode, use `offline`.
195258
Forces full offline mode. Any packages not locally cached will result in
196259
an error.
197260

261+
#### workspace
262+
263+
* Alias: `-w`
264+
* Type: Array
265+
* Default: `[]`
266+
267+
Enable running scripts in the context of workspaces while also filtering by
268+
the provided names or paths provided.
269+
270+
Valid values for the `workspace` config are either:
271+
- Workspace names
272+
- Path to a workspace directory
273+
- Path to a parent workspace directory (will result to selecting all of the
274+
children workspaces)
275+
276+
#### workspaces
277+
278+
* Alias: `-ws`
279+
* Type: Boolean
280+
* Default: `false`
281+
282+
Run scripts in the context of all configured workspaces for the current
283+
project.
284+
198285
### See Also
199286

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: Browse an installed package
1010
npm explore <pkg> [ -- <command>]
1111
```
1212

13+
Note: This command is unaware of workspaces.
14+
1315
### Description
1416

1517
Spawn a subshell in the directory of the installed package specified.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: npm-find-dupes
3+
section: 1
4+
description: Find duplication in the package tree
5+
---
6+
7+
### Synopsis
8+
9+
```bash
10+
npm find-dupes
11+
```
12+
13+
### Description
14+
15+
Runs `npm dedupe` in `--dry-run` mode, making npm only output the
16+
duplications, without actually changing the package tree.
17+
18+
### See Also
19+
20+
* [npm dedupe](/cli-commands/dedupe)
21+
* [npm ls](/cli-commands/ls)
22+
* [npm update](/cli-commands/update)
23+
* [npm install](/cli-commands/install)

deps/npm/docs/content/commands/npm-help-search.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: Search npm help documentation
1010
npm help-search <text>
1111
```
1212

13+
Note: This command is unaware of workspaces.
14+
1315
### Description
1416

1517
This command will search the npm markdown documentation files for the terms

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: Get help on npm
1010
npm help <term> [<terms..>]
1111
```
1212

13+
Note: This command is unaware of workspaces.
14+
1315
### Description
1416

1517
If supplied a topic, then show the appropriate documentation page.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ npm hook update <id> <url> [secret]
1313
npm hook rm <id>
1414
```
1515

16+
Note: This command is unaware of workspaces.
17+
1618
### Description
1719

1820
Allows you to manage [npm

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: npm-init
33
section: 1
4-
description: create a package.json file
4+
description: Create a package.json file
55
---
66

77
### Synopsis

0 commit comments

Comments
 (0)