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 9.6.6 #47862

Merged
merged 1 commit into from
May 7, 2023
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 0 additions & 34 deletions deps/npm/docs/content/commands/npm-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,40 +72,6 @@ cache:

### Configuration

#### `save`

* Default: `true` unless when using `npm update` where it defaults to `false`
* Type: Boolean

Save installed packages to a `package.json` file as dependencies.

When used with the `npm rm` command, removes the dependency from
`package.json`.

Will also prevent writing to `package-lock.json` if set to `false`.

#### `save-exact`

* Default: false
* Type: Boolean

Dependencies saved to package.json will be configured with an exact version
rather than using npm's default semver range operator.

#### `global`

* Default: false
* Type: Boolean

Operates in "global" mode, so that packages are installed into the `prefix`
folder instead of the current working directory. See
[folders](/configuring-npm/folders) for more on the differences in behavior.

* packages are installed into the `{prefix}/lib/node_modules` folder, instead
of the current working directory.
* bin files are linked to `{prefix}/bin`
* man pages are linked to `{prefix}/share/man`

#### `install-strategy`

* Default: "hoisted"
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ npm set key=value [key=value...]

Sets each of the config keys to the value provided.

If value is omitted, then it sets it to an empty string.
If value is omitted, the key will be removed from your config file entirely.

Note: for backwards compatibility, `npm config set key value` is supported
as an alias for `npm config set key=value`.
Expand Down
34 changes: 0 additions & 34 deletions deps/npm/docs/content/commands/npm-install-ci-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,40 +18,6 @@ This command runs `npm ci` followed immediately by `npm test`.

### Configuration

#### `save`

* Default: `true` unless when using `npm update` where it defaults to `false`
* Type: Boolean

Save installed packages to a `package.json` file as dependencies.

When used with the `npm rm` command, removes the dependency from
`package.json`.

Will also prevent writing to `package-lock.json` if set to `false`.

#### `save-exact`

* Default: false
* Type: Boolean

Dependencies saved to package.json will be configured with an exact version
rather than using npm's default semver range operator.

#### `global`

* Default: false
* Type: Boolean

Operates in "global" mode, so that packages are installed into the `prefix`
folder instead of the current working directory. See
[folders](/configuring-npm/folders) for more on the differences in behavior.

* packages are installed into the `{prefix}/lib/node_modules` folder, instead
of the current working directory.
* bin files are linked to `{prefix}/bin`
* man pages are linked to `{prefix}/share/man`

#### `install-strategy`

* Default: "hoisted"
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm-ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For
example, running `npm ls promzard` in npm's source tree will show:

```bash
npm@9.6.4 /path/to/npm
npm@9.6.6 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
```
Expand Down
3 changes: 2 additions & 1 deletion deps/npm/docs/content/commands/npm-publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ This value is not exported to the environment for child processes.
* Default: false
* Type: Boolean

Indicates that a provenance statement should be generated.
When publishing from a supported cloud CI/CD system, the package will be
publicly linked to where it was built and published from.

### See Also

Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Note: This command is unaware of workspaces.

### Version

9.6.4
9.6.6

### Description

Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/configuring-npm/folders.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Man pages are not installed on Windows systems.
#### Cache

See [`npm cache`](/commands/npm-cache). Cache files are stored in `~/.npm` on Posix, or
`%AppData%/npm-cache` on Windows.
`%LocalAppData%/npm-cache` on Windows.

