Skip to content

Commit 3805b80

Browse files
npm-robottargos
authored andcommitted
deps: upgrade npm to 8.1.2
PR-URL: #40643 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Voltrex <[email protected]>
1 parent c003ba1 commit 3805b80

File tree

15 files changed

+54
-32
lines changed

15 files changed

+54
-32
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ When passed to `npm config` this refers to which config file to use.
987987

988988
* Default: Version 2 if no lockfile or current lockfile version less than or
989989
equal to 2, otherwise maintain current lockfile version
990-
* Type: null, 1, 2, or 3
990+
* Type: null, 1, 2, 3, "1", "2", or "3"
991991

992992
Set the lockfile format version to be used in package-lock.json and
993993
npm-shrinkwrap-json files. Possible options are:

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ <h3 id="description">Description</h3>
159159
the results to only the paths to the packages named. Note that nested
160160
packages will <em>also</em> show the paths to the specified packages. For
161161
example, running <code>npm ls promzard</code> in npm’s source tree will show:</p>
162-
<pre lang="bash"><code>[email protected].1 /path/to/npm
162+
<pre lang="bash"><code>[email protected].2 /path/to/npm
163163
164164
165165
</code></pre>

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

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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ <h4 id="lockfile-version"><code>lockfile-version</code></h4>
939939
<ul>
940940
<li>Default: Version 2 if no lockfile or current lockfile version less than or
941941
equal to 2, otherwise maintain current lockfile version</li>
942-
<li>Type: null, 1, 2, or 3</li>
942+
<li>Type: null, 1, 2, 3, “1”, “2”, or “3”</li>
943943
</ul>
944944
<p>Set the lockfile format version to be used in package-lock.json and
945945
npm-shrinkwrap-json files. Possible options are:</p>

deps/npm/lib/publish.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const pacote = require('pacote')
88
const npa = require('npm-package-arg')
99
const npmFetch = require('npm-registry-fetch')
1010
const chalk = require('chalk')
11+
const replaceInfo = require('./utils/replace-info.js')
1112

1213
const otplease = require('./utils/otplease.js')
1314
const { getContents, logTar } = require('./utils/tar.js')
@@ -68,7 +69,7 @@ class Publish extends BaseCommand {
6869
if (args.length !== 1)
6970
throw this.usageError()
7071

71-
log.verbose('publish', args)
72+
log.verbose('publish', replaceInfo(args))
7273

7374
const unicode = this.npm.config.get('unicode')
7475
const dryRun = this.npm.config.get('dry-run')

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ define('location', {
11571157

11581158
define('lockfile-version', {
11591159
default: null,
1160-
type: [null, 1, 2, 3],
1160+
type: [null, 1, 2, 3, '1', '2', '3'],
11611161
defaultDescription: `
11621162
Version 2 if no lockfile or current lockfile version less than or equal to
11631163
2, otherwise maintain current lockfile version
@@ -1179,7 +1179,9 @@ define('lockfile-version', {
11791179
on disk than lockfile version 2, but not interoperable with older npm
11801180
versions. Ideal if all users are on npm version 7 and higher.
11811181
`,
1182-
flatten,
1182+
flatten: (key, obj, flatOptions) => {
1183+
flatOptions.lockfileVersion = obj[key] && parseInt(obj[key], 10)
1184+
},
11831185
})
11841186

11851187
define('loglevel', {

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\.1\.1 /path/to/npm
29+
npm@8\.1\.2 /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\.1\.1
13+
8\.1\.2
1414
.SS Description
1515
.P
1616
npm is the package manager for the Node JavaScript platform\. It puts

deps/npm/man/man7/config.7

+1-1
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ When passed to \fBnpm config\fP this refers to which config file to use\.
12541254
Default: Version 2 if no lockfile or current lockfile version less than or
12551255
equal to 2, otherwise maintain current lockfile version
12561256
.IP \(bu 2
1257-
Type: null, 1, 2, or 3
1257+
Type: null, 1, 2, 3, "1", "2", or "3"
12581258

12591259
.RE
12601260
.P

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

+23-12
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

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

deps/npm/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "8.1.1",
2+
"version": "8.1.2",
33
"name": "npm",
44
"description": "a package manager for JavaScript",
55
"workspaces": [
@@ -55,7 +55,7 @@
5555
},
5656
"dependencies": {
5757
"@isaacs/string-locale-compare": "^1.1.0",
58-
"@npmcli/arborist": "^4.0.2",
58+
"@npmcli/arborist": "^4.0.3",
5959
"@npmcli/ci-detect": "^1.4.0",
6060
"@npmcli/config": "^2.3.0",
6161
"@npmcli/map-workspaces": "^2.0.0",

deps/npm/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ exports[`test/lib/utils/config/definitions.js TAP > config description for lockf
10611061
10621062
* Default: Version 2 if no lockfile or current lockfile version less than or
10631063
equal to 2, otherwise maintain current lockfile version
1064-
* Type: null, 1, 2, or 3
1064+
* Type: null, 1, 2, 3, "1", "2", or "3"
10651065
10661066
Set the lockfile format version to be used in package-lock.json and
10671067
npm-shrinkwrap-json files. Possible options are:

deps/npm/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ When passed to \`npm config\` this refers to which config file to use.
861861
862862
* Default: Version 2 if no lockfile or current lockfile version less than or
863863
equal to 2, otherwise maintain current lockfile version
864-
* Type: null, 1, 2, or 3
864+
* Type: null, 1, 2, 3, "1", "2", or "3"
865865
866866
Set the lockfile format version to be used in package-lock.json and
867867
npm-shrinkwrap-json files. Possible options are:

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

+9
Original file line numberDiff line numberDiff line change
@@ -892,3 +892,12 @@ t.test('workspaces derived', t => {
892892
t.equal(flat.workspacesEnabled, false)
893893
t.end()
894894
})
895+
896+
t.test('lockfile version', t => {
897+
const flat = {}
898+
definitions['lockfile-version'].flatten('lockfile-version', {
899+
'lockfile-version': '3',
900+
}, flat)
901+
t.match(flat.lockfileVersion, 3, 'flattens to a number')
902+
t.end()
903+
})

0 commit comments

Comments
 (0)