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 8.6.0 #42550

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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm install <tarball url>
npm install <git:// url>
npm install <github username>/<github project>

aliases: i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall, add
aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall
```

<!-- automatically generated, do not edit manually -->
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description: Search for packages
```bash
npm search [search terms ...]

aliases: s, se, find
aliases: find, s, se
```

<!-- automatically generated, do not edit manually -->
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm-uninstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description: Remove a package
```bash
npm uninstall [<@scope>/]<pkg>...

aliases: un, unlink, remove, rm, r
aliases: unlink, remove, rm, r, un
```

<!-- automatically generated, do not edit manually -->
Expand Down
11 changes: 11 additions & 0 deletions deps/npm/docs/content/commands/npm-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,17 @@ This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->

#### `workspaces-update`

* Default: true
* Type: Boolean

If set to true, the npm cli will run an update after operations that may
possibly change the workspaces installed to the `node_modules` folder.

<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->

#### `include-workspace-root`

* Default: false
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description: View registry info
```bash
npm view [<@scope>/]<pkg>[@<version>] [<field>[.subfield]...]

aliases: v, info, show
aliases: info, show, v
```

<!-- automatically generated, do not edit manually -->
Expand Down
30 changes: 27 additions & 3 deletions deps/npm/docs/content/using-npm/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -1027,13 +1027,26 @@ See also the `foreground-scripts` config.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->

#### `logs-dir`

* Default: A directory named `_logs` inside the cache
* Type: null or Path

The location of npm's log directory. See [`npm logging`](/using-npm/logging)
for more information.

<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->

#### `logs-max`

* Default: 10
* Type: Number

The maximum number of log files to store.

If set to 0, no log files will be written for the current run.

<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->

Expand Down Expand Up @@ -1628,9 +1641,9 @@ particular, use care when overriding this setting for public packages.
* Default: false
* Type: Boolean

If true, writes an `npm-debug` log to `_logs` and timing information to
`_timing.json`, both in your cache, even if the command completes
successfully. `_timing.json` is a newline delimited list of JSON objects.
If true, writes a debug log to `logs-dir` and timing information to
`_timing.json` in the cache, even if the command completes successfully.
`_timing.json` is a newline delimited list of JSON objects.

You can quickly view it with this [json](https://npm.im/json) command line:
`npm exec -- json -g < ~/.npm/_timing.json`.
Expand Down Expand Up @@ -1823,6 +1836,17 @@ This value is not exported to the environment for child processes.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->

#### `workspaces-update`

* Default: true
* Type: Boolean

If set to true, the npm cli will run an update after operations that may
possibly change the workspaces installed to the `node_modules` folder.

<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->

#### `yes`

* Default: null
Expand Down
33 changes: 30 additions & 3 deletions deps/npm/docs/content/using-npm/logging.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
---
title: Logging
section: 7
description: Why, What & How we Log
description: Why, What & How We Log
---

### Description

The `npm` CLI has various mechanisms for showing different levels of information back to end-users for certain commands, configurations & environments.

### Setting Log File Location

All logs are written to a debug log, with the path to that file printed if the execution of a command fails.

The default location of the logs directory is a directory named `_logs` inside the npm cache. This can be changed
with the `logs-dir` config option.

Log files will be removed from the `logs-dir` when the number of log files exceeds `logs-max`, with the oldest logs being deleted first.

To turn off logs completely set `--logs-max=0`.

### Setting Log Levels

#### `loglevel`
Expand All @@ -28,8 +39,6 @@ The default value of `loglevel` is `"notice"` but there are several levels/types

All logs pertaining to a level proceeding the current setting will be shown.

All logs are written to a debug log, with the path to that file printed if the execution of a command fails.

##### Aliases

The log levels listed above have various corresponding aliases, including:
Expand All @@ -47,6 +56,15 @@ The log levels listed above have various corresponding aliases, including:

The `npm` CLI began hiding the output of lifecycle scripts for `npm install` as of `v7`. Notably, this means you will not see logs/output from packages that may be using "install scripts" to display information back to you or from your own project's scripts defined in `package.json`. If you'd like to change this behavior & log this output you can set `foreground-scripts` to `true`.

### Timing Information

The `--timing` config can be set which does two things:

1. Always shows the full path to the debug log regardless of command exit status
1. Write timing information to a timing file in the cache or `logs-dir`

This file is a newline delimited list of JSON objects that can be inspected to see timing data for each task in a `npm` CLI run.

### Registry Response Headers

#### `npm-notice`
Expand All @@ -55,6 +73,15 @@ The `npm` CLI reads from & logs any `npm-notice` headers that are returned from

This header is not cached, and will not be logged if the request is served from the cache.

### Logs and Sensitive Information

The `npm` CLI makes a best effort to redact the following from terminal output and log files:

- Passwords inside basic auth URLs
- npm tokens

However, this behavior should not be relied on to keep all possible sensitive information redacted. If you are concerned about secrets in your log file or terminal output, you can use `--loglevel=silent` and `--logs-max=0` to ensure no logs are written to your terminal or filesystem.

### See also

* [config](/using-npm/config)
2 changes: 1 addition & 1 deletion deps/npm/docs/content/using-npm/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ file.
* Don't prefix your script commands with "sudo". If root permissions
are required for some reason, then it'll fail with that error, and
the user will sudo the npm command in question.
* Don't use `install`. Use a `.gyp` file for compilation, and `prepublish`
* Don't use `install`. Use a `.gyp` file for compilation, and `prepare`
for anything else. You should almost never have to explicitly set a
preinstall or install script. If you are doing this, please consider if
there is another option. The only valid use of `install` or `preinstall`
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/output/commands/npm-install.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ <h2 id="table-of-contents">Table of contents</h2>
npm install &lt;git:// url&gt;
npm install &lt;github username&gt;/&lt;github project&gt;

aliases: i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall, add
aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/output/commands/npm-ls.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ <h3 id="description">Description</h3>
the results to only the paths to the packages named. Note that nested
packages will <em>also</em> show the paths to the specified packages. For
example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
<pre lang="bash"><code>npm@8.5.5 /path/to/npm
<pre lang="bash"><code>npm@8.6.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre>
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/output/commands/npm-search.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ <h2 id="table-of-contents">Table of contents</h2>
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm search [search terms ...]

aliases: s, se, find
aliases: find, s, se
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/output/commands/npm-uninstall.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ <h2 id="table-of-contents">Table of contents</h2>
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm uninstall [&lt;@scope&gt;/]&lt;pkg&gt;...

aliases: un, unlink, remove, rm, r
aliases: unlink, remove, rm, r, un
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
Expand Down
11 changes: 10 additions & 1 deletion deps/npm/docs/output/commands/npm-version.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <h1 id="npm-version">npm-version</h1>

<section id="table_of_contents">
<h2 id="table-of-contents">Table of contents</h2>
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#allow-same-version"><code>allow-same-version</code></a></li><li><a href="#commit-hooks"><code>commit-hooks</code></a></li><li><a href="#git-tag-version"><code>git-tag-version</code></a></li><li><a href="#json"><code>json</code></a></li><li><a href="#preid"><code>preid</code></a></li><li><a href="#sign-git-tag"><code>sign-git-tag</code></a></li><li><a href="#workspace"><code>workspace</code></a></li><li><a href="#workspaces"><code>workspaces</code></a></li><li><a href="#include-workspace-root"><code>include-workspace-root</code></a></li></ul><li><a href="#description">Description</a></li><li><a href="#see-also">See Also</a></li></ul></div>
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#allow-same-version"><code>allow-same-version</code></a></li><li><a href="#commit-hooks"><code>commit-hooks</code></a></li><li><a href="#git-tag-version"><code>git-tag-version</code></a></li><li><a href="#json"><code>json</code></a></li><li><a href="#preid"><code>preid</code></a></li><li><a href="#sign-git-tag"><code>sign-git-tag</code></a></li><li><a href="#workspace"><code>workspace</code></a></li><li><a href="#workspaces"><code>workspaces</code></a></li><li><a href="#workspaces-update"><code>workspaces-update</code></a></li><li><a href="#include-workspace-root"><code>include-workspace-root</code></a></li></ul><li><a href="#description">Description</a></li><li><a href="#see-also">See Also</a></li></ul></div>
</section>

<div id="_content"><h3 id="synopsis">Synopsis</h3>
Expand Down Expand Up @@ -258,6 +258,15 @@ <h4 id="workspaces"><code>workspaces</code></h4>
<p>This value is not exported to the environment for child processes.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h4 id="workspaces-update"><code>workspaces-update</code></h4>
<ul>
<li>Default: true</li>
<li>Type: Boolean</li>
</ul>
<p>If set to true, the npm cli will run an update after operations that may
possibly change the workspaces installed to the <code>node_modules</code> folder.</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h4 id="include-workspace-root"><code>include-workspace-root</code></h4>
<ul>
<li>Default: false</li>
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/output/commands/npm-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ <h2 id="table-of-contents">Table of contents</h2>
<!-- raw HTML omitted -->
<pre lang="bash"><code>npm view [&lt;@scope&gt;/]&lt;pkg&gt;[@&lt;version&gt;] [&lt;field&gt;[.subfield]...]

aliases: v, info, show
aliases: info, show, v
</code></pre>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/output/commands/npm.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ <h2 id="table-of-contents">Table of contents</h2>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h3 id="version">Version</h3>
<p>8.5.5</p>
<p>8.6.0</p>
<h3 id="description">Description</h3>
<p>npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
Expand Down
Loading