Skip to content

Commit 30fe0ff

Browse files
darcyclarketargos
authored andcommitted
deps: upgrade npm to 7.1.2
PR-URL: #36487 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ruy Adorno <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent cc544db commit 30fe0ff

File tree

135 files changed

+3985
-928
lines changed

Some content is hidden

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

135 files changed

+3985
-928
lines changed

deps/npm/CHANGELOG.md

+50
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
## 7.1.2 (2020-12-11)
2+
3+
### DEPENDENCIES
4+
5+
* [`c3ba1daf7`](https://github.com/npm/cli/commit/c3ba1daf7cd335d72aeba80ae0e9f9d215ca9ea5)
6+
[#2033](https://github.com/npm/cli/issues/2033) `@npmcli/[email protected]`:
7+
* Set `INIT_CWD` to initial current working directory
8+
* Set `NODE` to initial process.execPath
9+
* [`8029608b9`](https://github.com/npm/cli/commit/8029608b914fe5ba35a7cd37ae95ab93b0532e2e)
10+
11+
* [`0233818e6`](https://github.com/npm/cli/commit/0233818e606888b80881b17a2c6aca9f10a619b2)
12+
[#2332](https://github.com/npm/cli/issues/2332) `[email protected]`
13+
* [`e401d6bb3`](https://github.com/npm/cli/commit/e401d6bb37ffc767b4fefe89878dd3c3ef490b2c)
14+
15+
* [`011bb1220`](https://github.com/npm/cli/commit/011bb122035dcd43769ec35982662cca41635068)
16+
[#2320](https://github.com/npm/cli/issues/2320) `@npmcli/[email protected]`:
17+
* Do not save with `^` and no version
18+
19+
### BUGFIXES
20+
21+
* [`244c2069f`](https://github.com/npm/cli/commit/244c2069fd093f053d3061c85575ac13e72e2454)
22+
[#2325](https://github.com/npm/cli/issues/2325) npm search
23+
include/exclude ([@ruyadorno](https://github.com/ruyadorno))
24+
* [`d825e901e`](https://github.com/npm/cli/commit/d825e901eceea4cf8d860e35238dc30008eb4da4)
25+
[#1905](https://github.com/npm/cli/issues/1905)
26+
[#2316](https://github.com/npm/cli/issues/2316) run install scripts for
27+
root project
28+
* [`315449142`](https://github.com/npm/cli/commit/31544914294948085a84097af7f0f5de2a2e8f7e)
29+
[#2331](https://github.com/npm/cli/issues/2331)
30+
[#2021](https://github.com/npm/cli/issues/2021) Set `NODE_ENV=production`
31+
if 'dev' is on the omit list ([@isaacs](https://github.com/isaacs))
32+
33+
### TESTING
34+
35+
* [`c243e3b9d`](https://github.com/npm/cli/commit/c243e3b9d9bda0580a0fc1b3e230b4d47412176e)
36+
[#2313](https://github.com/npm/cli/issues/2313) tests: completion
37+
([@nlf](https://github.com/nlf))
38+
* [`7ff6efbb8`](https://github.com/npm/cli/commit/7ff6efbb866591b2330b967215cef8146dff3ebf)
39+
[#2314](https://github.com/npm/cli/issues/2314) npm team
40+
([@ruyadorno](https://github.com/ruyadorno))
41+
* [`7a4f0c96c`](https://github.com/npm/cli/commit/7a4f0c96c2ab9f264f7bda2caf7e72c881571270)
42+
[#2323](https://github.com/npm/cli/issues/2323) npm doctor
43+
([@nlf](https://github.com/nlf))
44+
45+
### DOCUMENTATION
46+
47+
* [`e340cf64b`](https://github.com/npm/cli/commit/e340cf64ba31ef329a9049b60c32ffd0342cfb7d)
48+
[#2330](https://github.com/npm/cli/issues/2330) explain through
49+
run-script ([@isaacs](https://github.com/isaacs))
50+
151
## 7.1.1 (2020-12-08)
252

353
### DEPENDENCIES

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

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ description: Explain installed packages
88

99
```bash
1010
npm explain <folder | specifier>
11+
12+
alias: why
1113
```
1214

1315
### Description

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

+45-24
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,44 @@ alias: npm ln
1515

1616
### Description
1717

18+
This is handy for installing your own stuff, so that you can work on it and
19+
test iteratively without having to continually rebuild.
20+
1821
Package linking is a two-step process.
1922

20-
First, `npm link` in a package folder will create a symlink in the global folder
21-
`{prefix}/lib/node_modules/<package>` that links to the package where the `npm
22-
link` command was executed. It will also link any bins in the package to `{prefix}/bin/{name}`.
23-
Note that `npm link` uses the global prefix (see `npm prefix -g` for its value).
23+
First, `npm link` in a package folder will create a symlink in the global
24+
folder `{prefix}/lib/node_modules/<package>` that links to the package
25+
where the `npm link` command was executed. It will also link any bins in
26+
the package to `{prefix}/bin/{name}`. Note that `npm link` uses the global
27+
prefix (see `npm prefix -g` for its value).
2428

2529
Next, in some other location, `npm link package-name` will create a
26-
symbolic link from globally-installed `package-name` to `node_modules/`
27-
of the current folder.
30+
symbolic link from globally-installed `package-name` to `node_modules/` of
31+
the current folder.
2832

29-
Note that `package-name` is taken from `package.json`,
30-
not from directory name.
33+
Note that `package-name` is taken from `package.json`, _not_ from the
34+
directory name.
3135

32-
The package name can be optionally prefixed with a scope. See [`scope`](/using-npm/scope).
33-
The scope must be preceded by an @-symbol and followed by a slash.
36+
The package name can be optionally prefixed with a scope. See
37+
[`scope`](/using-npm/scope). The scope must be preceded by an @-symbol and
38+
followed by a slash.
3439

3540
When creating tarballs for `npm publish`, the linked packages are
36-
"snapshotted" to their current state by resolving the symbolic links.
37-
38-
This is handy for installing your own stuff, so that you can work on it and
39-
test it iteratively without having to continually rebuild.
41+
"snapshotted" to their current state by resolving the symbolic links, if
42+
they are included in `bundleDependencies`.
4043

4144
For example:
4245

4346
```bash
44-
cd ~/projects/node-redis # go into the package directory
45-
npm link # creates global link
46-
cd ~/projects/node-bloggy # go into some other package directory.
47-
npm link redis # link-install the package
47+
cd ~/projects/node-redis # go into the package directory
48+
npm link # creates global link
49+
cd ~/projects/node-bloggy # go into some other package directory.
50+
npm link redis # link-install the package
4851
```
4952

50-
Now, any changes to ~/projects/node-redis will be reflected in
51-
~/projects/node-bloggy/node_modules/node-redis/. Note that the link should
52-
be to the package name, not the directory name for that package.
53+
Now, any changes to `~/projects/node-redis` will be reflected in
54+
`~/projects/node-bloggy/node_modules/node-redis/`. Note that the link
55+
should be to the package name, not the directory name for that package.
5356

5457
You may also shortcut the two steps in one. For example, to do the
5558
above use-case in a shorter way:
@@ -69,15 +72,33 @@ npm link redis
6972
That is, it first creates a global link, and then links the global
7073
installation target into your project's `node_modules` folder.
7174

72-
Note that in this case, you are referring to the directory name, `node-redis`,
73-
rather than the package name `redis`.
75+
Note that in this case, you are referring to the directory name,
76+
`node-redis`, rather than the package name `redis`.
7477

75-
If your linked package is scoped (see [`scope`](/using-npm/scope)) your link command must include that scope, e.g.
78+
If your linked package is scoped (see [`scope`](/using-npm/scope)) your
79+
link command must include that scope, e.g.
7680

7781
```bash
7882
npm link @myorg/privatepackage
7983
```
8084

85+
### Caveat
86+
87+
Note that package dependencies linked in this way are _not_ saved to
88+
`package.json` by default, on the assumption that the intention is to have
89+
a link stand in for a regular non-link dependency. Otherwise, for example,
90+
if you depend on `redis@^3.0.1`, and ran `npm link redis`, it would replace
91+
the `^3.0.1` dependency with `file:../path/to/node-redis`, which you
92+
probably don't want! Additionally, other users or developers on your
93+
project would run into issues if they do not have their folders set up
94+
exactly the same as yours.
95+
96+
If you are adding a _new_ dependency as a link, you should add it to the
97+
relevant metadata by running `npm install <dep> --package-lock-only`.
98+
99+
If you _want_ to save the `file:` reference in your `package.json` and
100+
`package-lock.json` files, you can use `npm link <dep> --save` to do so.
101+
81102
### See Also
82103

83104
* [npm developers](/using-npm/developers)

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ npm logout [--registry=<url>] [--scope=<@scope>]
1212

1313
### Description
1414

15-
When logged into a registry that supports token-based authentication, tell the
16-
server to end this token's session. This will invalidate the token everywhere
17-
you're using it, not just for the current environment.
15+
When logged into a registry that supports token-based authentication, tell
16+
the server to end this token's session. This will invalidate the token
17+
everywhere you're using it, not just for the current environment.
1818

19-
When logged into a legacy registry that uses username and password authentication, this will
20-
clear the credentials in your user configuration. In this case, it will _only_ affect
21-
the current environment.
19+
When logged into a legacy registry that uses username and password
20+
authentication, this will clear the credentials in your user configuration.
21+
In this case, it will _only_ affect the current environment.
2222

2323
If `--scope` is provided, this will find the credentials for the registry
2424
connected to that scope, if set.

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

+51-9
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,21 @@ aliases: list, la, ll
1515
### Description
1616

1717
This command will print to stdout all the versions of packages that are
18-
installed, as well as their dependencies, in a tree-structure.
18+
installed, as well as their dependencies when `--all` is specified, in a
19+
tree structure.
1920

20-
Positional arguments are `name@version-range` identifiers, which will
21-
limit the results to only the paths to the packages named. Note that
22-
nested packages will *also* show the paths to the specified packages.
23-
For example, running `npm ls promzard` in npm's source tree will show:
21+
Note: to get a "bottoms up" view of why a given package is included in the
22+
tree at all, use [`npm explain`](/commands/npm-explain).
23+
24+
Positional arguments are `name@version-range` identifiers, which will limit
25+
the results to only the paths to the packages named. Note that nested
26+
packages will *also* show the paths to the specified packages. For
27+
example, running `npm ls promzard` in npm's source tree will show:
2428

2529
```bash
26-
npm@@VERSION@ /path/to/npm
27-
28-
30+
npm@@VERSION@ /path/to/npm
31+
32+
2933
```
3034

3135
It will print out extraneous, missing, and invalid packages.
@@ -35,12 +39,49 @@ in parentheses after the name@version to make it easier for users to
3539
recognize potential forks of a project.
3640

3741
The tree shown is the logical dependency tree, based on package
38-
dependencies, not the physical layout of your node_modules folder.
42+
dependencies, not the physical layout of your `node_modules` folder.
3943

4044
When run as `ll` or `la`, it shows extended information by default.
4145

46+
### Note: Design Changes Pending
47+
48+
The `npm ls` command's output and behavior made a _ton_ of sense when npm
49+
created a `node_modules` folder that naively nested every dependency. In
50+
such a case, the logical dependency graph and physical tree of packages on
51+
disk would be roughly identical.
52+
53+
With the advent of automatic install-time deduplication of dependencies in
54+
npm v3, the `ls` output was modified to display the logical dependency
55+
graph as a tree structure, since this was more useful to most users.
56+
However, without using `npm ls -l`, it became impossible show _where_ a
57+
package was actually installed much of the time!
58+
59+
With the advent of automatic installation of `peerDependencies` in npm v7,
60+
this gets even more curious, as `peerDependencies` are logically
61+
"underneath" their dependents in the dependency graph, but are always
62+
physically at or above their location on disk.
63+
64+
Also, in the years since npm got an `ls` command (in version 0.0.2!),
65+
dependency graphs have gotten much larger as a general rule. Therefor, in
66+
order to avoid dumping an excessive amount of content to the terminal, `npm
67+
ls` now only shows the _top_ level dependencies, unless `--all` is
68+
provided.
69+
70+
A thorough re-examination of the use cases, intention, behavior, and output
71+
of this command, is currently underway. Expect significant changes to at
72+
least the default human-readable `npm ls` output in npm v8.
73+
4274
### Configuration
4375

76+
#### all
77+
78+
* Default: `false`
79+
* Type: Boolean
80+
81+
When running `npm outdated` and `npm ls`, setting `--all` will show all
82+
outdated or installed packages, rather than only those directly depended
83+
upon by the current project.
84+
4485
#### json
4586

4687
* Default: false
@@ -115,6 +156,7 @@ Set it to false in order to use all-ansi output.
115156

116157
### See Also
117158

159+
* [npm explain](/commands/npm-explain)
118160
* [npm config](/commands/npm-config)
119161
* [npmrc](/configuring-npm/npmrc)
120162
* [npm folders](/configuring-npm/folders)

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ $ npm org ls my-org @mx-santos
5252

5353
### Description
5454

55-
You can use the `npm org` commands to manage and view users of an organization.
56-
It supports adding and removing users, changing their roles, listing them, and
57-
finding specific ones and their roles.
55+
You can use the `npm org` commands to manage and view users of an
56+
organization. It supports adding and removing users, changing their roles,
57+
listing them, and finding specific ones and their roles.
5858

5959
### See Also
6060

61+
* [using orgs](/using-npm/orgs)
6162
* [Documentation on npm Orgs](https://docs.npmjs.com/orgs/)

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

+36-26
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,34 @@ npm outdated [[<@scope>/]<pkg> ...]
1515
This command will check the registry to see if any (or, specific) installed
1616
packages are currently outdated.
1717

18+
By default, only the direct dependencies of the root project are shown.
19+
Use `--all` to find all outdated meta-dependencies as well.
20+
1821
In the output:
1922

2023
* `wanted` is the maximum version of the package that satisfies the semver
21-
range specified in `package.json`. If there's no available semver range (i.e.
22-
you're running `npm outdated --global`, or the package isn't included in
23-
`package.json`), then `wanted` shows the currently-installed version.
24+
range specified in `package.json`. If there's no available semver range
25+
(i.e. you're running `npm outdated --global`, or the package isn't
26+
included in `package.json`), then `wanted` shows the currently-installed
27+
version.
2428
* `latest` is the version of the package tagged as latest in the registry.
25-
Running `npm publish` with no special configuration will publish the package
26-
with a dist-tag of `latest`. This may or may not be the maximum version of
27-
the package, or the most-recently published version of the package, depending
28-
on how the package's developer manages the latest [dist-tag](npm-dist-tag).
29+
Running `npm publish` with no special configuration will publish the
30+
package with a dist-tag of `latest`. This may or may not be the maximum
31+
version of the package, or the most-recently published version of the
32+
package, depending on how the package's developer manages the latest
33+
[dist-tag](/commands/npm-dist-tag).
2934
* `location` is where in the physical tree the package is located.
3035
* `depended by` shows which package depends on the displayed dependency
31-
* `package type` (when using `--long` / `-l`) tells you whether this package is
32-
a `dependency` or a dev/peer/optional dependency. Packages not included in `package.json`
33-
are always marked `dependencies`.
34-
* `homepage` (when using `--long` / `-l`) is the `homepage` value contained in the package's packument
35-
* Red means there's a newer version matching your semver requirements, so you should update now.
36-
* Yellow indicates that there's a newer version above your semver requirements (usually new major, or new 0.x minor) so proceed with caution.
36+
* `package type` (when using `--long` / `-l`) tells you whether this
37+
package is a `dependency` or a dev/peer/optional dependency. Packages not
38+
included in `package.json` are always marked `dependencies`.
39+
* `homepage` (when using `--long` / `-l`) is the `homepage` value contained
40+
in the package's packument
41+
* Red means there's a newer version matching your semver requirements, so
42+
you should update now.
43+
* Yellow indicates that there's a newer version _above_ your semver
44+
requirements (usually new major, or new 0.x minor) so proceed with
45+
caution.
3746

3847
### An example
3948

@@ -59,19 +68,20 @@ With these `dependencies`:
5968

6069
A few things to note:
6170

62-
* `glob` requires `^5`, which prevents npm from installing `glob@6`, which is
63-
outside the semver range.
64-
* Git dependencies will always be reinstalled, because of how they're specified.
65-
The installed committish might satisfy the dependency specifier (if it's
66-
something immutable, like a commit SHA), or it might not, so `npm outdated` and
67-
`npm update` have to fetch Git repos to check. This is why currently doing a
68-
reinstall of a Git dependency always forces a new clone and install.
69-
* `[email protected]` is marked as "wanted", but "latest" is `[email protected]` because npm
70-
uses dist-tags to manage its `latest` and `next` release channels. `npm update`
71-
will install the _newest_ version, but `npm install npm` (with no semver range)
72-
will install whatever's tagged as `latest`.
73-
* `once` is just plain out of date. Reinstalling `node_modules` from scratch or
74-
running `npm update` will bring it up to spec.
71+
* `glob` requires `^5`, which prevents npm from installing `glob@6`, which
72+
is outside the semver range.
73+
* Git dependencies will always be reinstalled, because of how they're
74+
specified. The installed committish might satisfy the dependency
75+
specifier (if it's something immutable, like a commit SHA), or it might
76+
not, so `npm outdated` and `npm update` have to fetch Git repos to check.
77+
This is why currently doing a reinstall of a Git dependency always forces
78+
a new clone and install.
79+
* `[email protected]` is marked as "wanted", but "latest" is `[email protected]` because
80+
npm uses dist-tags to manage its `latest` and `next` release channels.
81+
`npm update` will install the _newest_ version, but `npm install npm`
82+
(with no semver range) will install whatever's tagged as `latest`.
83+
* `once` is just plain out of date. Reinstalling `node_modules` from
84+
scratch or running `npm update` will bring it up to spec.
7585

7686
### Configuration
7787

0 commit comments

Comments
 (0)