Skip to content

Commit 73499a6

Browse files
authored
Fixes resolution concurrency problem (#3673)
1 parent 23dd84b commit 73499a6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/package-request.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,10 @@ export default class PackageRequest {
343343
}
344344
}
345345

346-
await Promise.all(promises);
346+
for (const promise of promises) {
347+
await promise;
348+
}
349+
347350
ref.addDependencies(deps);
348351

349352
// Now that we have all dependencies, it's safe to propagate optional

src/package-resolver.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,10 @@ export default class PackageResolver {
471471
this.frozen = Boolean(isFrozen);
472472
this.workspaceLayout = workspaceLayout;
473473
const activity = (this.activity = this.reporter.activity());
474-
await Promise.all(deps.map((req): Promise<void> => this.find(req)));
474+
475+
for (const req of deps) {
476+
await this.find(req);
477+
}
475478

476479
// all required package versions have been discovered, so now packages that
477480
// resolved to existing versions can be resolved to their best available version

0 commit comments

Comments
 (0)