renovate-log-parser 0.2.0 → 0.3.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 +208 -233
- package/dist/core/error-detector.d.ts +1 -1
- package/dist/core/error-detector.js +42 -2
- package/dist/core/error-detector.js.map +1 -1
- package/dist/core/skill-template.js +4 -0
- package/dist/core/skill-template.js.map +1 -1
- package/dist/server/api.d.ts +5 -4
- package/dist/server/api.js +59 -26
- package/dist/server/api.js.map +1 -1
- package/dist/server/log-registry.d.ts +17 -8
- package/dist/server/log-registry.js +44 -36
- package/dist/server/log-registry.js.map +1 -1
- package/package.json +4 -4
- package/web/.output/public/200.html +1 -1
- package/web/.output/public/404.html +1 -1
- package/web/.output/public/_nuxt/B7wga9sP.js +6 -0
- package/web/.output/public/_nuxt/BqJkfZTJ.js +3 -0
- package/web/.output/public/_nuxt/{CuOsDQlp.js → CMgYIlaH.js} +1 -1
- package/web/.output/public/_nuxt/CWl6nNLj.js +1 -0
- package/web/.output/public/_nuxt/DAvRMvMn.js +3 -0
- package/web/.output/public/_nuxt/{DeS15jQo.js → DB7E78p3.js} +1 -1
- package/web/.output/public/_nuxt/DVm4N3tR.js +28 -0
- package/web/.output/public/_nuxt/ObQDjlGC.js +1 -0
- package/web/.output/public/_nuxt/{BjDV6v2h.js → S1m8Jgsd.js} +1 -1
- package/web/.output/public/_nuxt/builds/latest.json +1 -1
- package/web/.output/public/_nuxt/builds/meta/d1ca25cf-550d-4bed-a4d1-2daf0b4cc292.json +1 -0
- package/web/.output/public/_nuxt/entry.C5Sa_xmV.css +2 -0
- package/web/.output/public/_nuxt/{DVWtRbHb.js → qhIzkFe8.js} +1 -1
- package/web/.output/public/index.html +1 -1
- package/web/.output/public/_nuxt/CVlqYHPc.js +0 -6
- package/web/.output/public/_nuxt/CztOM3Aq.js +0 -28
- package/web/.output/public/_nuxt/D3wuHpM_.js +0 -3
- package/web/.output/public/_nuxt/DUXEQ2Eh.js +0 -3
- package/web/.output/public/_nuxt/XP9RigIT.js +0 -1
- package/web/.output/public/_nuxt/builds/meta/f68582c9-55a9-4352-b85a-d7f8de6f7202.json +0 -1
- package/web/.output/public/_nuxt/entry.BlZrUrUl.css +0 -2
- package/web/.output/public/_nuxt/lGYp6_9X.js +0 -1
package/README.md
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
# renovate-log-parser
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center"><img src="./renovate-log-parser.webp" width="400" /></p>
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
https://github.com/user-attachments/assets/f99595b5-d8bc-4dca-a662-550e502f05f4
|
|
6
|
+
|
|
7
|
+
`renovate-log-parser` is a CLI and web interface for manual and automated analysis of Renovate Bot debug logs in JSONL format.
|
|
8
|
+
|
|
9
|
+
To get this log: if you use the _hosted_ Mend GitHub app, download a run log from [https://developer.mend.io](https://developer.mend.io). For self-hosted Renovate, set the `LOG_FILE` environment variable.
|
|
6
10
|
|
|
7
11
|
`renovate-log-parser` offers the following commands:
|
|
8
12
|
|
|
9
|
-
- `detect-errors`
|
|
10
|
-
- `analyze`
|
|
11
|
-
- `web` starts a temporary local web server
|
|
12
|
-
- `install-analyze-skill` writes a SKILL.md
|
|
13
|
+
- `detect-errors` scans the log for potential problems and warnings. If it finds a problem, it exits with an error and reports the cause. This solves hidden Renovate issues you would otherwise miss.
|
|
14
|
+
- `analyze` reports the log structure. A SKILL.md teaches coding agents to read relevant lines and diagnose Renovate problems with fewer tokens.
|
|
15
|
+
- `web` starts a temporary local web server. The server parses logs of _any_ length and provides an interface for analysis and filtering. This interface replaces manual “grep”-like analysis that can overwhelm a text editor.
|
|
16
|
+
- `install-analyze-skill` writes a SKILL.md to your project or home directory. It can include instructions to get logs from self-hosted Renovate runs in GitHub Actions. Your agent then knows how to get and read a log.
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
To try it now, download an example log and open it in the web UI:
|
|
15
19
|
|
|
16
20
|
```bash
|
|
17
21
|
curl -sSLO https://raw.githubusercontent.com/MShekow/renovate-log-parser/main/src/core/__tests__/fixtures/various-issues.jsonl
|
|
@@ -19,7 +23,7 @@ npx renovate-log-parser web various-issues.jsonl
|
|
|
19
23
|
```
|
|
20
24
|
|
|
21
25
|
<details>
|
|
22
|
-
<summary>Or
|
|
26
|
+
<summary>Or use Docker to mount the log in the container and map the port</summary>
|
|
23
27
|
|
|
24
28
|
```bash
|
|
25
29
|
curl -sSLO https://raw.githubusercontent.com/MShekow/renovate-log-parser/main/src/core/__tests__/fixtures/various-issues.jsonl
|
|
@@ -27,31 +31,31 @@ docker run --rm -it -p 3000:3000 -v "$PWD/various-issues.jsonl:/logs/various-iss
|
|
|
27
31
|
npx -y renovate-log-parser web /logs/various-issues.jsonl --host 0.0.0.0 --no-open
|
|
28
32
|
```
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
second terminal — the `?log=` parameter is the path _inside_ the container, and
|
|
32
|
-
makes the UI load the file right away (`open` instead of `xdg-open` on macOS):
|
|
34
|
+
When the container reports that the server is listening, open the UI from a second terminal:
|
|
33
35
|
|
|
34
36
|
```bash
|
|
35
37
|
xdg-open "http://localhost:3000/?log=/logs/various-issues.jsonl"
|
|
36
38
|
```
|
|
37
39
|
|
|
40
|
+
The `?log=` parameter contains the path _inside_ the container. This parameter makes the UI load the file immediately. On macOS, use `open` instead of `xdg-open`:
|
|
41
|
+
|
|
38
42
|
</details>
|
|
39
43
|
|
|
40
|
-
## Background (why
|
|
44
|
+
## Background (why you need this)
|
|
41
45
|
|
|
42
|
-
This tool
|
|
46
|
+
This tool solves these problems:
|
|
43
47
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
48
|
+
- Renovate is easy to configure for projects with many repositories and development teams. However, subtle problems can occur later without notice. For example, Renovate can stop creating PRs for complex reasons. It only adds a small notice block to the _Dependency dashboard_ GitHub issue. Teams that use _Jira_ can miss this notice because they do not read GitHub issues.
|
|
49
|
+
- Developers do not always understand the actions of Renovate Bot. Renovate can omit expected actions or do unwanted actions. Manual analysis is difficult for non-experts because the debug-level log is overly verbose. Important information often occurs in _debug_\-level lines, not warning- or error-level lines. AI agents can miss information in large logs or use many tokens for analysis. Consequently, users accept a suboptimal Renovate configuration or become frustrated with Renovate.
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
This tool automatically detects these subtle problems. It also makes manual and AI-assisted analysis of Renovate log files simpler.
|
|
48
52
|
|
|
49
53
|
## Usage
|
|
50
54
|
|
|
51
|
-
Run directly with `npx
|
|
55
|
+
Run the tool directly with `npx`. You do not have to install it:
|
|
52
56
|
|
|
53
57
|
```bash
|
|
54
|
-
# Detect
|
|
58
|
+
# Detect potential problems in a Renovate JSONL log (CI-friendly)
|
|
55
59
|
npx renovate-log-parser detect-errors path/to/renovate.jsonl
|
|
56
60
|
|
|
57
61
|
# Also write a machine-readable JSON report
|
|
@@ -64,7 +68,7 @@ npx renovate-log-parser analyze path/to/renovate.jsonl
|
|
|
64
68
|
npx renovate-log-parser web path/to/renovate.jsonl
|
|
65
69
|
```
|
|
66
70
|
|
|
67
|
-
|
|
71
|
+
Alternatively, install the tool globally:
|
|
68
72
|
|
|
69
73
|
```bash
|
|
70
74
|
npm install -g renovate-log-parser
|
|
@@ -75,47 +79,49 @@ renovate-log-parser --help
|
|
|
75
79
|
|
|
76
80
|
### `detect-errors <path>`
|
|
77
81
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
to stdout
|
|
82
|
+
This command scans a Renovate debug log (JSONL) for potential problems and warnings. It uses deterministic rules to gate CI.
|
|
83
|
+
|
|
84
|
+
The command prints a readable summary to stdout. With `--out`, it writes a stable JSON report for machine processing. It can be used for comparisons between CI runs.
|
|
81
85
|
|
|
82
86
|
```bash
|
|
83
87
|
renovate-log-parser detect-errors renovate.jsonl [--out report.json] \
|
|
84
88
|
[--ignore-file rules.json] [--fail-on-warn]
|
|
85
89
|
```
|
|
86
90
|
|
|
87
|
-
| Arg / option | Default | Description
|
|
88
|
-
| ---------------- | ----------------------------------- |
|
|
89
|
-
| `<path>` | **required** | Path to the Renovate JSONL log
|
|
90
|
-
| `--out` | (none) |
|
|
91
|
-
| `--ignore-file` | `./renovate-log-parser.ignore.json` | Ignore
|
|
92
|
-
| `--fail-on-warn` | `false` |
|
|
91
|
+
| Arg / option | Default | Description |
|
|
92
|
+
| ---------------- | ----------------------------------- | ------------------------------------------- |
|
|
93
|
+
| `<path>` | **required** | Path to the Renovate JSONL log |
|
|
94
|
+
| `--out` | (none) | Path to the machine-readable JSON report |
|
|
95
|
+
| `--ignore-file` | `./renovate-log-parser.ignore.json` | Ignore file (a missing file means no rules) |
|
|
96
|
+
| `--fail-on-warn` | `false` | Include warning findings in the exit code |
|
|
93
97
|
|
|
94
98
|
**Exit codes:**
|
|
95
99
|
|
|
96
100
|
- `0` = no non-ignored errors
|
|
97
|
-
- `1` = ≥1 non-ignored error (or
|
|
101
|
+
- `1` = ≥1 non-ignored error (or ≥1 non-ignored warning with `--fail-on-warn`)
|
|
98
102
|
- `2` = tool/usage error (bad path, unreadable, bad args, malformed ignore file)
|
|
99
103
|
|
|
100
104
|
**Detected categories**:
|
|
101
105
|
|
|
102
|
-
- **Errors** (
|
|
103
|
-
- `host-error-abort`:
|
|
106
|
+
- **Errors** (conditions that Renovate does _not_ otherwise flag in a PR comment):
|
|
107
|
+
- `host-error-abort`: Renovate skipped PR creation or updates because it was unable to reach one or more well-known registries. The detector looks for a `Repository finished` entry with `result: "external-host-error"`.
|
|
104
108
|
- `log-error`: lines with error level (level=50)
|
|
105
109
|
- `log-fatal`: lines with fatal level (level=60)
|
|
106
|
-
- `config-migration`:
|
|
107
|
-
- `
|
|
110
|
+
- `config-migration`: a repository needs a renovate.json migration. The detector looks for a `Config migration necessary` entry that contains `oldConfig` + `newConfig`.
|
|
111
|
+
- `invalid-config`: a repository's own Renovate config did not parse, or failed validation. Renovate aborts the run during `init`, so it extracts nothing and creates no PR. The detector looks for a `Repository has invalid config` entry and reports the offending file (`validationSource`) with the reason (`validationError`, `validationMessage`). Renovate logs this at warning level and still exits with code 0, which makes it easy to miss.
|
|
112
|
+
- `abandoned-package`: a repository contains one or more abandoned packages for which Renovate does not create a PR. The detector reports one finding per package in an `Abandoned package statistics` entry.
|
|
108
113
|
- **Warnings**:
|
|
109
114
|
- `log-warn`: lines with warning level (level=40)
|
|
110
115
|
- `err-object`: reports lines with an `err` object, such as rawExec errors
|
|
111
|
-
- `repo-problem`: reports entries in `repoProblems` lines
|
|
116
|
+
- `repo-problem`: reports entries in `repoProblems` lines, which contain a string array
|
|
112
117
|
|
|
113
|
-
The
|
|
118
|
+
The `counts` map in the JSON report always lists every category, including zero counts. This structure keeps comparisons between CI runs stable.
|
|
114
119
|
|
|
115
|
-
**Ignore file
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
120
|
+
**Ignore file**: Use stable keys to hide expected findings because line numbers change as logs grow.
|
|
121
|
+
|
|
122
|
+
An active rule must match `category`. If it contains `message` or `repository`, these values must also match.
|
|
123
|
+
|
|
124
|
+
If a rule is past its optional `expires` date, the tool reports it to stderr and skips it:
|
|
119
125
|
|
|
120
126
|
```jsonc
|
|
121
127
|
{
|
|
@@ -132,16 +138,16 @@ optional `expires` date are reported to stderr and skipped:
|
|
|
132
138
|
}
|
|
133
139
|
```
|
|
134
140
|
|
|
135
|
-
Ignored findings
|
|
136
|
-
excluded from the summary counts and the exit code.
|
|
141
|
+
Ignored findings remain in the report with `"ignored": true`. The summary counts and exit code exclude them.
|
|
137
142
|
|
|
138
143
|
### `analyze <path>`
|
|
139
144
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
streams a filtered, line-ranged, limited **JSONL**
|
|
143
|
-
|
|
144
|
-
|
|
145
|
+
This command provides a token-efficient structure for an AI coding agent or a person.
|
|
146
|
+
|
|
147
|
+
Without `--print`, it writes compact, single-line JSON **stats** for the complete log to stdout. With `--print`, it streams a filtered, line-ranged, and limited **JSONL** section. Each entry uses one line.
|
|
148
|
+
|
|
149
|
+
The intended loop is:
|
|
150
|
+
First, read the statistics. Then select the relevant line range. Use `--print` to read only that range.
|
|
145
151
|
|
|
146
152
|
```bash
|
|
147
153
|
# Whole-log stats: level counts + per-repository structure
|
|
@@ -167,44 +173,43 @@ renovate-log-parser analyze renovate.jsonl --print \
|
|
|
167
173
|
| `--filter-with-wildcard` | (none) | `key:pattern` wildcard filter (`*` = any run), case-insensitive, repeatable, AND'd |
|
|
168
174
|
| `--include-original-line` | `false` | Add `_oL` (0-indexed source line) to each object |
|
|
169
175
|
|
|
170
|
-
**Stats mode** reports `levelCounts
|
|
171
|
-
|
|
172
|
-
`branches info extended`
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
leading
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
**Exit codes:** `0` = success · `2` = tool/usage error (bad path, unreadable, bad
|
|
193
|
-
filter token).
|
|
176
|
+
**Stats mode** reports `levelCounts`, which contains the entry count for each numeric level. It also reports a `repos` array.
|
|
177
|
+
|
|
178
|
+
For each repository, this array contains the line range, unique branches, and rowids of `branches info extended` entries. It also contains rowids of `packageFiles with updates` entries, `repoProblems`, and the dependency inventory. This inventory combines root-level `depNames`/`packageNames` keys with the `packageFiles with updates` configuration.
|
|
179
|
+
|
|
180
|
+
**Print mode** selects rows in this order: line range, filters, then `--limit`. The limit selects the first N rows in line order.
|
|
181
|
+
|
|
182
|
+
The output is JSONL on stdout without the ignored root fields. The command never removes `msg`.
|
|
183
|
+
|
|
184
|
+
When the limit restricts the result, the command writes a truncation notice to **stderr**. Therefore, stdout remains a clean stream for pipes.
|
|
185
|
+
|
|
186
|
+
Both filter flags target one root-level key. You can repeat them, and all conditions use AND logic with the line range.
|
|
187
|
+
|
|
188
|
+
`--filter` matches the value **exactly**. The command converts its value to a typed JSON value for comparison.
|
|
189
|
+
|
|
190
|
+
The values `true` and `false` become Boolean values. Plain numbers become numbers, so `level:30` matches the numeric `level`.
|
|
191
|
+
|
|
192
|
+
All other values remain strings. This rule includes values with leading zeros or dots, such as `007` or `1.2.3`.
|
|
193
|
+
|
|
194
|
+
`--filter-with-wildcard` treats `*` as "any run of characters" and uses a case-insensitive match. The characters `?` and `%` remain literal.
|
|
195
|
+
|
|
196
|
+
The command anchors the pattern as written. Use a leading or trailing `*` for prefix, suffix, or contains matches. For example, use `msg:*lock file*`.
|
|
197
|
+
|
|
198
|
+
**Exit codes:** `0` = success · `2` = tool/usage error (bad path, unreadable, bad filter token).
|
|
194
199
|
|
|
195
200
|
### `install-analyze-skill`
|
|
196
201
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
log from GitHub self-hosted Renovate workflows via the `gh` CLI.
|
|
202
|
+
This command writes or updates a `renovate-log-analyzer` **SKILL.md**. The skill teaches an AI coding agent how to use `analyze` with fewer tokens.
|
|
203
|
+
|
|
204
|
+
The agent can be Codex, Copilot, Claude Code, or another coding agent. The skill can include instructions to get logs from self-hosted Renovate workflows in GitHub Actions with the `gh` CLI.
|
|
201
205
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
By default, the command is interactive. It asks whether to install the skill **locally** or **globally**.
|
|
207
|
+
|
|
208
|
+
It also asks whether to include the GitHub fetch section. This section applies to self-hosted Renovate in a GitHub Actions workflow.
|
|
209
|
+
|
|
210
|
+
If you include this section, provide the repository as `org/repo`, the Renovate workflow filename, and the base URL.
|
|
211
|
+
|
|
212
|
+
Provide all answers as flags to run without prompts. Use these flags in CI. Each provided flag skips its prompt.
|
|
208
213
|
|
|
209
214
|
```bash
|
|
210
215
|
# Interactive
|
|
@@ -216,31 +221,28 @@ npx renovate-log-parser install-analyze-skill --scope local --with-gh \
|
|
|
216
221
|
--gh-repo acme/app --gh-workflow renovate.yml
|
|
217
222
|
```
|
|
218
223
|
|
|
219
|
-
The skill is
|
|
220
|
-
`<root>/.agents/skills/renovate-log-analyzer/SKILL.md`, where `<root>` is the
|
|
221
|
-
current working directory (`local`) or your home directory (`global`).
|
|
224
|
+
The command writes the skill to `<root>/.agents/skills/renovate-log-analyzer/SKILL.md`. The `<root>` is the current working directory for `local` scope. It is your home directory for `global` scope.
|
|
222
225
|
|
|
223
|
-
| Arg / option | Default | Description
|
|
224
|
-
| --------------- | -------------- |
|
|
225
|
-
| `--scope` | (prompt) | `local` (`<cwd>/.agents/skills`) or `global` (`~/.agents/skills`)
|
|
226
|
-
| `--with-gh` | (prompt) | Include a "fetch logs from GitHub via `gh`" section
|
|
227
|
-
| `--gh-base-url` | (prompt if gh) | GitHub Enterprise host (
|
|
228
|
-
| `--gh-repo` | (prompt if gh) | Repository as `org/repo` (
|
|
229
|
-
| `--gh-workflow` | (prompt if gh) | Filename of the workflow that runs Renovate (
|
|
230
|
-
| `--yes` | `false` | Skip all prompts
|
|
226
|
+
| Arg / option | Default | Description |
|
|
227
|
+
| --------------- | -------------- | ------------------------------------------------------------------------------ |
|
|
228
|
+
| `--scope` | (prompt) | `local` (`<cwd>/.agents/skills`) or `global` (`~/.agents/skills`) |
|
|
229
|
+
| `--with-gh` | (prompt) | Include a "fetch logs from GitHub via `gh`" section |
|
|
230
|
+
| `--gh-base-url` | (prompt if gh) | GitHub Enterprise host (for example, `github.example.com`). Blank = github.com |
|
|
231
|
+
| `--gh-repo` | (prompt if gh) | Repository as `org/repo` (for example, `acme/app`) |
|
|
232
|
+
| `--gh-workflow` | (prompt if gh) | Filename of the workflow that runs Renovate (for example, `renovate.yml`) |
|
|
233
|
+
| `--yes` | `false` | Skip all prompts. Fail if a required answer is missing |
|
|
231
234
|
|
|
232
|
-
**Exit codes:** `0` = success · `2` = tool/usage error (missing required answer
|
|
233
|
-
when non-interactive, or a write failure).
|
|
235
|
+
**Exit codes:** `0` = success · `2` = tool/usage error (missing required answer without prompts, or a write failure).
|
|
234
236
|
|
|
235
237
|
### `web`
|
|
236
238
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
[
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
239
|
+
This command starts the bundled web UI for interactive, filtered log analysis. The UI is a statically rendered [Nuxt](https://nuxt.com) SPA with [Nuxt UI](https://ui.nuxt.com).
|
|
240
|
+
|
|
241
|
+
A small [Express](https://expressjs.com) server provides the UI and exposes the `/api` endpoints. The server keeps the SQLite-backed parsed log on disk. It streams paged rows to the client.
|
|
242
|
+
|
|
243
|
+
You can open more than one log at the same time. Open a second browser tab and pick a different file. Each tab keeps its own log and its own filters. The tab keeps its log in the URL, so a page reload restores it.
|
|
244
|
+
|
|
245
|
+
To open a log automatically, provide its optional path. Otherwise, use the file picker in the UI.
|
|
244
246
|
|
|
245
247
|
| Arg / option | Default | Description |
|
|
246
248
|
| ------------ | ----------- | -------------------------------------------------- |
|
|
@@ -257,35 +259,25 @@ renovate-log-parser web path/to/renovate.jsonl
|
|
|
257
259
|
renovate-log-parser web --port 4000 --no-open
|
|
258
260
|
```
|
|
259
261
|
|
|
260
|
-
**The viewer**
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
- **
|
|
268
|
-
- **
|
|
269
|
-
|
|
270
|
-
- **
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
- **Pills** — dynamic, individually toggleable/removable filters created from row
|
|
276
|
-
and JSON-tree context menus (e.g. show-only/hide a `field`, or a
|
|
277
|
-
`field == value`; nested keys create a scoped "contains" search on their
|
|
278
|
-
top-level ancestor).
|
|
279
|
-
|
|
280
|
-
The affordances that cannot be discovered by looking — the two context menus
|
|
281
|
-
above all, but also the pill click/✕ semantics, the `*` search rules and what
|
|
282
|
-
"Hidden fields" actually does — are documented in the UI itself, behind the
|
|
283
|
-
**Help** button in the header.
|
|
262
|
+
**The viewer** displays every log line in a virtualized list with a fixed height. Each row shows a colored level glyph (`T/D/I/W/E/F`) and the entry `msg`.
|
|
263
|
+
|
|
264
|
+
The arrow in each row opens the details slide-over. The slide-over contains a recursive, collapsible JSON tree of the complete entry.
|
|
265
|
+
|
|
266
|
+
**Filtering**: The UI combines all filters with AND logic and debounces input.
|
|
267
|
+
|
|
268
|
+
- **Log levels**: a dropdown that shows or hides entries by level.
|
|
269
|
+
- **Repositories**: includes or excludes entries by repository. The "Repository-independent" pseudo-group contains entries without a `repository`.
|
|
270
|
+
- **Ignored fields**: hides noisy root keys from the row list. The UI always keeps `msg`.
|
|
271
|
+
- **Free-text search**: a field selector. Its first entry, **Raw search**, matches any key or value in the complete line. Other fields use a case-insensitive `*` wildcard match in that field.
|
|
272
|
+
- **Pills**: dynamic filters from the context menus for rows and JSON trees. You can enable, disable, or remove each filter. For example, show or hide a `field` or a `field == value`. Nested keys create a scoped "contains" search for their top-level ancestor.
|
|
273
|
+
|
|
274
|
+
The UI help explains controls that are not visually apparent. These controls include context menus, pill behavior, search rules, and hidden fields.
|
|
275
|
+
|
|
276
|
+
Select the **Help** button in the header to read this information.
|
|
284
277
|
|
|
285
278
|
## Development
|
|
286
279
|
|
|
287
|
-
This repository is an npm workspace
|
|
288
|
-
server live at the root (`src/`), the Nuxt frontend lives in [`web/`](./web).
|
|
280
|
+
This repository is an npm workspace. The publishable CLI and Express web server are in the root `src/` directory. The Nuxt frontend is in [`web/`](./web).
|
|
289
281
|
|
|
290
282
|
```bash
|
|
291
283
|
# Install all workspace dependencies
|
|
@@ -321,87 +313,66 @@ npm run test:e2e:screenshots # + pixel comparison, in Docker
|
|
|
321
313
|
npm run test:e2e:screenshots:update # rewrite the committed baselines
|
|
322
314
|
```
|
|
323
315
|
|
|
324
|
-
Three suites
|
|
316
|
+
Three suites detect different failure classes:
|
|
325
317
|
|
|
326
|
-
- **Unit tests** (`src/core/__tests__/*.test.ts`)
|
|
327
|
-
|
|
328
|
-
- **Fixture tests** (`src/core/__tests__/fixtures.test.ts`) — the full
|
|
329
|
-
Parser → ErrorDetector/Analyzer pipeline run over _real_ Renovate logs
|
|
330
|
-
captured against
|
|
331
|
-
[`MShekow/renovate-log-parser-test`](https://github.com/MShekow/renovate-log-parser-test)
|
|
332
|
-
and committed under `src/core/__tests__/fixtures/`:
|
|
318
|
+
- **Unit tests** (`src/core/__tests__/*.test.ts`): These tests use synthetic, manually written JSONL logs. Each log tests one detection contract.
|
|
319
|
+
- **Fixture tests** (`src/core/__tests__/fixtures.test.ts`): The complete Parser → ErrorDetector/Analyzer pipeline runs on _real_ Renovate logs. Most come from [`MShekow/renovate-log-parser-test`](https://github.com/MShekow/renovate-log-parser-test). The repository stores them in `src/core/__tests__/fixtures/`:
|
|
333
320
|
|
|
334
321
|
| Fixture | What it demonstrates |
|
|
335
322
|
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
336
323
|
| `external-host-error.jsonl` | NPM registry blocked → the run aborts with `result: "external-host-error"` |
|
|
337
|
-
| `various-issues.jsonl` | Abandoned packages, a required
|
|
324
|
+
| `various-issues.jsonl` | Abandoned packages, a required configuration migration, and an npm `lock file error` whose `err.stderr` reports a `Conflicting peer dependency` |
|
|
338
325
|
| `failed-dotnet-install.jsonl` | `builds.dotnet.microsoft.com` blocked → `Datasource connection error` (`DEPTH_ZERO_SELF_SIGNED_CERT`) and `Failed to generate lock file` / "No tool releases found." |
|
|
326
|
+
| `invalid-config.jsonl` | An unparseable `renovate.jsonc` → `Repository has invalid config` at warning level, and `result: "config-validation"` |
|
|
339
327
|
|
|
340
|
-
The
|
|
341
|
-
|
|
342
|
-
dependency versions
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
Its nested `web UI` block starts the installed `web` command and drives the
|
|
353
|
-
real UI in a headless Chromium, using the `playwright-core` _library_ — there
|
|
354
|
-
is no second test runner or config file, these are plain `node:test` cases in
|
|
355
|
-
the same file. Because they run against the installed tarball, they assert
|
|
356
|
-
that the shipped server actually boots and serves the SPA, not merely that its
|
|
357
|
-
files are present. Chromium must be installed once with
|
|
358
|
-
`npx playwright-core install chromium`; when a browser test fails, a
|
|
359
|
-
screenshot, an HTML dump and the captured console/server output are written to
|
|
360
|
-
`e2e-artifacts/` (CI uploads them as a build artifact).
|
|
328
|
+
The `invalid-config` fixture is the exception: Renovate ran with `--platform=local` against a directory, so there is no test repository and the repository is named `local`. Its input is `src/core/__tests__/fixtures/invalid-config-repo/renovate.jsonc`, which is malformed on purpose. Do not reformat that file. It is listed in `.prettierignore`.
|
|
329
|
+
|
|
330
|
+
The assertions are _semantic_, not snapshot-based. A Renovate log contains variable data, such as timestamps, pid, hostname, logContext, and dependency versions. The assertions cover only the signals that each scenario demonstrates.
|
|
331
|
+
|
|
332
|
+
- **Packaging E2E tests** (`e2e/pack-install.e2e.ts`): These tests build and run `npm pack`. They install the tarball in an empty temporary project. Then they run the installed `renovate-log-parser` binary with a fixture. Only this suite detects a missing `package.json#files` entry. When `src/` is adjacent, it also detects a `dist/` import that resolves only in that location.
|
|
333
|
+
|
|
334
|
+
To skip the packaging tests, set `SKIP_E2E=1`.
|
|
335
|
+
|
|
336
|
+
The nested `web UI` block starts the installed `web` command. It controls the real UI in headless Chromium with the `playwright-core` _library_. There is no second test runner or configuration file. The cases use `node:test` in the same file. The cases prove that the shipped server starts and provides the SPA. They do not only inspect the package files.
|
|
337
|
+
|
|
338
|
+
If a browser test fails, the suite writes a screenshot and HTML dump to `e2e-artifacts/`. It also writes the captured console and server output. CI uploads these files as a build artifact.
|
|
361
339
|
|
|
362
340
|
### Screenshot tests
|
|
363
341
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
is therefore only meaningful against a frozen environment, so the comparison runs
|
|
374
|
-
inside the container built from [`e2e/Dockerfile`](./e2e/Dockerfile) — pinned base
|
|
375
|
-
image, Chromium pinned to the `playwright-core` version in `package.json`, and a
|
|
376
|
-
fixed grayscale-antialiasing/hinting config. Outside that container the four
|
|
377
|
-
cases skip themselves, so a plain `npm run test:e2e` keeps working as before.
|
|
342
|
+
There are cases in the `web UI` block comparing the live UI with PNG files in [`e2e/screenshots/`](./e2e/screenshots). These files show the empty state, a loaded log, the Problems slide-over, and the details slide-over.
|
|
343
|
+
|
|
344
|
+
A difference in **one** pixel fails the test. Locator-based assertions cannot detect a broken layout or a level glyph that lost its color. They also cannot detect a Nuxt UI upgrade that changes the header layout. Only this suite detects these changes.
|
|
345
|
+
|
|
346
|
+
Code is not the only factor that changes pixels. The Chromium build, installed font files, and fontconfig rasterization configuration also change the output.
|
|
347
|
+
|
|
348
|
+
A baseline is meaningful only in a fixed environment. Therefore, the comparison runs in the container built from [`e2e/Dockerfile`](./e2e/Dockerfile). The container has a pinned base image and a fixed grayscale antialiasing and hinting configuration. The `playwright-core` version in `package.json` pins the Chromium build.
|
|
349
|
+
|
|
350
|
+
Outside this container, the four cases skip. Therefore, `npm run test:e2e` continues to work as before.
|
|
378
351
|
|
|
379
352
|
```bash
|
|
380
353
|
npm run test:e2e:screenshots # build the image, run the suite, compare
|
|
381
354
|
npm run test:e2e:screenshots:update # same, but rewrite the baselines
|
|
382
355
|
```
|
|
383
356
|
|
|
384
|
-
Both build the image
|
|
385
|
-
|
|
386
|
-
|
|
357
|
+
Both commands build the image, which is cached after the first run. They mount the work tree with your UID. Therefore, they do not leave root-owned files on the host.
|
|
358
|
+
|
|
359
|
+
If the images differ, the commands write the expected, actual, and difference images to `e2e-artifacts/`. CI uploads these images.
|
|
360
|
+
|
|
361
|
+
After an intentional UI change, run the update script. Then **inspect the regenerated PNGs**. Commit them with the change.
|
|
362
|
+
|
|
363
|
+
A baseline difference is part of the review. Do not approve it without inspection.
|
|
387
364
|
|
|
388
|
-
After an
|
|
389
|
-
PNGs**, and commit them alongside the change — a baseline diff is part of the
|
|
390
|
-
review, not a chore to rubber-stamp. Upgrading `@nuxt/ui`, `tailwindcss` or
|
|
391
|
-
`playwright-core` will usually require the same, since all three move pixels.
|
|
365
|
+
After an upgrade of `@nuxt/ui`, `tailwindcss`, or `playwright-core`, update and inspect the screenshot baselines. All three products may change pixels.
|
|
392
366
|
|
|
393
|
-
For
|
|
394
|
-
rather than merely declared: an unloaded font falls back to whatever
|
|
395
|
-
`sans-serif` the viewer's OS provides, which made the UI render differently on
|
|
396
|
-
every machine.
|
|
367
|
+
For consistent output, the project hosts `Public Sans` with `@fontsource/public-sans` instead of only declaring the font.
|
|
397
368
|
|
|
398
369
|
### Regenerating the log fixtures
|
|
399
370
|
|
|
400
|
-
The [`compose.yml`](./compose.yml) stack runs Renovate against the test
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
adds the hostnames it
|
|
371
|
+
The [`compose.yml`](./compose.yml) stack runs Renovate against the test repository. It includes an NGINX "firewall" for selected hostnames.
|
|
372
|
+
|
|
373
|
+
Docker DNS points these hostnames to the firewall. Therefore, outbound access to these hostnames fails as it does behind a corporate proxy.
|
|
374
|
+
|
|
375
|
+
The base file does not block a hostname. Each scenario adds an override with the hostnames that it must block:
|
|
405
376
|
|
|
406
377
|
```bash
|
|
407
378
|
# Requires a .env with GITHUB_PAT (+ optionally LOCAL_UID / LOCAL_GID)
|
|
@@ -414,23 +385,42 @@ cp container-out-logs/out.log src/core/__tests__/fixtures/<scenario>.jsonl
|
|
|
414
385
|
docker compose ... down -v # discard the generated certificate
|
|
415
386
|
```
|
|
416
387
|
|
|
417
|
-
Renovate must start from a _pristine_ repository
|
|
418
|
-
|
|
419
|
-
|
|
388
|
+
Renovate must start from a _pristine_ repository. Remaining `renovate/*` branches cause the "Branch already exists" code path. That code path skips the work that the fixture records. Before you regenerate a fixture, close the related Renovate PRs and delete their branches.
|
|
389
|
+
|
|
390
|
+
The `invalid-config` fixture does not use this stack. It runs Renovate's [local platform](https://docs.renovatebot.com/modules/platform/local) against a directory, so it needs no test repository, no token and no firewall:
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
work="$(mktemp -d)" # must be outside a Git work tree
|
|
394
|
+
cp src/core/__tests__/fixtures/invalid-config-repo/renovate.jsonc "$work/"
|
|
395
|
+
chmod -R a+rwX "$work"
|
|
396
|
+
mkdir -p container-out-logs && chmod 777 container-out-logs
|
|
397
|
+
: > container-out-logs/out.log && chmod 666 container-out-logs/out.log
|
|
398
|
+
|
|
399
|
+
docker run --rm -v "$work":/workspace -w /workspace \
|
|
400
|
+
-v "$PWD/container-out-logs":/logs \
|
|
401
|
+
-e LOG_LEVEL=debug -e LOG_FILE=/logs/out.log -e RENOVATE_PLATFORM=local \
|
|
402
|
+
--entrypoint renovate renovate/renovate:latest
|
|
403
|
+
|
|
404
|
+
cp container-out-logs/out.log src/core/__tests__/fixtures/invalid-config.jsonl
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
Two details matter here. The scratch directory must be outside a Git work tree, because Renovate lists files with `git ls-files` and only falls back to a glob when that command fails. Inside a work tree it succeeds and returns the wrong files. The log file must also be created in advance and made writable, because `--entrypoint renovate` skips the wrapper that normally returns ownership of the log to your user.
|
|
408
|
+
|
|
409
|
+
The [`.github/workflows/verify-fixtures.yml`](./.github/workflows/verify-fixtures.yml) workflow automates this process each week and on demand. It uses one job for each scenario.
|
|
410
|
+
|
|
411
|
+
The jobs that share the test repository run in sequence. Each of these jobs first closes every Renovate PR and deletes every Renovate branch. The `invalid-config` job uses no repository, so it runs in parallel.
|
|
412
|
+
|
|
413
|
+
The workflow overwrites the committed fixture with the new log. Then it runs the fixture tests with this log.
|
|
414
|
+
|
|
415
|
+
If a Renovate release renames a message or removes a field, the workflow fails. It does not commit the new log.
|
|
420
416
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
Renovate PR and branch. It overwrites the committed fixture with the freshly
|
|
425
|
-
generated log and re-runs the fixture tests against it — so a Renovate release
|
|
426
|
-
that renames a message or drops a field turns the workflow red. Nothing is
|
|
427
|
-
committed back; the regenerated log is uploaded as an artifact so the fixture
|
|
428
|
-
can be updated deliberately. The workflow needs a `TEST_REPO_PAT` secret (a
|
|
429
|
-
fine-grained PAT with contents + pull-request write access to the test repo).
|
|
417
|
+
Instead, the workflow uploads the log as an artifact for an intentional fixture update. The workflow requires a `TEST_REPO_PAT` secret.
|
|
418
|
+
|
|
419
|
+
This secret is a fine-grained PAT. It requires write access to contents and pull requests in the test repository.
|
|
430
420
|
|
|
431
421
|
### Linting & formatting
|
|
432
422
|
|
|
433
|
-
[ESLint](https://eslint.org)
|
|
423
|
+
[ESLint](https://eslint.org) uses a flat configuration at the workspace root. [Prettier](https://prettier.io) also has its configuration at the workspace root.
|
|
434
424
|
|
|
435
425
|
```bash
|
|
436
426
|
npm run lint # ESLint for src/ (type-aware) + web/ (Nuxt rules)
|
|
@@ -438,42 +428,26 @@ npm run format # Prettier write pass over all non-ignored files
|
|
|
438
428
|
npm run format:check # Prettier check (no writes — useful in CI)
|
|
439
429
|
```
|
|
440
430
|
|
|
441
|
-
- **Root (`src/`)
|
|
442
|
-
- **Web (`web/`)
|
|
443
|
-
|
|
444
|
-
### How it
|
|
445
|
-
|
|
446
|
-
- **CLI
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
SQLite-
|
|
454
|
-
- **Backend** — a plain Express server in [`src/server/`](./src/server),
|
|
455
|
-
compiled by the same `tsc` pass as the CLI. It imports `src/core/` through
|
|
456
|
-
ordinary relative imports (no bundler, no alias), serves the `/api` routes
|
|
457
|
-
from `api.ts`, and serves the static SPA with an `index.html` fallback so
|
|
458
|
-
client-side routing works. `log-registry.ts` holds the process-wide "current
|
|
459
|
-
log" (one open `Parser`/SQLite handle per loaded md5, plus a memoized error
|
|
460
|
-
report). The `web` command spawns `dist/server/server-main.js` as a child
|
|
461
|
-
process; when given a log path it hands it off to the UI via a `?log=` query
|
|
462
|
-
parameter.
|
|
431
|
+
- **Root (`src/`)**: [`eslint.config.mjs`](./eslint.config.mjs) applies the `typescript-eslint` `recommendedTypeChecked` rules to `src/**/*.ts`. It appends `eslint-config-prettier` to disable rules that conflict with Prettier. Prettier uses its defaults: semicolons, double quotes, and trailing commas.
|
|
432
|
+
- **Web (`web/`)**: [`web/eslint.config.mjs`](./web/eslint.config.mjs) uses the generated `@nuxt/eslint` configuration. This configuration covers Vue, TypeScript, and Nuxt-specific rules. The root ESLint and Prettier configurations exclude `web/`. Therefore, the two configurations remain independent.
|
|
433
|
+
|
|
434
|
+
### How it is built
|
|
435
|
+
|
|
436
|
+
- **CLI**: TypeScript compiles to ESM in `dist/` with `tsc`. The CLI uses [`yargs`](https://yargs.js.org) to parse commands.
|
|
437
|
+
- **Frontend**: The Nuxt UI application uses `nuxt generate` and `ssr: false`. It is a client-side SPA. The `web/.output/public` directory contains an application shell and static assets. The package does not include Nitro/h3, and the application does not run it. The frontend shares the filtering model and level metadata from `src/core/` with the CLI. The bundle aliases this code as `renovate-core`.
|
|
438
|
+
|
|
439
|
+
Therefore, the browser and CLI use the same SQLite-backed model.
|
|
440
|
+
|
|
441
|
+
- **Backend**: A plain Express server is in [`src/server/`](./src/server). The same `tsc` pass compiles the backend and CLI. The backend imports `src/core/` through ordinary relative imports without a bundler or alias. It provides the `/api` routes from `api.ts`. It also provides the static SPA with an `index.html` fallback for client-side routing. `log-registry.ts` keeps every loaded log, keyed by its content md5.
|
|
442
|
+
|
|
443
|
+
It keeps one open `Parser`/SQLite handle for each loaded md5 and a memoized error report. The read endpoints are stateless: each `GET` gives the md5 of the log to read in a query parameter. There is no server-side "current log". Therefore, each browser tab can show a different log. The `web` command starts `dist/server/server-main.js` as a child process. When the user provides a log path, the command sends it to the UI in a `?log=` query parameter. The UI then replaces that parameter with `?md5=`, which lets the tab restore its log after a page reload.
|
|
463
444
|
|
|
464
445
|
### What gets published
|
|
465
446
|
|
|
466
|
-
Two `package.json` mechanisms
|
|
447
|
+
Two `package.json` mechanisms include both build outputs in the npm package:
|
|
467
448
|
|
|
468
|
-
- **`files: ["dist", "web/.output/public"]
|
|
469
|
-
|
|
470
|
-
`bin` target, then includes everything matched here — both directories,
|
|
471
|
-
recursively. This list takes precedence over `.gitignore`, which is why
|
|
472
|
-
`web/.output/` (gitignored as a build artifact) is still published.
|
|
473
|
-
- **`prepublishOnly: "npm run build"`** — a lifecycle hook npm runs automatically
|
|
474
|
-
before packing on `npm publish`. It generates the static SPA and compiles the
|
|
475
|
-
CLI + server `dist`, so both directories exist and are current by the time the
|
|
476
|
-
`files` allow-list is evaluated.
|
|
449
|
+
- **`files: ["dist", "web/.output/public"]`**: This allow-list controls the contents of the published tarball. npm always adds `package.json`, `README`, `LICENSE`, and the `bin` target. Then it recursively adds both listed directories. This list takes precedence over `.gitignore`. Therefore, npm publishes `web/.output/` although Git ignores it as a build artifact.
|
|
450
|
+
- **`prepublishOnly: "npm run build"`**: Before npm creates the package for `npm publish`, it automatically runs this lifecycle hook. The hook generates the static SPA and compiles the CLI and server to `dist`. When npm evaluates the `files` allow-list, both directories exist and contain current files.
|
|
477
451
|
|
|
478
452
|
```
|
|
479
453
|
npm publish
|
|
@@ -483,5 +457,6 @@ npm publish
|
|
|
483
457
|
└─ upload to registry
|
|
484
458
|
```
|
|
485
459
|
|
|
486
|
-
The result is a
|
|
487
|
-
|
|
460
|
+
The result is a small, self-contained package. It does not include source files or an unintended `node_modules` directory.
|
|
461
|
+
|
|
462
|
+
Run `npm pack --dry-run` to inspect the package contents.
|