summaryrefslogtreecommitdiff
path: root/deps/npm/lib
diff options
context:
space:
mode:
authorMichael Perrotte <mike@npmjs.com>2019-10-29 13:03:29 -0400
committerMyles Borins <mylesborins@google.com>2019-10-30 16:20:34 -0400
commitefe31e791d0f71cf7d7964f89f249aafca025cde (patch)
tree1bf722c3921816b6cf548dc8144a587273077d27 /deps/npm/lib
parentaf2a9a45a54eef456829b9e045688b6eeeef4af0 (diff)
downloadandroid-node-v8-efe31e791d0f71cf7d7964f89f249aafca025cde.tar.gz
android-node-v8-efe31e791d0f71cf7d7964f89f249aafca025cde.tar.bz2
android-node-v8-efe31e791d0f71cf7d7964f89f249aafca025cde.zip
deps: update npm to 6.12.1
PR-URL: https://github.com/nodejs/node/pull/30164 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Diffstat (limited to 'deps/npm/lib')
-rw-r--r--deps/npm/lib/install/inflate-shrinkwrap.js7
-rw-r--r--deps/npm/lib/pack.js4
2 files changed, 7 insertions, 4 deletions
diff --git a/deps/npm/lib/install/inflate-shrinkwrap.js b/deps/npm/lib/install/inflate-shrinkwrap.js
index b0b71ef6b1..1ec4f9ba6d 100644
--- a/deps/npm/lib/install/inflate-shrinkwrap.js
+++ b/deps/npm/lib/install/inflate-shrinkwrap.js
@@ -141,6 +141,7 @@ function isGit (sw) {
}
function makeFakeChild (name, topPath, tree, sw, requested) {
+ const isDirectory = requested.type === 'directory'
const from = sw.from || requested.raw
const pkg = {
name: name,
@@ -167,16 +168,16 @@ function makeFakeChild (name, topPath, tree, sw, requested) {
}
const child = createChild({
package: pkg,
- loaded: true,
+ loaded: isDirectory,
parent: tree,
children: [],
fromShrinkwrap: requested,
fakeChild: sw,
fromBundle: sw.bundled ? tree.fromBundle || tree : null,
path: childPath(tree.path, pkg),
- realpath: requested.type === 'directory' ? requested.fetchSpec : childPath(tree.realpath, pkg),
+ realpath: isDirectory ? requested.fetchSpec : childPath(tree.realpath, pkg),
location: (tree.location === '/' ? '' : tree.location + '/') + pkg.name,
- isLink: requested.type === 'directory',
+ isLink: isDirectory,
isInLink: tree.isLink || tree.isInLink,
swRequires: sw.requires
})
diff --git a/deps/npm/lib/pack.js b/deps/npm/lib/pack.js
index 78e5bfd174..8189cb6ced 100644
--- a/deps/npm/lib/pack.js
+++ b/deps/npm/lib/pack.js
@@ -4,6 +4,9 @@
// Packs the specified package into a .tgz file, which can then
// be installed.
+// Set this early to avoid issues with circular dependencies.
+module.exports = pack
+
const BB = require('bluebird')
const byteSize = require('byte-size')
@@ -37,7 +40,6 @@ pack.usage = 'npm pack [[<@scope>/]<pkg>...] [--dry-run]'
// if it can be installed, it can be packed.
pack.completion = install.completion
-module.exports = pack
function pack (args, silent, cb) {
const cwd = process.cwd()
if (typeof cb !== 'function') {