Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 35 additions & 70 deletions renovate.json5
Original file line number Diff line number Diff line change
@@ -1,89 +1,54 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",

// best-practices over recommended mainly for helpers:pinGitHubActionDigests.
// ci.yml already SHA-pins actions by hand, but a hand-pinned SHA is frozen
// forever: we get the supply-chain benefit and none of the security updates.
// The preset keeps the pin *and* moves it.
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
"config:best-practices",
"schedule:weekly",
'config:best-practices',
'schedule:weekly',
],

// Cooldown against compromised uploads. The npm attack pattern is a malicious
// patch release that gets detected and unpublished within hours to a few days,
// so a 7-day window means we never see it.
//
// Both settings are required. minimumReleaseAge alone only marks an internal
// check as pending — Renovate still opens the PR, and with automerge enabled
// that PR can merge itself the moment the check flips green, unreviewed.
// "strict" suppresses the PR entirely until the version is old enough, which
// turns the cooldown from a delay into an actual filter.
minimumReleaseAge: "7 days",
internalChecksFilter: "strict",

// The cooldown above would also delay a release that exists to *fix* a CVE,
// making us less safe against the likelier threat. Security updates therefore
// skip the age rule and the weekly schedule. Requires Dependabot alerts to be
// enabled on the repo — without that, this fast-path never fires.
minimumReleaseAge: '7 days',
internalChecksFilter: 'strict',
vulnerabilityAlerts: {
minimumReleaseAge: null,
schedule: ["at any time"],
schedule: [
'at any time',
],
},
dependencyDashboard: {
enabled: true,
},

// Kept on deliberately: with internalChecksFilter "strict", some updates are
// intentionally invisible. Without the dashboard, "no pending updates" and
// "three updates suppressed" look identical.
dependencyDashboard: true,

packageRules: [
// Every dependency here is a devDependency, nothing ships to a consumer,
// and the package is not published to npm — so the blast radius of a bad
// automerge is "CI is red on main and we revert", not "users are broken".
{
matchManagers: ["npm"],
matchDepTypes: ["devDependencies"],
matchUpdateTypes: ["patch", "minor"],
matchManagers: [
'npm',
],
matchDepTypes: [
'devDependencies',
],
matchUpdateTypes: [
'patch',
'minor',
],
automerge: true,
},
{
matchManagers: ["github-actions"],
matchUpdateTypes: ["digest", "patch", "minor"],
matchManagers: [
'github-actions',
],
matchUpdateTypes: [
'digest',
'patch',
'minor',
],
automerge: true,
},

// hunkdiff is the one dependency CI cannot vouch for. It is imported as
// `import type` in the extension itself (index.ts, src/ui/session.ts), so
// that much is erased at compile time and only `tsc --noEmit` covers it,
// for the 4 interfaces we name. The exception is test/manifest.test.ts,
// which imports HUNK_EXTENSION_API_VERSION as a *value* — that one module
// is really evaluated under `bun test`. Nothing else here changes
// behaviour with the version. It is also 0.x, where Renovate calls
// 0.20 -> 0.21 a "minor" even though that is breaking by convention, and
// where the extension API generation advances (0.20 declares 8, 0.21
// declares 16) and drags our stated minimum Hunk version with it. Green CI
// means very little: read the release notes and load the extension in Hunk
// before merging. The `hunkdiff-upgrade` skill is that procedure.
//
// No automerge, and deliberately no cooldown either. The global 7-day
// minimumReleaseAge plus schedule:weekly put this PR 7-14 days behind the
// release, and every one of those days is spent not reading release notes
// we could have read on day one. Nothing merges itself here — the bump is
// finished by hand on a separate branch, and this PR serves mainly as the
// notification that a release happened. The cost we accept: CI runs
// `bun install` and evaluates that one module on the day the PR opens,
// rather than a week later. No trustedDependencies is set, so bun does not
// run install scripts.
//
// Listed last so it overrides the devDependencies rule above.
{
matchPackageNames: ["hunkdiff"],
matchPackageNames: [
'hunkdiff',
],
automerge: false,
// null opts out of the global cooldown, which also clears
// internalChecksFilter "strict" — with no pending age check there is
// nothing left for it to suppress.
minimumReleaseAge: null,
schedule: ["at any time"],
schedule: [
'at any time',
],
},
],
}
Loading