File tree 1 file changed +7
-1
lines changed
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 {
147
147
const originalOutput : INpmInstallCLIResult | INpm5InstallCliResult = JSON . parse ( npmDryRunInstallOutput ) ;
148
148
const npm5Output = < INpm5InstallCliResult > originalOutput ;
149
149
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
+ } ) ;
151
157
152
158
// Npm 5 return different object after performing `npm install --dry-run`.
153
159
// Considering that the dependency is already installed we should
You can’t perform that action at this time.
0 commit comments