fix(deps): move pnpm overrides to pnpm-workspace.yaml - #308
Conversation
pnpm 11 no longer reads the `pnpm` field from package.json, so the js-yaml / brace-expansion overrides were silently ignored while the lockfile still recorded them. Frozen installs under pnpm 11 then abort with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH, which kills the publish job in its "Bump version (patch)" step and blocks all releases. Move the overrides verbatim into pnpm-workspace.yaml, which pnpm 11 does read. The lockfile is unchanged (lockfileVersion '9.0'), so the lint job's pinned pnpm 10 keeps working. 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 QodoMove pnpm overrides to workspace configuration
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. pnpm 11 override changes lack regression coverage
|
| overrides: | ||
| js-yaml@^4: '>=4.3.2 <5' | ||
| brace-expansion@^1: '>=1.1.16 <2' |
There was a problem hiding this comment.
1. Pnpm 11 override changes lack regression coverage 📘 Rule violation ▣ Testability
The dependency configuration moves the override declarations from package.json into pnpm-workspace.yaml without adding or modifying an automated test. A pnpm 11 frozen install could regress to ignoring the overrides and aborting with a lockfile configuration mismatch without any repository test detecting it.
Agent Prompt
## Issue description
The bug-fix PR moves the dependency overrides into `pnpm-workspace.yaml`, but it adds no automated regression test for pnpm 11 reading those overrides and completing a frozen install.
## Fix Focus Areas
- pnpm-workspace.yaml[8-10]
- package.json[36-37]
## Recommended Fix
Add an automated regression test that runs the supported pnpm 11 installation or validates the workspace override configuration and asserts that a frozen install succeeds with the patched transitive versions. Ensure the test would fail when the overrides are placed only in the removed `package.json` `pnpm` field.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Problem
The recent dependency sweep put the js-yaml / brace-expansion overrides into the
pnpm.overridesfield ofpackage.json, and regenerated the lockfile with pnpm 10.pnpm 11 no longer reads the
pnpmfield frompackage.json. It warns:and then ignores it. CI's publish job runs pnpm 11, so it sees no overrides while
the lockfile records them, and the frozen install aborts:
The publish job dies in its "Bump version (patch)" step, so this plugin cannot
release at all until this is fixed. The dependency fix itself is correct — only
its location was wrong.
Fix
Move the overrides verbatim from
package.jsonintopnpm-workspace.yaml, whichpnpm 11 does read. The override values are unchanged, and so is the lockfile
(
lockfileVersion: '9.0'), so the lint job's pinned pnpm 10 still works.Verification
npx -y pnpm@11 install→ lockfile unchanged, stilllockfileVersion: '9.0'npx -y pnpm@11 i --frozen-lockfile→ succeedspnpm i --frozen-lockfilewith pnpm 10.33.0 → succeedsjs-yaml@4.1.1orbrace-expansion@1.1.14in the lockfilepnpm run lint→ 0 errors🤖 Generated with Claude Code
https://claude.ai/code/session_013S4pYSjwUsiZtdtMMpW7bw