build(pnpm): migrate settings to pnpm-workspace.yaml for pnpm 11 #54

Merged
ullrich merged 4 commits from ci/pnpm-11-migrate-settings into main 2026-07-31 06:16:38 +00:00
Owner

Replaces #49, which cannot work as written.

Renovate bumps only packageManager. pnpm 11 stops reading the pnpm field from package.json, so that bump alone would silently drop 13 dependency overrides and the build-script allowlist. This does the migration that has to accompany it.

overrides — straight move

Moves to pnpm-workspace.yaml unchanged. These are CVE remediation pins (the value is the minimum patched version inside the range its consumers expect, not the newest release), and that reasoning now sits next to them.

onlyBuiltDependencies — NOT a move

pnpm 11 removed it, along with onlyBuiltDependenciesFile, neverBuiltDependencies, ignoredBuiltDependencies and ignoreDepScripts, replacing all of them with allowBuilds — which takes a map, not an array:

allowBuilds:
  "@sentry/cli": true
  esbuild: true

Relocating the old key verbatim would have been accepted as unknown YAML and ignored, so @sentry/cli would ship without its binary and esbuild without its platform binary. That fails at build time with nothing pointing at the cause — which is why this was checked against pnpm docs rather than assumed.

Verified locally

  • pnpm 11.18.0 read the migrated config with no "unknown setting" / "no longer read" warnings, and resolved all 1358 packages. That absence is precisely the failure this PR exists to prevent.
  • LOCKFILE_MAJOR_VERSION = "9" in the pnpm 11.18.0 bundle matches this repo's lockfileVersion: '9.0', so --frozen-lockfile should not fail on a format bump. pnpm-lock.yaml is therefore untouched.

NOT verified locally — CI is the verifier

typecheck/lint/test/build under pnpm 11. The install could not finish: the registry was serving tarballs at ~6 KiB/s and the run died on TimeoutError after exhausting retries. If --frozen-lockfile does reject the lock, the fix is regenerating it on a healthy network, not reverting this.

Trap worth knowing

pnpm 11's first install wants to purge node_modules and aborts without a TTY (ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY). CI sets CI=true which auto-confirms, so CI is unaffected — but locally you need CI=true or confirmModulesPurge=false.

Close #49 in favour of this once green.

Replaces #49, which cannot work as written. Renovate bumps only `packageManager`. pnpm 11 stops reading the `pnpm` field from `package.json`, so that bump alone would **silently drop 13 dependency overrides and the build-script allowlist**. This does the migration that has to accompany it. ## `overrides` — straight move Moves to `pnpm-workspace.yaml` unchanged. These are CVE remediation pins (the value is the minimum patched version inside the range its consumers expect, not the newest release), and that reasoning now sits next to them. ## `onlyBuiltDependencies` — NOT a move pnpm 11 **removed** it, along with `onlyBuiltDependenciesFile`, `neverBuiltDependencies`, `ignoredBuiltDependencies` and `ignoreDepScripts`, replacing all of them with `allowBuilds` — which takes a **map**, not an array: ```yaml allowBuilds: "@sentry/cli": true esbuild: true ``` Relocating the old key verbatim would have been accepted as unknown YAML and ignored, so `@sentry/cli` would ship without its binary and esbuild without its platform binary. That fails at build time with nothing pointing at the cause — which is why this was checked against pnpm docs rather than assumed. ## Verified locally - pnpm 11.18.0 read the migrated config with **no** "unknown setting" / "no longer read" warnings, and resolved all 1358 packages. That absence is precisely the failure this PR exists to prevent. - `LOCKFILE_MAJOR_VERSION = "9"` in the pnpm 11.18.0 bundle matches this repo's `lockfileVersion: '9.0'`, so `--frozen-lockfile` should not fail on a format bump. `pnpm-lock.yaml` is therefore untouched. ## NOT verified locally — CI is the verifier typecheck/lint/test/build under pnpm 11. The install could not finish: the registry was serving tarballs at ~6 KiB/s and the run died on `TimeoutError` after exhausting retries. If `--frozen-lockfile` does reject the lock, the fix is regenerating it on a healthy network, not reverting this. ## Trap worth knowing pnpm 11's first install wants to purge `node_modules` and **aborts without a TTY** (`ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY`). CI sets `CI=true` which auto-confirms, so CI is unaffected — but locally you need `CI=true` or `confirmModulesPurge=false`. Close #49 in favour of this once green.
build(pnpm): migrate settings to pnpm-workspace.yaml for pnpm 11
Some checks failed
CI / Dockerfile Package Check (pull_request) Successful in 27s
CI / Security Scan (pull_request) Successful in 1m12s
CI / Checks (pull_request) Failing after 4m25s
CI / Visual Tests (pull_request) Failing after 3m39s
CI / E2E Tests (pull_request) Has been skipped
CI / Journal Image Smoke Test (pull_request) Failing after 2m53s
237a393065
Renovate's #49 bumps only `packageManager`, which cannot work on its own:
pnpm 11 stops reading the `pnpm` field from package.json, so the bump alone
would silently drop 13 dependency overrides and the build-script allowlist.
This does the migration that has to accompany it.

