deps: upgrade npm to 6.14.5

PR-URL: https://github.com/nodejs/node/pull/33239
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
Ruy Adorno 2020-05-04 14:57:47 -04:00 committed by Michaël Zasso
parent 339690ce9b
commit 38853eb84a
No known key found for this signature in database
GPG Key ID: 770F7A9A5AE15600
185 changed files with 567 additions and 797 deletions

2
deps/npm/.npmignore vendored
View File

@ -24,5 +24,5 @@ html/*.png
*.pyc
Session.vim
.nyc_output

View File

@ -12,9 +12,6 @@ node_js:
env: "DEPLOY_VERSION=testing"
notifications:
slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8
install:
- "node . install"

4
deps/npm/AUTHORS vendored
View File

@ -691,3 +691,7 @@ Vitaliy Markitanov <9357021+vit100@users.noreply.github.com>
simon_s <simon_s@afimilk.co.il>
John Kennedy <john.kennedy.9147@gmail.com>
Bernard Kitchens <bernard@npmjs.com>
Jarda Snajdr <jsnajdr@gmail.com>
Naix Geng <1308363651@qq.com>
Dylan Treisman <dylanzt@gmail.com>
mum-never-proud <abhuz@hotmail.com>

15
deps/npm/CHANGELOG.md vendored
View File

@ -1,3 +1,18 @@
## 6.14.5 (2020-05-01)
### BUG FIXES
* [`33ec41f18`](https://github.com/npm/cli/commit/33ec41f18f557146607cb14a7a38c707fce6d42c) [#758](https://github.com/npm/cli/pull/758) fix: relativize file links when inflating shrinkwrap ([@jsnajdr](https://github.com/jsnajdr))
* [`94ed456df`](https://github.com/npm/cli/commit/94ed456dfb0b122fd4192429024f034d06c3c454) [#1162](https://github.com/npm/cli/pull/1162) fix: npm init help output ([@mum-never-proud](https://github.com/mum-never-proud))
### DEPENDENCIES
* [`5587ac01f`](https://github.com/npm/cli/commit/5587ac01ffd0d2ea830a6bbb67bb34a611ffc409) `npm-registry-fetch@4.0.4`
* [`fc5d94c39`](https://github.com/npm/npm-registry-fetch/commit/fc5d94c39ca218d78df77249ab3a6bf1d9ed9db1) fix: removed default timeout
* [`07a4d8884`](https://github.com/npm/cli/commit/07a4d8884448359bac485a49c05fd2d23d06834b) `graceful-fs@4.2.4`
* [`8228d1f2e`](https://github.com/npm/cli/commit/8228d1f2e427ad9adee617266108acd1ee39b4a5) `mkdirp@0.5.5`
* [`e6d208317`](https://github.com/npm/cli/commit/e6d20831740a84aea766da2a2913cf82a4d56ada) `nopt@4.0.3`
## 6.14.4 (2020-03-24)
### DEPENDENCIES

View File

@ -73,7 +73,7 @@ All interactions in the npm repository are covered by the [npm Code of Conduct](
# Make sure you install the dependencies first before running tests.
$ npm install
# Run tests for the CLI (it could take awhile).
# Run tests for the CLI (it could take a while).
$ npm run test
```
@ -97,7 +97,7 @@ $ make link
#################
# ALTERNATIVELY
#################
# If ou're working on a feature or bug, you can run the same command on your
# If you're working on a feature or bug, you can run the same command on your
# working branch and link that code.
# Create new branch to work from (there are many ways)
@ -130,7 +130,7 @@ let you know that it's sent the request to start the benchmark suite.
![image](https://user-images.githubusercontent.com/2818462/72312698-e2e57f80-3656-11ea-9fcf-4a8f6b97b0d1.png)
If you've updated your pull-reuqest and you'd like to run the the benchmark suite again, simple update your original comment, by adding `test this please ✅` again, or simply just adding another emoji to the **end**. _(The trigger is the phrase "test this please ✅" at the beginning of a comment. Updates will trigger as well, so long as the phrase stays at the beginning.)_.
If you've updated your pull-request and you'd like to run the the benchmark suite again, simple update your original comment, by adding `test this please ✅` again, or simply just adding another emoji to the **end**. _(The trigger is the phrase "test this please ✅" at the beginning of a comment. Updates will trigger as well, so long as the phrase stays at the beginning.)_.
![image](https://user-images.githubusercontent.com/2818462/72313006-ec231c00-3657-11ea-9bd9-227634d67362.png)

View File

@ -57,14 +57,14 @@ on a preinstalled git.
If one of the packages npm tries to install is a native node module and
requires compiling of C++ Code, npm will use
[node-gyp](https://github.com/TooTallNate/node-gyp) for that task.
For a Unix system, [node-gyp](https://github.com/TooTallNate/node-gyp)
[node-gyp](https://github.com/nodejs/node-gyp) for that task.
For a Unix system, [node-gyp](https://github.com/nodejs/node-gyp)
needs Python, make and a buildchain like GCC. On Windows,
Python and Microsoft Visual Studio C++ are needed. Python 3 is
not supported by [node-gyp](https://github.com/TooTallNate/node-gyp).
not supported by [node-gyp](https://github.com/nodejs/node-gyp).
For more information visit
[the node-gyp repository](https://github.com/TooTallNate/node-gyp) and
the [node-gyp Wiki](https://github.com/TooTallNate/node-gyp/wiki).
[the node-gyp repository](https://github.com/nodejs/node-gyp) and
the [node-gyp Wiki](https://github.com/nodejs/node-gyp/wiki).
### Directories

View File

@ -145,9 +145,15 @@ suites, then those executables will be added to the `PATH` for
executing the scripts. So, if your package.json has this:
```json
{ "name" : "foo"
, "dependencies" : { "bar" : "0.1.x" }
, "scripts": { "start" : "bar ./test" } }
{
"name" : "foo",
"dependencies" : {
"bar" : "0.1.x"
},
"scripts": {
"start" : "bar ./test"
}
}
```
then you could run `npm start` to execute the `bar` script, which is
@ -176,9 +182,15 @@ there is a config param of `<name>[@<version>]:<key>`. For example,
if the package.json has this:
```json
{ "name" : "foo"
, "config" : { "port" : "8080" }
, "scripts" : { "start" : "node server.js" } }
{
"name" : "foo",
"config" : {
"port" : "8080"
},
"scripts" : {
"start" : "node server.js"
}
}
```
and the server.js is this:
@ -213,10 +225,11 @@ process.env.npm_package_scripts_install === "foo.js"
For example, if your package.json contains this:
```json
{ "scripts" :
{ "install" : "scripts/install.js"
, "postinstall" : "scripts/postinstall.js"
, "uninstall" : "scripts/uninstall.js"
{
"scripts" : {
"install" : "scripts/install.js",
"postinstall" : "scripts/install.js",
"uninstall" : "scripts/uninstall.js"
}
}
```
@ -232,10 +245,11 @@ If you want to run a make command, you can do so. This works just
fine:
```json
{ "scripts" :
{ "preinstall" : "./configure"
, "install" : "make && make install"
, "test" : "make test"
{
"scripts" : {
"preinstall" : "./configure",
"install" : "make && make install",
"test" : "make test"
}
}
```

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -63,7 +63,7 @@ function init (args, cb) {
'This utility will walk you through creating a package.json file.',
'It only covers the most common items, and tries to guess sensible defaults.',
'',
'See `npm help json` for definitive documentation on these fields',
'See `npm help init` for definitive documentation on these fields',
'and exactly what they do.',
'',
'Use `npm install <pkg>` afterwards to install a package and',

View File

@ -74,7 +74,10 @@ function doesChildVersionMatch (child, requested, requestor) {
var childReq = child.package._requested
if (childReq) {
if (childReq.rawSpec === requested.rawSpec) return true
if (childReq.type === requested.type && childReq.saveSpec === requested.saveSpec) return true
if (childReq.type === requested.type) {
if (childReq.saveSpec === requested.saveSpec) return true
if (childReq.fetchSpec === requested.fetchSpec) return true
}
}
// If _requested didn't exist OR if it didn't match then we'll try using
// _from. We pass it through npa to normalize the specifier.
@ -200,6 +203,7 @@ function removeObsoleteDep (child, log) {
})
}
exports.packageRelativePath = packageRelativePath
function packageRelativePath (tree) {
if (!tree) return ''
var requested = tree.package._requested || {}
@ -570,7 +574,7 @@ function addDependency (name, versionSpec, tree, log, done) {
try {
var req = childDependencySpecifier(tree, name, versionSpec)
if (tree.swRequires && tree.swRequires[name]) {
var swReq = childDependencySpecifier(tree, name, tree.swRequires[name], tree.package._where)
var swReq = childDependencySpecifier(tree, name, tree.swRequires[name])
}
} catch (err) {
return done(err)

View File

@ -1,12 +1,15 @@
'use strict'
const npa = require('npm-package-arg')
const moduleName = require('../utils/module-name.js')
const packageRelativePath = require('./deps').packageRelativePath
module.exports = function (child, reqBy) {
if (!child.requiredBy.length) return
if (!reqBy) reqBy = child.requiredBy[0]
const deps = reqBy.package.dependencies || {}
const devDeps = reqBy.package.devDependencies || {}
const optDeps = reqBy.package.optionalDependencies || {}
const name = moduleName(child)
return npa.resolve(name, deps[name] || devDeps[name], reqBy.realpath)
const spec = deps[name] || devDeps[name] || optDeps[name]
const where = packageRelativePath(reqBy)
return npa.resolve(name, spec, where)
}

View File

@ -89,6 +89,20 @@ function tarballToVersion (name, tb) {
return match[2] || match[1]
}
function relativizeLink (name, spec, topPath, requested) {
if (!spec.startsWith('file:')) {
return
}
let requestedPath = requested.fetchSpec
if (requested.type === 'file') {
requestedPath = path.dirname(requestedPath)
}
const relativized = path.relative(requestedPath, path.resolve(topPath, spec.slice(5)))
return 'file:' + relativized
}
function inflatableChild (onDiskChild, name, topPath, tree, sw, requested, opts) {
validate('OSSOOOO|ZSSOOOO', arguments)
const usesIntegrity = (
@ -101,7 +115,14 @@ function inflatableChild (onDiskChild, name, topPath, tree, sw, requested, opts)
sw.resolved = sw.version
sw.version = regTarball
}
if (sw.requires) Object.keys(sw.requires).map(_ => { sw.requires[_] = tarballToVersion(_, sw.requires[_]) || sw.requires[_] })
if (sw.requires) {
Object.keys(sw.requires).forEach(name => {
const spec = sw.requires[name]
sw.requires[name] = tarballToVersion(name, spec) ||
relativizeLink(name, spec, topPath, requested) ||
spec
})
}
const modernLink = requested.type === 'directory' && !sw.from
if (hasModernMeta(onDiskChild) && childIsEquivalent(sw, requested, onDiskChild)) {
// The version on disk matches the shrinkwrap entry.

View File

@ -1,4 +1,4 @@
.TH "NPM" "1" "March 2020" "" ""
.TH "NPM" "1" "May 2020" "" ""
.SH "NAME"
\fBnpm\fR \- a JavaScript package manager
.P

View File

@ -1,4 +1,4 @@
.TH "NPM\-ACCESS" "1" "March 2020" "" ""
.TH "NPM\-ACCESS" "1" "May 2020" "" ""
.SH "NAME"
\fBnpm-access\fR \- Set access level on published packages
.SS Synopsis

View File

@ -3,7 +3,7 @@
section: cli\-commands
title: npm\-adduser
.SH description: Set access level on published packages
.TH "NPM\-ADDUSER" "1" "March 2020" "" ""
.TH "NPM\-ADDUSER" "1" "May 2020" "" ""
.SH "NAME"
\fBnpm-adduser\fR \- Add a registry user account
.SS Synopsis

View File

@ -1,4 +1,4 @@
.TH "NPM\-AUDIT" "1" "March 2020" "" ""
.TH "NPM\-AUDIT" "1" "May 2020" "" ""
.SH "NAME"
\fBnpm-audit\fR \- Run a security audit
.SS Synopsis

View File

@ -1,4 +1,4 @@
.TH "NPM\-BIN" "1" "March 2020" "" ""
.TH "NPM\-BIN" "1" "May 2020" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SS Synopsis

View File

@ -1,4 +1,4 @@
.TH "NPM\-BUGS" "1" "March 2020" "" ""
.TH "NPM\-BUGS" "1" "May 2020" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe
.SS Synopsis

View File

@ -1,4 +1,4 @@
.TH "NPM\-BUILD" "1" "March 2020" "" ""
.TH "NPM\-BUILD" "1" "May 2020" "" ""
.SH "NAME"
\fBnpm-build\fR \- Build a package
.SS Synopsis

View File

@ -1,4 +1,4 @@
.TH "NPM\-BUNDLE" "1" "March 2020" "" ""
.TH "NPM\-BUNDLE" "1" "May 2020" "" ""
.SH "NAME"
\fBnpm-bundle\fR \- REMOVED
.SS Description

View File

@ -1,4 +1,4 @@
.TH "NPM\-CACHE" "1" "March 2020" "" ""
.TH "NPM\-CACHE" "1" "May 2020" "" ""
.SH "NAME"
\fBnpm-cache\fR \- Manipulates packages cache
.SS Synopsis

Some files were not shown because too many files have changed in this diff Show More