@tracelane/playwright 0.1.0-alpha.2 → 0.1.0-alpha.4

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 (2) hide show
  1. package/README.md +7 -5
  2. package/package.json +7 -6
package/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  # @tracelane/playwright
4
4
 
5
- > The recorder for your Playwright tests. A self-contained HTML report on every failurereplay the run with rrweb, inspect the console + failed-network panels, attach to any bug tracker. No SaaS, no dashboard, no signup, no cloud.
5
+ > The recorder for your Playwright tests. When a test fails, you get **one HTML file you can email**media inlined, so it replays the whole session like a video the moment someone double-clicks it. No server, no unzip, no `show-trace`, no toolchain. Under the hood it's rrweb **continuous** DOM replay (not discrete snapshots) across every navigation, plus the console and failed-network panels. Apache-2.0. No SaaS, no dashboard, no signup, no cloud.
6
+
7
+ **Why one file matters.** A `trace.zip` can't be double-clicked — it needs `npx playwright show-trace` or the hosted web viewer over `http(s)://`. The built-in HTML reporter is a server-served folder (`show-report`); open it over `file://` and you get a blank screen. tracelane's artifact is a single `.html` with **all media inlined** — drop it in a bug ticket, email it, archive it, and it still replays standalone. (Plenty of reporters write "a single HTML file"; the part that's specific here is the fully-inlined media *plus* rrweb continuous session replay, so the file plays back like a screen recording with no dependencies.)
6
8
 
7
9
  [![npm](https://img.shields.io/npm/v/@tracelane/playwright.svg)](https://www.npmjs.com/package/@tracelane/playwright)
8
10
  [![downloads](https://img.shields.io/npm/dw/@tracelane/playwright.svg)](https://www.npmjs.com/package/@tracelane/playwright)
@@ -47,11 +49,11 @@ test('checkout', async ({ page }) => {
47
49
 
48
50
  That's it. The fixture is `auto` — every test in files that import this `test` is recorded; nothing else to wire per-test.
49
51
 
50
- Run your suite. On a failing test you get a single `.html` file at `./tracelane-reports/<spec>--<title>--<project>-<ts>.html`open it in any browser, fully offline. Replay the run with [rrweb-player](https://www.rrweb.io), inspect the console + failed-network panels, attach to your bug tracker, archive it forever.
52
+ Run your suite. On a failing test you get one `.html` file at `./tracelane-reports/<spec>--<title>--<project>-<ts>.html`. Double-click it — it opens in any browser, fully offline, with every asset inlined (nothing fetched, nothing to unzip, no local server). Scrub the run as a [rrweb](https://www.rrweb.io) continuous DOM replay, inspect the console + failed-network panels, drop it into a bug ticket, archive it forever.
51
53
 
52
54
  ## How it works
53
55
 
54
- - **The fixture** owns the recording. It is the only place with a live `page` + `testInfo`, so it injects the rrweb bundle via `context.addInitScript` AND hooks `page.on('framenavigated')` to call `recorder.reinject` on every main-frame navigation — so recording continues across navigations (each navigation emits a `tracelane.nav` boundary marker in the replay). It starts the recorder before your test body, and — after it — builds + writes the report. It reuses `@tracelane/core`'s recorder and `@tracelane/report`'s HTML builder.
56
+ - **The fixture** owns the recording — and keeps it going across navigations, so the replay is one continuous session, not a set of per-page snapshots. It is the only place with a live `page` + `testInfo`, so it injects the rrweb bundle via `context.addInitScript` AND hooks `page.on('framenavigated')` to call `recorder.reinject` on every main-frame navigation (each navigation emits a `tracelane.nav` boundary marker in the replay). It starts the recorder before your test body, and — after it — builds + writes the report. It reuses `@tracelane/core`'s recorder and `@tracelane/report`'s HTML builder.
55
57
  - **The reporter** owns config only: it validates options at startup and bridges them to the fixture via `TRACELANE_*` env vars. By design it never touches `page`, prints nothing, and produces no end-of-run summary (the fixture writes the per-test reports).
56
58
  - **Failed-network capture** uses CDP on Chromium (4xx/5xx responses and no-response failures are surfaced into the report's network panel). On Firefox/WebKit it degrades silently to rrweb + console.
57
59
  - **Parallel-safe**: report filenames are namespaced by the Playwright **project name** and carry a millisecond timestamp. Different projects are isolated by name; parallel workers *within one project* share the project-name segment and rely on the timestamp (plus spec + title) to stay distinct.
@@ -69,8 +71,8 @@ Run your suite. On a failing test you get a single `.html` file at `./tracelane-
69
71
 
70
72
  ## What this is NOT
71
73
 
72
- - Not a SaaS. There is no upload, no signup, no dashboard, no telemetry. The artifact is a single HTML file on your filesystem.
73
- - Not a replacement for Playwright's trace viewer — it's a complementary, self-contained replay you can hand to anyone with a browser, no `npx playwright show-trace` required.
74
+ - Not a SaaS. There is no upload, no signup, no dashboard, no telemetry. The artifact is a single HTML file on your filesystem — and unlike reporters that link screenshots/video by relative path, every asset is inlined, so the file keeps replaying even when it's moved or emailed on its own.
75
+ - Not a replacement for Playwright's trace viewer. The trace viewer is the deeper local-debugging tool; tracelane is for the *handoff* — a double-clickable `file://` replay (media inlined, no local server, no `show-trace`/`show-report` step) you can hand to anyone with a browser. The capture model differs too: Playwright records discrete per-action snapshots, tracelane records a continuous rrweb session.
74
76
 
75
77
  ## Limitations
76
78
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tracelane/playwright",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.4",
4
4
  "description": "Playwright reporter + auto-fixture that writes a self-contained replayable HTML report on test failure (rrweb + console + failed-network). No SaaS.",
5
5
  "keywords": [
6
6
  "tracelane",
@@ -41,8 +41,8 @@
41
41
  "README.md"
42
42
  ],
43
43
  "dependencies": {
44
- "@tracelane/report": "0.1.0-alpha.14",
45
- "@tracelane/core": "0.1.0-alpha.12"
44
+ "@tracelane/core": "0.1.0-alpha.14",
45
+ "@tracelane/report": "0.1.0-alpha.16"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@playwright/test": ">=1.40.0"
@@ -51,7 +51,7 @@
51
51
  "@playwright/test": "^1.60.0",
52
52
  "esbuild": "^0.28.0",
53
53
  "tsx": "^4.19.0",
54
- "@cubenest/rrweb-core": "0.1.0-alpha.5"
54
+ "@cubenest/rrweb-core": "0.1.0-alpha.6"
55
55
  },
56
56
  "publishConfig": {
57
57
  "access": "public",
@@ -67,12 +67,13 @@
67
67
  },
68
68
  "homepage": "https://tracelane.cubenest.in",
69
69
  "engines": {
70
- "node": ">=20.18.0"
70
+ "node": ">=22"
71
71
  },
72
72
  "scripts": {
73
73
  "build": "tsc -p tsconfig.json && node scripts/build-rrweb-bundle.mjs",
74
74
  "typecheck": "tsc -p tsconfig.json --noEmit",
75
75
  "test": "vitest run --passWithNoTests",
76
- "test:e2e": "node scripts/build-rrweb-bundle.mjs && node ./e2e/run.mjs"
76
+ "test:e2e": "node scripts/build-rrweb-bundle.mjs && node ./e2e/run.mjs",
77
+ "demo:gen": "tsc -p tsconfig.json && node scripts/build-rrweb-bundle.mjs && node ./scripts/gen-demo-report.mjs"
77
78
  }
78
79
  }