`overrides` moves to pnpm-workspace.yaml unchanged. Those entries are CVE
remediation pins — the value is the minimum patched version inside the range its
consumers expect, not the newest release — and that reasoning now lives next to
them.

`onlyBuiltDependencies` does NOT simply move. pnpm 11 REMOVED it, along with
`onlyBuiltDependenciesFile`, `neverBuiltDependencies`, `ignoredBuiltDependencies`
and `ignoreDepScripts`, replacing all of them with `allowBuilds` — which takes a
map, not an array:

    allowBuilds:
      "@sentry/cli": true
      esbuild: true

Relocating the old key verbatim would have been accepted as unknown YAML and
ignored, so @sentry/cli would ship without its binary and esbuild without its
platform binary. That fails at build time with nothing pointing at the cause,
which is why this was checked against pnpm's own docs rather than assumed.

Verified what could be verified locally:

- pnpm 11.18.0 read the migrated config without complaint and resolved all 1358
  packages — no "unknown setting" or "no longer read" warnings, which is exactly
  the failure this commit exists to avoid.
- `LOCKFILE_MAJOR_VERSION = "9"` in the pnpm 11.18.0 bundle, matching this
  repo's `lockfileVersion: '9.0'`, so `--frozen-lockfile` in CI should not fail
  on a lockfile format bump. pnpm-lock.yaml is therefore left untouched.

NOT verified locally: typecheck/lint/test/build under pnpm 11. The install could
not complete — the registry was returning tarballs at ~6 KiB/s and the run died
on TimeoutError after exhausting retries. CI is the verifier here. If
`--frozen-lockfile` does reject the lock, the fix is to regenerate it on a
healthy network, not to revert this.

One trap worth knowing: pnpm 11's first install wants to purge node_modules and
ABORTS without a TTY (ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY). CI sets
`CI=true`, which auto-confirms, so CI is unaffected — but a human running this
locally needs `CI=true` or `confirmModulesPurge=false`.

Refs #49

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X8hNxgYp777FRqYtVmQNaU
build(pnpm): declare the un-built packages, which pnpm 11 now requires
Some checks failed
CI / Dockerfile Package Check (pull_request) Successful in 19s
CI / Security Scan (pull_request) Successful in 40s
CI / Visual Tests (pull_request) Successful in 4m22s
CI / Checks (pull_request) Successful in 7m59s
CI / E2E Tests (pull_request) Failing after 8m11s
CI / Journal Image Smoke Test (pull_request) Successful in 14m3s
5913286789
CI caught what the local install could not: pnpm 11 fails the install outright
when a dependency has an install script that is neither allowed nor explicitly
denied.

  [ERR_PNPM_IGNORED_BUILDS] Ignored build scripts:
    @fission-ai/openspec@1.6.0, canvas@3.2.3, unrs-resolver@1.12.2

Under pnpm 10's `onlyBuiltDependencies` the list was an allowlist and everything
absent from it was skipped in silence. `allowBuilds` in pnpm 11 wants a decision
recorded for each such package, and treats an unrecorded one as an error rather
than a warning — so listing only the two we do build was incomplete.

These three are set to `false`, which preserves exactly the behaviour they
already had: none of them has ever run its install script here, and canvas would
need a native toolchain that CI does not have. Nothing changes about what gets
built; the change is that the decision is now written down. A newly added
dependency with an install script will fail CI until it appears here, which is
the useful half of pnpm's stricter stance.

