Skip to content

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

Merged
jbdevprimary merged 1 commit into
mainfrom
chore/pnpm-overrides-forward-compatible
Jul 27, 2026
Merged

chore(deps): move pnpm overrides to pnpm-workspace.yaml#62
jbdevprimary merged 1 commit into
mainfrom
chore/pnpm-overrides-forward-compatible

Conversation

@jbdevprimary

Copy link
Copy Markdown
Contributor

The transitive security overrides lived in a pnpm field in package.json. pnpm 10.33 reads that, so they work today — but pnpm 11 ignores the field outright and silently, with no warning or error. engines.pnpm is ">=10", so a pnpm 11 bump is permitted and would leave every override inert while the repo still looked patched.

A security control that fails silently is worse than an absent one, so this removes the latent trap rather than relying on nobody bumping pnpm.

Change

All ten overrides moved to pnpm-workspace.yaml, which both pnpm 10 and 11 honour — verified empirically with pnpm 10.33 before making the change (a probe with the override only in pnpm-workspace.yaml resolved svgo@3.3.4, not the requested 3.3.3).

Behaviour-preserving: pnpm-lock.yaml is byte-identical after the move, and its overrides: block still records all ten.

The overrides are load-bearing, not decorative

Proven by control test — strip them, re-resolve, and vulnerable versions come back:

package with overrides without verdict
sharp 0.35.3 0.34.5, 0.35.3 blocks 0.34.5 (high, < 0.35.0)
svgo 3.3.4 3.3.4, 4.0.2 tightens tree
others at/above floor at/above floor currently redundant, kept as a floor

CI guard so this cannot regress

Fails the build if a pnpm field reappears in package.json, if the overrides block goes missing, or if any declared override is absent from the resolved lockfile — i.e. declared but not actually taking effect.

Tested all three failure modes plus the passing case:

TEST A (correct state)      -> passes, all 10 present in lockfile
TEST B (pnpm field returns) -> caught
TEST C (override not in lock)-> caught

Verification

pnpm install --frozen-lockfile OK · build green · node 2/2 · ruby 5/5 · homebrew + scoop validators pass.

The transitive security overrides lived in a `pnpm` field in package.json.
pnpm 10.33 reads that, so they work today — but pnpm 11 ignores the field
outright and SILENTLY, with no warning or error. `engines.pnpm` is ">=10",
so a pnpm 11 bump is permitted and would leave every override inert while
the repo still looked patched. A security control that fails silently is
worse than an absent one.

Moved all ten overrides to pnpm-workspace.yaml, which both pnpm 10 and 11
honour. Verified behaviour-preserving: pnpm-lock.yaml is byte-identical
after the move, and its `overrides:` block still records all ten.

Adds a CI guard so this cannot regress: it fails if a `pnpm` field
reappears in package.json, if the overrides block goes missing, or if any
declared override is absent from the resolved lockfile — i.e. declared but
not taking effect. Tested all three failure modes plus the passing case.

Verified the overrides are load-bearing rather than decorative: removing
them and re-resolving reintroduces sharp 0.34.5 (high, < 0.35.0) and an
extra svgo 4.0.2. With them, every package resolves to a single version at
or above its advisory floor.
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jbdevprimary, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: dd9c8d93-c172-4da5-bc92-88b7d0ffe95f

📥 Commits

Reviewing files that changed from the base of the PR and between 0bd45f7 and 1d1cee5.

📒 Files selected for processing (3)
  • .github/workflows/validate-packages.yml
  • package.json
  • pnpm-workspace.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/pnpm-overrides-forward-compatible

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR successfully migrates pnpm overrides to ensure forward compatibility with pnpm 11. The approach is sound: moving security-critical overrides from the silently-ignored package.json location to pnpm-workspace.yaml, which both pnpm 10 and 11 honor. The byte-identical lockfile confirms behavior preservation, and the CI guard prevents regression by enforcing that overrides remain in the correct location and take effect in the resolved dependency tree.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@jbdevprimary
jbdevprimary merged commit 9fc19cb into main Jul 27, 2026
9 of 10 checks passed
@jbdevprimary
jbdevprimary deleted the chore/pnpm-overrides-forward-compatible branch July 27, 2026 06:35
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.

1 participant