Skip to content

Prevent Renovate from rewriting pnpm peer catalog ranges#1568

Merged
stipsan merged 2 commits into
mainfrom
cursor/renovate-ignore-peer-catalog-690f
Jul 14, 2026
Merged

Prevent Renovate from rewriting pnpm peer catalog ranges#1568
stipsan merged 2 commits into
mainfrom
cursor/renovate-ignore-peer-catalog-690f

Conversation

@stipsan

@stipsan stipsan commented Jul 13, 2026

Copy link
Copy Markdown
Member

Problem

Renovate keeps rewriting the manually curated ranges in the catalogs.peer section of pnpm-workspace.yaml#1566 bumps styled-components: ^6.1 to ^6.4.3, and #1564 (closed unmerged) rewrote react/react-dom from ^19.2 to ^19.2.7. Those ranges are intentionally wider than the default catalog: they declare what consumers may use, so they must only change through deliberate, manual edits.

This happens because the shared github>sanity-io/renovate-config:strategy preset only applies rangeStrategy: widen to the peerDependencies depType, while pnpm catalog entries get the dynamic depType pnpm.catalog.peer — which falls through to the default rangeStrategy: bump.

Fix

Add a packageRules entry to .github/renovate.json that disables Renovate entirely for matchDepTypes: ["pnpm.catalog.peer"]. Repo-level packageRules are appended after preset rules, so this rule wins. The default catalog (pnpm.catalog.default) is unaffected.

Once this lands on main (Renovate reads config from the default branch), the next Renovate run should autoclose #1566 since its update is no longer wanted. It also stops #1564 from coming back: closing that PR only ignored the exact ^19.2.7 update, so Renovate would have opened a fresh PR for the next react patch release — now peer-catalog entries are skipped entirely.

Also documents the policy in the peer catalog section of AGENTS.md.

Verification

Ran renovate --platform=local dry runs against this repo with the old and new config (comparison below): before, the react, react-dom (= #1564), and styled-components (= #1566) peer entries would be rewritten; after, all four peer entries report skipReason: "disabled", and the only branches dropped from Renovate's plan are the two peer-catalog-only ones (renovate/styled-components-6.x, renovate/react-monorepo) — the other 66 branches are untouched.

Renovate dry-run before/after comparison

  • renovate-config-validator .github/renovate.json
  • renovate --platform=local dry run before/after comparison
  • pnpm format
  • pnpm lint
  • pnpm knip
  • pnpm build
  • pnpm test run --changed origin/main (no affected packages — config/docs only, so no changeset needed)

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

cursoragent and others added 2 commits July 13, 2026 21:50
Co-authored-by: Cody Olsen <stipsan@users.noreply.github.com>
Co-authored-by: Cody Olsen <stipsan@users.noreply.github.com>
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
plugins-studio Ready Ready Preview, Comment Jul 13, 2026 10:00pm

Request Review

@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ad38323

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@stipsan stipsan added the 🤖 bot label Jul 13, 2026 — with Cursor
@stipsan
stipsan marked this pull request as ready for review July 14, 2026 00:54
@stipsan
stipsan requested a review from a team as a code owner July 14, 2026 00:54
@stipsan
stipsan requested review from bjoerge and Copilot and removed request for a team July 14, 2026 00:54
@stipsan
stipsan enabled auto-merge (squash) July 14, 2026 00:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates repo-level Renovate configuration to prevent automated edits to pnpm’s peer catalog ranges, which are intentionally curated to reflect consumer-supported peer ranges rather than the workspace’s pinned versions.

Changes:

  • Disable Renovate updates for the pnpm.catalog.peer depType via a repo-level packageRules entry.
  • Document the “peer catalog is manually curated and must not be rewritten” policy in AGENTS.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
AGENTS.md Documents that catalogs.peer ranges are intentionally wider and that Renovate is configured to never rewrite them.
.github/renovate.json Adds a packageRules entry disabling Renovate for matchDepTypes: ["pnpm.catalog.peer"].

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@stipsan
stipsan merged commit 310a9ca into main Jul 14, 2026
15 checks passed
@stipsan
stipsan deleted the cursor/renovate-ignore-peer-catalog-690f branch July 14, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants