@unotest/protocol 0.17.0 → 0.19.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/CHANGELOG.md +102 -0
- package/dist/index.d.ts +1107 -951
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,107 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.19.0] - 2026-08-23
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- dfb3991: Per-collection parallelism via a `workers:` field in the collection YAML.
|
|
8
|
+
|
|
9
|
+
- `workers: N` (integer ≥ 1) in `unotest/e2e/_collections/*.yaml` sets how
|
|
10
|
+
many scenarios of that collection run concurrently; omitted = serial.
|
|
11
|
+
- Precedence: CLI `--workers=N` flag > manifest `workers:` > 1.
|
|
12
|
+
- Viewer: the collection header shows an editable `workers` value; the
|
|
13
|
+
setting is stored in the YAML, so CLI and CI runs pick it up too.
|
|
14
|
+
- `CollectionMeta` (protocol) gains a `workers: number | null` field.
|
|
15
|
+
|
|
16
|
+
- Run history scales: runs are filed under daily shards and the viewer stops
|
|
17
|
+
polling history it is not showing.
|
|
18
|
+
|
|
19
|
+
- New on-disk layout `unotest/.runs/<YYYY>/<MM>/<DD>/<runId>/` (UTC date the
|
|
20
|
+
run started). The shard is a pure function of the `runId`, which already
|
|
21
|
+
carries the timestamp — a direct link to a run keeps working even with the
|
|
22
|
+
index deleted. Existing flat `.runs/<runId>/` history is migrated
|
|
23
|
+
automatically (see the `runs migrate` entry).
|
|
24
|
+
- The viewer's watcher polls only LIVE runs; finished history never touches
|
|
25
|
+
it. Discovery watches the current day's directory with native `fs.watch`
|
|
26
|
+
and re-attaches at UTC midnight.
|
|
27
|
+
- A JSONL index per day and per scenario backs the history list. It is fully
|
|
28
|
+
rebuildable — rebuilt on start, non-blocking — so a corrupted or missing
|
|
29
|
+
index degrades the listing, never the runs themselves.
|
|
30
|
+
- `@unotest/protocol`: new `run-shard` and `run-index` modules (shard path
|
|
31
|
+
derivation, index record shapes) exported from the root entry.
|
|
32
|
+
|
|
33
|
+
- Step screenshots are stored once and shared, and old runs expire on their
|
|
34
|
+
own — a long history stops growing without bound.
|
|
35
|
+
|
|
36
|
+
- Identical frames are content-addressed in `unotest/.runs/_blobs/` and
|
|
37
|
+
hardlinked into each run. `du` and ordinary copies see whole files;
|
|
38
|
+
`cp -a` / `rsync -H` preserve the sharing. On one dogfood suite: 45
|
|
39
|
+
frames, 2.04 MB by apparent size, 0.96 MB on disk.
|
|
40
|
+
- Reference counting is the filesystem's (`st_nlink`), so nothing to keep in
|
|
41
|
+
sync. Blob generations keep the dedup honest past ext4's 65 000-link
|
|
42
|
+
ceiling, and a fresh blob is untouchable for an hour so the window between
|
|
43
|
+
writing it and linking it is never mistaken for garbage.
|
|
44
|
+
- Retention: `UNOTEST_RUNS_RETENTION_DAYS` (whole days, default 180) sweeps
|
|
45
|
+
runs older than the window at the end of a collection run. It never
|
|
46
|
+
changes the exit code — a failed sweep is reported, not fatal.
|
|
47
|
+
- `@unotest/protocol`: new `run-blobs` module exported from the root entry.
|
|
48
|
+
|
|
49
|
+
- `ScenarioLatestEntry` (`GET /api/runs/latest`) gains `lastDurationMs` and
|
|
50
|
+
`recent` — a window of the last 12 outcomes, oldest first. Both are folded by
|
|
51
|
+
the same `foldScenarioRun` the live path and `rebuild()` already share, so
|
|
52
|
+
the index stays fully derived from the run manifests. Feeds the viewer's
|
|
53
|
+
overview dashboard without a request per scenario.
|
|
54
|
+
|
|
55
|
+
`RUN_INDEX_SCHEMA_VERSION` → 2: an index file from the previous version is
|
|
56
|
+
discarded and rebuilt on start, as before. Nothing to do on upgrade.
|
|
57
|
+
|
|
58
|
+
## [0.18.0] - 2026-08-23
|
|
59
|
+
|
|
60
|
+
### Minor Changes
|
|
61
|
+
|
|
62
|
+
- 44f5d6c: Editor typings for scenarios — `.js` files stop looking like broken
|
|
63
|
+
JavaScript in VS Code / WebStorm: autocomplete, hover docs, signature
|
|
64
|
+
help and locator-chain resolution, without turning on a second
|
|
65
|
+
type-checker (`checkJs` stays off; diagnostics remain the DSL
|
|
66
|
+
validator's job).
|
|
67
|
+
|
|
68
|
+
- New shipped file `types/unotest-dsl.d.ts` — ambient declarations for
|
|
69
|
+
every DSL function, generated from the same contracts the validator
|
|
70
|
+
uses (`buildDslVocab()`), so it can never drift from the installed
|
|
71
|
+
version.
|
|
72
|
+
- New CLI command `unotest-web types` — creates `unotest/jsconfig.json`
|
|
73
|
+
if missing and regenerates the `.unotest/types/env.d.ts` cache
|
|
74
|
+
(variable NAMES from `unotest/.env` / `.secrets`; values never leave
|
|
75
|
+
those files).
|
|
76
|
+
- `init` scaffolds the jsconfig + env cache; `scaffoldWorkspace()` now
|
|
77
|
+
includes the jsconfig too.
|
|
78
|
+
- Upgrade path is automatic: `lint` and `e2e` create a missing
|
|
79
|
+
`unotest/jsconfig.json` on the fly (one announcement line) and
|
|
80
|
+
silently refresh the env cache. Skipped under CI. No action needed
|
|
81
|
+
after upgrading — run any test or `unotest-web lint` once and the
|
|
82
|
+
editor comes alive. If you keep a custom `unotest/jsconfig.json`, it
|
|
83
|
+
is never overwritten (re-run `init --force` to reset it).
|
|
84
|
+
- `@unotest/protocol`: additive optional fields on the DSL vocab —
|
|
85
|
+
`DslVocabArg.enumValues` (literal members behind `kind: "enum"`) and
|
|
86
|
+
`DslVocabEntry.variadic`.
|
|
87
|
+
|
|
88
|
+
- 9726552: Go-to-definition for project helpers in the viewer's editor: Ctrl/⌘-click
|
|
89
|
+
(or F12) on a `flow_*` call opens the `_helpers/` file in its tab with
|
|
90
|
+
the declaration line highlighted and scrolled into view. Ctrl-hover shows
|
|
91
|
+
a preview of the helper body. Platform functions (`click`, `goto`) have
|
|
92
|
+
no jump target and produce no console errors. `@unotest/protocol`:
|
|
93
|
+
additive optional `DslVocabEntry.source` (project-relative path + 1-based
|
|
94
|
+
line/column of the declaration).
|
|
95
|
+
|
|
96
|
+
### Patch Changes
|
|
97
|
+
|
|
98
|
+
- 5ab7bd5: `screenshot()` appears in the DSL vocab (completion, hover, signature
|
|
99
|
+
help, generated editor typings). It always had a validator contract, but
|
|
100
|
+
its diagnostics contract group was missing from the vocab builder, so
|
|
101
|
+
every vocab consumer silently lacked it. A parity test now pins the vocab
|
|
102
|
+
to the contract registry, so a future contract group cannot be forgotten
|
|
103
|
+
again. `@unotest/protocol`: new `DslVocabCategory` value `"diagnostic"`.
|
|
104
|
+
|
|
3
105
|
## [0.17.0] - 2026-08-20
|
|
4
106
|
|
|
5
107
|
### Patch Changes
|