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 7.20.6 #39811

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
1 change: 1 addition & 0 deletions deps/npm/README.md
Expand Up @@ -29,6 +29,7 @@ If you're looking to manage multiple versions of **`node`** &/or **`npm`**, cons
* [**`volta`**](https://github.com/volta-cli/volta)
* [**`nodenv`**](https://github.com/nodenv/nodenv)
* [**`asdf-nodejs`**](https://github.com/asdf-vm/asdf-nodejs)
* [**`nvm-windows`**](https://github.com/coreybutler/nvm-windows)

### Usage

Expand Down
5 changes: 5 additions & 0 deletions deps/npm/docs/content/commands/npm-publish.md
Expand Up @@ -132,6 +132,11 @@ If you want your scoped package to be publicly viewable (and installable)
set `--access=public`. The only valid values for `access` are `public` and
`restricted`. Unscoped packages _always_ have an access level of `public`.

Note: Using the `--access` flag on the `npm publish` command will only set
the package access level on the initial publish of the package. Any subsequent `npm publish`
commands using the `--access` flag will not have an effect to the access level.
To make changes to the access level after the initial publish use `npm access`.

#### `dry-run`

* Default: false
Expand Down
4 changes: 1 addition & 3 deletions deps/npm/docs/content/configuring-npm/package-json.md
Expand Up @@ -286,12 +286,10 @@ Certain files are always included, regardless of settings:

* `package.json`
* `README`
* `CHANGES` / `CHANGELOG` / `HISTORY`
* `LICENSE` / `LICENCE`
* `NOTICE`
* The file in the "main" field

`README`, `CHANGES`, `LICENSE` & `NOTICE` can have any case and extension.
`README` & `LICENSE` can have any case and extension.

Conversely, some files are always ignored:

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@7.20.3 /path/to/npm
<pre lang="bash"><code>npm@7.20.6 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre>
Expand Down
4 changes: 4 additions & 0 deletions deps/npm/docs/output/commands/npm-publish.html
Expand Up @@ -269,6 +269,10 @@ <h4 id="access"><code>access</code></h4>
If you want your scoped package to be publicly viewable (and installable)
set <code>--access=public</code>. The only valid values for <code>access</code> are <code>public</code> and
<code>restricted</code>. Unscoped packages <em>always</em> have an access level of <code>public</code>.</p>
<p>Note: Using the <code>--access</code> flag on the <code>npm publish</code> command will only set
the package access level on the initial publish of the package. Any subsequent <code>npm publish</code>
commands using the <code>--access</code> flag will not have an effect to the access level.
To make changes to the access level after the initial publish use <code>npm access</code>.</p>
<h4 id="dry-run"><code>dry-run</code></h4>
<ul>
<li>Default: false</li>
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>7.20.3</p>
<p>7.20.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
4 changes: 1 addition & 3 deletions deps/npm/docs/output/configuring-npm/package-json.html
Expand Up @@ -358,12 +358,10 @@ <h3 id="files">files</h3>
<ul>
<li><code>package.json</code></li>
<li><code>README</code></li>
<li><code>CHANGES</code> / <code>CHANGELOG</code> / <code>HISTORY</code></li>
<li><code>LICENSE</code> / <code>LICENCE</code></li>
<li><code>NOTICE</code></li>
<li>The file in the “main” field</li>
</ul>
<p><code>README</code>, <code>CHANGES</code>, <code>LICENSE</code> &amp; <code>NOTICE</code> can have any case and extension.</p>
<p><code>README</code> &amp; <code>LICENSE</code> can have any case and extension.</p>
<p>Conversely, some files are always ignored:</p>
<ul>
<li><code>.git</code></li>
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/lib/set.js
Expand Up @@ -22,7 +22,7 @@ class Set extends BaseCommand {

exec (args, cb) {
if (!args.length)
return cb(this.usage)
return cb(this.usageError())
this.npm.commands.config(['set'].concat(args), cb)
}
}
Expand Down
10 changes: 0 additions & 10 deletions deps/npm/lib/test.js
Expand Up @@ -19,15 +19,5 @@ class Test extends LifecycleCmd {
'script-shell',
]
}

exec (args, cb) {
super.exec(args, er => {
if (er && er.code === 'ELIFECYCLE') {
/* eslint-disable standard/no-callback-literal */
cb('Test failed. See above for more details.')
} else
cb(er)
})
}
}
module.exports = Test
22 changes: 22 additions & 0 deletions deps/npm/lib/utils/format-bytes.js
@@ -0,0 +1,22 @@
// Convert bytes to printable output, for file reporting in tarballs
// Only supports up to GB because that's way larger than anything the registry
// supports anyways.

const formatBytes = (bytes, space = true) => {
let spacer = ''
if (space)
spacer = ' '

if (bytes < 1000) // B
return `${bytes}${spacer}B`

if (bytes < 1000000) // kB
return `${(bytes / 1000).toFixed(1)}${spacer}kB`

if (bytes < 1000000000) // MB
return `${(bytes / 1000000).toFixed(1)}${spacer}MB`

return `${(bytes / 1000000000).toFixed(1)}${spacer}GB`
}

module.exports = formatBytes
10 changes: 5 additions & 5 deletions deps/npm/lib/utils/tar.js
@@ -1,7 +1,7 @@
const tar = require('tar')
const ssri = require('ssri')
const npmlog = require('npmlog')
const byteSize = require('byte-size')
const formatBytes = require('./format-bytes.js')
const columnify = require('columnify')

const logTar = (tarball, opts = {}) => {
Expand All @@ -11,9 +11,9 @@ const logTar = (tarball, opts = {}) => {
log.notice('=== Tarball Contents ===')
if (tarball.files.length) {
log.notice('', columnify(tarball.files.map((f) => {
const bytes = byteSize(f.size)
const bytes = formatBytes(f.size, false)
return (/^node_modules\//.test(f.path)) ? null
: { path: f.path, size: `${bytes.value}${bytes.unit}` }
: { path: f.path, size: `${bytes}` }
}).filter(f => f), {
include: ['size', 'path'],
showHeaders: false,
Expand All @@ -28,8 +28,8 @@ const logTar = (tarball, opts = {}) => {
{ name: 'name:', value: tarball.name },
{ name: 'version:', value: tarball.version },
tarball.filename && { name: 'filename:', value: tarball.filename },
{ name: 'package size:', value: byteSize(tarball.size) },
{ name: 'unpacked size:', value: byteSize(tarball.unpackedSize) },
{ name: 'package size:', value: formatBytes(tarball.size) },
{ name: 'unpacked size:', value: formatBytes(tarball.unpackedSize) },
{ name: 'shasum:', value: tarball.shasum },
{
name: 'integrity:',
Expand Down
6 changes: 3 additions & 3 deletions deps/npm/lib/view.js
@@ -1,13 +1,13 @@
// npm view [pkg [pkg ...]]

const byteSize = require('byte-size')
const color = require('ansicolors')
const columns = require('cli-columns')
const fs = require('fs')
const jsonParse = require('json-parse-even-better-errors')
const log = require('npmlog')
const npa = require('npm-package-arg')
const { resolve } = require('path')
const formatBytes = require('./utils/format-bytes.js')
const relativeDate = require('tiny-relative-date')
const semver = require('semver')
const style = require('ansistyles')
Expand Down Expand Up @@ -315,7 +315,7 @@ class View extends BaseCommand {
tags.push(`${style.bright(color.green(t))}: ${version}`)
})
const unpackedSize = manifest.dist.unpackedSize &&
byteSize(manifest.dist.unpackedSize)
formatBytes(manifest.dist.unpackedSize, true)
const licenseField = manifest.license || 'Proprietary'
const info = {
name: color.green(manifest.name),
Expand Down Expand Up @@ -356,7 +356,7 @@ class View extends BaseCommand {
manifest.dist.integrity && color.yellow(manifest.dist.integrity),
fileCount:
manifest.dist.fileCount && color.yellow(manifest.dist.fileCount),
unpackedSize: unpackedSize && color.yellow(unpackedSize.value) + ' ' + unpackedSize.unit,
unpackedSize: unpackedSize && color.yellow(unpackedSize),
}
if (info.license.toLowerCase().trim() === 'proprietary')
info.license = style.bright(color.red(info.license))
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-access.1
@@ -1,4 +1,4 @@
.TH "NPM\-ACCESS" "1" "July 2021" "" ""
.TH "NPM\-ACCESS" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-access\fR \- Set access level on published packages
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-adduser.1
@@ -1,4 +1,4 @@
.TH "NPM\-ADDUSER" "1" "July 2021" "" ""
.TH "NPM\-ADDUSER" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-adduser\fR \- Add a registry user account
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-audit.1
@@ -1,4 +1,4 @@
.TH "NPM\-AUDIT" "1" "July 2021" "" ""
.TH "NPM\-AUDIT" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-audit\fR \- Run a security audit
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-bin.1
@@ -1,4 +1,4 @@
.TH "NPM\-BIN" "1" "July 2021" "" ""
.TH "NPM\-BIN" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-bugs.1
@@ -1,4 +1,4 @@
.TH "NPM\-BUGS" "1" "July 2021" "" ""
.TH "NPM\-BUGS" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Report bugs for a package in a web browser
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-cache.1
@@ -1,4 +1,4 @@
.TH "NPM\-CACHE" "1" "July 2021" "" ""
.TH "NPM\-CACHE" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-cache\fR \- Manipulates packages cache
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-ci.1
@@ -1,4 +1,4 @@
.TH "NPM\-CI" "1" "July 2021" "" ""
.TH "NPM\-CI" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-ci\fR \- Install a project with a clean slate
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-completion.1
@@ -1,4 +1,4 @@
.TH "NPM\-COMPLETION" "1" "July 2021" "" ""
.TH "NPM\-COMPLETION" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-completion\fR \- Tab Completion for npm
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-config.1
@@ -1,4 +1,4 @@
.TH "NPM\-CONFIG" "1" "July 2021" "" ""
.TH "NPM\-CONFIG" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-dedupe.1
@@ -1,4 +1,4 @@
.TH "NPM\-DEDUPE" "1" "July 2021" "" ""
.TH "NPM\-DEDUPE" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-dedupe\fR \- Reduce duplication in the package tree
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-deprecate.1
@@ -1,4 +1,4 @@
.TH "NPM\-DEPRECATE" "1" "July 2021" "" ""
.TH "NPM\-DEPRECATE" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-diff.1
@@ -1,4 +1,4 @@
.TH "NPM\-DIFF" "1" "July 2021" "" ""
.TH "NPM\-DIFF" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-diff\fR \- The registry diff command
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-dist-tag.1
@@ -1,4 +1,4 @@
.TH "NPM\-DIST\-TAG" "1" "July 2021" "" ""
.TH "NPM\-DIST\-TAG" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-dist-tag\fR \- Modify package distribution tags
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-docs.1
@@ -1,4 +1,4 @@
.TH "NPM\-DOCS" "1" "July 2021" "" ""
.TH "NPM\-DOCS" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Open documentation for a package in a web browser
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-doctor.1
@@ -1,4 +1,4 @@
.TH "NPM\-DOCTOR" "1" "July 2021" "" ""
.TH "NPM\-DOCTOR" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-doctor\fR \- Check your npm environment
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-edit.1
@@ -1,4 +1,4 @@
.TH "NPM\-EDIT" "1" "July 2021" "" ""
.TH "NPM\-EDIT" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-exec.1
@@ -1,4 +1,4 @@
.TH "NPM\-EXEC" "1" "July 2021" "" ""
.TH "NPM\-EXEC" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-exec\fR \- Run a command from a local or remote npm package
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-explain.1
@@ -1,4 +1,4 @@
.TH "NPM\-EXPLAIN" "1" "July 2021" "" ""
.TH "NPM\-EXPLAIN" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-explain\fR \- Explain installed packages
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-explore.1
@@ -1,4 +1,4 @@
.TH "NPM\-EXPLORE" "1" "July 2021" "" ""
.TH "NPM\-EXPLORE" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-find-dupes.1
@@ -1,4 +1,4 @@
.TH "NPM\-FIND\-DUPES" "1" "July 2021" "" ""
.TH "NPM\-FIND\-DUPES" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-find-dupes\fR \- Find duplication in the package tree
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-fund.1
@@ -1,4 +1,4 @@
.TH "NPM\-FUND" "1" "July 2021" "" ""
.TH "NPM\-FUND" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-fund\fR \- Retrieve funding information
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-help-search.1
@@ -1,4 +1,4 @@
.TH "NPM\-HELP\-SEARCH" "1" "July 2021" "" ""
.TH "NPM\-HELP\-SEARCH" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search npm help documentation
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-help.1
@@ -1,4 +1,4 @@
.TH "NPM\-HELP" "1" "July 2021" "" ""
.TH "NPM\-HELP" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-help\fR \- Get help on npm
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-hook.1
@@ -1,4 +1,4 @@
.TH "NPM\-HOOK" "1" "July 2021" "" ""
.TH "NPM\-HOOK" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-hook\fR \- Manage registry hooks
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-init.1
@@ -1,4 +1,4 @@
.TH "NPM\-INIT" "1" "July 2021" "" ""
.TH "NPM\-INIT" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-init\fR \- Create a package\.json file
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-install-ci-test.1
@@ -1,4 +1,4 @@
.TH "NPM\-INSTALL\-CI\-TEST" "1" "July 2021" "" ""
.TH "NPM\-INSTALL\-CI\-TEST" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-install-ci-test\fR \- Install a project with a clean slate and run tests
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-install-test.1
@@ -1,4 +1,4 @@
.TH "NPM\-INSTALL\-TEST" "1" "July 2021" "" ""
.TH "NPM\-INSTALL\-TEST" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-install-test\fR \- Install package(s) and run tests
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-install.1
@@ -1,4 +1,4 @@
.TH "NPM\-INSTALL" "1" "July 2021" "" ""
.TH "NPM\-INSTALL" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-install\fR \- Install a package
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-link.1
@@ -1,4 +1,4 @@
.TH "NPM\-LINK" "1" "July 2021" "" ""
.TH "NPM\-LINK" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-logout.1
@@ -1,4 +1,4 @@
.TH "NPM\-LOGOUT" "1" "July 2021" "" ""
.TH "NPM\-LOGOUT" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-logout\fR \- Log out of the registry
.SS Synopsis
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/man/man1/npm-ls.1
@@ -1,4 +1,4 @@
.TH "NPM\-LS" "1" "July 2021" "" ""
.TH "NPM\-LS" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SS Synopsis
Expand Down Expand Up @@ -26,7 +26,7 @@ example, running \fBnpm ls promzard\fP in npm's source tree will show:
.P
.RS 2
.nf
npm@7\.20\.3 /path/to/npm
npm@7\.20\.6 /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-org.1
@@ -1,4 +1,4 @@
.TH "NPM\-ORG" "1" "July 2021" "" ""
.TH "NPM\-ORG" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-org\fR \- Manage orgs
.SS Synopsis
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man1/npm-outdated.1
@@ -1,4 +1,4 @@
.TH "NPM\-OUTDATED" "1" "July 2021" "" ""
.TH "NPM\-OUTDATED" "1" "August 2021" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SS Synopsis
Expand Down