Skip to content

Commit 0a6f0b4

Browse files
npm-robotMylesBorins
authored andcommitted
deps: upgrade npm to 8.5.0
PR-URL: #41925 Reviewed-By: Derek Lewis <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Mestery <[email protected]>
1 parent e9ef9dd commit 0a6f0b4

Some content is hidden

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

48 files changed

+1051
-236
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -388,3 +388,4 @@ project.
388388
* [npm stop](/commands/npm-stop)
389389
* [npm config](/commands/npm-config)
390390
* [npm workspaces](/using-npm/workspaces)
391+
* [npx](/commands/npx)

deps/npm/docs/content/commands/npx.md

+1
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,4 @@ This resulted in some shifts in its functionality:
175175
* [npm restart](/commands/npm-restart)
176176
* [npm stop](/commands/npm-stop)
177177
* [npm config](/commands/npm-config)
178+
* [npm exec](/commands/npm-exec)

deps/npm/docs/content/using-npm/config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ If a package would be saved at install time by the use of `--save`,
13511351
`--save-dev`, or `--save-optional`, then also put it in the
13521352
`bundleDependencies` list.
13531353

1354-
Ignore if `--save-peer` is set, since peerDependencies cannot be bundled.
1354+
Ignored if `--save-peer` is set, since peerDependencies cannot be bundled.
13551355

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

deps/npm/docs/output/commands/npm-exec.html

+1
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ <h3 id="see-also">See Also</h3>
440440
<li><a href="../commands/npm-stop.html">npm stop</a></li>
441441
<li><a href="../commands/npm-config.html">npm config</a></li>
442442
<li><a href="../using-npm/workspaces.html">npm workspaces</a></li>
443+
<li><a href="../commands/npx.html">npx</a></li>
443444
</ul>
444445
</div>
445446

deps/npm/docs/output/commands/npm-ls.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ <h3 id="description">Description</h3>
160160
the results to only the paths to the packages named. Note that nested
161161
packages will <em>also</em> show the paths to the specified packages. For
162162
example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
163-
<pre lang="bash"><code>npm@8.4.1 /path/to/npm
163+
<pre lang="bash"><code>npm@8.5.0 /path/to/npm
164164
165165
166166
</code></pre>

deps/npm/docs/output/commands/npm.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ <h2 id="table-of-contents">Table of contents</h2>
149149
<pre lang="bash"><code>npm &lt;command&gt; [args]
150150
</code></pre>
151151
<h3 id="version">Version</h3>
152-
<p>8.4.1</p>
152+
<p>8.5.0</p>
153153
<h3 id="description">Description</h3>
154154
<p>npm is the package manager for the Node JavaScript platform. It puts
155155
modules in place so that node can find them, and manages dependency

deps/npm/docs/output/commands/npx.html

+1
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ <h3 id="see-also">See Also</h3>
277277
<li><a href="../commands/npm-restart.html">npm restart</a></li>
278278
<li><a href="../commands/npm-stop.html">npm stop</a></li>
279279
<li><a href="../commands/npm-config.html">npm config</a></li>
280+
<li><a href="../commands/npm-exec.html">npm exec</a></li>
280281
</ul>
281282
</div>
282283

deps/npm/docs/output/using-npm/config.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ <h4 id="save-bundle"><code>save-bundle</code></h4>
12291229
<p>If a package would be saved at install time by the use of <code>--save</code>,
12301230
<code>--save-dev</code>, or <code>--save-optional</code>, then also put it in the
12311231
<code>bundleDependencies</code> list.</p>
1232-
<p>Ignore if <code>--save-peer</code> is set, since peerDependencies cannot be bundled.</p>
1232+
<p>Ignored if <code>--save-peer</code> is set, since peerDependencies cannot be bundled.</p>
12331233
<!-- raw HTML omitted -->
12341234
<!-- raw HTML omitted -->
12351235
<h4 id="save-dev"><code>save-dev</code></h4>

deps/npm/lib/commands/org.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const liborg = require('libnpmorg')
22
const otplease = require('../utils/otplease.js')
33
const Table = require('cli-table3')
44
const BaseCommand = require('../base-command.js')
5+
const log = require('../utils/log-shim.js')
56

