fix: lifecycle buildindex sort (#6568)

This commit is contained in:
Xiao Chuan authored and GitHub committed 2023-05-20 15:55:32 +03:00
1 parent f5121500ee
commit 6ce3424a9a
2 files changed
+7 -1

No files matched your search

+6
View File
@@ -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).
@@ -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 }) =>