File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,13 @@ export class NodePackageManager implements INodePackageManager {
147147 const originalOutput : INpmInstallCLIResult | INpm5InstallCliResult = JSON . parse ( npmDryRunInstallOutput ) ;
148148 const npm5Output = < INpm5InstallCliResult > originalOutput ;
149149 const npmOutput = < INpmInstallCLIResult > originalOutput ;
150- const name = _ . head ( _ . keys ( npmOutput . dependencies ) ) ;
150+ let name : string ;
151+ _ . forOwn ( npmOutput . dependencies , ( peerDependency : INpmPeerDependencyInfo , key : string ) => {
152+ if ( ! peerDependency . required && ! peerDependency . peerMissing ) {
153+ name = key ;
154+ return false ;
155+ }
156+ } ) ;
151157
152158 // Npm 5 return different object after performing `npm install --dry-run`.
153159 // Considering that the dependency is already installed we should
You can’t perform that action at this time.
0 commit comments