67
class Org extends BaseCommand {
78
static description = 'Manage orgs'
@@ -32,7 +33,10 @@ class Org extends BaseCommand {
3233
}
3334

3435
async exec ([cmd, orgname, username, role], cb) {
35-
return otplease(this.npm.flatOptions, opts => {
36+
return otplease({
37+
...this.npm.flatOptions,
38+
log,
39+
}, opts => {
3640
switch (cmd) {
3741
case 'add':
3842
case 'set':

deps/npm/lib/commands/pack.js

+2-15
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
const util = require('util')
21
const pacote = require('pacote')
32
const libpack = require('libnpmpack')
43
const npa = require('npm-package-arg')
5-
const path = require('path')
64
const log = require('../utils/log-shim')
75
const { getContents, logTar } = require('../utils/tar.js')
8-
const writeFile = util.promisify(require('fs').writeFile)
96
const BaseCommand = require('../base-command.js')
107

118
class Pack extends BaseCommand {
@@ -28,7 +25,6 @@ class Pack extends BaseCommand {
2825
}
2926

3027
const unicode = this.npm.config.get('unicode')
31-
const dryRun = this.npm.config.get('dry-run')
3228
const json = this.npm.config.get('json')
3329

3430
// Get the manifests and filenames first so we can bail early on manifest
@@ -40,24 +36,15 @@ class Pack extends BaseCommand {
4036
if (!manifest._id) {
4137
throw new Error('Invalid package, must have name and version')
4238
}
43-
44-
const filename = `${manifest.name}-${manifest.version}.tgz`
45-
.replace(/^@/, '').replace(/\//, '-')
46-
manifests.push({ arg, filename, manifest })
39+
manifests.push({ arg, manifest })
4740
}
4841

4942
// Load tarball names up for printing afterward to isolate from the
5043
// noise generated during packing
5144
const tarballs = []
52-
for (const { arg, filename, manifest } of manifests) {
45+
for (const { arg, manifest } of manifests) {
5346
const tarballData = await libpack(arg, this.npm.flatOptions)
5447
const pkgContents = await getContents(manifest, tarballData)
55-
const tarballFilename = path.resolve(this.npm.config.get('pack-destination'), filename)
56-
57-
if (!dryRun) {
58-
await writeFile(tarballFilename, tarballData)
59-
}
60-
6148
tarballs.push(pkgContents)
6249
}
6350

deps/npm/lib/commands/publish.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ class Publish extends BaseCommand {
8383
})
8484
}
8585

86-
const tarballData = await pack(spec, opts)
86+
// we pass dryRun: true to libnpmpack so it doesn't write the file to disk
87+
const tarballData = await pack(spec, { ...opts, dryRun: true })
8788
const pkgContents = await getContents(manifest, tarballData)
8889

8990
// The purpose of re-reading the manifest is in case it changed,

deps/npm/lib/commands/unpublish.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class Unpublish extends BaseCommand {
8484
)
8585
}
8686

87-
const opts = this.npm.flatOptions
87+
const opts = { ...this.npm.flatOptions, log }
8888
if (!spec || path.resolve(spec.name) === this.npm.localPrefix) {
8989
// if there's a package.json in the current folder, then
9090
// read the package name and version out of that.

deps/npm/lib/utils/config/definitions.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1455,6 +1455,7 @@ define('pack-destination', {
14551455
description: `
14561456
Directory in which \`npm pack\` will save tarballs.
14571457
`,
1458+
flatten,
14581459
})
14591460

14601461
define('parseable', {
@@ -1587,7 +1588,7 @@ define('save', {
15871588
default: true,
15881589
defaultDescription: `\`true\` unless when using \`npm update\` or
15891590
\`npm dedupe\` where it defaults to \`false\``,
1590-
usage: '-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer',
1591+
usage: '-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle',
15911592
type: Boolean,
15921593
short: 'S',
15931594
description: `
@@ -1610,7 +1611,7 @@ define('save-bundle', {
16101611
\`--save-dev\`, or \`--save-optional\`, then also put it in the
16111612
\`bundleDependencies\` list.
16121613
1613-
Ignore if \`--save-peer\` is set, since peerDependencies cannot be bundled.
1614+
Ignored if \`--save-peer\` is set, since peerDependencies cannot be bundled.
16141615
`,
16151616
flatten (key, obj, flatOptions) {
16161617
// XXX update arborist to just ignore it if resulting saveType is peer

deps/npm/man/man1/npm-exec.1

+2
Original file line numberDiff line numberDiff line change
@@ -462,5 +462,7 @@ npm help stop
462462
npm help config
463463
.IP \(bu 2
464464
npm help workspaces
465+
.IP \(bu 2
466+
npm help npx
465467

466468
.RE

deps/npm/man/man1/npm-ls.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ example, running \fBnpm ls promzard\fP in npm's source tree will show:
2626
.P
2727
.RS 2
2828
.nf
29-
npm@8\.4\.1 /path/to/npm
29+
npm@8\.5\.0 /path/to/npm
3030
└─┬ init\-package\-json@0\.0\.4
3131
└── promzard@0\.1\.5
3232
.fi

deps/npm/man/man1/npm.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ npm <command> [args]
1010
.RE
1111
.SS Version
1212
.P
13-
8\.4\.1
13+
8\.5\.0
1414
.SS Description
1515
.P
1616
npm is the package manager for the Node JavaScript platform\. It puts

deps/npm/man/man1/npx.1

+2
Original file line numberDiff line numberDiff line change
@@ -209,5 +209,7 @@ npm help restart
209209
npm help stop
210210
.IP \(bu 2
211211
npm help config
212+
.IP \(bu 2
213+
npm help exec
212214

213215
.RE

deps/npm/man/man7/config.7

+1-1
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ If a package would be saved at install time by the use of \fB\-\-save\fP,
17041704
\fB\-\-save\-dev\fP, or \fB\-\-save\-optional\fP, then also put it in the
17051705
\fBbundleDependencies\fP list\.
17061706
.P
1707-
Ignore if \fB\-\-save\-peer\fP is set, since peerDependencies cannot be bundled\.
1707+
Ignored if \fB\-\-save\-peer\fP is set, since peerDependencies cannot be bundled\.
17081708
<!\-\- automatically generated, do not edit manually \-\->
17091709
<!\-\- see lib/utils/config/definitions\.js \-\->
17101710

deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js

+33-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps/npm/node_modules/@npmcli/arborist/package.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps/npm/node_modules/@npmcli/config/lib/env-replace.js

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)