Enable Renovate's bun manager and weekly lock file maintenance #252
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck#252
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The web build prints
Browserslist: browsers data (caniuse-lite) is N months oldduringRUN bun run buildin the Dockerfile'sweb-buildstage (Dockerfile:51).apps/web/postcss.config.cjsenablesautoprefixer, which calls browserslist; with nobrowserslistkey or.browserslistrcanywhere in the repo it resolves against thedefaultsquery using thecaniuse-liteversion pinned in the lockfile (bun.lock:566,caniuse-lite@1.0.30001793). The warning fires purely on the release date of that pinned package.Fixing this inside the Dockerfile is wrong: the only in-build fix would rewrite the lockfile during the image build, which contradicts
bun install --frozen-lockfile(Dockerfile:43andDockerfile:160) and makes builds non-reproducible. The fix belongs to dependency maintenance, i.e. Renovate.Renovate cannot do it today, for two independent reasons:
caniuse-liteis a transitive dependency — nothing inpackage.json,apps/web/package.json, or any other workspace manifest names it — and Renovate only raises updates for declared dependencies. The sole Renovate feature that advances transitive deps islockFileMaintenance, which re-resolves the whole lockfile within the existing semver ranges.config:recommended(.renovaterc:4) leaves it disabled..renovaterc:16-22restrictsenabledManagerstonpm,dockerfile,github-actions,custom.regex,renovate-config. The manager that ownsbun.lock— and that implementslockFileMaintenancefor it — isbun, which is absent from that list. Renovate's bun manager documentation (https://docs.renovatebot.com/modules/manager/bun/) states it supportslockFileMaintenanceforbun.lockbandbun.lock, delegated tobunrun as an external command.A likely second symptom of (2): with the bun manager disabled, the npm manager picks up the
package.jsonfiles and would edit semver ranges without regeneratingbun.lock, sobun install --frozen-lockfilefails for such a branch in both CI (.github/workflows/ci.yml:37-38) and the Docker build. This is unverified — confirm first:git_log --author renovatereturns no commits, norenovate/branches exist locally, and a PR search forchore(deps)/fix(deps)returns nothing, so Renovate appears to have never opened a pull request in this repository. AddingbuntoenabledManagersresolves this case regardless of whether it has already occurred.End state:
.renovatercenables thebunmanager and weeklylockFileMaintenance, so achore(deps): lock file maintenancepull request refreshesbun.lock—caniuse-liteincluded — every Monday, gated by the existing CI matrix and merged by hand.Plan
Approach
Both edits are to the single file
.renovatercand are independent of each other; apply them in one pass. No other file changes..renovatercis JSON (no comments permitted — it has none today, and$schemaon line 2 ishttps://docs.renovatebot.com/renovate-schema.json), so preserve its 2-space indentation.Let Renovate manage
bun.lock. Add the string"bun"to theenabledManagersarray at.renovaterc:16-22, positioned immediately after"npm". Resulting array, verbatim:Keep
"npm". It is not redundant and it does not cause duplicate pull requests: the bun manager's documentation specifies that apackage.jsonappearing in the bun manager's results is excluded from the npm manager's results unless an npm/pnpm/Yarn lock file is also found, and this repo has onlybun.lockat the root. Retaining"npm"keeps coverage for any manifest the bun manager does not claim.Enable weekly lock file maintenance. Add a top-level
lockFileMaintenanceobject directly after theenabledManagersarray and before"customManagers"(.renovaterc:23), verbatim:Do not add a
schedulekey here. Renovate's own default forlockFileMaintenanceis["before 4am on monday"], evaluated in the repo's configuredtimezone(Europe/Berlin,.renovaterc:11); writing it out would only duplicate a default and create a second place to keep in sync.Do not add
automerge. Nothing in this repository automerges today, and the weekly refresh is reviewed by hand.Do not add
commitMessage*overrides. The repository's history is conventional-commit (chore:,feat(server):,fix(web):), which Renovate auto-detects, producingchore(deps): lock file maintenanceon branchrenovate/lock-file-maintenanceunder the existingbranchPrefix(.renovaterc:13).No
packageRulesentry is needed:lockFileMaintenanceas a top-level object applies wherever a supported lock file exists, which in this repo isbun.lockalone. Thedockerfile,github-actions,custom.regex, andrenovate-configmanagers have no lock files and are unaffected.Scope boundary: this plan does not touch the browserslist query itself —
apps/webdeliberately keeps no explicitbrowserslisttargets and continues to resolvedefaults.Critical files & anchors
.renovaterc— theenabledManagersarray (lines 16-22) and the gap before"customManagers"(line 23). The only file edited..forgejo/workflows/renovate.yml:38— pins the Renovate container torenovate/renovate:44.14.12; use that same version when validating the config so the validator matches the version that will consume it.Verification
Run from the repository root.
Config is valid for the exact Renovate version that runs it.
npx --yes --package renovate@44.14.12 renovate-config-validator .renovatercExpected observable output: a line containing
Validating .renovatercfollowed byConfig validated successfully, and exit status 0. A rejectedenabledManagersmember (e.g. a typo such as"buns") or a malformedlockFileMaintenanceobject makes the validator print an error and exit non-zero, which is the specific failure this check exists to catch. Requires network access to the npm registry;npxis present at/usr/bin/npx.The repository still installs cleanly — the edit touches no dependency, so the lockfile must be untouched:
bun install --frozen-lockfileExpected: completes without the
lockfile had changes, but lockfile is frozenerror, confirming the change is config-only.Post-merge observable (not runnable at implementation time, stated so the outcome is checkable later): on the first Monday after merge, the hourly Renovate workflow (
.forgejo/workflows/renovate.yml:4-5) opens a pull request titledchore(deps): lock file maintenancefrom branchrenovate/lock-file-maintenance, whose diff modifiesbun.lockand nopackage.json. Merging it advancescaniuse-litebeyond1.0.30001793(bun.lock:566) and the browserslist staleness warning disappears from theweb-buildstage output ofdocker build -t omp-deck ..To observe it sooner, run the Renovate workflow out of schedule via its
workflow_dispatchtrigger (.forgejo/workflows/renovate.yml:10-28) withdryRun: fullandlogLevel: debug; the log then reports the lock file maintenance branch it would create without pushing it. Dispatching that workflow requires Forgejo Actions access, which is outside this plan's tooling — if it is unavailable, rely on the scheduled run.Assumptions & contingencies
renovate-config-validatorrejects"bun"as anenabledManagersmember (it will not for 44.14.12, where the bun manager is documented), do not drop the manager: instead pin the validator invocation to the version named in.forgejo/workflows/renovate.yml:38and re-run, since an older globally resolved Renovate is then the cause.lockFileMaintenanceagain — the failure is a genuine incompatibility inside an existing semver range, and the fix belongs in the offending dependency's constraint in the relevantpackage.json.