fix(deps): move pnpm overrides to pnpm-workspace.yaml - #105
Conversation
pnpm 11 no longer reads the `pnpm` field from package.json, so the overrides added by the recent dependency sweep were silently ignored while the lockfile still recorded them. Frozen installs under pnpm 11 therefore abort with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH, which kills the publish job in its "Bump version (patch)" step and blocks releases. Move the overrides verbatim into pnpm-workspace.yaml, where both pnpm 10 and pnpm 11 read them. The lockfile is unchanged (lockfileVersion 9.0) and the patched js-yaml / brace-expansion versions are preserved. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013S4pYSjwUsiZtdtMMpW7bw
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoRestore pnpm 11 installs by relocating dependency overrides
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. Frozen-install failures can recur
|
| overrides: | ||
| js-yaml: '^4.3.2' | ||
| brace-expansion@1: '^1.1.16' |
There was a problem hiding this comment.
1. Frozen-install failures can recur 📘 Rule violation ▣ Testability
pnpm-workspace.yaml relocates the overrides, but the changeset adds no automated test that runs a pnpm 11 frozen install against this configuration. A later override-placement or lockfile change can recreate the mismatch without a dedicated regression case covering the release-blocking scenario.
Agent Prompt
## Issue description
The bug fix moves dependency overrides so pnpm 11 frozen installs succeed, but no automated regression test in this changeset exercises the previously failing scenario.
## Fix Focus Areas
- pnpm-workspace.yaml[8-10]
## Recommended Fix
Add an automated test or CI check that runs pnpm 11 with `--frozen-lockfile` against the committed workspace configuration and lockfile. Ensure the check fails against the pre-fix placement in `package.json` and succeeds with the overrides in `pnpm-workspace.yaml`.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Problem
The recent dependency sweep added
pnpm.overridestopackage.jsonto clear the js-yaml / brace-expansion advisories, and regenerated the lockfile with pnpm 10.pnpm 11 no longer reads the
pnpmfield from package.json. It warns:…and ignores it. CI's publish job runs pnpm 11, so it sees no overrides while the lockfile still records them, and the frozen install aborts:
The publish job dies in its "Bump version (patch)" step, so no release can go out until this is fixed.
Fix
Move the overrides verbatim from
package.jsonintopnpm-workspace.yaml, which both pnpm 10 (the lint job) and pnpm 11 (the publish job) read. The dependency fix itself was right; only its location was wrong.Verification
npx -y pnpm@11 install→ lockfile unchanged,lockfileVersion: '9.0'preservednpx -y pnpm@11 i --frozen-lockfile→ succeeds (Done in 510ms using pnpm v11.27.1)pnpm i --frozen-lockfilewith pnpm 10.33.0 → succeeds (Done in 1.1s using pnpm v10.33.0)js-yaml@4.1.1/brace-expansion@1.1.14in the lockfile;js-yaml@4.3.2andbrace-expansion@1.1.21presentpnpm run lint→ 0 errors🤖 Generated with Claude Code
https://claude.ai/code/session_013S4pYSjwUsiZtdtMMpW7bw