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.11.2 #38475

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions deps/npm/AUTHORS
Expand Up @@ -770,3 +770,5 @@ Yash Singh <saiansh2525@gmail.com>
Danielle Church <dani.church@gmail.com>
Seth Thomas <seth@emailseth.com>
Andreas <andreas@bielk.se>
Felipe Santos <felipecassiors@gmail.com>
Luigi Pinca <luigipinca@gmail.com>
122 changes: 122 additions & 0 deletions deps/npm/CHANGELOG.md
@@ -1,3 +1,125 @@
## v7.11.2 (2021-04-29)

### BUG FIXES

* [`c371f183e`](https://github.com/npm/cli/commit/c371f183ebe833c2439e98b679f14e7a59f22c34)
[#3137](https://github.com/npm/cli/issues/3137)
[#3140](https://github.com/npm/cli/issues/3140)
fix(ls): do not warn on missing optional deps
([@isaacs](https://github.com/isaacs))
* [`861f606c7`](https://github.com/npm/cli/commit/861f606c7609d177c644814a171581afbb72f6db)
[#3156](https://github.com/npm/cli/issues/3156)
fix(build): make prune rule work on case-sensitive file systems
([@lpinca](https://github.com/lpinca))

### DEPENDENCIES

* [`fb79d89a0`](https://github.com/npm/cli/commit/fb79d89a07ef03e76633db275463f701d3dae42f)
`tap@15.0.6`
* [`ce3820043`](https://github.com/npm/cli/commit/ce38200437e9ed527df973794909b2699909bc9b)
`@npmcli/arborist@2.4.1`
* fix: prevent and eliminate unnecessary duplicates
* fix: support resolvable partial intersecting peerSets

### DOCUMENTATION

* [`e479f1dac`](https://github.com/npm/cli/commit/e479f1dac9a7639304d20116583034861635b2b1)
[#3146](https://github.com/npm/cli/issues/3146)
mention `directories.bin` in `bin`
([@felipecrs](https://github.com/felipecrs))

## v7.11.1 (2021-04-23)

### DEPENDENCIES

* [`7925cca24`](https://github.com/npm/cli/commit/7925cca24543d9e1a8297844b3e53e11057643ef)
`pacote@11.3.3`:
* fix(registry): normalize manfest
* [`b61eac693`](https://github.com/npm/cli/commit/b61eac693df82c52b955e6c18ec4dcf4cedea8a3)
[#3130](https://github.com/npm/cli/issues/3130)
`@npmcli/config@2.2.0`
* [`c74e67fc6`](https://github.com/npm/cli/commit/c74e67fc6572bb001d74c7486c05d211a0e03de8)
[#3130](https://github.com/npm/cli/issues/3130)
`npm-registry-fetch@10.1.1`

### DOCUMENTATION

* [`efdd7dd44`](https://github.com/npm/cli/commit/efdd7dd4427a0ee856c18aab1df2d3d30a307997)
Remove unused and incorrectly documented `--always-auth` config definition
([@isaacs](https://github.com/isaacs))

## v7.11.0 (2021-04-22)

### FEATURES

* [`4c1f16d2c`](https://github.com/npm/cli/commit/4c1f16d2c29a7a56c19b97f2820e6305a6075083)
[#3095](https://github.com/npm/cli/issues/3095)
feat(init): add workspaces support
([@ruyadorno](https://github.com/ruyadorno))

### BUG FIXES

* [`42ca59eee`](https://github.com/npm/cli/commit/42ca59eeedd3e402aa1c606941f7f52864e6039b)
[#3086](https://github.com/npm/cli/issues/3086)
fix(ls): do not exit with error when all problems are extraneous deps
([@nlf](https://github.com/nlf))
* [`2aecec591`](https://github.com/npm/cli/commit/2aecec591df6866e27d0b17dc49cef8f7d738d77)
[#2724](https://github.com/npm/cli/issues/2724)
[#3119](https://github.com/npm/cli/issues/3119)
fix(ls): make --long work when missing deps
([@ruyadorno](https://github.com/ruyadorno))
* [`42e0587a9`](https://github.com/npm/cli/commit/42e0587a9ea6940a5d5be5903370ad1113feef21)
[#3115](https://github.com/npm/cli/issues/3115)
fix(pack): refuse to pack invalid packument
([@wraithgar](https://github.com/wraithgar))
* [`1c4eff7b5`](https://github.com/npm/cli/commit/1c4eff7b513b8e84876818ede014d3ab19d203c6)
[#3126](https://github.com/npm/cli/issues/3126)
fix(logout): use isBasicAuth attribute
([@wraithgar](https://github.com/wraithgar))
### DOCUMENTATION


* [`c93f1c39e`](https://github.com/npm/cli/commit/c93f1c39e326feff0857712a10ef6183fbafe1ab)
[#3101](https://github.com/npm/cli/issues/3101)
chore(docs): update view docs
([@wraithgar](https://github.com/wraithgar))
* [`c4ff4bc11`](https://github.com/npm/cli/commit/c4ff4bc113c3a5b6ee5d74ab0b1adee95169ed32)
[npm/statusboard#313](https://github.com/npm/statusboard/issues/313)
[#3109](https://github.com/npm/cli/issues/3109)
fix(usage): fix refs to ws shorthand
([@ruyadorno](https://github.com/ruyadorno))


### DEPENDENCIES

* [`83166ebcc`](https://github.com/npm/cli/commit/83166ebcc4ba5e3bf215f08151437d96637f4f33)
`npm-registry-fetch@10.1.0`
* feat(auth): set isBasicAuth
* [`e02bda6da`](https://github.com/npm/cli/commit/e02bda6da68b8e8f490bf270cb5d6adec81685ea)
`npm-registry-fetch@10.0.0`
* feat(auth) load/send based on URI, not registry
* [`a0382deba`](https://github.com/npm/cli/commit/a0382deba346b09834e75db89e1fd4527f1f07dd)
`@npmcli/run-script@1.8.5`
* fix: windows ComSpec env variable name
* [`7f82ef5a8`](https://github.com/npm/cli/commit/7f82ef5a84d70e28983ed43ba1d8aced0fb4ba45)
`pacote@11.3.2`
* [`35e49b94f`](https://github.com/npm/cli/commit/35e49b94fba478a63df6cc9b62816eafe5f1fbdd)
`@npmcli/arborist@2.4.0`
* [`95faf8ce6`](https://github.com/npm/cli/commit/95faf8ce6c007082a02c160977da194c08ee9d82)
`libnpmaccess@4.0.2`
* [`17fffc0e4`](https://github.com/npm/cli/commit/17fffc0e42b2a9e7b84691093e45ba511906cbfa)
`libnpmhook@6.0.2`
* [`1b5a213aa`](https://github.com/npm/cli/commit/1b5a213aaf39652661ba72ba2e8751f049b170fb)
`libnpmorg@2.0.2`
* [`9f83e6484`](https://github.com/npm/cli/commit/9f83e6484aa163d066f318df42ec89c8234b614e)
`libnpmpublish@4.0.1`
* [`251f788c5`](https://github.com/npm/cli/commit/251f788c554a198ab42682453fa5504f8abe93fe)
`libnpmsearch@3.1.1`
* [`35873a989`](https://github.com/npm/cli/commit/35873a989fe67041ddcf30a0a278ed77ace5ee3c)
`libnpmteam@2.0.3`
* [`23e12b4d8`](https://github.com/npm/cli/commit/23e12b4d8f63d765a48036e7bb08f53319c73304)
`npm-profile@5.0.3`

## v7.10.0 (2021-04-15)

### FEATURES
Expand Down
19 changes: 1 addition & 18 deletions deps/npm/docs/content/commands/npm-adduser.md
Expand Up @@ -7,7 +7,7 @@ description: Add a registry user account
### Synopsis

```bash
npm adduser [--registry=url] [--scope=@orgname] [--always-auth] [--auth-type=legacy]
npm adduser [--registry=url] [--scope=@orgname] [--auth-type=legacy]

aliases: login, add-user
```
Expand Down Expand Up @@ -58,23 +58,6 @@ npm adduser --registry=http://myregistry.example.com --scope=@myco
This will set a registry for the given scope and login or create a user for
that registry at the same time.

#### always-auth

Default: false

If specified, save configuration indicating that all requests to the given
registry should include authorization information. Useful for private
registries. Can be used with `--registry` and / or `--scope`, e.g.

```bash
npm adduser --registry=http://private-registry.example.com --always-auth
```

This will ensure that all requests to that registry (including for tarballs)
include an authorization header. This setting may be necessary for use with
private registries where metadata and package tarballs are stored on hosts with
different hostnames. See `always-auth` in [`config`](/using-npm/config) for more details on always-auth. Registry-specific configuration of `always-auth` takes precedence over any global configuration.

#### auth-type

* Default: `'legacy'`
Expand Down
7 changes: 4 additions & 3 deletions deps/npm/docs/content/commands/npm-exec.md
Expand Up @@ -11,7 +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...]
npm exec [--ws] [-w <workspace-name] [args...]

npx <pkg>[@<specifier>] [args...]
npx -p <pkg>[@<specifier>] <cmd> [args...]
Expand Down Expand Up @@ -184,7 +184,7 @@ in this example we're using **eslint** to lint any js file found within each
workspace folder:

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

#### Filtering workspaces
Expand Down Expand Up @@ -275,7 +275,7 @@ children workspaces)

#### workspaces

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

Expand All @@ -291,3 +291,4 @@ project.
* [npm restart](/commands/npm-restart)
* [npm stop](/commands/npm-stop)
* [npm config](/commands/npm-config)
* [npm workspaces](/using-npm/workspaces)
120 changes: 110 additions & 10 deletions deps/npm/docs/content/commands/npm-init.md
Expand Up @@ -8,8 +8,9 @@ description: Create a package.json file

```bash
npm init [--force|-f|--yes|-y|--scope]
npm init <@scope> (same as `npx <@scope>/create`)
npm init [<@scope>/]<name> (same as `npx [<@scope>/]create-<name>`)
npm init <@scope> (same as `npm exec <@scope>/create`)
npm init [<@scope>/]<name> (same as `npm exec [<@scope>/]create-<name>`)
npm init [-w <dir>] [args...]
```

### Description
Expand All @@ -18,19 +19,16 @@ npm init [<@scope>/]<name> (same as `npx [<@scope>/]create-<name>`)
package.

`initializer` in this case is an npm package named `create-<initializer>`,
which will be installed by [`npx`](https://npm.im/npx), and then have its
which will be installed by [`npm-exec`](/commands/npm-exec), and then have its
main bin executed -- presumably creating or updating `package.json` and
running any other initialization-related operations.

The init command is transformed to a corresponding `npx` operation as
The init command is transformed to a corresponding `npm exec` operation as
follows:

* `npm init foo` -> `npx create-foo`
* `npm init @usr/foo` -> `npx @usr/create-foo`
* `npm init @usr` -> `npx @usr/create`

Any additional options will be passed directly to the command, so `npm init
foo -- --hello` will map to `npx create-foo --hello`.
* `npm init foo` -> `npm exec create-foo`
* `npm init @usr/foo` -> `npm exec @usr/create-foo`
* `npm init @usr` -> `npm exec @usr/create`

If the initializer is omitted (by just calling `npm init`), init will fall
back to legacy init behavior. It will ask you a bunch of questions, and
Expand All @@ -40,6 +38,18 @@ strictly additive, so it will keep any fields and values that were already
set. You can also use `-y`/`--yes` to skip the questionnaire altogether. If
you pass `--scope`, it will create a scoped package.

#### Forwarding additional options

Any additional options will be passed directly to the command, so `npm init
foo -- --hello` will map to `npm exec -- create-foo --hello`.

To better illustrate how options are forwarded, here's a more evolved
example showing options passed to both the **npm cli** and a create package,
both following commands are equivalent:

- `npm init foo -y --registry=<url> -- --hello -a`
- `npm exec -y --registry=<url> -- create-foo --hello -a`

### Examples

Create a new React-based project using
Expand Down Expand Up @@ -71,6 +81,68 @@ Generate it without having it ask any questions:
$ npm init -y
```

### Workspaces support

It's possible to create a new workspace within your project by using the
`workspace` config option. When using `npm init -w <dir>` the cli will
create the folders and boilerplate expected while also adding a reference
to your project `package.json` `"workspaces": []` property in order to make
sure that new generated **workspace** is properly set up as such.

Given a project with no workspaces, e.g:

```
.
+-- package.json
```

You may generate a new workspace using the legacy init:

```bash
$ npm init -w packages/a
```

That will generate a new folder and `package.json` file, while also updating
your top-level `package.json` to add the reference to this new workspace:

```
.
+-- package.json
`-- packages
`-- a
`-- package.json
```

The workspaces init also supports the `npm init <initializer> -w <dir>`
syntax, following the same set of rules explained earlier in the initial
**Description** section of this page. Similar to the previous example of
creating a new React-based project using
[`create-react-app`](https://npm.im/create-react-app), the following syntax
will make sure to create the new react app as a nested **workspace** within your
project and configure your `package.json` to recognize it as such:

```bash
npm init -w packages/my-react-app react-app .
```

This will make sure to generate your react app as expected, one important
consideration to have in mind is that `npm exec` is going to be run in the
context of the newly created folder for that workspace, and that's the reason
why in this example the initializer uses the initializer name followed with a
dot to represent the current directory in that context, e.g: `react-app .`:

```
.
+-- package.json
`-- packages
+-- a
| `-- package.json
`-- my-react-app
+-- README
+-- package.json
`-- ...
```

### A note on caching

The npm cli utilizes its internal package cache when using the package
Expand All @@ -93,10 +165,38 @@ 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 `npm init` in the context of workspaces, creating any missing
folders, generating files and adding/updating the `"workspaces"` property of
the project `package.json`.

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 `npm init` in the context of all configured workspaces for the
current project.

### See Also

* [init-package-json module](http://npm.im/init-package-json)
* [package.json](/configuring-npm/package-json)
* [npm version](/commands/npm-version)
* [npm scope](/using-npm/scope)
* [npm exec](/commands/npm-exec)
* [npm workspaces](/using-npm/workspaces)
3 changes: 2 additions & 1 deletion deps/npm/docs/content/commands/npm-run-script.md
Expand Up @@ -189,7 +189,7 @@ children workspaces)

#### workspaces

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

Expand All @@ -204,3 +204,4 @@ project.
* [npm restart](/commands/npm-restart)
* [npm stop](/commands/npm-stop)
* [npm config](/commands/npm-config)
* [npm workspaces](/using-npm/workspaces)