Skip to content

chore(deps): move pnpm overrides to pnpm-workspace.yaml#3371

Merged
marcusrbrown merged 1 commit into
mainfrom
chore/migrate-pnpm-overrides-to-workspace
May 24, 2026
Merged

chore(deps): move pnpm overrides to pnpm-workspace.yaml#3371
marcusrbrown merged 1 commit into
mainfrom
chore/migrate-pnpm-overrides-to-workspace

Conversation

@fro-bot
Copy link
Copy Markdown
Owner

@fro-bot fro-bot commented May 24, 2026

Why

pnpm 11.2.0 silently dropped support for reading the pnpm field from package.json. Running pnpm install now emits:

[WARN] The "pnpm" field in package.json is no longer read by pnpm. The following keys were ignored: "pnpm.overrides". See https://pnpm.io/settings for the new home of each setting.

All eight security-floor overrides were being ignored on fresh installs:

  • ajv@8, brace-expansion, fast-uri, flatted, minimatch, picomatch, undici, yaml

The existing pnpm-lock.yaml still pinned transitive packages above the floors because it was generated when pnpm still read the field, but any resolver-driven update (Renovate, fresh checkout, --no-frozen-lockfile) could quietly drift below them.

What

  • Moved the overrides block from package.jsonpnpm-workspace.yaml, which is where pnpm 11 looks per the current settings docs.
  • Refreshed pnpm-lock.yaml so the overrides: block now lives at the top of the lockfile and pnpm enforces it on --frozen-lockfile.

Verification

  • pnpm install — no warnings, lockfile honored
  • pnpm run lint — clean
  • pnpm run check-types — clean
  • pnpm test — 22 files / 644 passed (+3 todo)

Risk

Minimal and reversible. The override semantics are unchanged; only the file location moved. Reverting is a single revert commit if anything regresses.

pnpm 11.2.0 stopped reading the `pnpm` field from package.json,
silently disabling all eight security-floor overrides. The warning
surfaced during the daily autoheal validation:

  [WARN] The "pnpm" field in package.json is no longer read by pnpm.
  The following keys were ignored: "pnpm.overrides".

The stale lockfile still resolved transitive packages above the
floors, but a fresh install or Renovate resolver run could drift
below them. This restores enforcement by moving the block into
`pnpm-workspace.yaml` per current pnpm settings docs.

Refs: https://pnpm.io/settings
@marcusrbrown marcusrbrown merged commit 474896d into main May 24, 2026
12 checks passed
@marcusrbrown marcusrbrown deleted the chore/migrate-pnpm-overrides-to-workspace branch May 24, 2026 13:26
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.

2 participants