deps: upgrade npm to 8.5.1

PR-URL: https://github.com/nodejs/node/pull/42039
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
npm-robot authored and Bryan English committed 2022-02-22 11:38:56 -05:00
1 parent a95f7a0c25
commit d1ef43f2aa
25 files changed
+137 -68

No files matched your search

+13 -4
View File
@@ -78,11 +78,20 @@ into a tarball (b).
* `npm install <folder>`:
Install the package in the directory as a symlink in the current
project. Its dependencies will be installed before it's linked. If
`<folder>` sits inside the root of your project, its dependencies may
If `<folder>` sits inside the root of your project, its dependencies will be installed and may
be hoisted to the top-level `node_modules` as they would for other
types of dependencies.
types of dependencies. If `<folder>` sits outside the root of your project,
*npm will not install the package dependencies* in the directory `<folder>`,
but it will create a symlink to `<folder>`.
> NOTE: If you want to install the content of a directory like a package from the registry instead of creating a link, you would need to use [`npm pack`](/commands/npm-pack) while in the `<folder>` directory, and then install the resulting tarball instead of the `<folder>` using `npm install <tarball file>`
Example:
```bash
npm install ../../other-package
npm install ./sub-package
```
* `npm install <tarball file>`:
+6 -3
View File
@@ -18,11 +18,14 @@ Ping the configured or given npm registry and verify authentication.
If it works it will output something like:
```bash
Ping success: {*Details about registry*}
npm notice PING https://registry.npmjs.org/
npm notice PONG 255ms
```
otherwise you will get:
otherwise you will get an error:
```bash
Ping error: {*Detail about error}
npm notice PING http://foo.com/
npm ERR! code E404
npm ERR! 404 Not Found - GET http://www.foo.com/-/ping?write=true
```
### Configuration
+10 -8
View File
@@ -30,24 +30,25 @@ Workspaces are usually defined via the `workspaces` property of the
{
"name": "my-workspaces-powered-project",
"workspaces": [
"workspace-a"
"packages/a"
]
}
```
Given the above `package.json` example living at a current working
directory `.` that contains a folder named `workspace-a` that itself contains
directory `.` that contains a folder named `packages/a` that itself contains
a `package.json` inside it, defining a Node.js package, e.g:
```
.
+-- package.json
`-- workspace-a
`-- package.json
`-- packages
+-- a
| `-- package.json
```
The expected result once running `npm install` in this current working
directory `.` is that the folder `workspace-a` will get symlinked to the
directory `.` is that the folder `packages/a` will get symlinked to the
`node_modules` folder of the current working dir.
Below is a post `npm install` example, given that same previous example
@@ -56,11 +57,12 @@ structure of files and folders:
```
.
+-- node_modules
| `-- workspace-a -> ../workspace-a
| `-- packages/a -> ../packages/a
+-- package-lock.json
+-- package.json
`-- workspace-a
`-- package.json
`-- packages
+-- a
| `-- package.json
```
### Getting started with workspaces
+11 -4
View File
@@ -211,11 +211,18 @@ dependency to a project.</p>
</li>
<li>
<p><code>npm install &lt;folder&gt;</code>:</p>
<p>Install the package in the directory as a symlink in the current
project. Its dependencies will be installed before it's linked. If
<code>&lt;folder&gt;</code> sits inside the root of your project, its dependencies may
<p>If <code>&lt;folder&gt;</code> sits inside the root of your project, its dependencies will be installed and may
be hoisted to the top-level <code>node_modules</code> as they would for other
types of dependencies.</p>
types of dependencies. If <code>&lt;folder&gt;</code> sits outside the root of your project,
<em>npm will not install the package dependencies</em> in the directory <code>&lt;folder&gt;</code>,
but it will create a symlink to <code>&lt;folder&gt;</code>.</p>
<blockquote>
<p>NOTE: If you want to install the content of a directory like a package from the registry instead of creating a link, you would need to use <a href="../commands/npm-pack.html"><code>npm pack</code></a> while in the <code>&lt;folder&gt;</code> directory, and then install the resulting tarball instead of the <code>&lt;folder&gt;</code> using <code>npm install &lt;tarball file&gt;</code></p>
</blockquote>
<p>Example:</p>
<pre lang="bash"><code>npm install ../../other-package
npm install ./sub-package
</code></pre>
</li>
<li>
<p><code>npm install &lt;tarball file&gt;</code>:</p>
+1 -1
View File
@@ -160,7 +160,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@8.5.0 /path/to/npm
<pre lang="bash"><code>npm@8.5.1 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre>
+6 -3
View File
@@ -152,10 +152,13 @@ npm command-line interface
<h3 id="description">Description</h3>
<p>Ping the configured or given npm registry and verify authentication.
If it works it will output something like:</p>
<pre lang="bash"><code>Ping success: {*Details about registry*}
<pre lang="bash"><code>npm notice PING https://registry.npmjs.org/
npm notice PONG 255ms
</code></pre>
<p>otherwise you will get:</p>
<pre lang="bash"><code>Ping error: {*Detail about error}
<p>otherwise you will get an error:</p>
<pre lang="bash"><code>npm notice PING http://foo.com/
npm ERR! code E404
npm ERR! 404 Not Found - GET http://www.foo.com/-/ping?write=true
</code></pre>
<h3 id="configuration">Configuration</h3>
<!-- raw HTML omitted -->
+1 -1
View File
@@ -149,7 +149,7 @@ npm command-line interface
<pre lang="bash"><code>npm &lt;command&gt; [args]
</code></pre>
<h3 id="version">Version</h3>
<p>8.5.0</p>
<p>8.5.1</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
+10 -8
View File
@@ -164,30 +164,32 @@ file system that is explicitly defined in the <a href="../configuring-npm/packag
<pre lang="json"><code>{
"name": "my-workspaces-powered-project",
"workspaces": [
"workspace-a"
"packages/a"
]
}
</code></pre>
<p>Given the above <code>package.json</code> example living at a current working
directory <code>.</code> that contains a folder named <code>workspace-a</code> that itself contains
directory <code>.</code> that contains a folder named <code>packages/a</code> that itself contains
a <code>package.json</code> inside it, defining a Node.js package, e.g:</p>
<pre><code>.
+-- package.json
`-- workspace-a
`-- package.json
`-- packages
+-- a
| `-- package.json
</code></pre>
<p>The expected result once running <code>npm install</code> in this current working
directory <code>.</code> is that the folder <code>workspace-a</code> will get symlinked to the
directory <code>.</code> is that the folder <code>packages/a</code> will get symlinked to the
<code>node_modules</code> folder of the current working dir.</p>
<p>Below is a post <code>npm install</code> example, given that same previous example
structure of files and folders:</p>
<pre><code>.
+-- node_modules
| `-- workspace-a -&gt; ../workspace-a
| `-- packages/a -&gt; ../packages/a
+-- package-lock.json
+-- package.json
`-- workspace-a
`-- package.json
`-- packages
+-- a
| `-- package.json
</code></pre>
<h3 id="getting-started-with-workspaces">Getting started with workspaces</h3>
<p>You may automate the required steps to define a new workspace using
+2
View File
@@ -9,6 +9,8 @@ class Pkg extends BaseCommand {
'set <key>=<value> [<key>=<value> ...]',
'get [<key> [<key> ...]]',
'delete <key> [<key> ...]',
'set [<array>[<index>].<key>=<value> ...]',
'set [<array>[].<key>=<value> ...]',
]
static params = [
+16 -4
View File
@@ -87,11 +87,23 @@ NOTE: The \fB\-\-production\fP flag has no particular meaning when adding a
.
.IP \(bu 2
\fBnpm install <folder>\fP:
Install the package in the directory as a symlink in the current
project\. Its dependencies will be installed before it's linked\. If
\fB<folder>\fP sits inside the root of your project, its dependencies may
If \fB<folder>\fP sits inside the root of your project, its dependencies will be installed and may
be hoisted to the top\-level \fBnode_modules\fP as they would for other
types of dependencies\.
types of dependencies\. If \fB<folder>\fP sits outside the root of your project,
\fInpm will not install the package dependencies\fR in the directory \fB<folder>\fP,
but it will create a symlink to \fB<folder>\fP\|\.
.QP
NOTE: If you want to install the content of a directory like a package from the registry instead of creating a link, you would need to use npm help \fBpack\fP while in the \fB<folder>\fP directory, and then install the resulting tarball instead of the \fB<folder>\fP using \fBnpm install <tarball file>\fP
.
Example:
.P
.RS 2
.nf
npm install \.\./\.\./other\-package
npm install \./sub\-package
.fi
.RE
.IP \(bu 2
\fBnpm install <tarball file>\fP:
Install a package that is sitting on the filesystem\. Note: if you just
+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@8\.5\.0 /path/to/npm
npm@8\.5\.1 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.fi
+6 -3
View File
@@ -17,15 +17,18 @@ If it works it will output something like:
.P
.RS 2
.nf
Ping success: {*Details about registry*}
npm notice PING https://registry\.npmjs\.org/
npm notice PONG 255ms
.fi
.RE
.P
otherwise you will get:
otherwise you will get an error:
.P
.RS 2
.nf
Ping error: {*Detail about error}
npm notice PING http://foo\.com/
npm ERR! code E404
npm ERR! 404 Not Found \- GET http://www\.foo\.com/\-/ping?write=true
.fi
.RE
.SS Configuration
+1 -1
View File
@@ -10,7 +10,7 @@ npm <command> [args]
.RE
.SS Version
.P
8\.5\.0
8\.5\.1
.SS Description
.P
npm is the package manager for the Node JavaScript platform\. It puts
+10 -8
View File
@@ -27,27 +27,28 @@ npm help \fBpackage\.json\fP file, e\.g:
{
"name": "my\-workspaces\-powered\-project",
"workspaces": [
"workspace\-a"
"packages/a"
]
}
.fi
.RE
.P
Given the above \fBpackage\.json\fP example living at a current working
directory \fB\|\.\fP that contains a folder named \fBworkspace\-a\fP that itself contains
directory \fB\|\.\fP that contains a folder named \fBpackages/a\fP that itself contains
a \fBpackage\.json\fP inside it, defining a Node\.js package, e\.g:
.P
.RS 2
.nf
\|\.
+\-\- package\.json
`\-\- workspace\-a
`\-\- package\.json
`\-\- packages
+\-\- a
| `\-\- package\.json
.fi
.RE
.P
The expected result once running \fBnpm install\fP in this current working
directory \fB\|\.\fP is that the folder \fBworkspace\-a\fP will get symlinked to the
directory \fB\|\.\fP is that the folder \fBpackages/a\fP will get symlinked to the
\fBnode_modules\fP folder of the current working dir\.
.P
Below is a post \fBnpm install\fP example, given that same previous example
@@ -57,11 +58,12 @@ structure of files and folders:
.nf
\|\.
+\-\- node_modules
| `\-\- workspace\-a \-> \.\./workspace\-a
| `\-\- packages/a \-> \.\./packages/a
+\-\- package\-lock\.json
+\-\- package\.json
`\-\- workspace\-a
`\-\- package\.json
`\-\- packages
+\-\- a
| `\-\- package\.json
.fi
.RE
.SS Getting started with workspaces
+1 -1
View File
@@ -304,7 +304,7 @@ class AuditReport extends Map {
async [_getReport] () {
// if we're not auditing, just return false
if (this.options.audit === false || this.tree.inventory.size === 1) {
if (this.options.audit === false || this.options.offline === true || this.tree.inventory.size === 1) {
return null
}
@@ -13,6 +13,7 @@ module.exports = () =>
: process.env.DSARI ? 'dsari'
: process.env.GITHUB_ACTION ? 'github-actions'
: process.env.TDDIUM ? 'tddium'
: process.env.SCREWDRIVER ? 'screwdriver'
: process.env.STRIDER ? 'strider'
: process.env.TASKCLUSTER_ROOT_URL ? 'taskcluster'
: process.env.JENKINS_URL ? 'jenkins'
+20 -5
View File
@@ -1,26 +1,41 @@
{
"name": "@npmcli/ci-detect",
"version": "1.4.0",
"version": "2.0.0",
"description": "Detect what kind of CI environment the program is in",
"author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)",
"author": "GitHub Inc.",
"license": "ISC",
"main": "./lib",
"scripts": {
"test": "tap",
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags"
"prepublishOnly": "git push origin --follow-tags",
"lint": "eslint '**/*.js'",
"postlint": "npm-template-check",
"template-copy": "npm-template-copy --force",
"lintfix": "npm run lint -- --fix",
"snap": "tap",
"posttest": "npm run lint"
},
"tap": {
"check-coverage": true
},
"devDependencies": {
"tap": "^14.10.2"
"@npmcli/template-oss": "^2.7.1",
"tap": "^15.1.6"
},
"files": [
"index.js"
"bin",
"lib"
],
"repository": {
"type": "git",
"url": "git+https://github.com/npm/ci-detect.git"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16"
},
"templateOSS": {
"version": "2.7.1"
}
}
+2 -2
View File
@@ -27,8 +27,8 @@ themes.addTheme('colorASCII', themes.getTheme('ASCII'), {
})
themes.addTheme('brailleSpinner', {
preProgressbar: '⸨',
postProgressbar: '⸩',
preProgressbar: '(',
postProgressbar: ')',
progressbarTheme: {
complete: '#',
remaining: '⠂',
+7 -4
View File
@@ -1,6 +1,6 @@
{
"name": "gauge",
"version": "4.0.0",
"version": "4.0.1",
"description": "A terminal based horizontal gauge",
"main": "lib",
"scripts": {
@@ -12,7 +12,8 @@
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"snap": "tap",
"posttest": "npm run lint"
"posttest": "npm run lint",
"template-copy": "npm-template-copy --force"
},
"repository": {
"type": "git",
@@ -41,7 +42,7 @@
"wide-align": "^1.1.2"
},
"devDependencies": {
"@npmcli/template-oss": "^2.3.0",
"@npmcli/template-oss": "^2.7.1",
"readable-stream": "^3.6.0",
"tap": "^15.0.10"
},
@@ -58,5 +59,7 @@
"functions": 92,
"lines": 90
},
"templateVersion": "2.3.0"
"templateOSS": {
"version": "2.7.1"
}
}
+1 -1
View File
@@ -51,7 +51,7 @@
},
"dependencies": {
"@npmcli/arborist": "^4.0.0",
"@npmcli/ci-detect": "^1.3.0",
"@npmcli/ci-detect": "^2.0.0",
"@npmcli/run-script": "^2.0.0",
"chalk": "^4.1.0",
"mkdirp-infer-owner": "^2.0.0",
+2
View File
@@ -76,10 +76,12 @@ function getAgent (uri, opts) {
localAddress: opts.localAddress,
rejectUnauthorized: opts.rejectUnauthorized,
timeout: agentTimeout,
freeSocketTimeout: 15000,
}) : new HttpAgent({
maxSockets: agentMaxSockets,
localAddress: opts.localAddress,
timeout: agentTimeout,
freeSocketTimeout: 15000,
})
AGENT_CACHE.set(key, agent)
return agent
+2 -3
View File
@@ -1,6 +1,6 @@
{
"name": "make-fetch-happen",
"version": "10.0.2",
"version": "10.0.3",
"description": "Opinionated, caching, retrying fetch client",
"main": "lib/index.js",
"files": [
@@ -52,10 +52,9 @@
},
"devDependencies": {
"@npmcli/template-oss": "^2.7.1",
"eslint": "^8.8.0",
"eslint": "^8.9.0",
"mkdirp": "^1.0.4",
"nock": "^13.2.4",
"npmlog": "^6.0.1",
"rimraf": "^3.0.2",
"safe-buffer": "^5.2.1",
"standard-version": "^9.3.2",
+3 -3
View File
@@ -1,5 +1,5 @@
{
"version": "8.5.0",
"version": "8.5.1",
"name": "npm",
"description": "a package manager for JavaScript",
"workspaces": [
@@ -56,7 +56,7 @@
"dependencies": {
"@isaacs/string-locale-compare": "^1.1.0",
"@npmcli/arborist": "^4.3.1",
"@npmcli/ci-detect": "^1.4.0",
"@npmcli/ci-detect": "^2.0.0",
"@npmcli/config": "^3.0.0",
"@npmcli/map-workspaces": "^2.0.0",
"@npmcli/package-json": "^1.0.1",
@@ -90,7 +90,7 @@
"libnpmsearch": "^4.0.1",
"libnpmteam": "^3.0.1",
"libnpmversion": "^2.0.2",
"make-fetch-happen": "^10.0.2",
"make-fetch-happen": "^10.0.3",
"minipass": "^3.1.6",
"minipass-pipeline": "^1.2.4",
"mkdirp": "^1.0.4",
@@ -690,6 +690,8 @@ Usage:
npm pkg set <key>=<value> [<key>=<value> ...]
npm pkg get [<key> [<key> ...]]
npm pkg delete <key> [<key> ...]
npm pkg set [<array>[<index>].<key>=<value> ...]
npm pkg set [<array>[].<key>=<value> ...]
Options:
[-f|--force] [--json]
@@ -773,6 +773,8 @@ All commands:
npm pkg set <key>=<value> [<key>=<value> ...]
npm pkg get [<key> [<key> ...]]
npm pkg delete <key> [<key> ...]
npm pkg set [<array>[<index>].<key>=<value> ...]
npm pkg set [<array>[].<key>=<value> ...]
Options:
[-f|--force] [--json]