This is controlled by the [`cache` config](/using-npm/config#cache) param.

Expand Down
3 changes: 2 additions & 1 deletion deps/npm/docs/content/using-npm/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,8 @@ Set to `false` to suppress the progress bar.
* Default: false
* Type: Boolean

Indicates that a provenance statement should be generated.
When publishing from a supported cloud CI/CD system, the package will be
publicly linked to where it was built and published from.

#### `proxy`

Expand Down
32 changes: 1 addition & 31 deletions deps/npm/docs/output/commands/npm-ci.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <h1 id="npm-ci">npm-ci</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="#description">Description</a></li><li><a href="#example">Example</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#save"><code>save</code></a></li><li><a href="#save-exact"><code>save-exact</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#package-lock"><code>package-lock</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</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><li><a href="#install-links"><code>install-links</code></a></li></ul><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="#description">Description</a></li><li><a href="#example">Example</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#package-lock"><code>package-lock</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</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><li><a href="#install-links"><code>install-links</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
</section>

<div id="_content"><h3 id="synopsis">Synopsis</h3>
Expand Down Expand Up @@ -196,36 +196,6 @@ <h3 id="example">Example</h3>
- "$HOME/.npm"
</code></pre>
<h3 id="configuration">Configuration</h3>
<h4 id="save"><code>save</code></h4>
<ul>
<li>Default: <code>true</code> unless when using <code>npm update</code> where it defaults to <code>false</code></li>
<li>Type: Boolean</li>
</ul>
<p>Save installed packages to a <code>package.json</code> file as dependencies.</p>
<p>When used with the <code>npm rm</code> command, removes the dependency from
<code>package.json</code>.</p>
<p>Will also prevent writing to <code>package-lock.json</code> if set to <code>false</code>.</p>
<h4 id="save-exact"><code>save-exact</code></h4>
<ul>
<li>Default: false</li>
<li>Type: Boolean</li>
</ul>
<p>Dependencies saved to package.json will be configured with an exact version
rather than using npm's default semver range operator.</p>
<h4 id="global"><code>global</code></h4>
<ul>
<li>Default: false</li>
<li>Type: Boolean</li>
</ul>
<p>Operates in "global" mode, so that packages are installed into the <code>prefix</code>
folder instead of the current working directory. See
<a href="../configuring-npm/folders.html">folders</a> for more on the differences in behavior.</p>
<ul>
<li>packages are installed into the <code>{prefix}/lib/node_modules</code> folder, instead
of the current working directory.</li>
<li>bin files are linked to <code>{prefix}/bin</code></li>
<li>man pages are linked to <code>{prefix}/share/man</code></li>
</ul>
<h4 id="install-strategy"><code>install-strategy</code></h4>
<ul>
<li>Default: "hoisted"</li>
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/output/commands/npm-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h4 id="set">set</h4>
npm set key=value [key=value...]
</code></pre>
<p>Sets each of the config keys to the value provided.</p>
<p>If value is omitted, then it sets it to an empty string.</p>
<p>If value is omitted, the key will be removed from your config file entirely.</p>
<p>Note: for backwards compatibility, <code>npm config set key value</code> is supported
as an alias for <code>npm config set key=value</code>.</p>
<h4 id="get">get</h4>
Expand Down
32 changes: 1 addition & 31 deletions deps/npm/docs/output/commands/npm-install-ci-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <h1 id="npm-install-ci-test">npm-install-ci-test</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="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#save"><code>save</code></a></li><li><a href="#save-exact"><code>save-exact</code></a></li><li><a href="#global"><code>global</code></a></li><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#package-lock"><code>package-lock</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</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><li><a href="#install-links"><code>install-links</code></a></li></ul><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="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#install-strategy"><code>install-strategy</code></a></li><li><a href="#legacy-bundling"><code>legacy-bundling</code></a></li><li><a href="#global-style"><code>global-style</code></a></li><li><a href="#omit"><code>omit</code></a></li><li><a href="#strict-peer-deps"><code>strict-peer-deps</code></a></li><li><a href="#package-lock"><code>package-lock</code></a></li><li><a href="#foreground-scripts"><code>foreground-scripts</code></a></li><li><a href="#ignore-scripts"><code>ignore-scripts</code></a></li><li><a href="#audit"><code>audit</code></a></li><li><a href="#bin-links"><code>bin-links</code></a></li><li><a href="#fund"><code>fund</code></a></li><li><a href="#dry-run"><code>dry-run</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><li><a href="#install-links"><code>install-links</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
</section>

<div id="_content"><h3 id="synopsis">Synopsis</h3>
Expand All @@ -153,36 +153,6 @@ <h2 id="table-of-contents">Table of contents</h2>
<h3 id="description">Description</h3>
<p>This command runs <code>npm ci</code> followed immediately by <code>npm test</code>.</p>
<h3 id="configuration">Configuration</h3>
<h4 id="save"><code>save</code></h4>
<ul>
<li>Default: <code>true</code> unless when using <code>npm update</code> where it defaults to <code>false</code></li>
<li>Type: Boolean</li>
</ul>
<p>Save installed packages to a <code>package.json</code> file as dependencies.</p>
<p>When used with the <code>npm rm</code> command, removes the dependency from
<code>package.json</code>.</p>
<p>Will also prevent writing to <code>package-lock.json</code> if set to <code>false</code>.</p>
<h4 id="save-exact"><code>save-exact</code></h4>
<ul>
<li>Default: false</li>
<li>Type: Boolean</li>
</ul>
<p>Dependencies saved to package.json will be configured with an exact version
rather than using npm's default semver range operator.</p>
<h4 id="global"><code>global</code></h4>
<ul>
<li>Default: false</li>
<li>Type: Boolean</li>
</ul>
<p>Operates in "global" mode, so that packages are installed into the <code>prefix</code>
folder instead of the current working directory. See
<a href="../configuring-npm/folders.html">folders</a> for more on the differences in behavior.</p>
<ul>
<li>packages are installed into the <code>{prefix}/lib/node_modules</code> folder, instead
of the current working directory.</li>
<li>bin files are linked to <code>{prefix}/bin</code></li>
<li>man pages are linked to <code>{prefix}/share/man</code></li>
</ul>
<h4 id="install-strategy"><code>install-strategy</code></h4>
<ul>
<li>Default: "hoisted"</li>
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 @@ -160,7 +160,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><code class="language-bash">npm@9.6.4 /path/to/npm
<pre><code class="language-bash">npm@9.6.6 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre>
Expand Down
3 changes: 2 additions & 1 deletion deps/npm/docs/output/commands/npm-publish.html
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ <h4 id="provenance"><code>provenance</code></h4>
<li>Default: false</li>
<li>Type: Boolean</li>
</ul>
<p>Indicates that a provenance statement should be generated.</p>
<p>When publishing from a supported cloud CI/CD system, the package will be
publicly linked to where it was built and published from.</p>
<h3 id="see-also">See Also</h3>
<ul>
<li><a href="../using-npm/package-spec.html">package spec</a></li>
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 @@ -150,7 +150,7 @@ <h2 id="table-of-contents">Table of contents</h2>
</code></pre>
<p>Note: This command is unaware of workspaces.</p>
<h3 id="version">Version</h3>
<p>9.6.4</p>
<p>9.6.6</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
2 changes: 1 addition & 1 deletion deps/npm/docs/output/configuring-npm/folders.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ <h4 id="man-pages">Man Pages</h4>
<p>Man pages are not installed on Windows systems.</p>
<h4 id="cache">Cache</h4>
<p>See <a href="../commands/npm-cache.html"><code>npm cache</code></a>. Cache files are stored in <code>~/.npm</code> on Posix, or
<code>%AppData%/npm-cache</code> on Windows.</p>
<code>%LocalAppData%/npm-cache</code> on Windows.</p>
<p>This is controlled by the <a href="../using-npm/config#cache.html"><code>cache</code> config</a> param.</p>
<h4 id="temp-files">Temp Files</h4>
<p>Temporary files are stored by default in the folder specified by the
Expand Down
3 changes: 2 additions & 1 deletion deps/npm/docs/output/using-npm/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,8 @@ <h4 id="provenance"><code>provenance</code></h4>
<li>Default: false</li>
<li>Type: Boolean</li>
</ul>
<p>Indicates that a provenance statement should be generated.</p>
<p>When publishing from a supported cloud CI/CD system, the package will be
publicly linked to where it was built and published from.</p>
<h4 id="proxy"><code>proxy</code></h4>
<ul>
<li>Default: null</li>
Expand Down
3 changes: 2 additions & 1 deletion deps/npm/lib/commands/audit.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const Arborist = require('@npmcli/arborist')
const auditReport = require('npm-audit-report')
const fetch = require('npm-registry-fetch')
const localeCompare = require('@isaacs/string-locale-compare')('en')
Expand Down Expand Up @@ -413,6 +412,7 @@ class Audit extends ArboristWorkspaceCmd {

async auditAdvisories (args) {
const reporter = this.npm.config.get('json') ? 'json' : 'detail'
const Arborist = require('@npmcli/arborist')
const opts = {
...this.npm.flatOptions,
audit: true,
Expand Down Expand Up @@ -445,6 +445,7 @@ class Audit extends ArboristWorkspaceCmd {
}

log.verbose('loading installed dependencies')
const Arborist = require('@npmcli/arborist')
const opts = {
...this.npm.flatOptions,
path: this.npm.prefix,
Expand Down
3 changes: 1 addition & 2 deletions deps/npm/lib/commands/cache.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const cacache = require('cacache')
const Arborist = require('@npmcli/arborist')
const pacote = require('pacote')
const fs = require('fs/promises')
const { join } = require('path')
Expand Down Expand Up @@ -162,7 +161,7 @@ class Cache extends BaseCommand {
return pacote.tarball.stream(spec, stream => {
stream.resume()
return stream.promise()
}, { ...this.npm.flatOptions, Arborist })
}, { ...this.npm.flatOptions })
}))
}

