File tree 1 file changed +13
-4
lines changed
1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -297,11 +297,20 @@ class UibPackages {
297
297
lsParsed = JSON . parse ( ls )
298
298
} catch { }
299
299
300
- // Make sure we have package details for all installed packages
301
- await Object . keys ( lsParsed . dependencies || { } ) . forEach ( async pkgName => {
300
+ // Make sure we have package details for all installed packages - NB: don't use await with forEach!
301
+ let depPkgNames = Object . keys ( lsParsed . dependencies || { } )
302
+ // await depPkgNames.forEach( async pkgName => {
303
+ // await this.updIndividualPkgDetails(pkgName, lsParsed)
304
+ // })
305
+ //! EITHER (serial)
306
+ // for ( const pkgName of depPkgNames ) {
307
+ // await this.updIndividualPkgDetails(pkgName, lsParsed)
308
+ // }
309
+ //! OR (parallel)
310
+ await Promise . all ( depPkgNames . map ( async ( pkgName ) => {
302
311
await this . updIndividualPkgDetails ( pkgName , lsParsed )
303
- } )
304
-
312
+ } ) )
313
+
305
314
// (re)Write package.json
306
315
this . writePackageJson ( rootFolder , pj )
307
316
}
You can’t perform that action at this time.
0 commit comments