Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Renovate config to avoid JSON5 #1753

Merged
merged 4 commits into from
Jan 15, 2025
Merged

Conversation

gabrielfeo
Copy link
Member

@gabrielfeo gabrielfeo commented Jan 14, 2025

In #1742, Renovate was set up with a more usual standard regex matcher configuration, which is to search for versions in lines annotated with a comment // renovate: .... However, the versions.json file is parsed by several tools which don't support JSON5 or any form of comments, namely Groovy's json package and jq. Groovy json required using a lenient mode (#1742), which may suppress useful validations, while jq required stripping the comments beforehand (#1752). Moving away from JSON5 would be a simpler solution.

Revert the versions.json back from JSON5 to plain JSON and change the Renovate config to match the version properties based on the fact that their values are lists, e.g. "8.8.0": [. Matching the version in gradle.properties is also simplified to no longer require a comment.

Tested with a dry-run of gradle/renovate-agent against this repo and the Renovate GitHub app against a fork, which created an example PR.

@gabrielfeo gabrielfeo force-pushed the gf/renovate-no-comments branch from 4f9fb1e to 2d455f2 Compare January 14, 2025 12:50
@gabrielfeo gabrielfeo marked this pull request as ready for review January 14, 2025 13:02
@gabrielfeo gabrielfeo requested a review from a team January 14, 2025 13:05
.github/renovate.json5 Outdated Show resolved Hide resolved
Copy link
Member

@erichaagdev erichaagdev left a comment

Choose a reason for hiding this comment

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

Looks good aside from this one minor thing.

.github/renovate.json5 Outdated Show resolved Hide resolved
@gabrielfeo gabrielfeo merged commit a6f20bc into main Jan 15, 2025
21 checks passed
@gabrielfeo gabrielfeo deleted the gf/renovate-no-comments branch January 15, 2025 11:14
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