deps: upgrade npm to 7.7.6

PR-URL: https://github.com/nodejs/node/pull/37968
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Ruy Adorno committed 2021-03-29 21:55:41 -04:00
1 parent b0226b39f2
commit f2cef54b6f
25 files changed
+131 -31

No files matched your search

+2
View File
@@ -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
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -159,7 +159,7 @@ tree at all, use <a href="../commands/npm-explain.html"><code>npm explain</code>
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>
+1 -1
View File
@@ -148,7 +148,7 @@ npm command-line interface
<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
+1 -1
View File
@@ -811,7 +811,7 @@ npm registry. Must be IPv4 in versions of Node prior to 0.12.</p>
<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
+1 -1
View File
@@ -207,7 +207,7 @@ console.log(moduleA) // -&gt; a
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>
+1 -3
View File
@@ -61,9 +61,6 @@ 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)
@@ -71,6 +68,7 @@ module.exports = (process) => {
} else
npm.output(npm.usage)
process.exitCode = 1
return errorHandler()
} catch (err) {
errorHandler(err)
}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+3 -3
View File
@@ -8,8 +8,8 @@ module.exports = (mani, name) => {
peerDependencies: peerDeps = {},
} = mani
return typeof deps[name] === 'string' ? deps[name]
: typeof optDeps[name] === 'string' ? optDeps[name]
: typeof peerDeps[name] === 'string' ? peerDeps[name]
return deps && typeof deps[name] === 'string' ? deps[name]
: optDeps && typeof optDeps[name] === 'string' ? optDeps[name]
: peerDeps && typeof peerDeps[name] === 'string' ? peerDeps[name]
: null
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@npmcli/metavuln-calculator",
"version": "1.1.0",
"version": "1.1.1",
"main": "lib/index.js",
"files": [
"lib"
+5
View File
@@ -25,6 +25,7 @@ npmVersion(arg, {
signGitTag: false, // default false, gpg sign the git tag
force: false, // push forward recklessly if any problems happen
ignoreScripts: false, // do not run pre/post/version lifecycle scripts
scriptShell: '/bin/bash', // shell to run lifecycle scripts in
message: 'v%s', // message for tag and commit, replace %s with the version
}).then(newVersion => {
console.error('version updated!', newVersion)
@@ -149,6 +150,10 @@ Push forward recklessly if any problems happen. Default `false`.
Do not run pre/post/version lifecycle scripts. Default `false`.
#### `scriptShell` String
Path to the shell, which should execute the lifecycle scripts. Defaults to `/bin/sh` on unix, or `cmd.exe` on windows.
#### `message` String
The message for the git commit and annotated git tag that are created.
+2
View File
@@ -13,6 +13,7 @@ module.exports = async (newversion, opts = {}) => {
signGitTag = false,
force = false,
ignoreScripts = false,
scriptShell = undefined,
preid = null,
log = proclog,
message = 'v%s',
@@ -31,6 +32,7 @@ module.exports = async (newversion, opts = {}) => {
signGitTag,
force,
ignoreScripts,
scriptShell,
preid,
pkg,
log,
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "libnpmversion",
"version": "1.0.12",
"version": "1.1.0",
"main": "lib/index.js",
"files": [
"lib/*.js"
+8 -1
View File
@@ -182,6 +182,13 @@ const npmWalker = Class => class Walker extends Class {
getPackageFiles (entries, pkg) {
try {
// XXX this could be changed to use read-package-json-fast
// which handles the normalizing of bins for us, and simplifies
// the test for bundleDependencies and bundledDependencies later.
// HOWEVER if we do this, we need to be sure that we're careful
// about what we write back out since rpj-fast removes some fields
// that the user likely wants to keep. it also would add a second
// file read that we would want to optimize away.
pkg = normalizePackageBin(JSON.parse(pkg.toString()))
} catch (er) {
// not actually a valid package.json
@@ -202,7 +209,7 @@ const npmWalker = Class => class Walker extends Class {
// the files list as the effective readdir result, that means it
// looks like we don't have a node_modules folder at all unless we
// include it here.
if (pkg.bundleDependencies && entries.includes('node_modules'))
if ((pkg.bundleDependencies || pkg.bundledDependencies) && entries.includes('node_modules'))
pkg.files.push('node_modules')
const patterns = Array.from(new Set(pkg.files)).reduce((set, pattern) => {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "npm-packlist",
"version": "2.1.4",
"version": "2.1.5",
"description": "Get a list of the files to add from a folder into an npm package",
"directories": {
"test": "test"
@@ -20,7 +20,7 @@
"devDependencies": {
"mutate-fs": "^2.1.1",
"require-inject": "^1.4.4",
"tap": "^14.10.7"
"tap": "^14.10.8"
},
"scripts": {
"test": "tap",
+4 -4
View File
@@ -1,5 +1,5 @@
{
"version": "7.7.5",
"version": "7.7.6",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
@@ -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",
@@ -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",
+37
View File
@@ -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
@@ -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
+25 -4
View File
@@ -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)
@@ -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
})