renovate-mcp 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -18
- package/dist/data/managers.generated.d.ts +1 -1
- package/dist/data/managers.generated.js +3 -2
- package/dist/data/migrations.generated.d.ts +15 -0
- package/dist/data/migrations.generated.js +104 -0
- package/dist/index.js +4 -1
- package/dist/lib/configLinter.d.ts +4 -1
- package/dist/lib/configLinter.js +380 -2
- package/dist/lib/configWriter.d.ts +40 -0
- package/dist/lib/configWriter.js +184 -0
- package/dist/lib/customManagerPreview.d.ts +28 -0
- package/dist/lib/customManagerPreview.js +263 -23
- package/dist/lib/migrationWorker.d.ts +22 -0
- package/dist/lib/migrationWorker.js +47 -0
- package/dist/lib/migrationWorkerImpl.d.ts +1 -0
- package/dist/lib/migrationWorkerImpl.js +11 -0
- package/dist/lib/renovateCli.d.ts +31 -7
- package/dist/lib/renovateCli.js +52 -8
- package/dist/lib/runtimeWarnings.d.ts +20 -0
- package/dist/lib/runtimeWarnings.js +37 -1
- package/dist/lib/setupCheck.d.ts +23 -0
- package/dist/lib/setupCheck.js +149 -8
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/tools/dryRun.d.ts +8 -0
- package/dist/tools/dryRun.js +176 -34
- package/dist/tools/dryRunDiff.js +48 -5
- package/dist/tools/lintConfig.js +1 -1
- package/dist/tools/migrateConfig.d.ts +2 -0
- package/dist/tools/migrateConfig.js +107 -0
- package/dist/tools/previewCustomManager.js +19 -6
- package/dist/tools/validateConfig.js +2 -2
- package/dist/tools/writeConfig.js +41 -4
- package/package.json +13 -2
package/README.md
CHANGED
|
@@ -22,21 +22,22 @@ An MCP server for designing [Renovate](https://github.com/renovatebot/renovate)
|
|
|
22
22
|
|
|
23
23
|
## What it does
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Twelve tools plus a preset reference:
|
|
26
26
|
|
|
27
27
|
| Tool | Purpose |
|
|
28
28
|
| --- | --- |
|
|
29
|
-
| `check_setup` | Report Renovate CLI + validator availability, versions, and install hints. Also surfaces a `platformContext` block (`RENOVATE_PLATFORM` / `RENOVATE_ENDPOINT` values, token-presence booleans, the platform `dry_run` would pick when its input is unset, and notes about likely misconfigurations) so callers can verify env before invoking `dry_run`. Token values are never echoed — only presence booleans. Also runs at startup. |
|
|
29
|
+
| `check_setup` | Report Renovate CLI + validator availability, versions, and install hints. Also surfaces a `platformContext` block (`RENOVATE_PLATFORM` / `RENOVATE_ENDPOINT` values, token-presence booleans, the platform `dry_run` would pick when its input is unset, and notes about likely misconfigurations) so callers can verify env before invoking `dry_run`. Token values are never echoed — only presence booleans. Compares the running Node version against the bundled Renovate's declared `engines.node` range and emits an actionable hint when they're incompatible — the same condition Renovate would otherwise log only as `Unsupported node environment` during a `dry_run`. Also runs at startup. |
|
|
30
30
|
| `get_version` | Report the renovate-mcp server version and whether it's a released build (running from `node_modules`) or a local/dev build (typically launched via `command: node` against a checkout). |
|
|
31
31
|
| `read_config` | Locate and parse a repo's Renovate config (`renovate.json`, `renovate.json5`, `.renovaterc*`, `package.json#renovate`, …) in priority order. |
|
|
32
32
|
| `resolve_config` | Expand every `extends` preset offline. Opt in to fetching `github>` / `gitlab>` presets over HTTPS with `externalPresets: true`. |
|
|
33
33
|
| `explain_config` | Inverse of `resolve_config`: walk the same preset tree but annotate every leaf field with the chain of presets that touched it. Each leaf is `{ value, setBy }` where `setBy` lists every contribution in merge order — last entry wins for scalars; for arrays each entry adds its own slice. Same offline-by-default behaviour and same `externalPresets` / `endpoint` / `platform` opt-ins as `resolve_config`. |
|
|
34
|
-
| `preview_custom_manager` | Preview a `customManagers` (regex)
|
|
34
|
+
| `preview_custom_manager` | Preview a `customManagers` entry (regex or JSONata) against a local repo — for regex, shows file/line hits and extracted dep info; for `customType: "jsonata"` (`fileFormat: "json" \| "yaml" \| "toml"`), parses the file structure and extracts deps from each `matchStrings` JSONata projection. Offline. |
|
|
35
35
|
| `validate_config` | Run `renovate-config-validator` against a file or inline object. |
|
|
36
|
-
| `lint_config` | Semantic lint
|
|
37
|
-
| `dry_run` | Run Renovate with `--dry-run` and return the structured JSON report. Defaults to `--platform=local` against `repoPath`; pass `platform` + `endpoint` + `token` + `repository` to run as a real GitHub/GitLab client (needed when the config extends `local>` presets on a private host). When `platform` is not passed, the tool reads `RENOVATE_PLATFORM` from the MCP server's env before defaulting to `local
|
|
38
|
-
| `dry_run_diff` | Semantic diff between two `dry_run` reports — `added` / `removed` / `changed` proposed updates plus a compact text rendering. Stateless; takes both reports as inputs. Useful when iterating on a config to see exactly what each tweak did. |
|
|
39
|
-
| `
|
|
36
|
+
| `lint_config` | Semantic lint pass: regex hygiene (`/…/` wrapping), unknown manager names, deprecated keys, automerge/extends/enabled correctness, packageRule completeness, and schedule sanity. Offline; complements `validate_config`. |
|
|
37
|
+
| `dry_run` | Run Renovate with `--dry-run` and return the structured JSON report. Defaults to `--platform=local` against `repoPath`; pass `platform` + `endpoint` + `token` + `repository` to run as a real GitHub/GitLab client (needed when the config extends `local>` presets on a private host). When `platform` is not passed, the tool reads `RENOVATE_PLATFORM` from the MCP server's env before defaulting to `local`; the response echoes `platformSource` (`input` / `env` / `default`) and `effectivePlatform`, and an advisory warning fires when env-derived platform is non-local so a surprising `gitlab`/`github` is never mysterious. Preflight error messages also tag the platform origin. When `token` is not passed, falls back to `RENOVATE_TOKEN` from MCP env, then to `GITLAB_TOKEN` (when `platform=gitlab`) or `GITHUB_TOKEN` (when `platform=github`) — auto-translated to `RENOVATE_TOKEN` for the spawned Renovate CLI, since Renovate itself only reads that one var. `repository` accepts GitHub-style `owner/repo` and GitLab nested-group paths like `group/subgroup/project`. `endpoint`/`token` also flow through in local mode so `gitlab>…` / `github>…` preset shortcuts can be redirected at a self-hosted host without setting up a full remote run. Two optional inputs handle reports that would exceed MCP response-content caps: `reportOutputPath` redirects the structured report to a file (mode 0600) and collapses `summary.report` to `{ reportPath, repoCount, updateCount }`, and `summaryOnly: true` strips per-repo update arrays from the inline payload (only meaningful with `reportOutputPath`). No PRs, no pushes. Emits MCP progress notifications during the run when the caller supplies a `progressToken`. When `token` or any `hostRules[].token` is passed inline, the result `warnings` array carries an advisory steering callers toward env-var auth (see [Secrets](#secrets) under Design notes). RE2 native-fallback noise and `Unsupported node environment` notices are filtered out of `reportErrors` — the former still surfaces under `warnings`, the latter under a separate `environmentWarnings` array — so `ok` reflects whether the run actually failed, not benign degradation. |
|
|
38
|
+
| `dry_run_diff` | Semantic diff between two `dry_run` reports — `added` / `removed` / `changed` proposed updates plus a compact text rendering. Stateless; takes both reports as inputs. Each side accepts either the inline report (raw `{ repositories }` or a full `dry_run` summary with a `report` key) or `{ reportPath: "<absolute path>" }` pointing at a file written by `dry_run`'s `reportOutputPath` — pair the two when reports would otherwise hit the inline truncation cap. Useful when iterating on a config to see exactly what each tweak did. |
|
|
39
|
+
| `migrate_config` | Apply Renovate's built-in config migrations (deprecated key renames like `masterIssue` → `dependencyDashboard`, template-variable rewrites, `packageRules` matcher consolidation, `host-rules` unification, …) and return the migrated config plus a unified diff. Does not write — chain with `write_config` to persist. Runs in an isolated worker thread (see [Design notes](#design-notes)); first call carries a one-time cold-load cost of a few seconds. |
|
|
40
|
+
| `write_config` | Validate, then atomically write a config to disk. When the target file already exists and parses as JSON-with-comments, edits go through a round-trip serializer (`jsonc-parser`) that preserves comments, key order, and trailing trivia; brand-new writes fall back to plain `JSON.stringify`. Refuses to save invalid configs unless `force: true` is paired with `confirmForce: "YES_OVERRIDE_VALIDATION"` — the literal sentinel makes accidental overrides under prompt-injected tool calls harder. Also refuses `.json5` files that use JSON5-only syntax (`reason: "json5-not-jsonc-compatible"`) and corrupted existing files (`reason: "existing-file-unparseable"`); `force: true` is the escape hatch and is a destructive rewrite that skips both validation and round-trip preservation. |
|
|
40
41
|
| `renovate://presets` (resource) | Markdown index of all 1000+ built-in presets grouped by namespace. |
|
|
41
42
|
| `renovate://presets/{namespace}` (resource template) | Markdown listing for a single namespace (e.g. `renovate://presets/config`) — cheaper than the full index. |
|
|
42
43
|
| `renovate://preset/{name}` (resource template) | Expanded JSON body for one preset (e.g. `renovate://preset/config:recommended`). |
|
|
@@ -47,8 +48,8 @@ See [Design notes](#design-notes) for implementation details (timeouts, safety c
|
|
|
47
48
|
|
|
48
49
|
- **Not a Renovate replacement.** This server doesn't open PRs, run scheduled updates, or execute in CI — it's a design-time companion for a local `renovate.json`. Use the real Renovate for the actual dependency-update pipeline.
|
|
49
50
|
- **`resolve_config` is preview-quality.** Preset expansion runs against a committed snapshot, and template substitution implements only positional `{{argN}}` placeholders — non-positional tokens and Handlebars helpers are flagged in `warnings` and pass through verbatim. For authoritative output, run `dry_run`.
|
|
50
|
-
- **`preview_custom_manager` is a subset of Renovate's
|
|
51
|
-
- **`validate_config` / `dry_run` aren't exercised in CI.**
|
|
51
|
+
- **`preview_custom_manager` is a subset of Renovate's custom managers.** It covers `customType: "regex"` (with `matchStringsStrategy` of `any` / `combination` / `recursive`) and `customType: "jsonata"` (with `fileFormat: "json" \| "yaml" \| "toml"`); each `matchStrings` JSONata expression may return an array of objects OR a single bare object (auto-wrapped to a one-element array, mirroring Renovate's own `QueryResultZod` schema). Numeric/boolean values in JSONata results are stringified for `{{groupName}}` template substitution; `null` / `undefined` / nested objects / arrays are dropped from the substitution bag. Template substitution is `{{groupName}}` only — full Handlebars helpers/conditionals are not implemented. Other custom types (e.g. `html`) are out of scope. Use it for fast iteration; confirm with `dry_run`.
|
|
52
|
+
- **`validate_config` / `dry_run` aren't exercised end-to-end in CI.** The bundled Renovate is available (it's a runtime dep), but the integration tests use fake binaries via `RENOVATE_BIN` / `RENOVATE_CONFIG_VALIDATOR_BIN` env overrides for determinism and speed. Run the tools locally against a real config to validate behaviour.
|
|
52
53
|
|
|
53
54
|
## Requirements
|
|
54
55
|
|
|
@@ -56,11 +57,12 @@ See [Design notes](#design-notes) for implementation details (timeouts, safety c
|
|
|
56
57
|
|
|
57
58
|
- Linux or macOS. Windows is not supported — `package.json` declares `"os": ["darwin", "linux"]`, so `npm i` surfaces an `EBADPLATFORM` warning on Windows, and the server exits with a clear stderr message at startup. Run on WSL2 or a Linux/macOS host instead.
|
|
58
59
|
- Node.js ≥ 24 (aligns with Renovate's own engine requirement).
|
|
59
|
-
|
|
60
|
+
|
|
61
|
+
Renovate ships bundled — the `renovate` package is a runtime dependency, so `validate_config`, `dry_run`, and `write_config` work out of the box with no separate install. The offline tools (`read_config`, `resolve_config`, `explain_config`, `preview_custom_manager`, `lint_config`) never spawn Renovate at all.
|
|
60
62
|
|
|
61
63
|
**Optional**
|
|
62
64
|
|
|
63
|
-
- `RENOVATE_BIN` / `RENOVATE_CONFIG_VALIDATOR_BIN` — override
|
|
65
|
+
- `RENOVATE_BIN` / `RENOVATE_CONFIG_VALIDATOR_BIN` — override the bundled binaries (e.g., to point at a different Renovate install). When set, the override always wins.
|
|
64
66
|
- `RENOVATE_MCP_REQUIRE_CLI=false` — suppress the startup "partial availability" notice when you only intend to use the offline tools.
|
|
65
67
|
- Platform env vars — `RENOVATE_PLATFORM`, `RENOVATE_ENDPOINT`, and a token (`RENOVATE_TOKEN` / `GITHUB_TOKEN` / `GITLAB_TOKEN`). Needed for `dry_run` against a remote platform and for `resolve_config` with `externalPresets: true`. See [Platform setup](#platform-setup) for the matrix and a worked example.
|
|
66
68
|
- Private-registry credentials for `dry_run` — whatever Renovate itself would need at lookup time (`COMPOSER_AUTH`, `NPM_TOKEN` / `.npmrc`, Docker registry creds, or a `RENOVATE_HOST_RULES` JSON blob). Alternatively encode these as `hostRules` in the Renovate config, or pass them per-call via the `hostRules` input on `dry_run` (no MCP restart needed). Per-call `hostRules` are appended to whatever the repo's own config declares. Values reach Renovate as JSON through the tool-call transport, so the calling LLM sees them in its context — prefer the env route if that matters. Without any of these, Renovate's lookup often returns 0 updates silently; `dry_run` scans its logs for auth failures and surfaces them under `problems`.
|
|
@@ -69,6 +71,16 @@ See [Design notes](#design-notes) for implementation details (timeouts, safety c
|
|
|
69
71
|
|
|
70
72
|
## Install
|
|
71
73
|
|
|
74
|
+
### Quick install
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
curl -fsSL https://raw.githubusercontent.com/tibuntu/renovate-mcp/main/install.sh | bash
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The script checks Node ≥ 24, asks whether you want `npx`-on-demand or a global install, runs an MCP `initialize` handshake to verify the binary works, and — when the Claude Code CLI is on PATH — auto-registers `renovate` in user scope via `claude mcp add`. Useful flags (pass after `bash -s --`): `--global`, `--npx`, `--no-mcp-add`, `--mcp-scope=user|project|local`, `--version=X.Y.Z`. The same flags are also accepted as env vars (`RENOVATE_MCP_GLOBAL=1`, `RENOVATE_MCP_NO_MCP_ADD=1`, `RENOVATE_MCP_VERSION=…`).
|
|
81
|
+
|
|
82
|
+
### Manual install
|
|
83
|
+
|
|
72
84
|
`npx` fetches the [published package](https://www.npmjs.com/package/renovate-mcp) on demand — no manual install needed. For local development, clone and build first:
|
|
73
85
|
|
|
74
86
|
```bash
|
|
@@ -178,10 +190,11 @@ Once the server is wired up, try prompts like these. They're written for Claude
|
|
|
178
190
|
- "Expand `github>acme/renovate-config//base` from our GitHub Enterprise at `https://github.acme.corp/api/v3`."
|
|
179
191
|
- "Dry-run `infrastructure/kubernetes/our-platform` (a nested-group GitLab project) so Renovate can fetch the `local>` presets the config extends."
|
|
180
192
|
|
|
181
|
-
**Authoring a custom manager (regex)**
|
|
193
|
+
**Authoring a custom manager (regex or JSONata)**
|
|
182
194
|
|
|
183
195
|
- "I have `# renovate: datasource=docker depName=...` comments above image tags in my Dockerfiles. Draft a `customManagers` regex entry and preview it against this repo so I can see what it extracts."
|
|
184
196
|
- "Here's a `customManagers` entry — preview it and tell me which files match, which lines hit each `matchStrings` regex, and what dep info gets extracted."
|
|
197
|
+
- "Draft a `customType: \"jsonata\"` customManager with `fileFormat: \"yaml\"` to extract Helm chart dependencies (`name`, `version`, `repository`) from `Chart.yaml`, and preview it against this repo."
|
|
185
198
|
|
|
186
199
|
**Validating, previewing, saving**
|
|
187
200
|
|
|
@@ -213,7 +226,7 @@ A transcript-style walkthrough: design a Dockerfile custom manager from scratch,
|
|
|
213
226
|
>
|
|
214
227
|
> **You:** Save it.
|
|
215
228
|
>
|
|
216
|
-
> **Claude** calls `write_config` on `renovate.json`. → validated, written atomically.
|
|
229
|
+
> **Claude** calls `write_config` on `renovate.json`. → validated, written atomically; because the file already existed and parsed as JSON-with-comments, the round-trip serializer preserved the surrounding comments and key order — only the `customManagers` slice was edited in place.
|
|
217
230
|
|
|
218
231
|
## Development
|
|
219
232
|
|
|
@@ -227,12 +240,16 @@ npm run test:watch # vitest watch mode
|
|
|
227
240
|
npm run test:coverage # vitest run --coverage (writes coverage/ report)
|
|
228
241
|
npm run generate:presets # regenerate src/data/presets.generated.ts from the renovate devDep
|
|
229
242
|
npm run generate:managers # regenerate src/data/managers.generated.ts from the renovate devDep
|
|
243
|
+
npm run generate:migrations # regenerate src/data/migrations.generated.ts from the renovate devDep
|
|
244
|
+
npm run check:snapshot-versions # fail if src/data/*.generated.ts is stale vs installed renovate devDep
|
|
230
245
|
```
|
|
231
246
|
|
|
232
|
-
The preset catalogue at `src/data/presets.generated.ts
|
|
247
|
+
The preset catalogue at `src/data/presets.generated.ts`, the manager-name list at `src/data/managers.generated.ts`, and the deprecated-key rename map at `src/data/migrations.generated.ts` are committed snapshots of Renovate's built-in presets, manager registry, and renamed-property map. Runtime code never imports the `renovate` package — only the `scripts/generate-*.mjs` scripts do. All three are wired into a `postUpgradeTasks` block in this repo's `renovate.json` so a Renovate bump auto-regenerates them on the bot's branch (assuming the operator's `RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS` permits `npm ci` and the three `npm run generate:*` commands); regenerate manually otherwise. `npm run check:snapshot-versions` (also run in CI) compares the `RENOVATE_VERSION` embedded in each generated file against `node_modules/renovate/package.json#version` and fails fast naming the stale file(s) and the `npm run generate:*` command to fix them.
|
|
233
248
|
|
|
234
249
|
CI runs `typecheck`, `build`, and `test:coverage` on Node 24 for every PR and push to `main` (see `.github/workflows/ci.yml`), across an OS matrix of `ubuntu-latest` and `macos-latest` with `fail-fast: false` so a platform-specific regression on either side surfaces. Coverage is uploaded as a per-run artifact from the Ubuntu job only (to avoid name collisions); no threshold is enforced yet. The Ubuntu job also re-runs `npm install --package-lock-only` and fails on a non-empty diff, catching drift between `package.json` root metadata (`os`, `engines`, `bin`, dep ranges) and `package-lock.json` that `npm ci` does not validate.
|
|
235
250
|
|
|
251
|
+
A separate scheduled workflow (`.github/workflows/nightly-real-renovate.yml`) runs daily at 04:17 UTC, installs `renovate@latest` on top of `npm ci`, and re-runs the full suite. It's an upstream-drift signal — failures notify the maintainer by email and do not gate per-PR CI.
|
|
252
|
+
|
|
236
253
|
`.github/workflows/dependency-review.yml` runs [`actions/dependency-review-action`](https://github.com/actions/dependency-review-action) on every PR and fails the check when a newly introduced dependency carries a CVE of `high` severity or above. Findings also render inline in the PR's "Files changed" / Conversation tabs.
|
|
237
254
|
|
|
238
255
|
`.github/workflows/claude.yml` is maintainer tooling: it lets the repo owner trigger [`anthropics/claude-code-action`](https://github.com/anthropics/claude-code-action) by mentioning `@claude` in an issue, issue comment, PR review, or PR review comment. It's gated on `sender.login == repository_owner`, so mentions from anyone else are ignored. The workflow needs the `CLAUDE_CODE_OAUTH_TOKEN` secret on the repo; outside contributors and forks do not need any Anthropic credentials to work on this project.
|
|
@@ -254,13 +271,22 @@ Secrets required on the repo: `RELEASE_PLEASE_TOKEN` (a PAT for release-please).
|
|
|
254
271
|
|
|
255
272
|
Scope and non-goals are summarized in [What this is NOT](#what-this-is-not); this section covers implementation decisions behind the scope that *is* supported.
|
|
256
273
|
|
|
274
|
+
### Secrets
|
|
275
|
+
|
|
276
|
+
- **Env-var auth is the preferred path.** `RENOVATE_TOKEN` wins; `GITHUB_TOKEN` / `GITLAB_TOKEN` are platform-specific fallbacks that `dry_run` and `resolve_config` resolve through `src/lib/credentialResolver.ts`. For `dry_run`, the platform-specific var is auto-translated to `RENOVATE_TOKEN` for the spawned Renovate CLI (Renovate itself only reads that one var). See [Platform setup](#platform-setup) for the matrix.
|
|
277
|
+
- **MCP servers do NOT inherit your shell env.** Tokens (and every other env var — `COMPOSER_AUTH`, `RENOVATE_HOST_RULES`, `RENOVATE_PLATFORM`, …) must be set via the `env` key in `claude_desktop_config.json` / `.mcp.json`, not your shell. The MCP server runs as a child of the client; exporting `GITLAB_TOKEN` in your terminal does not reach it.
|
|
278
|
+
- **Inline secrets persist in the tool transcript.** Anything passed as a tool input — `token`, `hostRules[].token`, `hostRules[].password` — is stored in the MCP transcript that the client may share, replay, or feed back into the LLM. As of v0.12, `dry_run` detects inline `token` / `hostRules[].token` on its input and appends a single advisory entry to the result `warnings` array steering callers toward env-var auth. The warning is advisory only — it does not change `isError`, does not block the spawn, and does not alter the report shape. (`password`-only host rules are not yet covered by the warning; the locked v0.12 trigger is `token`-only.)
|
|
279
|
+
- This warning is `dry_run`-only as of v0.12. Other tools that accept inline tokens (e.g. `resolve_config`) follow the same env-var precedence but do not currently emit the warning.
|
|
280
|
+
|
|
257
281
|
- `validate_config`, `dry_run`, and `write_config` shell out to the Renovate CLI rather than importing Renovate as a library — this decouples our Node version from Renovate's (currently Node 24).
|
|
282
|
+
- The `renovate` package is bundled as a runtime dependency so users don't need a separate `npm i -g renovate`. We still spawn the binary as a child process (via `node node_modules/renovate/dist/renovate.js`) — never `import "renovate"` from `src/`. Resolution order is `RENOVATE_BIN` env override → bundled JS entry resolved via `require.resolve("renovate/package.json")` → bare tool name on `PATH`. The env override is the supported escape hatch when a user wants a different Renovate version.
|
|
258
283
|
- `resolve_config`, `preview_custom_manager`, and `lint_config` are fully in-process and never invoke the Renovate CLI, so they work without a Renovate install.
|
|
259
|
-
- `lint_config` is a semantic lint pass that sits alongside `validate_config` rather than replacing it: schema validation catches structural bugs, the linter catches Renovate-specific footguns that schema validation declares valid — most commonly a pattern like `"matchPackageNames": ["/devops\\/pipelines\\/.+"]` where a trailing `/` is missing and Renovate silently degrades the value to an exact-string match that never hits, or a typo like `"matchManagers": ["npmm"]` that silently applies the rule to zero packages. The ruleset is intentionally small (
|
|
284
|
+
- `lint_config` is a semantic lint pass that sits alongside `validate_config` rather than replacing it: schema validation catches structural bugs, the linter catches Renovate-specific footguns that schema validation declares valid — most commonly a pattern like `"matchPackageNames": ["/devops\\/pipelines\\/.+"]` where a trailing `/` is missing and Renovate silently degrades the value to an exact-string match that never hits, or a typo like `"matchManagers": ["npmm"]` that silently applies the rule to zero packages. The ruleset is intentionally small (nine rules: `dead-regex-missing-slash`, `unwrapped-regex`, `matchManagers-unknown-name`, `deprecated-key`, `automerge-without-automerge-type`, `empty-extends`, `contradictory-disabled-with-package-rules`, `package-rule-without-action`, `invalid-schedule`), scoped to the regex-aware and manager-aware fields plus a handful of `packageRules`-level footguns, and tuned to avoid false positives on benign exact strings containing a `.`. The valid-manager list is snapshotted from the `renovate` devDep at `src/data/managers.generated.ts` (regenerate with `npm run generate:managers`), and unknown names get a Damerau-Levenshtein "did you mean?" suggestion when something close enough exists. The `deprecated-key` rule scans the top level plus `packageRules` / `hostRules` / `customManagers` entries for keys Renovate has renamed (e.g. `masterIssue` → `dependencyDashboard`); the rename is embedded in the finding message and the user is pointed at `migrate_config` to auto-apply. The rename map is snapshotted from `MigrationsService.renamedProperties` at `src/data/migrations.generated.ts` (regenerate with `npm run generate:migrations`). Rule IDs are stable so findings can be suppressed by callers.
|
|
260
285
|
- `preview_custom_manager` honors `.gitignore` (including nested `.gitignore`s and `.git/info/exclude`) when walking the repo, so generated/vendored directories like `dist/`, `.next/`, `target/`, `__pycache__/` don't crowd out real hits against the `maxFilesWalked` cap. `node_modules/` and `.git/` are always skipped as a safety net even when no `.gitignore` is present.
|
|
261
286
|
- `preview_custom_manager` exposes two separate safety caps so the warning text can name which one tripped: `maxFilesWalked` (default 2000) bounds the directory walk before any `fileMatch` testing, and `maxFilesMatched` (default 500) bounds the result set after `fileMatch` is applied. Previously a single `maxFilesScanned` conflated the two, leaving the user unable to tell whether to narrow `fileMatch` or widen the walk.
|
|
262
287
|
- `preview_custom_manager` runs every user-supplied regex on a `worker_threads` worker with a wall-clock budget per operation (default 2 s, configurable via `matchTimeoutMs`). Catastrophic backtracking — e.g. `^(a+)+b$` against `aaaa…c`, or `(.*)*=` against a modestly sized file — would otherwise pin the MCP server's event loop indefinitely. On timeout the worker is terminated and a warning is appended identifying which `fileMatch[i]` or `matchStrings[i]` was aborted, so the user can simplify the pattern or raise the budget.
|
|
263
288
|
- `preview_custom_manager` also stats each matched file before reading it and skips anything larger than `maxFileBytes` (default 5 MiB) with a warning, so a stray lockfile, generated artifact, or SQL dump caught by a loose `fileMatch` can't OOM the server. `maxHitsPerFile` already bounds output size; this guards input size.
|
|
289
|
+
- `preview_custom_manager` supports two `customType` values: `regex` (the original path) and `jsonata` (added in v0.13). For `customType: "jsonata"`, `fileFormat` is required and must be one of `json`, `yaml`, or `toml` — the file is parsed structurally up front (via `JSON.parse`, the `yaml` package, or `smol-toml`), then each `matchStrings` entry is evaluated as a JSONata expression against the parsed value. Each expression must return either an array of objects whose keys map to dep fields (`depName`, `currentValue`, `datasource`, `versioning`, …) OR a single bare object that is auto-wrapped to a one-element array — this mirrors Renovate's own `QueryResultZod` schema. Non-string primitive values in the returned objects are stringified for `{{groupName}}` template substitution (e.g. `currentValue: 1.2` → `"1.2"`); `null` / `undefined` and nested objects/arrays are dropped from the substitution bag. The `{{groupName}}` template-substitution gap is shared with the regex path — full Handlebars helpers and conditionals are not implemented. JSONata expressions evaluate inside the same `worker_threads` worker as user regexes and share the `matchTimeoutMs` budget (default 2 s, configurable) — a pathological expression that doesn't return in time is killed by `worker.terminate()`, identical to the regex safety posture. Run `dry_run` afterwards for full-fidelity confirmation.
|
|
264
290
|
- `resolve_config` expands `extends` against a committed snapshot of Renovate's built-in presets (`src/data/presets.generated.ts`). External `github>` / `gitlab>` fetching is opt-in, uses each platform's contents API with a 10 s timeout, and caches results per call. The `endpoint` input swaps in a custom API base for GHE / self-hosted GitLab; `platform` additionally rewrites `local>` presets to be fetched against that endpoint.
|
|
265
291
|
- External preset fetches refuse to follow HTTP redirects (`redirect: "manual"`) and never attach `Authorization: Bearer …` / `PRIVATE-TOKEN: …` headers to non-`https://` URLs. Following redirects with custom auth headers can leak `RENOVATE_TOKEN` / `GITHUB_TOKEN` / `GITLAB_TOKEN` cross-host (undici only strips the standard `Authorization` header on cross-*origin* redirects, not `PRIVATE-TOKEN`); rejecting them outright avoids the leak path and matches the fact that the GitHub/GitLab content APIs don't normally redirect for valid presets.
|
|
266
292
|
- External preset fetches cap the response body at 1 MB. A `Content-Length` over the cap is rejected up front; chunked responses without a declared length are streamed into a bounded buffer that aborts the read once the running total passes the cap. Auth-failure bodies (401/403) are read with an 8 KB cap so a misconfigured endpoint returning a giant HTML error page can't OOM the long-lived MCP process. Preset bodies are tiny in practice, so the cap is well above any legitimate value.
|
|
@@ -270,8 +296,13 @@ Scope and non-goals are summarized in [What this is NOT](#what-this-is-not); thi
|
|
|
270
296
|
- `explain_config` reuses the same expansion machinery as `resolve_config` (`parsePreset`, `loadPresetBody`, `applyArgs`, `recordTemplateWarnings`) so the two can't drift — if `resolve_config` resolves a preset, `explain_config` does too. The annotated layer threads each preset body's leaves through a parallel `mergeAnnotated` that preserves contributors instead of dropping them, then pins each contribution with the source name (literal `extends` entry, or `<own>` for the user's input config) and a `via` chain naming every parent preset traversed to reach it. Arrays accumulate every contribution in `setBy` and concat their `value`s; scalars list every contribution in merge order with the last as the winner. `merge_quality: "preview"` carries the same disclaimer as `resolve_config` — Renovate's rule-specific semantics for `hostRules`, `regexManagers`, and certain boolean flags aren't modelled.
|
|
271
297
|
- `dry_run` uses `--report-type=file` so we get a structured JSON report instead of scraping stdout. The report path is pre-created with mode 0600 before Renovate is spawned (Renovate overwrites in place with `O_TRUNC`, preserving the mode), so the on-disk JSON is never world-readable while the run is in flight — Renovate's `problems` array can carry host-rule values that we don't want exposed under the default `umask`. The file is unlinked in a `finally` block. When a `hostRules` input is passed it's written to a mode-0600 temp file in `os.tmpdir()`, handed to Renovate via the `RENOVATE_CONFIG_FILE` env var (the CLI has no `--config-file` flag), and deleted in a `finally` block. Token/password values — including the platform `token` input — are scrubbed from the detected `problems` list and the `logTail` fallback before returning.
|
|
272
298
|
- `dry_run` defaults to `--platform=local` so no host token is required, but that mode can't resolve `local>` presets (they have no platform context to expand against) and silently hides non-default-host GitHub/GitLab setups. When the caller doesn't pass a `platform` input, the tool first falls back to `RENOVATE_PLATFORM` from the MCP server's env (if it's one of `local`/`github`/`gitlab`) before defaulting to `local` — without that fallback, the wrapper would unconditionally pass `--platform=local` and silently override an env var the user had set in their `mcp.json`. Passing `platform` + `endpoint` + `token` + `repository` (or relying on the `RENOVATE_PLATFORM` / `RENOVATE_ENDPOINT` env vars) switches the run to a real platform client so the preset-fetch path works end-to-end; `--dry-run` is still set, so no PRs are opened. The repository is passed to Renovate as a positional argument because the CLI has no `--repository` flag. `endpoint` and `token` are also forwarded in the default `platform=local` mode so `gitlab>…` / `github>…` preset shortcuts (which are otherwise hardcoded to gitlab.com/github.com) can be redirected at a self-hosted host. As a guard against the silent-failure mode, `dry_run` preflight-checks the repo's config: if it extends any `local>…` preset while the effective platform is `local`, the tool fails fast with specific remediation rather than spawning a Renovate run that would opaquely report `config-validation`. The preflight is skipped for `dryRunMode=extract` so manifest-only extraction can still be attempted.
|
|
273
|
-
- `dry_run` returns a top-level `ok` boolean that is `false` whenever the CLI exited non-zero OR the structured report contains a validation/error-level problem (`level >= 40`, `message === "config-validation"`, or a non-empty `validationError` field). Renovate frequently writes exit-code 0 alongside report-level failures — trusting the exit code alone hides runs that did nothing.
|
|
299
|
+
- `dry_run` returns a top-level `ok` boolean that is `false` whenever the CLI exited non-zero OR the structured report contains a validation/error-level problem (`level >= 40`, `message === "config-validation"`, or a non-empty `validationError` field). Renovate frequently writes exit-code 0 alongside report-level failures — trusting the exit code alone hides runs that did nothing. Two specific kinds of in-report problems are *filtered out* of `reportErrors` because they describe benign degradation rather than a failed run: the bundled RE2 native module failing to load (Renovate falls back to JS `RegExp` and keeps running — still surfaced under `warnings`) and Renovate's own `Unsupported node environment` notice (the run still produces a usable report — surfaced under a separate `environmentWarnings[]` array). For the nodeEnv case, `ok` also stays `true` even when Renovate exits non-zero, because the report is intact. Classification lives in `src/lib/runtimeWarnings.ts` (`classifyReportProblem`).
|
|
300
|
+
- **Platform-source precedence is visible to callers.** Resolution is `platform` input → `RENOVATE_PLATFORM` env → `local`, and the response echoes which step won via `platformSource: "input" | "env" | "default"` and `effectivePlatform`. Both preflight error messages (missing `repository`, missing token for a remote platform) carry an origin tag so a surprising `gitlab` value can be traced without reading source. When `platform` is unset and the env fallback yields a non-local platform, an advisory entry is appended to `warnings` reminding the caller they can pass `platform: 'local'` to override.
|
|
301
|
+
- **Large-report escape hatch.** MCP harnesses truncate tool responses at modest sizes (≈75 KB on Claude Desktop), and a real Renovate report easily exceeds that. `dry_run` accepts `reportOutputPath` (absolute path; mode-0600 write of the full report) which collapses `summary.report` to `{ reportPath, repoCount, updateCount }`, plus `summaryOnly: true` for further inline trimming. `dry_run_diff` accepts each input as either an inline report or `{ reportPath: … }`, so the iterative workflow becomes: `dry_run({ reportOutputPath: "/tmp/before.json" })`, tweak config, `dry_run({ reportOutputPath: "/tmp/after.json" })`, then `dry_run_diff({ before: { reportPath }, after: { reportPath } })`. `warnings` / `problems` / `reportErrors` / `environmentWarnings` always stay inline — those are the actionable bits.
|
|
274
302
|
- `dry_run` emits MCP progress notifications only when the caller's `tools/call` includes `_meta.progressToken` — no-op otherwise, so legacy clients see zero overhead. A 5-second heartbeat ticks while the child runs; each tick's message is best-effort enriched with the latest Renovate JSON-log `msg` seen on stdout. Notifications are also emitted at start and completion. We deliberately don't couple to Renovate's log schema beyond reading `msg`, since that schema isn't a stable API.
|
|
275
|
-
- `dry_run_diff` is stateless on purpose: both reports are passed as inputs, no per-repo state is kept on the server. Updates are keyed by `(manager, packageFile, depName)` so a version bump on the same dep shows up once under `changed` rather than twice as `removed + added`. Compared per identity: `newValue`, `newVersion`, `updateType`, `branchName`, `groupName`, `schedule`. Either input can be the raw Renovate report
|
|
303
|
+
- `dry_run_diff` is stateless on purpose: both reports are passed as inputs, no per-repo state is kept on the server. Updates are keyed by `(manager, packageFile, depName)` so a version bump on the same dep shows up once under `changed` rather than twice as `removed + added`. Compared per identity: `newValue`, `newVersion`, `updateType`, `branchName`, `groupName`, `schedule`. Either input can be the raw Renovate report, the full `dry_run` summary (with the `report` key), or a `{ reportPath: "<absolute path>" }` pointer at a file on disk (the tool reads + JSON-parses it) — the inline and path forms can be mixed. The path form is the round-trip with `dry_run`'s `reportOutputPath`.
|
|
276
304
|
- `write_config` writes to a temp file, validates, then atomically renames — so a failed validation never leaves a broken config on disk. The `force: true` escape hatch is gated behind a separate `confirmForce: "YES_OVERRIDE_VALIDATION"` literal: a single boolean is too easy for a prompt-injected agent to flip, but emitting an unusual sentinel string is a deliberate step that's harder to navigate accidentally.
|
|
277
|
-
-
|
|
305
|
+
- **Round-trip writes.** When the target file already exists and parses as JSON-with-comments, `write_config` performs a surgical edit through `src/lib/configWriter.ts` (backed by `jsonc-parser`, the same library VS Code uses to edit `settings.json`): comments, key order, trailing commas, blank-line groupings, and any unrelated trivia are preserved — only the keys the caller actually changed are rewritten. Brand-new file writes (no prior file at the target path) fall back to `JSON.stringify(config, null, 2) + "\n"` — byte-identical to pre-Phase-4 behavior. `.json5` files that lean on JSON5-only syntax (unquoted keys, single-quoted strings, hex literals, etc.) are refused with `reason: "json5-not-jsonc-compatible"`, and corrupted/unparseable existing files are refused with `reason: "existing-file-unparseable"`; both refusals hint at `force: true` as the documented escape hatch. `force: true` (with `confirmForce`) is intentionally destructive — it skips both validation AND the round-trip path and rewrites the file with a clean `JSON.stringify` rendering. The `bytes` field on a successful response is the full file size after the round-trip edit, not the size of the diff. The implementation lives in `src/lib/configWriter.ts` and is the single place `jsonc-parser` is used; the existing `json5` dependency stays for parse-only consumers (`migrate_config`, `lint_config`, `configLocations.ts`) and is not migrated.
|
|
306
|
+
- `migrate_config` is the only tool that calls into Renovate as a library rather than shelling out to it — Renovate ships no `renovate-config-migrate` CLI, only a library export. To keep the main MCP server process decoupled from Renovate's internal API surface (and to avoid the ~20-30 MB resident cost of `getOptions()` eagerly loading the manager registry), the tool spawns a `node:worker_threads` worker on demand that imports `renovate/dist/config/migration.js` inside the worker. The main process never imports `renovate`. First call carries a one-time cold-load latency (a few seconds) for the worker's ESM graph; the worker is terminated after each call. See `docs/adr/0001-worker-isolated-renovate-migration.md` for the full rationale. The tool returns the migrated config plus a unified diff but never writes — chain with `write_config` to persist.
|
|
307
|
+
- **`check_setup` fast-paths the bundled binary probe.** Each Renovate CLI binary is `node node_modules/renovate/dist/<cli>.js`, and a cold `--version` spawn loads Renovate's full ESM graph (~2 s per binary). Two of those at every MCP session start used to dominate cold-start latency and could blow past clients' `initialize` timeout. When the binary resolves via the bundled path (the default install), `check_setup` now reads the version directly from `node_modules/renovate/package.json` — no spawn — bringing the probe to a few milliseconds. The `RENOVATE_BIN` / `RENOVATE_CONFIG_VALIDATOR_BIN` env overrides keep the spawn-based check (a user pointing those at a custom binary wants real proof of life). Side effect: runtime warnings derived from `--version` stderr (e.g. RE2 dlopen failure) no longer appear in the startup banner for the bundled path; they still fire on the first actual tool call through `renovateCli.ts:run`, so users see the warning on first use rather than at session start.
|
|
308
|
+
- `check_setup` and the shell-out tools (`validate_config`, `write_config`, `dry_run`) detect Renovate runtime conditions that degrade the tool silently — currently the bundled `re2` native module failing to load (typically after a Node major-version upgrade leaves a prebuilt `re2.node` compiled against the old ABI). When the WARN appears in Renovate's stderr, the tool response carries a `warnings: [{ kind: "re2-unusable", … }]` entry alongside its normal output and `check_setup` aggregates the same warning into `SetupStatus.warnings` plus the startup `instructions` banner. Renovate keeps running on JavaScript `RegExp` so calls don't fail, but regex-heavy operations (custom managers, validation, lookups) are noticeably slower; the fix hint is to reinstall renovate-mcp (which reinstalls the bundled `renovate` and rebuilds its native deps), or run `npm rebuild re2` inside the renovate-mcp install's `node_modules/renovate`. This is passive detection only — the server doesn't rebuild anything itself.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// AUTO-GENERATED by scripts/generate-managers.mjs from renovate@43.
|
|
1
|
+
// AUTO-GENERATED by scripts/generate-managers.mjs from renovate@43.150.0.
|
|
2
2
|
// Do not edit by hand. Run `npm run generate:managers` to refresh.
|
|
3
|
-
export const RENOVATE_VERSION = "43.
|
|
3
|
+
export const RENOVATE_VERSION = "43.150.0";
|
|
4
4
|
/**
|
|
5
5
|
* All manager names accepted by Renovate's `matchManagers` /
|
|
6
6
|
* `excludeManagers` fields. Includes both regular managers and custom
|
|
@@ -95,6 +95,7 @@ export const ALL_MANAGERS = Object.freeze([
|
|
|
95
95
|
"pixi",
|
|
96
96
|
"poetry",
|
|
97
97
|
"pre-commit",
|
|
98
|
+
"proto",
|
|
98
99
|
"pub",
|
|
99
100
|
"puppet",
|
|
100
101
|
"pyenv",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const RENOVATE_VERSION = "43.150.0";
|
|
2
|
+
export interface DeprecatedKeyEntry {
|
|
3
|
+
/** Key as it appeared in old configs. */
|
|
4
|
+
readonly oldKey: string;
|
|
5
|
+
/** Current key that replaces it. */
|
|
6
|
+
readonly newKey: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Deprecated config keys with their current replacement. Sourced from
|
|
10
|
+
* Renovate's `MigrationsService.renamedProperties` — the "RenamePropertyMigration"
|
|
11
|
+
* subset only. Value coercions (e.g. `stabilityDays` → `minimumReleaseAge`)
|
|
12
|
+
* and structural transformations are deliberately excluded; `migrate_config`
|
|
13
|
+
* is the right tool for those.
|
|
14
|
+
*/
|
|
15
|
+
export declare const DEPRECATED_KEYS: readonly DeprecatedKeyEntry[];
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate-migrations.mjs from renovate@43.150.0.
|
|
2
|
+
// Do not edit by hand. Run `npm run generate:migrations` to refresh.
|
|
3
|
+
export const RENOVATE_VERSION = "43.150.0";
|
|
4
|
+
/**
|
|
5
|
+
* Deprecated config keys with their current replacement. Sourced from
|
|
6
|
+
* Renovate's `MigrationsService.renamedProperties` — the "RenamePropertyMigration"
|
|
7
|
+
* subset only. Value coercions (e.g. `stabilityDays` → `minimumReleaseAge`)
|
|
8
|
+
* and structural transformations are deliberately excluded; `migrate_config`
|
|
9
|
+
* is the right tool for those.
|
|
10
|
+
*/
|
|
11
|
+
export const DEPRECATED_KEYS = Object.freeze([
|
|
12
|
+
{
|
|
13
|
+
"oldKey": "adoptium-java",
|
|
14
|
+
"newKey": "java-version"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"oldKey": "aliases",
|
|
18
|
+
"newKey": "registryAliases"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"oldKey": "allowedPostUpgradeCommands",
|
|
22
|
+
"newKey": "allowedCommands"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"oldKey": "azureAutoApprove",
|
|
26
|
+
"newKey": "autoApprove"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"oldKey": "baseBranches",
|
|
30
|
+
"newKey": "baseBranchPatterns"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"oldKey": "customChangelogUrl",
|
|
34
|
+
"newKey": "changelogUrl"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"oldKey": "endpoints",
|
|
38
|
+
"newKey": "hostRules"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"oldKey": "excludedPackageNames",
|
|
42
|
+
"newKey": "excludePackageNames"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"oldKey": "exposeEnv",
|
|
46
|
+
"newKey": "exposeAllEnv"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"oldKey": "keepalive",
|
|
50
|
+
"newKey": "keepAlive"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"oldKey": "lookupNameTemplate",
|
|
54
|
+
"newKey": "packageNameTemplate"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"oldKey": "managerBranchPrefix",
|
|
58
|
+
"newKey": "additionalBranchPrefix"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"oldKey": "masterIssue",
|
|
62
|
+
"newKey": "dependencyDashboard"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"oldKey": "masterIssueApproval",
|
|
66
|
+
"newKey": "dependencyDashboardApproval"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"oldKey": "masterIssueAutoclose",
|
|
70
|
+
"newKey": "dependencyDashboardAutoclose"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"oldKey": "masterIssueFooter",
|
|
74
|
+
"newKey": "dependencyDashboardFooter"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"oldKey": "masterIssueHeader",
|
|
78
|
+
"newKey": "dependencyDashboardHeader"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"oldKey": "masterIssueLabels",
|
|
82
|
+
"newKey": "dependencyDashboardLabels"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"oldKey": "masterIssueTitle",
|
|
86
|
+
"newKey": "dependencyDashboardTitle"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"oldKey": "multipleMajorPrs",
|
|
90
|
+
"newKey": "separateMultipleMajor"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"oldKey": "regexManagers",
|
|
94
|
+
"newKey": "customManagers"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"oldKey": "separatePatchReleases",
|
|
98
|
+
"newKey": "separateMinorPatch"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"oldKey": "versionScheme",
|
|
102
|
+
"newKey": "versioning"
|
|
103
|
+
}
|
|
104
|
+
]);
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import { registerPreviewCustomManager } from "./tools/previewCustomManager.js";
|
|
|
11
11
|
import { registerDryRun } from "./tools/dryRun.js";
|
|
12
12
|
import { registerDryRunDiff } from "./tools/dryRunDiff.js";
|
|
13
13
|
import { registerWriteConfig } from "./tools/writeConfig.js";
|
|
14
|
+
import { registerMigrateConfig } from "./tools/migrateConfig.js";
|
|
14
15
|
import { registerGetVersion } from "./tools/getVersion.js";
|
|
15
16
|
import { registerPresetResources } from "./resources/presets.js";
|
|
16
17
|
import { checkSetup, startupBanner } from "./lib/setupCheck.js";
|
|
@@ -37,7 +38,8 @@ const BASE_INSTRUCTIONS = [
|
|
|
37
38
|
" 6. lint_config — semantic lint pass: catches Renovate-specific footguns schema validation misses (e.g. malformed /…/ regex patterns)",
|
|
38
39
|
" 7. dry_run — preview what Renovate would actually do (no PRs)",
|
|
39
40
|
" 8. dry_run_diff — semantic diff between two dry_run reports (added/removed/changed updates)",
|
|
40
|
-
" 9.
|
|
41
|
+
" 9. migrate_config — apply Renovate's built-in migrations (deprecated keys → current schema) and return the migrated config",
|
|
42
|
+
" 10. write_config — save the agreed-upon config (validates first)",
|
|
41
43
|
"",
|
|
42
44
|
"If any tool fails unexpectedly, call check_setup to diagnose CLI availability.",
|
|
43
45
|
"Built-in preset reference: renovate://presets (namespace index), renovate://presets/{namespace} (one namespace), renovate://preset/{name} (one preset's expanded JSON).",
|
|
@@ -63,6 +65,7 @@ registerValidateConfig(server);
|
|
|
63
65
|
registerLintConfig(server);
|
|
64
66
|
registerDryRun(server);
|
|
65
67
|
registerDryRunDiff(server);
|
|
68
|
+
registerMigrateConfig(server);
|
|
66
69
|
registerWriteConfig(server);
|
|
67
70
|
registerGetVersion(server);
|
|
68
71
|
registerPresetResources(server);
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
export type LintRuleId = "dead-regex-missing-slash" | "unwrapped-regex" | "matchManagers-unknown-name";
|
|
1
|
+
export type LintRuleId = "dead-regex-missing-slash" | "unwrapped-regex" | "matchManagers-unknown-name" | "deprecated-key" | "automerge-without-automerge-type" | "empty-extends" | "contradictory-disabled-with-package-rules" | "package-rule-without-action" | "invalid-schedule";
|
|
2
2
|
export interface LintFinding {
|
|
3
3
|
ruleId: LintRuleId;
|
|
4
|
+
severity: "error" | "warn";
|
|
4
5
|
path: string;
|
|
5
6
|
value: string;
|
|
6
7
|
message: string;
|
|
8
|
+
suggestion?: string;
|
|
7
9
|
}
|
|
10
|
+
export declare const PACKAGE_RULE_ACTION_KEYS: ReadonlySet<string>;
|
|
8
11
|
export declare function lintConfig(config: unknown): LintFinding[];
|