feat!: consolidate the general-purpose presets into default.json - #89
Conversation
|
Added a guard, after considering whether release-please should stamp the version onto the nested refs instead. Why not stamping. It would work, and it would be more general than inlining, but release-please cannot do it natively. The What stamping was right about. Inlining only works because the nesting is one level deep, and nothing enforced that. A sibling
The check covers
|
b039f88 to
a59f243
Compare
|
Switched from inlining to stamping. Superseded approach is in the force-pushed history; the PR description now reflects what is here. Correcting myself twice on the way: |
a59f243 to
112bae1
Compare
|
Back to inlining, now with Checked Renovate's parser rather than the docs: Also withdrawing something I said earlier in this thread: renovatebot/renovate#15464 is about multiple presets inside one file, not about presets extending presets, so it was not evidence either way. |
112bae1 to
9238e81
Compare
A `#tag` on a preset reference does not propagate to references made inside that preset, and Renovate has no relative or self-referencing preset syntax: parsePreset resolves every reference to an absolute source, repo, path and tag. default.json listed its siblings untagged, so Renovate resolved every one of them from the default branch no matter what tag a consumer pinned. The pin covered the entry point and nothing else, and #86 moving files under apps/ broke every previously published tag at once. Fold config/, managers/, overrides/ and policies/ into default.json. It is one self-contained preset now, so a tag pins all of it, the directory layout stops being a public API that no tag can stop depending on, and the general -purpose presets cost one fetch instead of thirteen. The only references left are stock presets that ship inside Renovate. apps/ is untouched. Splitting the defaults from opt-in application presets is the point of the repo, and only the defaults needed consolidating. The scripts, mise tasks and CI steps that generated and checked default.json go too. There is no generated file left to drift or to diff against its sources. The rationale that lived in JSON5 comments moves into the `description` of the rule it explains, which is the only prose strict JSON carries and shows up in resolved config. The resolved config is unchanged apart from those description edits, verified by running Renovate's own resolveConfigPresets over the bare reference on main and on this branch and diffing. BREAKING CHANGE: the general-purpose presets no longer exist as individual files. Extending github>home-operations/renovate-presets//policies/zer0ver.json5 or any other path under config/, managers/, overrides/ or policies/ stops resolving; extend the repo itself instead. ignorePresets can no longer drop one of them out of the bundle. apps/ presets are unaffected. Signed-off-by: Devin Buhl <devin@buhl.casa>
9238e81 to
b5d034b
Compare
…ts (6.0.0 ➔ 7.0.0) (#9) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [home-operations/renovate-presets](https://github.com/home-operations/renovate-presets) | major | `6.0.0` → `7.0.0` | --- ### Release Notes <details> <summary>home-operations/renovate-presets (home-operations/renovate-presets)</summary> ### [`v7.0.0`](https://github.com/home-operations/renovate-presets/blob/HEAD/CHANGELOG.md#700-2026-08-08) [Compare Source](home-operations/renovate-presets@6.0.0...7.0.0) ##### ⚠ BREAKING CHANGES - consolidate the general-purpose presets into default.json ([#​89](home-operations/renovate-presets#89)) ##### Features - consolidate the general-purpose presets into default.json ([#​89](home-operations/renovate-presets#89)) ([8f8e06a](home-operations/renovate-presets@8f8e06a)) </details> --- ### Configuration 📅 **Schedule**: (in timezone America/New_York) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC43LjQiLCJ1cGRhdGVkSW5WZXIiOiI0NC43LjQiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbInJlbm92YXRlL2dpdGh1Yi1yZWxlYXNlIiwidHlwZS9tYWpvciJdfQ==--> Reviewed-on: https://git.greyrock.io/greyrock-labs/renovate-config/pulls/9
Problem
A
#tagon a preset reference does not propagate to references made inside that preset, and Renovate has no relative or self-referencing preset syntax:parsePreset(config/presets/parse.js:70-88) resolves every reference to an absolute source, repo, path and tag.default.jsonlisted its siblings untagged, so Renovate resolved every one of them from the default branch regardless of what tag a consumer pinned. Two consequences:#5.0.0was runningmain's preset bodies, and had been all along.apps/, breaking every previously published tag at once:default.json@5.0.0still asksmainformanagers/cnpg.json5. Downstream sawCannot find preset's package (...). Note: this is a *nested* presetand Renovate stopped opening PRs entirely (example: Action Required: Fix Renovate Configuration onedr0p/home-ops#11489).Change
config/,managers/,overrides/andpolicies/are folded intodefault.json. It is one self-contained preset now, so a tag pins all of it and the layout stops being something no published tag can stop depending on.apps/is untouched. Separating the defaults from opt-in application presets is the point of the repo; only the defaults needed consolidating, and they were always consumed as a set.This also drops the general-purpose presets from thirteen fetches to one. The only references left are stock Renovate presets, which resolve from inside the binary rather than over the network:
scripts/, thegenandverifymise tasks, and the CI steps that regenerated and cross-checkeddefault.jsonare all removed. There is no generated file left to drift or to diff against its sources.Rationale that lived in JSON5 comments moves into the
descriptionof the rule it explains, which is the only prose strict JSON carries and which surfaces in resolved config. Nothing was dropped.Verification
Both refs run through Renovate's own
resolveConfigPresetsand diffed. The entire difference is the three description edits above:Ignoring
descriptionfields the two resolved configs are equal, and the counts match: 733packageRules, 4customManagers, 1registryAliases, samedependencyDashboardTitle.mise run lint,mise run validateover all 8 remaining configs, actionlint and zizmor are clean.Breaking
The general-purpose presets no longer exist as individual files. Extending
//policies/zer0ver.json5, or any other path underconfig/,managers/,overrides/orpolicies/, stops resolving. Extend the repo itself instead.ignorePresetscan no longer drop one of them out of the bundle, whichshouldResolvePresetdid allow while they were separate references.apps/presets are unaffected and stay individually opt-in.Tags at or below 6.0.0 are not repaired; their
default.jsonwill askmainformanagers/cnpg.json5forever. Fixing that would mean restoring the moved paths as shims. Deliberately skipped: the broken-config issue Renovate files is loud enough to drive an upgrade.