Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFighting-Jack <574637316@qq.com>2019-11-20 15:19:19 +0300
committerMichael Perrotte <mike@npmjs.com>2019-12-03 20:09:07 +0300
commite4b97962e5fce0d49beb541ce5a0f96aee0525de (patch)
treef4bff4d19bb0cdf363b0109d80dad23701a95e43
parent867642942bec69bb9ab71cff1914fb6a9fe67de8 (diff)
shrinkwrap: no need to read package.json when read shrinkwrap
PR-URL: https://github.com/npm/cli/pull/504 Credit: @Lighting-Jack Close: #504 Reviewed-by: @mikemimik
-rw-r--r--lib/install/read-shrinkwrap.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/install/read-shrinkwrap.js b/lib/install/read-shrinkwrap.js
index 707467801..1d9fb99c1 100644
--- a/lib/install/read-shrinkwrap.js
+++ b/lib/install/read-shrinkwrap.js
@@ -19,8 +19,7 @@ function readShrinkwrap (child, next) {
maybeReadFile('npm-shrinkwrap.json', child),
// Don't read non-root lockfiles
child.isTop && maybeReadFile('package-lock.json', child),
- child.isTop && maybeReadFile('package.json', child),
- (shrinkwrap, lockfile, pkgJson) => {
+ (shrinkwrap, lockfile) => {
if (shrinkwrap && lockfile) {
log.warn('read-shrinkwrap', 'Ignoring package-lock.json because there is already an npm-shrinkwrap.json. Please use only one of the two.')
}