Skip to content

Commit

Permalink
deps: upgrade npm to 8.1.2
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
npm-robot authored and BethGriggs committed Nov 25, 2021
1 parent a901b6c commit c14eb23
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 32 deletions.
2 changes: 1 addition & 1 deletion deps/npm/docs/content/using-npm/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ When passed to `npm config` this refers to which config file to use.

* Default: Version 2 if no lockfile or current lockfile version less than or
equal to 2, otherwise maintain current lockfile version
* Type: null, 1, 2, or 3
* Type: null, 1, 2, 3, "1", "2", or "3"

Set the lockfile format version to be used in package-lock.json and
npm-shrinkwrap-json files. Possible options are:
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 @@ -159,7 +159,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>[email protected].1 /path/to/npm
<pre lang="bash"><code>[email protected].2 /path/to/npm
└─┬ [email protected]
└── [email protected]
</code></pre>
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 @@ -148,7 +148,7 @@ <h2 id="table-of-contents">Table of contents</h2>
<pre lang="bash"><code>npm &lt;command&gt; [args]
</code></pre>
<h3 id="version">Version</h3>
<p>8.1.1</p>
<p>8.1.2</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/using-npm/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ <h4 id="lockfile-version"><code>lockfile-version</code></h4>
<ul>
<li>Default: Version 2 if no lockfile or current lockfile version less than or
equal to 2, otherwise maintain current lockfile version</li>
<li>Type: null, 1, 2, or 3</li>
<li>Type: null, 1, 2, 3, “1”, “2”, or “3”</li>
</ul>
<p>Set the lockfile format version to be used in package-lock.json and
npm-shrinkwrap-json files. Possible options are:</p>
Expand Down
3 changes: 2 additions & 1 deletion deps/npm/lib/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const pacote = require('pacote')
const npa = require('npm-package-arg')
const npmFetch = require('npm-registry-fetch')
const chalk = require('chalk')
const replaceInfo = require('./utils/replace-info.js')

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

log.verbose('publish', args)
log.verbose('publish', replaceInfo(args))

const unicode = this.npm.config.get('unicode')
const dryRun = this.npm.config.get('dry-run')
Expand Down
6 changes: 4 additions & 2 deletions deps/npm/lib/utils/config/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ define('location', {

define('lockfile-version', {
default: null,
type: [null, 1, 2, 3],
type: [null, 1, 2, 3, '1', '2', '3'],
defaultDescription: `
Version 2 if no lockfile or current lockfile version less than or equal to
2, otherwise maintain current lockfile version
Expand All @@ -1179,7 +1179,9 @@ define('lockfile-version', {
on disk than lockfile version 2, but not interoperable with older npm
versions. Ideal if all users are on npm version 7 and higher.
`,
flatten,
flatten: (key, obj, flatOptions) => {
flatOptions.lockfileVersion = obj[key] && parseInt(obj[key], 10)
},
})

define('loglevel', {
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-ls.1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ example, running \fBnpm ls promzard\fP in npm's source tree will show:
.P
.RS 2
.nf
npm@8\.1\.1 /path/to/npm
npm@8\.1\.2 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.fi
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm.1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ npm <command> [args]
.RE
.SS Version
.P
8\.1\.1
8\.1\.2
.SS Description
.P
npm is the package manager for the Node JavaScript platform\. It puts
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man7/config.7
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ When passed to \fBnpm config\fP this refers to which config file to use\.
Default: Version 2 if no lockfile or current lockfile version less than or
equal to 2, otherwise maintain current lockfile version
.IP \(bu 2
Type: null, 1, 2, or 3
Type: null, 1, 2, 3, "1", "2", or "3"

.RE
.P
Expand Down
35 changes: 23 additions & 12 deletions deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions deps/npm/node_modules/@npmcli/arborist/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions deps/npm/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "8.1.1",
"version": "8.1.2",
"name": "npm",
"description": "a package manager for JavaScript",
"workspaces": [
Expand Down Expand Up @@ -55,7 +55,7 @@
},
"dependencies": {
"@isaacs/string-locale-compare": "^1.1.0",
"@npmcli/arborist": "^4.0.2",
"@npmcli/arborist": "^4.0.3",
"@npmcli/ci-detect": "^1.4.0",
"@npmcli/config": "^2.3.0",
"@npmcli/map-workspaces": "^2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ exports[`test/lib/utils/config/definitions.js TAP > config description for lockf
* Default: Version 2 if no lockfile or current lockfile version less than or
equal to 2, otherwise maintain current lockfile version
* Type: null, 1, 2, or 3
* Type: null, 1, 2, 3, "1", "2", or "3"
Set the lockfile format version to be used in package-lock.json and
npm-shrinkwrap-json files. Possible options are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ When passed to \`npm config\` this refers to which config file to use.
* Default: Version 2 if no lockfile or current lockfile version less than or
equal to 2, otherwise maintain current lockfile version
* Type: null, 1, 2, or 3
* Type: null, 1, 2, 3, "1", "2", or "3"
Set the lockfile format version to be used in package-lock.json and
npm-shrinkwrap-json files. Possible options are:
Expand Down
9 changes: 9 additions & 0 deletions deps/npm/test/lib/utils/config/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -892,3 +892,12 @@ t.test('workspaces derived', t => {
t.equal(flat.workspacesEnabled, false)
t.end()
})

t.test('lockfile version', t => {
const flat = {}
definitions['lockfile-version'].flatten('lockfile-version', {
'lockfile-version': '3',
}, flat)
t.match(flat.lockfileVersion, 3, 'flattens to a number')
t.end()
})

0 comments on commit c14eb23

Please sign in to comment.