Skip to content

fix: use matchDepNames in Renovate package rules to pin prev_major_version to v3#520

Merged
fzipi merged 1 commit into
mainfrom
fix/renovate-prev-major-version-constraint
Jun 26, 2026
Merged

fix: use matchDepNames in Renovate package rules to pin prev_major_version to v3#520
fzipi merged 1 commit into
mainfrom
fix/renovate-prev-major-version-constraint

Conversation

@fzipi

@fzipi fzipi commented Jun 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Replaces matchPackageNames with matchDepNames in both Renovate package rules
  • Removes rangeStrategy: bump-minor from the v3 rule (no effect on pinned versions)

Problem

matchPackageNames matches the registry packageName, which is "coreruleset/coreruleset" for both custom managers. It never matched "coreruleset-v3" or "coreruleset-v4" (those are depName values set by depNameTemplate). As a result, the allowedVersions: "<4.0.0" constraint was silently ignored, and Renovate would propose v4 updates for prev_major_version.

matchDepNames matches depName, which is what the custom managers actually set — fixing the constraint.

Test plan

  • Verify Renovate dry-run no longer proposes a v4 update for prev_major_version
  • Verify Renovate still proposes v3 patch/minor updates for prev_major_version
  • Verify Renovate still proposes v4 updates for latest_major_version

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated automated dependency update settings for Core Rule Set packages.
    • Adjusted how one update rule matches packages and removed a minor version bump preference from that rule.
    • Kept the v4 update group unchanged.

matchPackageNames matches the registry packageName ("coreruleset/coreruleset"),
not the depName set by depNameTemplate. This meant the allowedVersions: "<4.0.0"
constraint was never applied to prev_major_version, allowing Renovate to propose
v4 updates for that field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ff99a8a1-dc47-4ac2-938d-87f04f9dd186

📥 Commits

Reviewing files that changed from the base of the PR and between 619c296 and 22c7dcb.

📒 Files selected for processing (1)
  • renovate.json

📝 Walkthrough

Walkthrough

The Renovate configuration updates the coreruleset-v3 rule to use matchDepNames and removes its rangeStrategy setting. The nearby coreruleset-v4 rule also uses matchDepNames.

Changes

Renovate config update

Layer / File(s) Summary
Selector key update
renovate.json
The coreruleset-v3 Renovate rule switches selector fields and drops rangeStrategy: "bump-minor"; the adjacent coreruleset-v4 rule uses matchDepNames.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 I hopped through the config with a twitchy nose,
Swapped my selectors where the Renovate grows.
No bump-minor carrot, just tidy new keys,
Hop-hop, little rules, updated with ease.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the Renovate rule change and its purpose to keep prev_major_version pinned to v3.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/renovate-prev-major-version-constraint

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.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 22c7dcb
Status: ✅  Deploy successful!
Preview URL: https://c8370f22.website-1u6.pages.dev
Branch Preview URL: https://fix-renovate-prev-major-vers.website-1u6.pages.dev

View logs

@fzipi fzipi enabled auto-merge June 25, 2026 07:14
@fzipi fzipi merged commit 8f887e9 into main Jun 26, 2026
3 checks passed
@fzipi fzipi deleted the fix/renovate-prev-major-version-constraint branch June 26, 2026 06:31
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