From 46d6a005495249bee43b6d8818c1c0922579e398 Mon Sep 17 00:00:00 2001 From: 2239559319 Date: Sat, 20 May 2023 17:07:57 +0800 Subject: [PATCH 1/2] fix: lifecycle buildindex sort --- exec/lifecycle/src/runLifecycleHooksConcurrently.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec/lifecycle/src/runLifecycleHooksConcurrently.ts b/exec/lifecycle/src/runLifecycleHooksConcurrently.ts index 740d2ac5695..eaa48ccb16e 100644 --- a/exec/lifecycle/src/runLifecycleHooksConcurrently.ts +++ b/exec/lifecycle/src/runLifecycleHooksConcurrently.ts @@ -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 }) => From c039641a986aa7b11e39ed330037b95919f4e431 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Sat, 20 May 2023 15:48:44 +0300 Subject: [PATCH 2/2] docs: add changesets --- .changeset/twelve-ears-thank.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/twelve-ears-thank.md diff --git a/.changeset/twelve-ears-thank.md b/.changeset/twelve-ears-thank.md new file mode 100644 index 00000000000..5a949301226 --- /dev/null +++ b/.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).