Skip to content

Commit

Permalink
deps: upgrade npm to 7.7.6
Browse files Browse the repository at this point in the history
PR-URL: #37968
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
ruyadorno committed Mar 30, 2021
1 parent 52c7539 commit 7823759
Show file tree
Hide file tree
Showing 25 changed files with 131 additions and 31 deletions.
2 changes: 2 additions & 0 deletions deps/npm/AUTHORS
Expand Up @@ -768,3 +768,5 @@ kbayrhammer <klaus.bayrhammer@redbull.com>
James Chen-Smith <jameschensmith@gmail.com>
Yash Singh <saiansh2525@gmail.com>
Danielle Church <dani.church@gmail.com>
Seth Thomas <seth@emailseth.com>
Andreas <andreas@bielk.se>
28 changes: 28 additions & 0 deletions deps/npm/CHANGELOG.md
@@ -1,3 +1,31 @@
## v7.7.6 (2021-03-29)

### BUG FIXES

* [`9dd2ed518`](https://github.com/npm/cli/commit/9dd2ed5189b6f283094664e9e192cf1598ec3f79)
fix empty newline printed to stderr
([@ruyadorno](https://github.com/ruyadorno))
* [`9d391462a`](https://github.com/npm/cli/commit/9d391462a25f637219501e2430ef1f7b89710816)
[#2973](https://github.com/npm/cli/issues/2973)
fix spelling in workspaces.md file
([@sethomas](https://github.com/sethomas))
* [`4b100249a`](https://github.com/npm/cli/commit/4b100249a6cad67e002186816e64817313b636c7)
[#2979](https://github.com/npm/cli/issues/2979)
change 'maxsockets' default value back to 15
([@wallrat](https://github.com/wallrat))

### DEPENDENCIES

* [`a28f89572`](https://github.com/npm/cli/commit/a28f89572a708cced69cc938f877eaa969dbad9e)
`libnpmversion@1.1.0`
* fix reading `script-shell` config on `npm version` lifecycle scripts
* [`03734c29e`](https://github.com/npm/cli/commit/03734c29e00191d17f164d1c0e75d9f228268842)
`npm-packlist@2.1.5`
* fix packaging `bundledDependencies`
* [`80ce2a019`](https://github.com/npm/cli/commit/80ce2a019526632b01b70e1c75c42608dc160332)
`@npmcli/metavuln-calculator@1.1.1`
* fix error auditing package documents with missing dependencies

## v7.7.5 (2021-03-25)

### BUG FIXES
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/using-npm/config.md
Expand Up @@ -795,7 +795,7 @@ Show extended information in `npm ls` and `npm search`.

#### `maxsockets`

* Default: Infinity
* Default: 15
* Type: Number

The maximum number of connections to use per origin (protocol/host/port
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/using-npm/workspaces.md
Expand Up @@ -90,7 +90,7 @@ nested workspaces to be consumed elsewhere.

### Running commands in the context of workspaces

You man use the `workspace` configuration option to run commands in the context
You can use the `workspace` configuration option to run commands in the context
of a configured workspace.

Following is a quick example on how to use the `npm run` command in the context
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.7.5 /path/to/npm
<pre lang="bash"><code>npm@7.7.6 /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>7.7.5</p>
<p>7.7.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
2 changes: 1 addition & 1 deletion deps/npm/docs/output/using-npm/config.html
Expand Up @@ -811,7 +811,7 @@ <h4 id="long"><code>long</code></h4>
<p>Show extended information in <code>npm ls</code> and <code>npm search</code>.</p>
<h4 id="maxsockets"><code>maxsockets</code></h4>
<ul>
<li>Default: Infinity</li>
<li>Default: 15</li>
<li>Type: Number</li>
</ul>
<p>The maximum number of connections to use per origin (protocol/host/port
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/output/using-npm/workspaces.html
Expand Up @@ -207,7 +207,7 @@ <h3 id="using-workspaces">Using workspaces</h3>
in such a way that is also easy to <a href="../commands/npm-publish.html">publish</a> these
nested workspaces to be consumed elsewhere.</p>
<h3 id="running-commands-in-the-context-of-workspaces">Running commands in the context of workspaces</h3>
<p>You man use the <code>workspace</code> configuration option to run commands in the context
<p>You can use the <code>workspace</code> configuration option to run commands in the context
of a configured workspace.</p>
<p>Following is a quick example on how to use the <code>npm run</code> command in the context
of nested workspaces. For a project containing multiple workspaces, e.g:</p>
Expand Down
4 changes: 1 addition & 3 deletions deps/npm/lib/cli.js
Expand Up @@ -61,16 +61,14 @@ module.exports = (process) => {
impl(npm.argv, errorHandler)
else {
try {
// I don't know why this is needed but we get a cb() not called if we
// omit it
npm.log.level = 'silent'
if (cmd) {
const didYouMean = require('./utils/did-you-mean.js')
const suggestions = await didYouMean(npm, npm.localPrefix, cmd)
npm.output(`Unknown command: "${cmd}"${suggestions}\n\nTo see a list of supported npm commands, run:\n npm help`)
} else
npm.output(npm.usage)
process.exitCode = 1
return errorHandler()
} catch (err) {
errorHandler(err)
}
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/lib/utils/config/definitions.js
Expand Up @@ -1154,7 +1154,7 @@ define('long', {
})

define('maxsockets', {
default: Infinity,
default: 15,
type: Number,
description: `
The maximum number of connections to use per origin (protocol/host/port
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@7\.7\.5 /path/to/npm
npm@7\.7\.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.1
Expand Up @@ -10,7 +10,7 @@ npm <command> [args]
.RE
.SS Version
.P
7\.7\.5
7\.7\.6
.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 @@ -1065,7 +1065,7 @@ Show extended information in \fBnpm ls\fP and \fBnpm search\fP\|\.
.SS \fBmaxsockets\fP
.RS 0
.IP \(bu 2
Default: Infinity
Default: 15
.IP \(bu 2
Type: Number

Expand Down
2 changes: 1 addition & 1 deletion deps/npm/man/man7/workspaces.7
Expand Up @@ -92,7 +92,7 @@ in such a way that is also easy to npm help publish these
nested workspaces to be consumed elsewhere\.
.SS Running commands in the context of workspaces
.P
You man use the \fBworkspace\fP configuration option to run commands in the context
You can use the \fBworkspace\fP configuration option to run commands in the context
of a configured workspace\.
.P
Following is a quick example on how to use the \fBnpm run\fP command in the context
Expand Down

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

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

5 changes: 5 additions & 0 deletions deps/npm/node_modules/libnpmversion/README.md

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

2 changes: 2 additions & 0 deletions deps/npm/node_modules/libnpmversion/lib/index.js

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

2 changes: 1 addition & 1 deletion deps/npm/node_modules/libnpmversion/package.json

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

9 changes: 8 additions & 1 deletion deps/npm/node_modules/npm-packlist/index.js

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/node_modules/npm-packlist/package.json

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

8 changes: 4 additions & 4 deletions deps/npm/package.json
@@ -1,5 +1,5 @@
{
"version": "7.7.5",
"version": "7.7.6",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
Expand Down Expand Up @@ -74,7 +74,7 @@
"libnpmpublish": "^4.0.0",
"libnpmsearch": "^3.1.0",
"libnpmteam": "^2.0.2",
"libnpmversion": "^1.0.12",
"libnpmversion": "^1.1.0",
"make-fetch-happen": "^8.0.14",
"minipass": "^3.1.3",
"minipass-pipeline": "^1.2.4",
Expand Down Expand Up @@ -180,12 +180,12 @@
"devDependencies": {
"@mdx-js/mdx": "^1.6.22",
"cmark-gfm": "^0.8.5",
"eslint": "^7.22.0",
"eslint": "^7.23.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-standard": "^5.0.0",
"jsdom": "^16.5.1",
"jsdom": "^16.5.2",
"licensee": "^8.1.0",
"marked-man": "^0.7.0",
"require-inject": "^1.4.4",
Expand Down
37 changes: 37 additions & 0 deletions deps/npm/tap-snapshots/smoke-tests-index.js-TAP.test.js
Expand Up @@ -5,6 +5,43 @@
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
exports[`smoke-tests/index.js TAP npm (no args) > should have expected no args output 1`] = `
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview
All commands:
access, adduser, audit, bin, bugs, cache, ci, completion,
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
edit, exec, explain, explore, find-dupes, fund, get, help,
hook, init, install, install-ci-test, install-test, link,
ll, login, logout, ls, org, outdated, owner, pack, ping,
prefix, profile, prune, publish, rebuild, repo, restart,
root, run-script, search, set, set-script, shrinkwrap, star,
stars, start, stop, team, test, token, uninstall, unpublish,
unstar, update, version, view, whoami
Specify configs in the ini-formatted file:
{CWD}/smoke-tests/index/.npmrc
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
npm {CWD}
`

exports[`smoke-tests/index.js TAP npm diff > should have expected diff output 1`] = `
diff --git a/package.json b/package.json
index v1.0.4..v1.1.1 100644
Expand Down
Expand Up @@ -674,7 +674,7 @@ Show extended information in \`npm ls\` and \`npm search\`.
#### \`maxsockets\`
* Default: Infinity
* Default: 15
* Type: Number
The maximum number of connections to use per origin (protocol/host/port
Expand Down
29 changes: 25 additions & 4 deletions deps/npm/test/lib/cli.js
Expand Up @@ -172,17 +172,37 @@ t.test('gracefully handles error printing usage', t => {
t.teardown(() => {
npmock.output = output
errorHandlerCb = null
errorHandlerCalled = null
})
const proc = {
argv: ['node', 'npm', 'asdf'],
argv: ['node', 'npm'],
on: () => {},
}
npmock.argv = []
npmock.output = (msg) => {
throw new Error('test exception')
errorHandlerCb = () => {
t.match(errorHandlerCalled, [], 'should call errorHandler with no args')
t.end()
}
cli(proc)
})

t.test('handles output error', t => {
const { output } = npmock
t.teardown(() => {
npmock.output = output
errorHandlerCb = null
errorHandlerCalled = null
})
const proc = {
argv: ['node', 'npm'],
on: () => {},
}
npmock.argv = []
npmock.output = () => {
throw new Error('ERR')
}
errorHandlerCb = () => {
t.match(errorHandlerCalled, /test exception/)
t.match(errorHandlerCalled, /ERR/, 'should call errorHandler with error')
t.end()
}
cli(proc)
Expand All @@ -191,6 +211,7 @@ t.test('gracefully handles error printing usage', t => {
t.test('load error calls error handler', t => {
t.teardown(() => {
errorHandlerCb = null
errorHandlerCalled = null
LOAD_ERROR = null
})

Expand Down

0 comments on commit 7823759

Please sign in to comment.