Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: upgrade npm to 7.7.0 #37879

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions deps/npm/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -759,3 +759,9 @@ Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
Bjørn Johansen <bjjohans@microsoft.com>
Fraqe <f@fraqe.ca>
Edward Grech <dwardu@gmail.com>
Kenrick <kenrick95@gmail.com>
Karthik Sundari <karthik_sundari@comcast.com>
Jan Sepke <625043+jansepke@users.noreply.github.com>
Augusto Moura <augusto.borgesm@gmail.com>
Eric Chow <eric.zjp.chow@gmail.com>
kbayrhammer <klaus.bayrhammer@redbull.com>
76 changes: 76 additions & 0 deletions deps/npm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,79 @@
## v7.7.0 (2021-03-23)

### FEATURES

* [`33c4189f9`](https://github.com/npm/cli/commit/33c4189f939aebdfaf85ea419e6ea01d0977b79d)
[#2864](https://github.com/npm/cli/issues/2864)
add `npm run-script` workspaces support
([@ruyadorno](https://github.com/ruyadorno))
* [`e1b3b318f`](https://github.com/npm/cli/commit/e1b3b318f095a7e1a7cc4b131907de4955275d9d)
[#2886](https://github.com/npm/cli/issues/2886)
add `npm exec` workspaces support
([@ruyadorno](https://github.com/ruyadorno))
* [`41facf643`](https://github.com/npm/cli/commit/41facf6435ced4e416d74111d9c3ff00ee19ab7d)
[#2859](https://github.com/npm/cli/issues/2859)
expanded "Did you mean?" suggestions for missing cmds and scripts
([@wraithgar](https://github.com/wraithgar))

### BUG FIXES

* [`8cce4282f`](https://github.com/npm/cli/commit/8cce4282f7bef11aeeb73cffd532b477b241985e)
[#2865](https://github.com/npm/cli/issues/2865)
`npm publish`: handle case where multiple config list is present
([@kenrick95](https://github.com/kenrick95))
* [`6598bfe86`](https://github.com/npm/cli/commit/6598bfe8697439e827d84981f8504febca64a55a)
mark deprecated configs
([@isaacs](https://github.com/isaacs))
* [`8a38afe77`](https://github.com/npm/cli/commit/8a38afe779ce71a10178ed62b13709d06adf7a66)
[#2881](https://github.com/npm/cli/issues/2881)
docs(package-json): document default main behavior
([@klausbayrhammer](https://github.com/klausbayrhammer))
* [`93a061d73`](https://github.com/npm/cli/commit/93a061d737dc769663652368e8586e4202267b9e)
[#2917](https://github.com/npm/cli/issues/2917)
add action items to `npm run` error output
([@wraithgar](https://github.com/wraithgar))

### DOCUMENTATION

* [`ad65bd910`](https://github.com/npm/cli/commit/ad65bd9101aa8e8b94bc1e48df3ef93deca6d30c)
[#2860](https://github.com/npm/cli/issues/2860)
fix link in configuring-npm
([@varmakarthik12](https://github.com/varmakarthik12))
* [`b419bfb02`](https://github.com/npm/cli/commit/b419bfb0259596fb338d45b2eaeab25a7a0d1f1e)
[#2876](https://github.com/npm/cli/issues/2876)
fix test-coverage command in contributing guide
([@chowkapow](https://github.com/chowkapow))

### DEPENDENCIES

* [`7b5606b93`](https://github.com/npm/cli/commit/7b5606b931083e8a70f5ea094c2b46f0b7a38a18)
`@npmcli/arborist@2.2.9`
* [#254](https://github.com/npm/arborist/pull/254) Honor explicit
prefix when saving dependencies
([@jameschensmith](https://github.com/jameschensmith))
* [#255](https://github.com/npm/arborist/pull/255) Never save to
`bundleDependencies` when saving a `peer` or `peerOptional`
dependency. ([@isaacs](https://github.com/isaacs))
* [`f76e7c21f`](https://github.com/npm/cli/commit/f76e7c21ffd87b08593d8c396a78ab9c5fa790bd)
`pacote@11.3.1`
* increases tarball compression level
* [`4928512bc`](https://github.com/npm/cli/commit/4928512bcefd8448ff5852978cfc7f903e3ae996)
`semver@7.3.5`
* fix handling prereleases/ANY ranges in subset
* [`1924eb457`](https://github.com/npm/cli/commit/1924eb457aea7c93dfaf4a911355a63d84d66eee)
`libnpmversion@1.0.12`
* fix removing undescored-prefixed package.json properties in `npm version`
* [`916623056`](https://github.com/npm/cli/commit/91662305643509eebd2f79ed7e3ff01562aa4968)
`@npmcli/run-script@1.8.4`
* fix expanding windows-style environment variables
* [`a8d0751e4`](https://github.com/npm/cli/commit/a8d0751e4b7c7d8b808c8a49f288fc7272f729b0)
`npm-pick-manifest@6.1.1`
* fix running packages with a single executable binary with `npm exec`
* [`af7eaac50`](https://github.com/npm/cli/commit/af7eaac5018ed821d72d43d08f1d7e49e7491453)
`hosted-git-info@4.0.1`
* [`f52c51db1`](https://github.com/npm/cli/commit/f52c51db13c39cfbaed18dbd13ba7302a4b6a0d9)
`@npmcli/config@2.0.0`

## v7.6.3 (2021-03-11)

### DOCUMENTATION
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ We expect that every new feature or bug fix comes with corresponding tests that
**You can find out what the current test coverage percentage is by running...**

```bash
$ npm run test-coverage
$ npm run check-coverage
```

## Performance & Benchmarks
Expand Down
1 change: 1 addition & 0 deletions deps/npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ If you're looking to manage multiple versions of **`node`** &/or **`npm`**, cons
* [**`n`**](https://github.com/tj/n)
* [**`volta`**](https://github.com/volta-cli/volta)
* [**`nodenv`**](https://github.com/nodenv/nodenv)
* [**`asdf-nodejs`**](https://github.com/asdf-vm/asdf-nodejs)

### Usage

Expand Down
8 changes: 4 additions & 4 deletions deps/npm/bin/npx-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ const removed = new Set([
...removedOpts
])

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

// things that don't take a value
const switches = new Set([
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/docs/content/commands/npm-adduser.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ npm adduser [--registry=url] [--scope=@orgname] [--always-auth] [--auth-type=leg
aliases: login, add-user
```

Note: This command is unaware of workspaces.

### Description

Create or verify a user named `<username>` in the specified registry, and
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/docs/content/commands/npm-bin.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: Display npm bin folder
npm bin [-g|--global]
```

Note: This command is unaware of workspaces.

### Description

Print the folder where npm will install executables.
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/docs/content/commands/npm-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ aliases: npm cache clear, npm cache rm
npm cache verify
```

Note: This command is unaware of workspaces.

### Description

Used to add, list, or clean the npm cache folder.
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/docs/content/commands/npm-completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: Tab Completion for npm
source <(npm completion)
```

Note: This command is unaware of workspaces.

### Description

Enables tab-completion in all npm commands.
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/docs/content/commands/npm-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ npm get [<key> [<key> ...]]
alias: c
```

Note: This command is unaware of workspaces.

### Description

npm gets its config settings from the command line, environment
Expand Down
5 changes: 3 additions & 2 deletions deps/npm/docs/content/commands/npm-dedupe.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: npm-dedupe
section: 1
description: Reduce duplication
description: Reduce duplication in the package tree
---

### Synopsis
Expand All @@ -10,7 +10,7 @@ description: Reduce duplication
npm dedupe
npm ddp

aliases: find-dupes, ddp
aliases: ddp
```

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

### See Also

* [npm find-dupes](/cli-commands/find-dupes)
* [npm ls](/cli-commands/ls)
* [npm update](/cli-commands/update)
* [npm install](/cli-commands/install)
2 changes: 2 additions & 0 deletions deps/npm/docs/content/commands/npm-deprecate.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: Deprecate a version of a package
npm deprecate <pkg>[@<version range>] <message>
```

Note: This command is unaware of workspaces.

### Description

This command will update the npm registry entry for a package, providing a
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/docs/content/commands/npm-doctor.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: Check your npm environment
npm doctor
```

Note: This command is unaware of workspaces.

### Description

`npm doctor` runs a set of checks to ensure that your npm installation has
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/docs/content/commands/npm-edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: Edit an installed package
npm edit <pkg>
```

Note: This command is unaware of workspaces.

### Description

Selects a dependency in the current project and opens the package folder in
Expand Down
87 changes: 87 additions & 0 deletions deps/npm/docs/content/commands/npm-exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ npm exec -- <pkg>[@<version>] [args...]
npm exec --package=<pkg>[@<version>] -- <cmd> [args...]
npm exec -c '<cmd> [args...]'
npm exec --package=foo -c '<cmd> [args...]'
npm exec [-ws] [-w <workspace-name] [args...]

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

### Workspaces support

You may use the `workspace` or `workspaces` configs in order to run an
arbitrary command from an npm package (either one installed locally, or fetched
remotely) in the context of the specified workspaces.
If no positional argument or `--call` option is provided, it will open an
interactive subshell in the context of each of these configured workspaces one
at a time.

Given a project with configured workspaces, e.g:

```
.
+-- package.json
`-- packages
+-- a
| `-- package.json
+-- b
| `-- package.json
`-- c
`-- package.json
```

Assuming the workspace configuration is properly set up at the root level
`package.json` file. e.g:

```
{
"workspaces": [ "./packages/*" ]
}
```

You can execute an arbitrary command from a package in the context of each of
the configured workspaces when using the `workspaces` configuration options,
in this example we're using **eslint** to lint any js file found within each
workspace folder:

```
npm exec -ws -- eslint ./*.js
```

#### Filtering workspaces

It's also possible to execute a command in a single workspace using the
`workspace` config along with a name or directory path:

```
npm exec --workspace=a -- eslint ./*.js
```

The `workspace` config can also be specified multiple times in order to run a
specific script in the context of multiple workspaces. When defining values for
the `workspace` config in the command line, it also possible to use `-w` as a
shorthand, e.g:

```
npm exec -w a -w b -- eslint ./*.js
```

This last command will run the `eslint` command in both `./packages/a` and
`./packages/b` folders.

### Compatibility with Older npx Versions

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

#### workspace

* Alias: `-w`
* Type: Array
* Default: `[]`

Enable running scripts in the context of workspaces while also filtering by
the provided names or paths provided.

Valid values for the `workspace` config are either:
- Workspace names
- Path to a workspace directory
- Path to a parent workspace directory (will result to selecting all of the
children workspaces)

#### workspaces

* Alias: `-ws`
* Type: Boolean
* Default: `false`

Run scripts in the context of all configured workspaces for the current
project.

### See Also

* [npm run-script](/commands/npm-run-script)
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/docs/content/commands/npm-explore.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: Browse an installed package
npm explore <pkg> [ -- <command>]
```

Note: This command is unaware of workspaces.

### Description

Spawn a subshell in the directory of the installed package specified.
Expand Down
23 changes: 23 additions & 0 deletions deps/npm/docs/content/commands/npm-find-dupes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: npm-find-dupes
section: 1
description: Find duplication in the package tree
---

### Synopsis

```bash
npm find-dupes
```

### Description

Runs `npm dedupe` in `--dry-run` mode, making npm only output the
duplications, without actually changing the package tree.

### See Also

* [npm dedupe](/cli-commands/dedupe)
* [npm ls](/cli-commands/ls)
* [npm update](/cli-commands/update)
* [npm install](/cli-commands/install)
2 changes: 2 additions & 0 deletions deps/npm/docs/content/commands/npm-help-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: Search npm help documentation
npm help-search <text>
```

Note: This command is unaware of workspaces.

### Description

This command will search the npm markdown documentation files for the terms
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/docs/content/commands/npm-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: Get help on npm
npm help <term> [<terms..>]
```

Note: This command is unaware of workspaces.

### Description

If supplied a topic, then show the appropriate documentation page.
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/docs/content/commands/npm-hook.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ npm hook update <id> <url> [secret]
npm hook rm <id>
```

Note: This command is unaware of workspaces.

### Description

Allows you to manage [npm
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm-init.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: npm-init
section: 1
description: create a package.json file
description: Create a package.json file
---

### Synopsis
Expand Down
Loading