Worth recording why the local run missed it: the install never got far enough to
reach the build phase — the registry was serving tarballs at ~6 KiB/s and it
died on TimeoutError. The same run did get past `--frozen-lockfile` validation
without ERR_PNPM_OUTDATED_LOCKFILE, which rules out the lockfile as a cause and
matches LOCKFILE_MAJOR_VERSION = "9" in the pnpm 11.18.0 bundle.

Refs #49

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X8hNxgYp777FRqYtVmQNaU
ci: re-run E2E (previous run failed on the BRouter warmup flake)
All checks were successful
CI / Dockerfile Package Check (pull_request) Successful in 16s
CI / Security Scan (pull_request) Successful in 44s
CI / Visual Tests (pull_request) Successful in 4m38s
CI / Checks (pull_request) Successful in 4m48s
CI / Journal Image Smoke Test (pull_request) Successful in 12m45s
CI / E2E Tests (pull_request) Successful in 8m19s
38cb2d263b
The prior E2E run failed with 'BRouter did not serve a route within 180s' —
infrastructure warmup, not the pnpm 11 change. Every other check passed:
Checks 7m59s, Visual Tests 4m22s, Security Scan, Dockerfile Package Check.
This empty commit re-runs the suite to get a signal that means something.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X8hNxgYp777FRqYtVmQNaU
ullrich force-pushed ci/pnpm-11-migrate-settings from 38cb2d263b
All checks were successful
CI / Dockerfile Package Check (pull_request) Successful in 16s
CI / Security Scan (pull_request) Successful in 44s
CI / Visual Tests (pull_request) Successful in 4m38s
CI / Checks (pull_request) Successful in 4m48s
CI / Journal Image Smoke Test (pull_request) Successful in 12m45s
CI / E2E Tests (pull_request) Successful in 8m19s
to 3229639ba6
Some checks failed
CD Staging / Build & Push Docker Images (pull_request) Has been skipped
CD Staging / Build & Push Docker Images-1 (pull_request) Has been skipped
CD Staging / Deploy Staging (pull_request) Has been skipped
CD Staging / Deploy PR Preview (pull_request) Has been skipped
CD Staging / Tear Down PR Preview (pull_request) Has been skipped
CI / Security Scan (pull_request) Successful in 39s
CI / Dockerfile Package Check (pull_request) Successful in 15s
CI / Checks (pull_request) Successful in 4m30s
CI / Visual Tests (pull_request) Successful in 4m35s
CI / Journal Image Smoke Test (pull_request) Successful in 28m28s
CI / E2E Tests (pull_request) Failing after 8m44s
2026-07-30 11:13:22 +00:00
Compare
ci: re-run E2E after the BRouter segment cache was cleared
Some checks failed
CI / Security Scan (pull_request) Successful in 55s
CI / Dockerfile Package Check (pull_request) Successful in 1m19s
CI / Checks (pull_request) Successful in 3m52s
CI / Visual Tests (pull_request) Successful in 3m56s
CI / E2E Tests (pull_request) Failing after 9m0s
CI / Journal Image Smoke Test (pull_request) Successful in 23m29s
49ce9b8074
The two previous E2E failures on this branch were the poisoned segment cache
(see the BRouter segment-integrity PR): BRouter answered every poll in ~600ms
but had no routable data. The cache volume is now absent on both slots, so this
run refetches it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X8hNxgYp777FRqYtVmQNaU
ullrich force-pushed ci/pnpm-11-migrate-settings from 49ce9b8074
Some checks failed
CI / Security Scan (pull_request) Successful in 55s
CI / Dockerfile Package Check (pull_request) Successful in 1m19s
CI / Checks (pull_request) Successful in 3m52s
CI / Visual Tests (pull_request) Successful in 3m56s
CI / E2E Tests (pull_request) Failing after 9m0s
CI / Journal Image Smoke Test (pull_request) Successful in 23m29s
to 805a63443d
All checks were successful
CI / Security Scan (pull_request) Successful in 46s
CI / Dockerfile Package Check (pull_request) Successful in 44s
CI / Checks (pull_request) Successful in 4m59s
CI / Visual Tests (pull_request) Successful in 3m56s
CI / Journal Image Smoke Test (pull_request) Successful in 32m14s
CI / E2E Tests (pull_request) Successful in 7m22s
2026-07-30 21:27:49 +00:00
Compare
ullrich deleted branch ci/pnpm-11-migrate-settings 2026-07-31 06:16:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
trails-cool/trails!54
No description provided.