Skip to content

fix: separate allowedVersions into its own packageRule#8420

Merged
Devinwong merged 2 commits intomainfrom
fix/renovate-allowedversions-separate-rule
Apr 28, 2026
Merged

fix: separate allowedVersions into its own packageRule#8420
Devinwong merged 2 commits intomainfrom
fix/renovate-allowedversions-separate-rule

Conversation

@Devinwong
Copy link
Copy Markdown
Collaborator

Problem

PR #8418 introduced allowedVersions combined with matchUpdateTypes in the same packageRule, which Renovate does not allow. This caused a config validation error:

packageRules cannot combine both matchUpdateTypes and allowedVersions

Fix

Moved allowedVersions: "!/~(alpha|beta|rc)/" into a separate packageRule that only uses matchPackageNames. Renovate merges all matching rules, so the version filter still applies to both patch and minor updates for these packages.

Validation

  • JSON is valid
  • No rule combines matchUpdateTypes + allowedVersions
  • Pre-release filtering still applies via rule merging

Renovate does not allow combining matchUpdateTypes and allowedVersions
in the same packageRule. Move the pre-release exclusion filter into a
dedicated rule that only uses matchPackageNames + allowedVersions.

This fixes the config validation error introduced in #8418.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a Renovate config validation error by separating allowedVersions into its own packageRules entry so it no longer conflicts with matchUpdateTypes, while still applying the pre-release filter via Renovate rule merging.

Changes:

  • Added a standalone packageRules entry applying allowedVersions: "!/~(alpha|beta|rc)/" to a specific set of packages.
  • Removed allowedVersions from the existing patch and minor rules that use matchUpdateTypes.

Add rule #10 to the renovate.json syntax guardrails in copilot
instructions, documenting that matchUpdateTypes and allowedVersions
cannot be combined in the same packageRules entry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Devinwong Devinwong force-pushed the fix/renovate-allowedversions-separate-rule branch from 4f267af to 8b708b9 Compare April 28, 2026 20:14
@Devinwong Devinwong enabled auto-merge (squash) April 28, 2026 20:25
@Devinwong Devinwong merged commit 1f1a911 into main Apr 28, 2026
21 checks passed
@Devinwong Devinwong deleted the fix/renovate-allowedversions-separate-rule branch April 28, 2026 20:27
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.

3 participants