Expand Down
20 changes: 17 additions & 3 deletions deps/npm/lib/commands/ci.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
const Arborist = require('@npmcli/arborist')
const reifyFinish = require('../utils/reify-finish.js')
const runScript = require('@npmcli/run-script')
const fs = require('fs/promises')
const log = require('../utils/log-shim.js')
const validateLockfile = require('../utils/validate-lockfile.js')

const ArboristWorkspaceCmd = require('../arborist-cmd.js')
const Install = require('./install.js')

class CI extends ArboristWorkspaceCmd {
static description = 'Clean install a project'
static name = 'ci'

static params = Install.params
// These are in the order they will show up in when running "-h"
static params = [
'install-strategy',
'legacy-bundling',
'global-style',
'omit',
'strict-peer-deps',
'package-lock',
'foreground-scripts',
'ignore-scripts',
'audit',
'bin-links',
'fund',
'dry-run',
...super.params,
]

async exec () {
if (this.npm.global) {
Expand All @@ -22,6 +35,7 @@ class CI extends ArboristWorkspaceCmd {
}

const where = this.npm.prefix
const Arborist = require('@npmcli/arborist')
const opts = {
...this.npm.flatOptions,
packageLock: true, // npm ci should never skip lock files
Expand Down
8 changes: 7 additions & 1 deletion deps/npm/lib/commands/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,13 @@ class Config extends BaseCommand {
`The \`${baseKey}\` option is deprecated, and can not be set in this way${deprecated}`
)
}
this.npm.config.set(key, val || '', where)

if (val === '') {
this.npm.config.delete(key, where)
} else {
this.npm.config.set(key, val, where)
}

if (!this.npm.config.validate(where)) {
log.warn('config', 'omitting invalid config values')
}
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/lib/commands/dedupe.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// dedupe duplicated packages, or find them in the tree
const Arborist = require('@npmcli/arborist')
const reifyFinish = require('../utils/reify-finish.js')

const ArboristWorkspaceCmd = require('../arborist-cmd.js')
Expand Down Expand Up @@ -31,6 +30,7 @@ class Dedupe extends ArboristWorkspaceCmd {

const dryRun = this.npm.config.get('dry-run')
const where = this.npm.prefix
const Arborist = require('@npmcli/arborist')
const opts = {
...this.npm.flatOptions,
path: where,
Expand Down