chore(deps): pnpm 11.1.2 → 11.7.0 + config migration (deferred from #229) #235

Closed
opened 2026-06-17 04:57:38 +00:00 by spikerj · 1 comment
Owner

Split out from #229 (frontend dev/build/test tooling roll-up). The pnpm devDependency bump to 11.7.0 was excluded because it is effectively breaking for this repo's setup.

Problem

pnpm 11.7.0:

  1. Stops reading the pnpm field in package.json (e.g. pnpm.onlyBuiltDependencies). It emits [WARN] The "pnpm" field in package.json is no longer read by pnpm ... onlyBuiltDependencies ... and ignores those settings.
  2. Changes deps-verification defaults, so the husky pnpm exec lint-staged pre-commit hook triggers a deps-status check that wants to purge/reinstall node_modules non-interactively and aborts:
    ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY: Aborted removal of modules directory due to no TTY.

Work required

  • Migrate pnpm.onlyBuiltDependencies (and any other pnpm.* settings in package.json) to pnpm-workspace.yaml per https://pnpm.io/settings.
  • Decide on / configure the deps-verification behaviour (verify-deps-before-run / CI=true / confirmModulesPurge=false) so the husky hook and CI both behave.
  • Bump pnpm devDep ^11.1.2 → ^11.7.0 and regenerate the lockfile.
  • Verify: clean pnpm install, a commit through the husky hook succeeds, and CI green.

Context

Currently kept at ^11.1.2 (lockfile pinned 11.1.2). Build engine still uses system pnpm 10.33.0 for installs.

Split out from #229 (frontend dev/build/test tooling roll-up). The pnpm devDependency bump to **11.7.0** was excluded because it is effectively breaking for this repo's setup. ## Problem pnpm 11.7.0: 1. **Stops reading the `pnpm` field in `package.json`** (e.g. `pnpm.onlyBuiltDependencies`). It emits `[WARN] The "pnpm" field in package.json is no longer read by pnpm ... onlyBuiltDependencies ...` and ignores those settings. 2. **Changes deps-verification defaults**, so the husky `pnpm exec lint-staged` pre-commit hook triggers a deps-status check that wants to purge/reinstall `node_modules` non-interactively and aborts: `ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY: Aborted removal of modules directory due to no TTY`. ## Work required - Migrate `pnpm.onlyBuiltDependencies` (and any other `pnpm.*` settings in `package.json`) to `pnpm-workspace.yaml` per https://pnpm.io/settings. - Decide on / configure the deps-verification behaviour (`verify-deps-before-run` / `CI=true` / `confirmModulesPurge=false`) so the husky hook and CI both behave. - Bump `pnpm` devDep `^11.1.2 → ^11.7.0` and regenerate the lockfile. - Verify: clean `pnpm install`, a commit through the husky hook succeeds, and CI green. ## Context Currently kept at `^11.1.2` (lockfile pinned 11.1.2). Build engine still uses system pnpm 10.33.0 for installs.
Author
Owner

Resolved in spikersoft-angular PR #163 (merged to master), going past the ticket's 11.7.0 to current latest 11.12.0: pnpm devDep ^11.12.0 + CI PNPM_VERSION 11.12.0 in all three workflows (was 10.22.0 — local and CI now agree); the package.json pnpm field migrated to pnpm-workspace.yaml consolidated onto 11.12's allowBuilds (old allow list → true, old ignore list + newly-prompted less/tesseract.js/web-mrz-reader → false); verifyDepsBeforeRun: warn fixes the ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY husky abort (reproduced live before the fix); lockfile regenerated by 11.12 itself and passing its supply-chain scan. Validated: clean install with no 'pnpm field' warning, nx build green, 1871/1871 tests, commit through the hook succeeds. Closing.

Resolved in spikersoft-angular PR #163 (merged to master), going past the ticket's 11.7.0 to current latest 11.12.0: pnpm devDep ^11.12.0 + CI PNPM_VERSION 11.12.0 in all three workflows (was 10.22.0 — local and CI now agree); the package.json pnpm field migrated to pnpm-workspace.yaml consolidated onto 11.12's allowBuilds (old allow list → true, old ignore list + newly-prompted less/tesseract.js/web-mrz-reader → false); verifyDepsBeforeRun: warn fixes the ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY husky abort (reproduced live before the fix); lockfile regenerated by 11.12 itself and passing its supply-chain scan. Validated: clean install with no 'pnpm field' warning, nx build green, 1871/1871 tests, commit through the hook succeeds. Closing.
Sign in to join this conversation.