# `renovate-deps` | | | | ---------- | -------------------------------------------------------------------------------------------------------------------------- | | Project | [renovate-deps](https://docs.renovatebot.com/) | | Fix | yes | | Binary | `renovate` | | Scope | [native](../linters.md#scope-native) | | Patterns | `renovate.json renovate.json5 .github/renovate.json .github/renovate.json5 .renovaterc .renovaterc.json .renovaterc.json5` | | Run policy | adaptive — see [when does this run?](#when-does-this-run) | `renovate-deps` verifies that Renovate's dependency snapshot and update rules remain consistent. It does three related checks: 1. It verifies that `renovate-tracked-deps.json` next to the active Renovate config matches what Renovate currently extracts from the repo. 2. It checks that extracted dependencies which resolve to the same upstream package are covered consistently by Renovate package rules. 3. It checks that any extracted `extractVersion` still turns Renovate's resolved `currentVersion` into the tracked `currentValue`. The second and third checks are there to catch configuration mistakes before they show up as separate Renovate PRs, stalled updates, or README drift. ## Configuration and CI The check requires `renovate` in `[tools]`. To exclude managers from the snapshot and consistency checks, configure: ```toml [checks.renovate-deps] exclude_managers = ["github-actions", "github-runners"] ``` `renovate-deps` uses `GITHUB_COM_TOKEN` first, then `GITHUB_TOKEN`, then an authenticated GitHub CLI session so Renovate can authenticate GitHub requests. The `gh` hostname comes from `GITHUB_API_URL`: it defaults to `github.com`, maps `api.github.com` to `github.com`, and uses the host (including any port) for GitHub Enterprise Server URLs. Flint and the standalone `mise run lint:renovate-deps` task forward the selected token to Renovate as `GITHUB_COM_TOKEN`. In CI, the check fails when none is available; local runs warn. When `flint init` writes a new `flint.toml`, it includes the `[checks.renovate-deps]` section when this check is selected. ## When does this run? CI always runs `renovate-deps`. As an [adaptive check](../cli.md#adaptive-runs), a local `flint run` only runs it when the changed files plausibly affect the snapshot. `--full` or naming the linter explicitly bypass the skip. | Change | Local | CI | | ------------------------------------------------------------------- | ----- | --- | | Renovate config edited | ✅ | ✅ | | `renovate-tracked-deps.json` snapshot edited | ✅ | ✅ | | File already tracked in the snapshot edited | ✅ | ✅ | | New file matches an existing `customManagers[].managerFilePatterns` | ✅ | ✅ | | New tool/action added via a built-in manager (mise, GH Actions) | ❌ | ✅ | | Unrelated change (docs, source, etc.) | ❌ | ✅ | The new-file check works offline by matching changed paths against `managerFilePatterns` regexes/globs from the active config and any resolvable `extends` — inline entries, local file presets, Flint's own bundled `github>grafana/flint` preset, and cached `github>owner/repo` presets. `flint init` warms the GitHub preset cache when a `GITHUB_COM_TOKEN`, `GITHUB_TOKEN`, or authenticated GitHub CLI session is available; normal `flint run` never performs a network request. Cache-cold GitHub presets and presets from unsupported sources (`gitlab>`, npm, and HTTP URLs) are skipped, so those still only surface in CI. GitHub presets support the forms `github>owner/repo`, `github>owner/repo//path/to/preset.json`, and an optional `#ref` suffix. A preset without a path resolves `default.json`. Presets may extend other presets; resolution has a bounded depth and cycle guard. The "new tool not yet tracked" case (built-in managers, or a custom manager pattern flint couldn't resolve offline) is the typical reason a CI failure won't reproduce locally without `--full`. ## What it catches It also catches stale or overly generic `extractVersion` rules. For example, if Renovate resolves a current upstream tag like `@biomejs/biome@2.4.12` but the configured `extractVersion` is still `^v?(?.+)`, Flint will flag that the regex no longer extracts the tracked `currentValue` (`2.4.12`). Goal: `mise.toml` and `README.md` both refer to actionlint, so you want Renovate to treat them as the same dependency and keep them in the same group. A setup can fail that goal by extracting different dependency names for the same upstream package: ```json5 { packageRules: [ { groupName: "linters", matchDepNames: ["actionlint"], }, ], customManagers: [ { customType: "regex", managerFilePatterns: ["/^README\\.md$/"], datasourceTemplate: "github-releases", depNameTemplate: "rhysd/actionlint", }, ], } ``` Where it fails: - `mise.toml` extracts `actionlint` - `README.md` extracts `rhysd/actionlint` - the `linters` rule matches only `actionlint` Renovate can now stop grouping those occurrences consistently and update them separately. `renovate-deps` reports that mismatch earlier, at config-check time. ## Preset compatibility note `default.json` now describes Flint's current Renovate behavior only. It does not include the legacy regex managers some v1-era repos used to update SHA-pinned `raw.githubusercontent.com/...//... # vX.Y.Z` references or `*_VERSION` variables in `mise.toml`. Repos that still need those updates should keep repo-local custom managers for them when extending the shared preset. ## Preferred pattern When a custom manager needs a different lookup identity than the grouping name, set both values explicitly: ```json5 { customType: "regex", datasourceTemplate: "github-releases", depNameTemplate: "actionlint", packageNameTemplate: "rhysd/actionlint", } ``` Why: - `depNameTemplate` controls the extracted dependency name Flint uses for rule matching comparisons - `packageNameTemplate` keeps the datasource lookup pointed at the real upstream package The same pattern applies to entries like: ```json5 depNameTemplate: "github:koalaman/shellcheck", packageNameTemplate: "koalaman/shellcheck", ``` ## Snapshot shape The committed `renovate-tracked-deps.json` snapshot lives next to the active Renovate config: - `.github/renovate-tracked-deps.json` for `.github/renovate.json5` - `renovate-tracked-deps.json` for root-level configs such as `.renovaterc.json` It stores only the stable metadata Flint needs for these checks: - `files`: extracted dependency names by file and manager - `meta`: stable package metadata used for rule-coverage validation - `actionMeta`: stable identity and ref-shape metadata for reusable GitHub Actions, keyed by the complete `package/path` target Lookup-only fields such as `currentVersion`, `currentValue`, and `extractVersion` are used transiently during validation and autofix, but are stripped before Flint compares or writes the committed snapshot. This keeps `renovate-tracked-deps.json` stable across routine version changes. ## Fixing failures If the snapshot is stale: ```bash flint run --fix renovate-deps ``` Verification (plain `flint run`) uses Renovate's cheap `--dry-run=extract` plus the committed snapshot's metadata. `--fix` regenerates via `--dry-run=lookup` so meta is authoritative. For monorepo GitHub Actions, `actionMeta` keeps the action path separate from the shared package name. Semver-like refs record their optional compatibility prefix (for example, `create-github-app-token/v0.2.2` records compatibility `create-github-app-token`, while `v0.2.2` records no prefix), and branch refs record the ref (for example, `main`). Comparing these shapes catches a namespace change without changing the snapshot for ordinary version bumps in the same namespace. Lookup remains responsible for transient ref-to-commit and digest checks; the stable snapshot does not contain a digest that would change on every update. When Flint can infer a better `extractVersion` directly from Renovate's resolved `currentVersion` and `currentValue`, `--fix` also appends a targeted `packageRules` override for the affected `depName` and retries the lookup. The linter requires every dep referenced by a `packageRule` to have `packageName`; deps matched via `matchPackageNames` additionally require `datasource` so Renovate's `(packageName, datasource)` grouping is deterministic. `matchDepNames` rules don't require datasource — bare-key mise tools like `biome` don't always surface one even in lookup-mode output, and Renovate matches them by name regardless. If rule coverage is inconsistent: - normalize equivalent deps to one canonical `depNameTemplate` - keep `packageNameTemplate` explicit when datasource lookup needs a different identifier - make sure the intended `packageRules` matcher covers that canonical dependency name