Skip to content

Fix the pnpm workspace file I broke CI with - #270

Merged
ramonski merged 2 commits into
masterfrom
fix/ci-pnpm-workspace-regression
Sep 15, 2026
Merged

ramonski merged 2 commits into
masterfrom
fix/ci-pnpm-workspace-regression

Conversation

@ramonski

Copy link
Copy Markdown
Member

My fault, from #267. The pnpm-workspace.yaml I added to approve esbuild's build script broke pnpm install in CI:

ERROR  packages field missing or empty

pnpm 9, which the workflow pins, treats any pnpm-workspace.yaml as a workspace declaration and refuses to install without a packages field. pnpm 12, which I have locally, does not. I tested the install on my machine, saw it succeed, and shipped a file that only works on the version I happened to have.

The file now carries both keys, one for each version, with a comment saying which is which:

  • packages: ["."] — this package itself, so pnpm 9 is satisfied and the install layout is unchanged.
  • ignoredBuiltDependencies: [esbuild] — pnpm 10+ refuses to finish an install that silently skipped a build script (ERR_PNPM_IGNORED_BUILDS) unless told the skip is deliberate.

And it is deliberate: esbuild's script places a prebuilt binary that neither the build nor the tests need. Verified by wiping node_modules, installing without the script, and running pnpm build and pnpm test — both green. The original approval in #267 was me reacting to a warning without checking whether it meant anything.

The workflow also now runs the frontend tests. #267 added them and I never wired them into CI, so the job that just failed would not have caught a broken test either.

Verified locally from a wiped node_modules: pnpm install exits 0, build succeeds, 20 tests pass. I have no pnpm 9 here, so the packages half is reasoned from the exact error CI produced rather than measured; this run will settle it.

My fault, from #267. The pnpm-workspace.yaml I added to
approve esbuild's build script broke pnpm install in CI:

  ERROR  packages field missing or empty

pnpm 9, which the workflow pins, treats any
pnpm-workspace.yaml as a workspace declaration and refuses
to install without a packages field. pnpm 12, which I have
locally, does not. I tested the install on my machine, saw
it succeed, and shipped a file that only works on the
version I happened to have.

The file now carries both keys, one for each version:
packages: ["."] so pnpm 9 is satisfied and the layout is
unchanged, and ignoredBuiltDependencies so pnpm 10+ stops
refusing an install that skipped a build script.

Skipping it is deliberate. esbuild's script places a
prebuilt binary that neither the build nor the tests need,
verified by wiping node_modules, installing without it,
and running pnpm build and pnpm test. The approval in #267
was me reacting to a warning without checking whether it
meant anything.

The workflow also runs the frontend tests now. #267 added
them and never wired them in, so the job that failed would
not have caught a broken test either.
The frontend tests I wired in one commit ago fail on the
runner:

  TypeError: webidl.util.markAsUncloneable is not a
  function
    at new CacheStorage [email protected]/.../cachestorage.js
    at [email protected]/lib/api.js

jsdom 30, which vitest pulls in, declares engines
^22.22.2 || ^24.15.0 || >=26.0.0, and undici 8 under it
wants >=22.19.0. CI ran Node 20, where the import dies
with a message that names neither Node nor a version.

Both workflows move to 22. The runners had already
annotated the previous run to say 20 is deprecated and
that actions are being forced onto 24, so this was due
anyway.

frontend/package.json gains an engines field so the
requirement is visible where someone would look for it,
rather than only in a transitive dependency's metadata.
@ramonski
ramonski merged commit 2dc74da into master Sep 15, 2026
2 checks passed
@ramonski
ramonski deleted the fix/ci-pnpm-workspace-regression branch September 15, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant