@decocms/parity 0.11.11 → 0.11.14

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/cli.js +37502 -1076
  3. package/package.json +7 -4
package/CHANGELOG.md CHANGED
@@ -5,6 +5,48 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
+ ## [0.11.14](https://github.com/decocms/parity/compare/v0.11.13...v0.11.14) (2026-06-17)
9
+
10
+ ### Added
11
+
12
+ * **Always-visible elapsed counter.** A 1-second ticker rewrites the spinner with `⏱ 04:32 · <current label>` from the moment "Launching browser…" appears until the report writes. No more "is it stuck?" minutes of silence — the user knows exactly how long the run has been going at any moment. Cleared in `finally` so it can't survive past `runCommand`.
13
+ * **Per-flow timing in the bottom summary.** New `flows breakdown` block lists each flow's `max` time (the parallel-wall-clock contribution) plus per-side detail:
14
+ ```
15
+ flows breakdown (sides run in parallel within viewport)
16
+ purchase-journey max 1m32s · mobile/prod 52s · mobile/cand 58s · desk/prod 89s · desk/cand 90s
17
+ search max 1m48s · …
18
+ ```
19
+ Driven by the existing `FlowCapture.totalDurationMs` (already populated by `finalize` — just wasn't surfaced).
20
+
21
+ ### Changed
22
+
23
+ * **Prod + cand now run in parallel within each viewport.** `parity run`'s collect loop was 100% sequential: `for viewport { for side { for flow {…} } }`. The two sides for a given viewport are already independent (separate BrowserContexts, separate HAR/trace paths), so the same `Promise.all([prod, cand])` pattern that `parity journey` has used for months now applies to `parity run` too. Extracted a `runOneSide(viewport, side)` helper, replaced the inner side loop with `Promise.all`, and deferred `promoteStepsFromFlow` (which mutates the shared `learned` object) until after `Promise.all` resolves so there's no race on selector promotion. **Expected speedup: ~50% on collect phase** (25m → ~17m total on bagaggio). Viewports still serialize for now — PR #2 will parallelize those too.
24
+
25
+ ## [0.11.13](https://github.com/decocms/parity/compare/v0.11.12...v0.11.13) (2026-06-17)
26
+
27
+ ### Fixed
28
+
29
+ * **`parity run` no longer crashes when a flow's `newPage()` errors.** A single rejected inner-flow promise (most commonly `browserContext.newPage: Target page, context or browser has been closed` raised from `flowSearch` when a prior flow corrupted the context) was bubbling through `Promise.race` in `runFlow` and aborting the entire run, throwing away 25+ minutes of work. The `.catch(() => undefined)` on the inner promise only silenced the unhandled-rejection warning — it didn't stop `Promise.race` from seeing the rejection. Wrapped the inner switch in a try/catch that returns a `flow-error` `FlowCapture` instead of throwing, so the surviving viewports/sides finish and the report still renders.
30
+
31
+ ### Added
32
+
33
+ * **Live per-step progress in `parity run`.** Previously the terminal went silent for tens of minutes after "Launching browser…" with no feedback until the run ended or crashed — devs were stuck guessing whether the tool was making progress. Now the spinner updates on every step (`[mobile/prod] purchase-journey 5/9 add-to-cart…`) and prints a permanent per-flow summary line as each side finishes:
34
+ ```
35
+ ✓ [mobile/prod] purchase-journey 9/9 58.2s
36
+ ✓ [mobile/cand] purchase-journey 9/9 62.4s
37
+ ✗ [desk/prod] purchase-journey 6/9 stopped at open-minicart 118s
38
+ ▴ [desk/cand] purchase-journey 3/9 ended at enter-pdp 45s
39
+ ```
40
+ Glyphs: `✓` reached target, `✗` explicit failure at a step, `▴` early exit (e.g. PDP not found so journey never started checkout). Wires the existing `onStep` callback from `runFlow` (already used by `parity journey`) into `run.ts`.
41
+
42
+ ## [0.11.12](https://github.com/decocms/parity/compare/v0.11.11...v0.11.12) (2026-06-17)
43
+
44
+ ### Fixed
45
+
46
+ * **Zero warnings on `npm install -g @decocms/parity`.** Verified end-to-end: a clean global install produces no `ERESOLVE` peer-dep warning and no `deprecated` notices. From 161 packages down to 137.
47
+ * **Migrated to zod 4** to eliminate the `ERESOLVE overriding peer dependency` warning. `@anthropic-ai/claude-agent-sdk@0.3.x` peer-deps `zod@^4.0.0` and we were pinned to `zod@^3.24.1`. Both sibling deps (`@anthropic-ai/sdk@^0.100.1` and `@modelcontextprotocol/sdk`) already accept `^3.25.0 || ^4.0.0`, so zod 4 was the safe direction. Migration touched two files (`src/types/schema.ts`, `src/learned/repo.ts`): `z.record(value)` → `z.record(z.string(), value)` (zod 4 requires explicit key type), and `z.record(enum, value)` → `z.partialRecord(enum, value)` (zod 4 made enum-keyed records require all enum members by default). All 701 tests still pass.
48
+ * **Bundled cheerio inline to drop the deprecated `whatwg-encoding@3.1.1` warning.** `npm overrides` only applies to the consumer's root project, so even with `overrides: { "encoding-sniffer": "^1.0.0" }` end users still saw `npm warn deprecated whatwg-encoding@3.1.1`. The fix: switched the build from `--packages=external` (everything external) to an explicit `--external` list that excludes cheerio. cheerio + its transitives (`parse5`, `htmlparser2`, `domutils`, `domhandler`, `encoding-sniffer`, etc.) are now bundled inline in `dist/cli.js`, and cheerio moved from `dependencies` to `devDependencies`. Net cost: `dist/cli.js` grew from 0.76 MB → 2.16 MB. Net benefit: end users no longer install cheerio or any of its transitives, eliminating the deprecation warning at its source. Live-validated.
49
+
8
50
  ## [0.11.11](https://github.com/decocms/parity/compare/v0.11.10...v0.11.11) (2026-06-17)
9
51
 
10
52
  ### Fixed