Skip to content

Commit

Permalink
Fix renovate config to recognize @aws-cdk/cli-lib-alpha versions (#353)
Browse files Browse the repository at this point in the history
Renovate can't handle the alpha versioning scheme used by
`@aws-cdk-cli-lib-alpha`
When given `^2.178.1-alpha.0` it reads the `-alpha.0` as a `prerelease`
which means it marks the update as "unstable". For "unstable" updates
renovate only recognizes bumps to the `prerelease` portion, so it would
recognize `2.178.1-alpha.2`, but not `2.179.0-alpha.0`.
(it expects major.minor.patch to always be the same)

To handle this, we tell renovate how to read the versioning. The
important part
is that we switch the `-alpha.0` to be read as the `compatibility` part
instead of `prerelease`

see https://docs.renovatebot.com/modules/versioning/regex/
  • Loading branch information
corymhall authored Feb 21, 2025
1 parent 0161b44 commit 75a72ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
matchDataSource: ["npm"],
matchPackageNames: ["@aws-cdk/cli-lib-alpha"],
matchDepTypes: ["dependencies"],
// renovate can't handle the alpha versioning scheme (it expects major.minor.patch to always be the same)
// In this case it is the `-alpha.0` that always stays the same
// Here we tell renovate how to read the versioning. The important part
// is that we switch the `-alpha.0` to be the `compatibility` part instead of `prerelease`
// see https://docs.renovatebot.com/modules/versioning/regex/
versioning: "regex:^(?<major>\\d+)\\.((?<minor>\\d+))\\.((?<patch>\\d+))-(?<compatibility>.*)$",
},
]
}

0 comments on commit 75a72ce

Please sign in to comment.