From efe31e791d0f71cf7d7964f89f249aafca025cde Mon Sep 17 00:00:00 2001 From: Michael Perrotte Date: Tue, 29 Oct 2019 13:03:29 -0400 Subject: deps: update npm to 6.12.1 PR-URL: https://github.com/nodejs/node/pull/30164 Reviewed-By: Anna Henningsen Reviewed-By: Myles Borins Reviewed-By: Colin Ihrig Reviewed-By: Jiawen Geng --- deps/npm/lib/install/inflate-shrinkwrap.js | 7 ++++--- deps/npm/lib/pack.js | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'deps/npm/lib') 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>/]...] [--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') { -- cgit v1.2.3