@@ -345,8 +345,8 @@ class BootstrapCommand extends Command {
345
345
let rootVersion ;
346
346
347
347
if ( hoisting && isHoistedPackage ( externalName , hoisting ) ) {
348
- const commonVersion = Array . from ( externalDependents . keys ( ) ) . reduce (
349
- ( a , b ) => ( externalDependents . get ( a ) . size > externalDependents . get ( b ) . size ? a : b )
348
+ const commonVersion = Array . from ( externalDependents . keys ( ) ) . reduce ( ( a , b ) =>
349
+ externalDependents . get ( a ) . size > externalDependents . get ( b ) . size ? a : b
350
350
) ;
351
351
352
352
// Get the version required by the repo root (if any).
@@ -471,13 +471,15 @@ class BootstrapCommand extends Command {
471
471
// installed in package directories.
472
472
actions . push ( ( ) => {
473
473
// Compute the list of candidate directories synchronously
474
- const candidates = root . filter ( dep => dep . dependents . length ) . reduce ( ( list , { name, dependents } ) => {
475
- const dirs = dependents
476
- . filter ( pkg => pkg . nodeModulesLocation !== rootPkg . nodeModulesLocation )
477
- . map ( pkg => path . join ( pkg . nodeModulesLocation , name ) ) ;
478
-
479
- return list . concat ( dirs ) ;
480
- } , [ ] ) ;
474
+ const candidates = root
475
+ . filter ( dep => dep . dependents . length )
476
+ . reduce ( ( list , { name, dependents } ) => {
477
+ const dirs = dependents
478
+ . filter ( pkg => pkg . nodeModulesLocation !== rootPkg . nodeModulesLocation )
479
+ . map ( pkg => path . join ( pkg . nodeModulesLocation , name ) ) ;
480
+
481
+ return list . concat ( dirs ) ;
482
+ } , [ ] ) ;
481
483
482
484
if ( ! candidates . length ) {
483
485
tracker . verbose ( "hoist" , "nothing to prune" ) ;
0 commit comments