vdelta 0.4.0 → 0.6.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/dist/adapter.d.ts +7 -5
- package/dist/adapter.js +22 -3
- package/dist/adapter.js.map +1 -1
- package/dist/adapters/playwright/adapter.d.ts +27 -0
- package/dist/adapters/playwright/adapter.js +175 -0
- package/dist/adapters/playwright/adapter.js.map +1 -0
- package/dist/adapters/playwright/capture.d.ts +119 -0
- package/dist/adapters/playwright/capture.js +12 -0
- package/dist/adapters/playwright/capture.js.map +1 -0
- package/dist/adapters/playwright/recorder.d.ts +65 -0
- package/dist/adapters/playwright/recorder.js +511 -0
- package/dist/adapters/playwright/recorder.js.map +1 -0
- package/dist/adapters/playwright/reporter.cjs +322 -0
- package/dist/adapters/playwright/reporter.cjs.map +1 -0
- package/dist/adapters/playwright/reporter.d.cts +63 -0
- package/dist/adapters/registry.js +2 -1
- package/dist/adapters/registry.js.map +1 -1
- package/dist/adapters/vitest/adapter.d.ts +9 -10
- package/dist/adapters/vitest/adapter.js +8 -17
- package/dist/adapters/vitest/adapter.js.map +1 -1
- package/dist/adapters/vitest/recorder.d.ts +10 -1
- package/dist/adapters/vitest/recorder.js +18 -1
- package/dist/adapters/vitest/recorder.js.map +1 -1
- package/dist/compare.d.ts +5 -0
- package/dist/compare.js +28 -27
- package/dist/compare.js.map +1 -1
- package/dist/gate.js +9 -8
- package/dist/gate.js.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/schema.d.ts +55 -1
- package/dist/schema.js +26 -8
- package/dist/schema.js.map +1 -1
- package/package.json +4 -2
- package/spec/veridelta-1.md +32 -3
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VdeltaPlaywrightReporter = void 0;
|
|
4
|
+
exports.safeSerialize = safeSerialize;
|
|
5
|
+
exports.serializeConfig = serializeConfig;
|
|
6
|
+
exports.parseStackFrames = parseStackFrames;
|
|
7
|
+
exports.titlesFromTitlePath = titlesFromTitlePath;
|
|
8
|
+
exports.projectFromTitlePath = projectFromTitlePath;
|
|
9
|
+
exports.aggregateAttempts = aggregateAttempts;
|
|
10
|
+
/**
|
|
11
|
+
* Playwright Reporter (`@playwright/test/reporter`) — the vdelta capture
|
|
12
|
+
* side of the playwright adapter. Type-only import of `@playwright/test`:
|
|
13
|
+
* veridelta ships zero runtime dependencies, so this file must not import
|
|
14
|
+
* any playwright *value* (only `import type`). Structured-first (§12):
|
|
15
|
+
* consumes only the runner's structured channel (TestCase/TestResult
|
|
16
|
+
* fields), never rendered output. Writes a Capture dump to
|
|
17
|
+
* $VDELTA_CAPTURE_FILE at run end; without that env var it is inert, so it
|
|
18
|
+
* can stay permanently configured in a project's playwright config (ambient
|
|
19
|
+
* recording, §4.2 — same convention as `../vitest/reporter.ts:123-124`).
|
|
20
|
+
*
|
|
21
|
+
* playwright's `error.message` can contain ANSI escapes (observed in
|
|
22
|
+
* `probes/playwright-0b-core/observations/failures.json`); this reporter
|
|
23
|
+
* writes it through unstripped. Stripping is the recorder's job, matching
|
|
24
|
+
* the vitest adapter's division of labor (canonicalization lives in the
|
|
25
|
+
* recorder, not the capture channel).
|
|
26
|
+
*
|
|
27
|
+
* This source file is `.cts` (not `.ts`), so `tsc` emits it as CommonJS
|
|
28
|
+
* (`dist/adapters/playwright/reporter.cjs`) even though the package is
|
|
29
|
+
* `"type": "module"`. That is deliberate: playwright 1.49.1's
|
|
30
|
+
* `node_modules/playwright/lib/util.js:272-277` `fileIsModule()` treats a
|
|
31
|
+
* `.js` file under `"type": "module"` as ESM and loads it through
|
|
32
|
+
* `node_modules/playwright/lib/transform/transform.js:225-231`
|
|
33
|
+
* `requireOrImport()`'s `eval("import(...)")` branch — in this environment
|
|
34
|
+
* that dynamic `import()` promise never settles, hanging the run
|
|
35
|
+
* indefinitely (observed/BLOCKED). `fileIsModule()` treats `.cjs`/`.cts`
|
|
36
|
+
* as CommonJS unconditionally, which routes through the `require(file)`
|
|
37
|
+
* branch instead — the same branch confirmed to complete normally.
|
|
38
|
+
* Do not reintroduce an ESM `dist/adapters/playwright/reporter.js` as the
|
|
39
|
+
* file playwright's `--reporter` flag loads.
|
|
40
|
+
*/
|
|
41
|
+
const node_crypto_1 = require("node:crypto");
|
|
42
|
+
const node_fs_1 = require("node:fs");
|
|
43
|
+
/**
|
|
44
|
+
* Local copy of `capture.ts`'s `CAPTURE_VERSION`, kept in lockstep via
|
|
45
|
+
* `satisfies` rather than a runtime import: `capture.ts` lives under
|
|
46
|
+
* `"type": "module"` (ESM), and a `.cts` file importing an ESM *value*
|
|
47
|
+
* either fails to compile (TS1479) or risks `ERR_REQUIRE_ESM` at runtime
|
|
48
|
+
* (node 22.0–22.11, before `require(esm)` was unflagged). `import type`
|
|
49
|
+
* (above) is erased at compile time and carries no such risk; this
|
|
50
|
+
* `satisfies` clause makes any future change to `capture.ts`'s
|
|
51
|
+
* `CAPTURE_VERSION` a compile-time error here instead of a silent drift.
|
|
52
|
+
*/
|
|
53
|
+
const CAPTURE_VERSION = 1;
|
|
54
|
+
/**
|
|
55
|
+
* Recursively serializes a resolved-config-shaped value into JSON-safe data:
|
|
56
|
+
* `RegExp` becomes its `.toString()` form, circular object references become
|
|
57
|
+
* the string `'[Circular]'`, and function-valued properties are dropped
|
|
58
|
+
* (never appear as a key in the output). Used for `grep`/`grepInvert` and
|
|
59
|
+
* per-project `testMatch`/`testIgnore`/`use`, all of which can carry `RegExp`
|
|
60
|
+
* values in playwright's resolved `FullConfig`/`FullProject`.
|
|
61
|
+
*/
|
|
62
|
+
function safeSerialize(value, seen = new WeakSet()) {
|
|
63
|
+
if (value === undefined)
|
|
64
|
+
return undefined;
|
|
65
|
+
if (value === null)
|
|
66
|
+
return null;
|
|
67
|
+
if (value instanceof RegExp)
|
|
68
|
+
return value.toString();
|
|
69
|
+
const t = typeof value;
|
|
70
|
+
if (t === 'function')
|
|
71
|
+
return undefined;
|
|
72
|
+
if (t !== 'object')
|
|
73
|
+
return value;
|
|
74
|
+
if (seen.has(value))
|
|
75
|
+
return '[Circular]';
|
|
76
|
+
seen.add(value);
|
|
77
|
+
if (Array.isArray(value))
|
|
78
|
+
return value.map((v) => safeSerialize(v, seen));
|
|
79
|
+
const out = {};
|
|
80
|
+
for (const [k, v] of Object.entries(value)) {
|
|
81
|
+
const s = safeSerialize(v, seen);
|
|
82
|
+
if (s !== undefined)
|
|
83
|
+
out[k] = s;
|
|
84
|
+
}
|
|
85
|
+
return out;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Defensive-cast the playwright resolved config (`FullConfig`, as given to
|
|
89
|
+
* `onBegin`) into `Capture['config']` (the §4-judged-`yes` covering set).
|
|
90
|
+
* Pure function so the cast rules are unit-testable without a running
|
|
91
|
+
* playwright test run.
|
|
92
|
+
*/
|
|
93
|
+
function serializeConfig(config) {
|
|
94
|
+
return {
|
|
95
|
+
fullyParallel: config.fullyParallel,
|
|
96
|
+
workers: config.workers,
|
|
97
|
+
shard: config.shard,
|
|
98
|
+
forbidOnly: config.forbidOnly,
|
|
99
|
+
maxFailures: config.maxFailures,
|
|
100
|
+
grep: safeSerialize(config.grep),
|
|
101
|
+
grepInvert: safeSerialize(config.grepInvert),
|
|
102
|
+
globalTimeout: config.globalTimeout,
|
|
103
|
+
projects: config.projects.map((p) => ({
|
|
104
|
+
name: p.name,
|
|
105
|
+
testMatch: safeSerialize(p.testMatch),
|
|
106
|
+
testIgnore: safeSerialize(p.testIgnore),
|
|
107
|
+
dependencies: [...p.dependencies],
|
|
108
|
+
retries: p.retries,
|
|
109
|
+
timeout: p.timeout,
|
|
110
|
+
use: safeSerialize(p.use),
|
|
111
|
+
})),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Deterministically parses `at <symbol> (<file>:<line>:<column>)` frames out
|
|
116
|
+
* of a raw error stack string — the same regex rule as
|
|
117
|
+
* `probes/playwright-0b-core/project/scripts/analyze-stability.mjs`'s
|
|
118
|
+
* `findEnclosingFrame`, applied to every matching line rather than just the
|
|
119
|
+
* first. Anonymous frames (no named symbol, no parens) do not match, by
|
|
120
|
+
* design (same rule as the probe). Returns `[]` for an undefined/empty
|
|
121
|
+
* stack.
|
|
122
|
+
*/
|
|
123
|
+
function parseStackFrames(stack) {
|
|
124
|
+
if (stack === undefined || stack === '')
|
|
125
|
+
return [];
|
|
126
|
+
const frames = [];
|
|
127
|
+
const re = /at\s+[\w$.]+\s+\(([^)]+):(\d+):(\d+)\)/g;
|
|
128
|
+
let m;
|
|
129
|
+
// biome-ignore lint/suspicious/noAssignInExpressions: standard exec-loop idiom
|
|
130
|
+
while ((m = re.exec(stack)) !== null) {
|
|
131
|
+
const file = m[1];
|
|
132
|
+
const line = m[2];
|
|
133
|
+
const column = m[3];
|
|
134
|
+
if (file === undefined || line === undefined || column === undefined)
|
|
135
|
+
continue;
|
|
136
|
+
frames.push({ file, line: Number(line), column: Number(column) });
|
|
137
|
+
}
|
|
138
|
+
return frames;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* `TestCase.titlePath()` is `['', project, file, ...titles]` (root suite
|
|
142
|
+
* title is always `''`, then the project suite title, then the file suite
|
|
143
|
+
* title). Strips those first three entries, leaving the describe/test title
|
|
144
|
+
* chain.
|
|
145
|
+
*/
|
|
146
|
+
function titlesFromTitlePath(titlePath) {
|
|
147
|
+
return titlePath.slice(3);
|
|
148
|
+
}
|
|
149
|
+
/** The project name is `titlePath()[1]` — `''` if the path is malformed/short. */
|
|
150
|
+
function projectFromTitlePath(titlePath) {
|
|
151
|
+
return titlePath[1] ?? '';
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Appends `attempt` to `existing` and returns a new array sorted by `retry`
|
|
155
|
+
* ascending. Playwright calls `onTestEnd` once per attempt for the same
|
|
156
|
+
* `TestCase.id` (retries), so the reporter aggregates by folding each new
|
|
157
|
+
* result through this pure function; sorting keeps the aggregation
|
|
158
|
+
* deterministic even if attempts arrive out of order (e.g. under
|
|
159
|
+
* `--repeat-each`, where a single id's retries interleave with other
|
|
160
|
+
* repeats' worker scheduling).
|
|
161
|
+
*/
|
|
162
|
+
function aggregateAttempts(existing, attempt) {
|
|
163
|
+
return [...existing, attempt].sort((a, b) => a.retry - b.retry);
|
|
164
|
+
}
|
|
165
|
+
function stdioEntryText(chunk) {
|
|
166
|
+
return typeof chunk === 'string' ? chunk : chunk.toString('utf8');
|
|
167
|
+
}
|
|
168
|
+
function captureError(error) {
|
|
169
|
+
const location = error.location;
|
|
170
|
+
return {
|
|
171
|
+
message: typeof error.message === 'string' ? error.message : '',
|
|
172
|
+
...(typeof error.stack === 'string' ? { stack: error.stack } : {}),
|
|
173
|
+
...(location !== undefined
|
|
174
|
+
? {
|
|
175
|
+
location: {
|
|
176
|
+
file: location.file,
|
|
177
|
+
line: location.line,
|
|
178
|
+
column: location.column,
|
|
179
|
+
},
|
|
180
|
+
}
|
|
181
|
+
: {}),
|
|
182
|
+
frames: parseStackFrames(error.stack),
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
function digestAttachmentBody(attachment) {
|
|
186
|
+
let bodyDigest = null;
|
|
187
|
+
if (attachment.body !== undefined) {
|
|
188
|
+
bodyDigest = (0, node_crypto_1.createHash)('sha256').update(attachment.body).digest('hex');
|
|
189
|
+
}
|
|
190
|
+
else if (typeof attachment.path === 'string') {
|
|
191
|
+
try {
|
|
192
|
+
bodyDigest = (0, node_crypto_1.createHash)('sha256')
|
|
193
|
+
.update((0, node_fs_1.readFileSync)(attachment.path))
|
|
194
|
+
.digest('hex');
|
|
195
|
+
}
|
|
196
|
+
catch {
|
|
197
|
+
bodyDigest = null;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
name: attachment.name,
|
|
202
|
+
content_type: attachment.contentType,
|
|
203
|
+
body_digest: bodyDigest,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
function captureAttempt(result) {
|
|
207
|
+
return {
|
|
208
|
+
status: result.status,
|
|
209
|
+
retry: result.retry,
|
|
210
|
+
errors: result.errors.map(captureError),
|
|
211
|
+
stdio: [
|
|
212
|
+
...result.stdout.map((s) => ({
|
|
213
|
+
type: 'stdout',
|
|
214
|
+
text: stdioEntryText(s),
|
|
215
|
+
})),
|
|
216
|
+
...result.stderr.map((s) => ({
|
|
217
|
+
type: 'stderr',
|
|
218
|
+
text: stdioEntryText(s),
|
|
219
|
+
})),
|
|
220
|
+
],
|
|
221
|
+
attachments: result.attachments.map(digestAttachmentBody),
|
|
222
|
+
duration_ms: result.duration,
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
function captureAnnotations(annotations) {
|
|
226
|
+
return annotations.map((a) => a.description !== undefined
|
|
227
|
+
? { type: a.type, description: a.description }
|
|
228
|
+
: { type: a.type });
|
|
229
|
+
}
|
|
230
|
+
function describeTest(test) {
|
|
231
|
+
const titlePath = test.titlePath();
|
|
232
|
+
return {
|
|
233
|
+
test_case_id: test.id,
|
|
234
|
+
file_abs: test.location.file,
|
|
235
|
+
project: projectFromTitlePath(titlePath),
|
|
236
|
+
titles: titlesFromTitlePath(titlePath),
|
|
237
|
+
location_line: test.location.line ?? null,
|
|
238
|
+
expected_status: test.expectedStatus,
|
|
239
|
+
annotations: captureAnnotations(test.annotations),
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
class VdeltaPlaywrightReporter {
|
|
243
|
+
configDump;
|
|
244
|
+
configFile;
|
|
245
|
+
runnerVersion = 'unknown';
|
|
246
|
+
rootSuite;
|
|
247
|
+
unhandledErrorCount = 0;
|
|
248
|
+
metaById = new Map();
|
|
249
|
+
attemptsById = new Map();
|
|
250
|
+
get active() {
|
|
251
|
+
const outFile = process.env.VDELTA_CAPTURE_FILE;
|
|
252
|
+
return outFile !== undefined && outFile !== '';
|
|
253
|
+
}
|
|
254
|
+
onBegin(config, suite) {
|
|
255
|
+
if (!this.active)
|
|
256
|
+
return;
|
|
257
|
+
this.configDump = serializeConfig(config);
|
|
258
|
+
this.configFile =
|
|
259
|
+
typeof config.configFile === 'string' && config.configFile !== ''
|
|
260
|
+
? config.configFile
|
|
261
|
+
: undefined;
|
|
262
|
+
this.runnerVersion = config.version;
|
|
263
|
+
this.rootSuite = suite;
|
|
264
|
+
}
|
|
265
|
+
onError(_error) {
|
|
266
|
+
if (!this.active)
|
|
267
|
+
return;
|
|
268
|
+
this.unhandledErrorCount += 1;
|
|
269
|
+
}
|
|
270
|
+
onTestEnd(test, result) {
|
|
271
|
+
if (!this.active)
|
|
272
|
+
return;
|
|
273
|
+
const id = test.id;
|
|
274
|
+
if (!this.metaById.has(id))
|
|
275
|
+
this.metaById.set(id, describeTest(test));
|
|
276
|
+
const existing = this.attemptsById.get(id) ?? [];
|
|
277
|
+
this.attemptsById.set(id, aggregateAttempts(existing, captureAttempt(result)));
|
|
278
|
+
}
|
|
279
|
+
onEnd(result) {
|
|
280
|
+
if (!this.active)
|
|
281
|
+
return;
|
|
282
|
+
const outFile = process.env.VDELTA_CAPTURE_FILE;
|
|
283
|
+
if (outFile === undefined || outFile === '')
|
|
284
|
+
return;
|
|
285
|
+
const tests = [];
|
|
286
|
+
for (const [id, meta] of this.metaById) {
|
|
287
|
+
tests.push({ ...meta, attempts: this.attemptsById.get(id) ?? [] });
|
|
288
|
+
}
|
|
289
|
+
const allTests = this.rootSuite?.allTests() ?? [];
|
|
290
|
+
const unreportedTests = allTests
|
|
291
|
+
.filter((t) => !this.metaById.has(t.id))
|
|
292
|
+
.map((t) => describeTest(t));
|
|
293
|
+
const capture = {
|
|
294
|
+
capture_version: CAPTURE_VERSION,
|
|
295
|
+
runner: 'playwright',
|
|
296
|
+
runner_version: this.runnerVersion,
|
|
297
|
+
status: result.status,
|
|
298
|
+
unhandled_errors: this.unhandledErrorCount,
|
|
299
|
+
config: this.configDump ?? {
|
|
300
|
+
fullyParallel: false,
|
|
301
|
+
workers: 0,
|
|
302
|
+
shard: null,
|
|
303
|
+
forbidOnly: false,
|
|
304
|
+
maxFailures: 0,
|
|
305
|
+
grep: null,
|
|
306
|
+
grepInvert: null,
|
|
307
|
+
globalTimeout: 0,
|
|
308
|
+
projects: [],
|
|
309
|
+
},
|
|
310
|
+
tests,
|
|
311
|
+
unreported_tests: unreportedTests,
|
|
312
|
+
config_files: this.configFile !== undefined ? [this.configFile] : [],
|
|
313
|
+
};
|
|
314
|
+
(0, node_fs_1.writeFileSync)(outFile, JSON.stringify(capture));
|
|
315
|
+
}
|
|
316
|
+
printsToStdio() {
|
|
317
|
+
return false;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
exports.default = VdeltaPlaywrightReporter;
|
|
321
|
+
exports.VdeltaPlaywrightReporter = VdeltaPlaywrightReporter;
|
|
322
|
+
//# sourceMappingURL=reporter.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter.cjs","sourceRoot":"","sources":["../../../src/adapters/playwright/reporter.cts"],"names":[],"mappings":";;;AAyEA,sCAmBC;AAQD,0CAoBC;AAWD,4CAeC;AAQD,kDAEC;AAGD,oDAEC;AAWD,8CAKC;AAjLD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,6CAAwC;AACxC,qCAAqD;AAoBrD;;;;;;;;;GASG;AACH,MAAM,eAAe,GACnB,CAA4D,CAAA;AAE9D;;;;;;;GAOG;AACH,SAAgB,aAAa,CAC3B,KAAc,EACd,OAAO,IAAI,OAAO,EAAU;IAE5B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IACzC,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IAC/B,IAAI,KAAK,YAAY,MAAM;QAAE,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAA;IACpD,MAAM,CAAC,GAAG,OAAO,KAAK,CAAA;IACtB,IAAI,CAAC,KAAK,UAAU;QAAE,OAAO,SAAS,CAAA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C,EAAE;SACrE,CAAA;QACD,IAAA,uBAAa,EAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;IACjD,CAAC;IAED,aAAa;QACX,OAAO,KAAK,CAAA;IACd,CAAC;CACF;AAnFD,2CAmFC;AAEQ,4DAAwB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { FullConfig, FullResult, Reporter, Suite, TestCase, TestError, TestResult } from '@playwright/test/reporter';
|
|
2
|
+
import type { Capture, CapturedPwAttempt, CapturedPwFrame } from './capture.js';
|
|
3
|
+
/**
|
|
4
|
+
* Recursively serializes a resolved-config-shaped value into JSON-safe data:
|
|
5
|
+
* `RegExp` becomes its `.toString()` form, circular object references become
|
|
6
|
+
* the string `'[Circular]'`, and function-valued properties are dropped
|
|
7
|
+
* (never appear as a key in the output). Used for `grep`/`grepInvert` and
|
|
8
|
+
* per-project `testMatch`/`testIgnore`/`use`, all of which can carry `RegExp`
|
|
9
|
+
* values in playwright's resolved `FullConfig`/`FullProject`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function safeSerialize(value: unknown, seen?: WeakSet<object>): unknown;
|
|
12
|
+
/**
|
|
13
|
+
* Defensive-cast the playwright resolved config (`FullConfig`, as given to
|
|
14
|
+
* `onBegin`) into `Capture['config']` (the §4-judged-`yes` covering set).
|
|
15
|
+
* Pure function so the cast rules are unit-testable without a running
|
|
16
|
+
* playwright test run.
|
|
17
|
+
*/
|
|
18
|
+
export declare function serializeConfig(config: FullConfig): Capture['config'];
|
|
19
|
+
/**
|
|
20
|
+
* Deterministically parses `at <symbol> (<file>:<line>:<column>)` frames out
|
|
21
|
+
* of a raw error stack string — the same regex rule as
|
|
22
|
+
* `probes/playwright-0b-core/project/scripts/analyze-stability.mjs`'s
|
|
23
|
+
* `findEnclosingFrame`, applied to every matching line rather than just the
|
|
24
|
+
* first. Anonymous frames (no named symbol, no parens) do not match, by
|
|
25
|
+
* design (same rule as the probe). Returns `[]` for an undefined/empty
|
|
26
|
+
* stack.
|
|
27
|
+
*/
|
|
28
|
+
export declare function parseStackFrames(stack: string | undefined): CapturedPwFrame[];
|
|
29
|
+
/**
|
|
30
|
+
* `TestCase.titlePath()` is `['', project, file, ...titles]` (root suite
|
|
31
|
+
* title is always `''`, then the project suite title, then the file suite
|
|
32
|
+
* title). Strips those first three entries, leaving the describe/test title
|
|
33
|
+
* chain.
|
|
34
|
+
*/
|
|
35
|
+
export declare function titlesFromTitlePath(titlePath: readonly string[]): string[];
|
|
36
|
+
/** The project name is `titlePath()[1]` — `''` if the path is malformed/short. */
|
|
37
|
+
export declare function projectFromTitlePath(titlePath: readonly string[]): string;
|
|
38
|
+
/**
|
|
39
|
+
* Appends `attempt` to `existing` and returns a new array sorted by `retry`
|
|
40
|
+
* ascending. Playwright calls `onTestEnd` once per attempt for the same
|
|
41
|
+
* `TestCase.id` (retries), so the reporter aggregates by folding each new
|
|
42
|
+
* result through this pure function; sorting keeps the aggregation
|
|
43
|
+
* deterministic even if attempts arrive out of order (e.g. under
|
|
44
|
+
* `--repeat-each`, where a single id's retries interleave with other
|
|
45
|
+
* repeats' worker scheduling).
|
|
46
|
+
*/
|
|
47
|
+
export declare function aggregateAttempts(existing: readonly CapturedPwAttempt[], attempt: CapturedPwAttempt): CapturedPwAttempt[];
|
|
48
|
+
export default class VdeltaPlaywrightReporter implements Reporter {
|
|
49
|
+
private configDump;
|
|
50
|
+
private configFile;
|
|
51
|
+
private runnerVersion;
|
|
52
|
+
private rootSuite;
|
|
53
|
+
private unhandledErrorCount;
|
|
54
|
+
private metaById;
|
|
55
|
+
private attemptsById;
|
|
56
|
+
private get active();
|
|
57
|
+
onBegin(config: FullConfig, suite: Suite): void;
|
|
58
|
+
onError(_error: TestError): void;
|
|
59
|
+
onTestEnd(test: TestCase, result: TestResult): void;
|
|
60
|
+
onEnd(result: FullResult): void;
|
|
61
|
+
printsToStdio(): boolean;
|
|
62
|
+
}
|
|
63
|
+
export { VdeltaPlaywrightReporter };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { playwrightAdapter } from './playwright/adapter.js';
|
|
1
2
|
import { vitestAdapter } from './vitest/adapter.js';
|
|
2
3
|
/** Every known adapter, in a deterministic order. */
|
|
3
|
-
export const ADAPTERS = [vitestAdapter];
|
|
4
|
+
export const ADAPTERS = [vitestAdapter, playwrightAdapter];
|
|
4
5
|
/** Known adapter names, in registry order — for diagnostics and `--adapter`. */
|
|
5
6
|
export function adapterNames(adapters = ADAPTERS) {
|
|
6
7
|
return adapters.map((a) => a.name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/adapters/registry.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,qDAAqD;AACrD,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,aAAa,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/adapters/registry.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,qDAAqD;AACrD,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAA;AAE9E,gFAAgF;AAChF,MAAM,UAAU,YAAY,CAC1B,WAA+B,QAAQ;IAEvC,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;AACpC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CACzB,IAAY,EACZ,WAA+B,QAAQ;IAEvC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;AAC9C,CAAC;AAED;;;;GAIG;AACH,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C,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;IACjD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QACpB,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAA;IACzE,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAE,CAAA;IACxB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAA;AAC3E,CAAC"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import { type Adapter, type
|
|
1
|
+
import { type Adapter, type CommandSelector } from '../../adapter.js';
|
|
2
|
+
import { VITEST_CAPABILITIES } from './recorder.js';
|
|
3
|
+
/**
|
|
4
|
+
* Re-exported from the recorder (§3.4): the declaration lives in
|
|
5
|
+
* `recorder.ts` so `buildRunRecord` can write it into `instrument.capabilities`
|
|
6
|
+
* without an import cycle. Kept here too so existing consumers of this
|
|
7
|
+
* descriptor module keep importing it from `adapter.js`.
|
|
8
|
+
*/
|
|
9
|
+
export { VITEST_CAPABILITIES };
|
|
2
10
|
/**
|
|
3
11
|
* The invocation's selector is its inclusion intent (§6.4): the vitest CLI
|
|
4
12
|
* positional filters. The canonical command excludes them (§5.1).
|
|
@@ -9,13 +17,4 @@ import { type Adapter, type CapabilityDeclaration, type CommandSelector } from '
|
|
|
9
17
|
* produce byte-identical `command` arrays (and thus the same stream key).
|
|
10
18
|
*/
|
|
11
19
|
export declare function splitCommandSelector(cmd: readonly string[]): CommandSelector;
|
|
12
|
-
/**
|
|
13
|
-
* Capability declaration for the `vitest-native` composition series (§3.4).
|
|
14
|
-
* Unchanged since `/1`, and still true under `/2`: only `source-region-text`
|
|
15
|
-
* is degraded (CE-1 — vitest's structured channel carries no failing-source
|
|
16
|
-
* region text), everything else this composition claims is met. The `/2`
|
|
17
|
-
* version bump (record shape: 9-item config_digest covering +
|
|
18
|
-
* `completeness.module_errors`) does not touch this declaration.
|
|
19
|
-
*/
|
|
20
|
-
export declare const VITEST_CAPABILITIES: CapabilityDeclaration;
|
|
21
20
|
export declare const vitestAdapter: Adapter;
|
|
@@ -10,7 +10,14 @@ import { readFileSync } from 'node:fs';
|
|
|
10
10
|
import { dirname, join } from 'node:path';
|
|
11
11
|
import { fileURLToPath } from 'node:url';
|
|
12
12
|
import { AdapterCaptureError, } from '../../adapter.js';
|
|
13
|
-
import { ADAPTER_NAME, buildRunRecord, COMPOSITION_ID, DECLARED_ENV_VARS, } from './recorder.js';
|
|
13
|
+
import { ADAPTER_NAME, buildRunRecord, COMPOSITION_ID, DECLARED_ENV_VARS, VITEST_CAPABILITIES, } from './recorder.js';
|
|
14
|
+
/**
|
|
15
|
+
* Re-exported from the recorder (§3.4): the declaration lives in
|
|
16
|
+
* `recorder.ts` so `buildRunRecord` can write it into `instrument.capabilities`
|
|
17
|
+
* without an import cycle. Kept here too so existing consumers of this
|
|
18
|
+
* descriptor module keep importing it from `adapter.js`.
|
|
19
|
+
*/
|
|
20
|
+
export { VITEST_CAPABILITIES };
|
|
14
21
|
/**
|
|
15
22
|
* Absolute path of the in-process vitest reporter that writes the capture.
|
|
16
23
|
* Resolved relative to this module so it points at the built sibling
|
|
@@ -136,22 +143,6 @@ export function splitCommandSelector(cmd) {
|
|
|
136
143
|
}
|
|
137
144
|
return { command, selector };
|
|
138
145
|
}
|
|
139
|
-
/**
|
|
140
|
-
* Capability declaration for the `vitest-native` composition series (§3.4).
|
|
141
|
-
* Unchanged since `/1`, and still true under `/2`: only `source-region-text`
|
|
142
|
-
* is degraded (CE-1 — vitest's structured channel carries no failing-source
|
|
143
|
-
* region text), everything else this composition claims is met. The `/2`
|
|
144
|
-
* version bump (record shape: 9-item config_digest covering +
|
|
145
|
-
* `completeness.module_errors`) does not touch this declaration.
|
|
146
|
-
*/
|
|
147
|
-
export const VITEST_CAPABILITIES = {
|
|
148
|
-
verdicts: 'pass',
|
|
149
|
-
'source-location': 'pass',
|
|
150
|
-
suppression: 'pass',
|
|
151
|
-
inventory: 'pass',
|
|
152
|
-
'failure-evidence': 'pass',
|
|
153
|
-
'source-region-text': 'unsupported',
|
|
154
|
-
};
|
|
155
146
|
export const vitestAdapter = {
|
|
156
147
|
name: ADAPTER_NAME,
|
|
157
148
|
compositionId: COMPOSITION_ID,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../src/adapters/vitest/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAEL,mBAAmB,
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../src/adapters/vitest/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAEL,mBAAmB,GAGpB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,eAAe,CAAA;AAEtB;;;;;GAKG;AACH,OAAO,EAAE,mBAAmB,EAAE,CAAA;AAE9B;;;;GAIG;AACH,SAAS,kBAAkB;IACzB,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE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1
|
+
import { AdapterCaptureError, type CapabilityDeclaration, type RecordContext } from '../../adapter.js';
|
|
2
2
|
import { type RunRecord } from '../../schema.js';
|
|
3
3
|
import type { Capture, CapturedTest } from './capture.js';
|
|
4
4
|
export declare const ADAPTER_NAME = "vitest";
|
|
@@ -16,6 +16,15 @@ export declare class RecorderError extends AdapterCaptureError {
|
|
|
16
16
|
}
|
|
17
17
|
/** Re-exported from the seam: the context shape is runner-neutral (§4.1). */
|
|
18
18
|
export type { RecordContext };
|
|
19
|
+
/**
|
|
20
|
+
* Capability declaration for the `vitest-native` composition series (§3.4).
|
|
21
|
+
* Unchanged since `/1`, and still true under `/2`: only `source-region-text`
|
|
22
|
+
* is degraded (CE-1 — vitest's structured channel carries no failing-source
|
|
23
|
+
* region text), everything else this composition claims is met. The `/2`
|
|
24
|
+
* version bump (record shape: 9-item config_digest covering +
|
|
25
|
+
* `completeness.module_errors`) does not touch this declaration.
|
|
26
|
+
*/
|
|
27
|
+
export declare const VITEST_CAPABILITIES: CapabilityDeclaration;
|
|
19
28
|
export declare function buildRunRecord(capture: Capture, ctx: RecordContext): RunRecord;
|
|
20
29
|
/**
|
|
21
30
|
* The effective evidence-affecting configuration (§3.1, contract §5.4):
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { readFileSync, realpathSync } from 'node:fs';
|
|
19
19
|
import { isAbsolute, join, relative } from 'node:path';
|
|
20
|
-
import { AdapterCaptureError } from '../../adapter.js';
|
|
20
|
+
import { AdapterCaptureError, } from '../../adapter.js';
|
|
21
21
|
import { canonicalDigest } from '../../digest.js';
|
|
22
22
|
import { redactText, redactValue } from '../../redact.js';
|
|
23
23
|
import { SCHEMA_VERSION, } from '../../schema.js';
|
|
@@ -37,6 +37,22 @@ export class RecorderError extends AdapterCaptureError {
|
|
|
37
37
|
this.name = 'RecorderError';
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Capability declaration for the `vitest-native` composition series (§3.4).
|
|
42
|
+
* Unchanged since `/1`, and still true under `/2`: only `source-region-text`
|
|
43
|
+
* is degraded (CE-1 — vitest's structured channel carries no failing-source
|
|
44
|
+
* region text), everything else this composition claims is met. The `/2`
|
|
45
|
+
* version bump (record shape: 9-item config_digest covering +
|
|
46
|
+
* `completeness.module_errors`) does not touch this declaration.
|
|
47
|
+
*/
|
|
48
|
+
export const VITEST_CAPABILITIES = {
|
|
49
|
+
verdicts: 'pass',
|
|
50
|
+
'source-location': 'pass',
|
|
51
|
+
suppression: 'pass',
|
|
52
|
+
inventory: 'pass',
|
|
53
|
+
'failure-evidence': 'pass',
|
|
54
|
+
'source-region-text': 'unsupported',
|
|
55
|
+
};
|
|
40
56
|
export function buildRunRecord(capture, ctx) {
|
|
41
57
|
if (capture.capture_version !== 3) {
|
|
42
58
|
throw new RecorderError(`unsupported capture version ${capture.capture_version}`);
|
|
@@ -92,6 +108,7 @@ export function buildRunRecord(capture, ctx) {
|
|
|
92
108
|
adapter_version: ctx.adapterVersion,
|
|
93
109
|
composition_id: COMPOSITION_ID,
|
|
94
110
|
config_digest: instrumentConfigDigest(capture, ctx.worktree),
|
|
111
|
+
capabilities: { ...VITEST_CAPABILITIES },
|
|
95
112
|
},
|
|
96
113
|
environment: {
|
|
97
114
|
runner: capture.runner,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recorder.js","sourceRoot":"","sources":["../../../src/adapters/vitest/recorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"recorder.js","sourceRoot":"","sources":["../../../src/adapters/vitest/recorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,YAAY,EA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EAAE,CAAA;IACvC,OAAO,MAAM;SACV,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,SAAS,CAAC;SACrC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,aAAc,CAAC,CAAA;AAC1C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe,EAAE,QAAgB;IAC/D,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAA;IACtC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC3C,MAAM,GAAG,GAAG,QAAQ,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAA;IACpD,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,YAAY,YAAY,EAAE,CAAA;IAC9E,oEAAoE;IACpE,oEAAoE;IACpE,OAAO,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AAClC,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC5B,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,IAAI,CAAC;QACH,OAAO,eAAe,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAA;IACpD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
|
package/dist/compare.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comparator (spec §5–§9): baseline selection, comparability judgment,
|
|
3
|
+
* the three delta axes, and comparison-report construction. Deterministic:
|
|
4
|
+
* no timestamps, stable sort orders, recency = store insertion order.
|
|
5
|
+
*/
|
|
1
6
|
import { type BaselineMode, type ComparabilityDetail, type ComparisonReport, type NearMiss, type RunRecord } from './schema.js';
|
|
2
7
|
import { type RunStore } from './store.js';
|
|
3
8
|
export type BaselineSpec = {
|