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.1.2 #40643

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/npm/docs/content/using-npm/config.md
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
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>npm@8.1.1 /path/to/npm
<pre lang="bash"><code>npm@8.1.2 /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.html
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
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
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
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
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
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
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
@@ -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
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
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
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()
})