From 29b3b0c883e939020a7da9706e41e1286d0e3f1d Mon Sep 17 00:00:00 2001 From: Aumy <46275902+AumyF@users.noreply.github.com> Date: Thu, 12 Aug 2021 03:33:17 +0900 Subject: [PATCH] Fix #253: exclude peerDependencies by default even using '--lock' flag --- lib/Package.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Package.js b/lib/Package.js index 9a6f0b7..b4ba170 100644 --- a/lib/Package.js +++ b/lib/Package.js @@ -231,6 +231,8 @@ Package.prototype.resolveDependenciesFromLockedDependencies = function(dependenc callback(); } else if(self.deploymentConfig.stripOptionalDependencies && dependency.optional) { // When the stripping optional dependencies feature has been enabled, remove all optional dependencies callback(); + } else if (!self.deploymentConfig.includePeerDependencies && dependency.peer) { // When the including peer dependencies features has been disabled, remove all peer dependencies + callback(); } else if(self.production && dependency.dev) { // Development dependencies should not be included in production mode callback(); } else {