Skip to content

Commit

Permalink
fix: lifecycle buildindex sort (#6568)
Browse files Browse the repository at this point in the history
  • Loading branch information
2239559319 committed May 20, 2023
1 parent f512150 commit 6ce3424
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/twelve-ears-thank.md
@@ -0,0 +1,6 @@
---
"@pnpm/lifecycle": patch
"pnpm": patch
---

Build projects in a workspace in correct order [#6568](https://github.com/pnpm/pnpm/pull/6568).
2 changes: 1 addition & 1 deletion exec/lifecycle/src/runLifecycleHooksConcurrently.ts
Expand Up @@ -38,7 +38,7 @@ export async function runLifecycleHooksConcurrently (
importersByBuildIndex.get(importer.buildIndex)!.push(importer)
}
}
const sortedBuildIndexes = Array.from(importersByBuildIndex.keys()).sort()
const sortedBuildIndexes = Array.from(importersByBuildIndex.keys()).sort((a, b) => a - b)
const groups = sortedBuildIndexes.map((buildIndex) => {
const importers = importersByBuildIndex.get(buildIndex)!
return importers.map(({ manifest, modulesDir, rootDir, stages: importerStages, targetDirs }) =>
Expand Down

0 comments on commit 6ce3424

Please sign in to comment.