From 7dbffb9673503382b262390ecf8801c4022c22b6 Mon Sep 17 00:00:00 2001 From: Jarvis Date: Wed, 29 Jul 2026 09:08:57 +0800 Subject: [PATCH] ci(e2e): install with pnpm 11, matching the version developers run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI pinned pnpm 9 while local installs are on 11, and the gap was not cosmetic: pnpm 10 stopped running a dependency's install scripts unless the package is named in `pnpm-workspace.yaml`, so a local `pnpm install` failed with ERR_PNPM_IGNORED_BUILDS and dropped a placeholder workspace file that, if committed, broke CI's pnpm 9 install ("packages field missing or empty"). The two halves have to land together — pnpm 9 rejects the workspace file and pnpm 11 requires it — so this bumps the workflow and adds the file in one commit. esbuild (via vitest) keeps its install script enabled, which is what pnpm 9 did by default, so the harness behaves as before. Verified by running the full e2e suite under pnpm 11.17.0: 163 files, 422 passed, 3 skipped. --- .github/workflows/ci.yml | 6 +++++- tests/e2e/pnpm-workspace.yaml | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tests/e2e/pnpm-workspace.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 514c9987..7e5ad14a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -243,7 +243,11 @@ jobs: node-version: 20 - uses: pnpm/action-setup@v6 with: - version: 9 + # Matches the pnpm developers run locally. The harness's + # `tests/e2e/pnpm-workspace.yaml` uses the `allowBuilds` key this + # line unlocks — pnpm 9 rejects that file outright, so the two + # must move together. + version: 11 - name: check harness exists id: harness run: | diff --git a/tests/e2e/pnpm-workspace.yaml b/tests/e2e/pnpm-workspace.yaml new file mode 100644 index 00000000..f08f356d --- /dev/null +++ b/tests/e2e/pnpm-workspace.yaml @@ -0,0 +1,11 @@ +# pnpm 10+ does not run a dependency's install scripts unless it is named +# here. esbuild (via vitest) links its platform binary in that script, and +# pnpm 9 ran it by default — so keeping it enabled preserves the behavior +# this harness has always had. Without the entry `pnpm install` fails with +# ERR_PNPM_IGNORED_BUILDS. +# +# This file MUST NOT be committed while CI still installs with pnpm 9: a +# workspace manifest without a `packages:` key fails that version outright +# ("packages field missing or empty"). +allowBuilds: + esbuild: true