@ac-bench/reporter-json 0.2.1 → 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/CHANGELOG.md +51 -0
- package/README.md +16 -6
- package/dist/index.d.ts +16 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +150 -6
- package/dist/index.js.map +1 -1
- package/package.json +11 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# @ac-bench/reporter-json
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5c203e7: The reporter factory is a named export only, `jsonReporter`; the package no
|
|
8
|
+
longer has a default export. `zod` is now a required peer dependency
|
|
9
|
+
(`^4.5.4`), passed on from `@ac-kit/app-report`.
|
|
10
|
+
|
|
11
|
+
Migration: replace `import jsonReporter from "@ac-bench/reporter-json"` with
|
|
12
|
+
`import { jsonReporter } from "@ac-bench/reporter-json"`, and add `zod` to your
|
|
13
|
+
dependencies if it is not there already.
|
|
14
|
+
- 5c203e7: Config sampling, condition results, a streamed archive.
|
|
15
|
+
|
|
16
|
+
- A config's `sampling` is now read: a record of each measure's default
|
|
17
|
+
sampling options (`{ duration: { minRuns: 20 }, resource: { warmup: 5 } }`),
|
|
18
|
+
validated as such. `runBench`'s new `sampling` option forwards a measure's
|
|
19
|
+
entry to each case as `measureOptions.sampling`, which duration and resource
|
|
20
|
+
read through `runSamplingDefaults` (`@ac-bench/core/runner`) under each
|
|
21
|
+
condition's own options. Migration: the old `sampling` type (condition
|
|
22
|
+
options) never had an effect; key it by measure id.
|
|
23
|
+
- A condition's `onEnd` hook receives a second argument,
|
|
24
|
+
`BenchConditionEndContext`, whose `setConditionResult` emits a
|
|
25
|
+
`"condition-result"` for the condition. Jitter uses it: its condition result
|
|
26
|
+
gains `eventLoopDelay` (`meanMs`, `p50Ms`, `p99Ms`, `maxMs`), the event
|
|
27
|
+
loop's own delay over the condition.
|
|
28
|
+
- The json reporter streams its archive: the header and each condition once
|
|
29
|
+
it settles (`ArchiveBuilder.settled()`), the run description, runtimes,
|
|
30
|
+
gates, verdicts and diagnostics at close, so a crashed run keeps every
|
|
31
|
+
settled condition; `recoverJsonArchive(text)` reads such a file back,
|
|
32
|
+
keeping every condition written whole and dropping one cut mid-way. A
|
|
33
|
+
complete file parses as before; its keys are in another order.
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- 5c203e7: The `homepage` points at the @ac-bench documentation site: `measure(1)` for the CLI, the API reference for `core`, `lib` and `gate`, the site's home for the others.
|
|
38
|
+
- Updated dependencies [5c203e7]
|
|
39
|
+
- Updated dependencies [5c203e7]
|
|
40
|
+
- Updated dependencies [5c203e7]
|
|
41
|
+
- Updated dependencies [5c203e7]
|
|
42
|
+
- Updated dependencies [5c203e7]
|
|
43
|
+
- Updated dependencies [5c203e7]
|
|
44
|
+
- Updated dependencies [5c203e7]
|
|
45
|
+
- Updated dependencies [5c203e7]
|
|
46
|
+
- Updated dependencies [5c203e7]
|
|
47
|
+
- Updated dependencies [5c203e7]
|
|
48
|
+
- Updated dependencies [5c203e7]
|
|
49
|
+
- Updated dependencies [5c203e7]
|
|
50
|
+
- Updated dependencies [5c203e7]
|
|
51
|
+
- @ac-kit/app-report@0.4.0
|
|
52
|
+
- @ac-bench/core@0.5.0
|
|
53
|
+
|
|
3
54
|
## 0.2.1
|
|
4
55
|
|
|
5
56
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
# @ac-bench/reporter-json
|
|
2
2
|
|
|
3
3
|
Writes a benchmark run to a single JSON document, the archive
|
|
4
|
-
(`format: "ac-bench-archive"`, version 1)
|
|
5
|
-
|
|
6
|
-
the
|
|
4
|
+
(`format: "ac-bench-archive"`, version 1): the run's description, the machine,
|
|
5
|
+
the runtimes, and every condition with its titles, the answer of each case and
|
|
6
|
+
the executions behind it, then the gates and their verdicts. A case's answer is
|
|
7
7
|
whatever the measure's own plugin produces for JSON; raw samples are left out
|
|
8
|
-
unless the run was started with `--emit-samples`.
|
|
8
|
+
unless the run was started with `--emit-samples`. `measure gate` and baselines
|
|
9
|
+
read it back.
|
|
10
|
+
|
|
11
|
+
The archive is streamed: its header and each condition are written once the
|
|
12
|
+
condition settles, the rest when the run ends. A run that crashes leaves every
|
|
13
|
+
settled condition on disk; `recoverJsonArchive(text)` reads such a file back
|
|
14
|
+
(`partial: true`, with the header and every condition written whole: a
|
|
15
|
+
condition cut mid-way is dropped, the ones before it kept).
|
|
9
16
|
|
|
10
17
|
```ts
|
|
11
18
|
import { defineConfig } from "@ac-bench/cli";
|
|
12
|
-
import jsonReporter from "@ac-bench/reporter-json";
|
|
19
|
+
import { jsonReporter } from "@ac-bench/reporter-json";
|
|
13
20
|
|
|
14
21
|
export default defineConfig({
|
|
15
22
|
plugins: [jsonReporter({ output: "artifacts/bench.json" })],
|
|
@@ -17,9 +24,12 @@ export default defineConfig({
|
|
|
17
24
|
});
|
|
18
25
|
```
|
|
19
26
|
|
|
20
|
-
`output` defaults to the run's output base name plus `.json`.
|
|
27
|
+
`output` defaults to the run's output base name plus `.json`. `jsonReporter`
|
|
21
28
|
is a factory because there is something to configure; call it with no arguments
|
|
22
29
|
for the defaults.
|
|
23
30
|
|
|
24
31
|
`@ac-bench/cli` already depends on this package and selects it by id, so listing
|
|
25
32
|
it in `plugins` is only necessary to pass options.
|
|
33
|
+
|
|
34
|
+
`zod` is a peer dependency (`^4.5.4`), passed on from `@ac-kit/app-report`:
|
|
35
|
+
install it beside this package.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
import type { ReporterPlugin } from "@ac-bench/core/plugin";
|
|
1
|
+
import type { BenchArchive, ReporterPlugin } from "@ac-bench/core/plugin";
|
|
2
2
|
export type JsonReporterOptions = {
|
|
3
3
|
/** Where to write. Default: the run's output base name plus `.json`. */
|
|
4
4
|
readonly output?: string;
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
7
|
-
* The whole run as one JSON archive (`BenchArchive`),
|
|
8
|
-
* ends.
|
|
7
|
+
* The whole run as one JSON archive (`BenchArchive`), streamed: each condition
|
|
8
|
+
* is written once it settles, the rest of the archive when the run ends. A run
|
|
9
|
+
* that crashes leaves every settled condition on disk; `recoverJsonArchive`
|
|
10
|
+
* reads such a file back.
|
|
9
11
|
*/
|
|
10
|
-
export
|
|
12
|
+
export declare function jsonReporter(options?: JsonReporterOptions): ReporterPlugin;
|
|
13
|
+
/**
|
|
14
|
+
* What a JSON archive cut short by a crash still holds: its header and every
|
|
15
|
+
* condition written whole, with `partial: true` — a condition cut mid-way is
|
|
16
|
+
* dropped, the ones before it kept; the whole archive, with `partial: false`,
|
|
17
|
+
* when the file is complete; `null` when the cut falls before the conditions
|
|
18
|
+
* array opens.
|
|
19
|
+
*/
|
|
20
|
+
export declare function recoverJsonArchive(text: string): (Partial<BenchArchive> & {
|
|
21
|
+
readonly partial: boolean;
|
|
22
|
+
}) | null;
|
|
11
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,YAAY,EAEZ,cAAc,EACd,MAAM,uBAAuB,CAAC;AAI/B,MAAM,MAAM,mBAAmB,GAAG;IACjC,wEAAwE;IACxE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,YAAY,CAC3B,OAAO,GAAE,mBAAwB,GAC/B,cAAc,CAYhB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,MAAM,GACV,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,IAAI,CAuBhE"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ArchiveBuilder, defineReporterPlugin } from "@ac-bench/core/plugin";
|
|
2
2
|
/**
|
|
3
|
-
* The whole run as one JSON archive (`BenchArchive`),
|
|
4
|
-
* ends.
|
|
3
|
+
* The whole run as one JSON archive (`BenchArchive`), streamed: each condition
|
|
4
|
+
* is written once it settles, the rest of the archive when the run ends. A run
|
|
5
|
+
* that crashes leaves every settled condition on disk; `recoverJsonArchive`
|
|
6
|
+
* reads such a file back.
|
|
5
7
|
*/
|
|
6
|
-
|
|
7
|
-
export default function jsonReporter(options = {}) {
|
|
8
|
+
export function jsonReporter(options = {}) {
|
|
8
9
|
return defineReporterPlugin({
|
|
9
10
|
id: "json",
|
|
10
11
|
createSink: (context) => new ArchiveSink_(new ArchiveBuilder({
|
|
@@ -13,26 +14,169 @@ export default function jsonReporter(options = {}) {
|
|
|
13
14
|
}), context.openOutput(options.output ?? `${context.defaultOutput}.json`)),
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* What a JSON archive cut short by a crash still holds: its header and every
|
|
19
|
+
* condition written whole, with `partial: true` — a condition cut mid-way is
|
|
20
|
+
* dropped, the ones before it kept; the whole archive, with `partial: false`,
|
|
21
|
+
* when the file is complete; `null` when the cut falls before the conditions
|
|
22
|
+
* array opens.
|
|
23
|
+
*/
|
|
24
|
+
export function recoverJsonArchive(text) {
|
|
25
|
+
try {
|
|
26
|
+
return { ...JSON.parse(text), partial: false };
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
// Cut short: recover below.
|
|
30
|
+
}
|
|
31
|
+
const cut = lastConditionBoundary_(text);
|
|
32
|
+
if (cut === null) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
return {
|
|
37
|
+
...JSON.parse(`${text.slice(0, cut.index)}${cut.inArray ? "]" : ""}}`),
|
|
38
|
+
partial: true,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Where the archive can be cut and closed: just after the last complete element
|
|
47
|
+
* of the top-level `conditions` array (or its `[`); once the array closed, just
|
|
48
|
+
* before the comma after the last complete member. `null` before the array
|
|
49
|
+
* opens.
|
|
50
|
+
*/
|
|
51
|
+
function lastConditionBoundary_(text) {
|
|
52
|
+
let depth = 0;
|
|
53
|
+
let inString = false;
|
|
54
|
+
let stringStart = 0;
|
|
55
|
+
let lastTopLevelString = "";
|
|
56
|
+
let inConditions = false;
|
|
57
|
+
let conditionsClosed = false;
|
|
58
|
+
let cut = null;
|
|
59
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
60
|
+
const char = text[index];
|
|
61
|
+
if (inString) {
|
|
62
|
+
if (char === "\\") {
|
|
63
|
+
index += 1;
|
|
64
|
+
}
|
|
65
|
+
else if (char === '"') {
|
|
66
|
+
inString = false;
|
|
67
|
+
if (depth === 1) {
|
|
68
|
+
lastTopLevelString = text.slice(stringStart, index);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
switch (char) {
|
|
74
|
+
case '"':
|
|
75
|
+
inString = true;
|
|
76
|
+
stringStart = index + 1;
|
|
77
|
+
break;
|
|
78
|
+
case "{":
|
|
79
|
+
case "[":
|
|
80
|
+
depth += 1;
|
|
81
|
+
if (depth === 2 &&
|
|
82
|
+
char === "[" &&
|
|
83
|
+
lastTopLevelString === "conditions") {
|
|
84
|
+
inConditions = true;
|
|
85
|
+
cut = { index: index + 1, inArray: true };
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
case "}":
|
|
89
|
+
case "]":
|
|
90
|
+
depth -= 1;
|
|
91
|
+
if (inConditions && depth === 2) {
|
|
92
|
+
cut = { index: index + 1, inArray: true };
|
|
93
|
+
}
|
|
94
|
+
else if (inConditions && depth === 1) {
|
|
95
|
+
inConditions = false;
|
|
96
|
+
conditionsClosed = true;
|
|
97
|
+
cut = { index: index + 1, inArray: false };
|
|
98
|
+
}
|
|
99
|
+
break;
|
|
100
|
+
case ",":
|
|
101
|
+
// A member written whole after the array: keep it too.
|
|
102
|
+
if (conditionsClosed && depth === 1) {
|
|
103
|
+
cut = { index, inArray: false };
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
default:
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return cut;
|
|
111
|
+
}
|
|
112
|
+
const INDENT_ = " ";
|
|
113
|
+
/** What the header and the streamed array hold; the rest is written at close. */
|
|
114
|
+
const STREAMED_KEYS_ = new Set(["format", "version", "machine", "conditions"]);
|
|
115
|
+
/**
|
|
116
|
+
* `value` as pretty JSON, every line after the first indented by `depth`
|
|
117
|
+
* levels.
|
|
118
|
+
*/
|
|
119
|
+
function pretty_(value, depth) {
|
|
120
|
+
return (JSON.stringify(value, null, INDENT_.length) ?? "null").replaceAll("\n", `\n${INDENT_.repeat(depth)}`);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Folds events into the archive as they come; writes the header and each
|
|
124
|
+
* condition as it settles, then the remaining conditions and the rest at
|
|
125
|
+
* close.
|
|
126
|
+
*/
|
|
17
127
|
class ArchiveSink_ {
|
|
18
128
|
builder;
|
|
19
129
|
writer;
|
|
130
|
+
written = new Set();
|
|
131
|
+
opened = false;
|
|
132
|
+
pending = Promise.resolve();
|
|
20
133
|
constructor(builder, stream) {
|
|
21
134
|
this.builder = builder;
|
|
22
135
|
this.writer = stream.getWriter();
|
|
23
136
|
}
|
|
24
137
|
write(event) {
|
|
25
138
|
this.builder.write(event);
|
|
139
|
+
if (event.kind === "scope-end" && this.builder.described) {
|
|
140
|
+
const settled = this.builder.settled();
|
|
141
|
+
if (settled.length > 0) {
|
|
142
|
+
this.enqueue_(this.conditionsText_(settled));
|
|
143
|
+
}
|
|
144
|
+
}
|
|
26
145
|
}
|
|
27
146
|
async flush() {
|
|
147
|
+
await this.pending;
|
|
28
148
|
await this.writer.ready;
|
|
29
149
|
}
|
|
30
150
|
/** A run that described nothing (a listing) has no archive to write. */
|
|
31
151
|
async close() {
|
|
32
152
|
if (this.builder.described) {
|
|
33
|
-
|
|
153
|
+
const archive = this.builder.build();
|
|
154
|
+
const remaining = archive.conditions.filter((condition) => !this.written.has(condition.key));
|
|
155
|
+
const tail = Object.entries(archive)
|
|
156
|
+
.filter(([name]) => !STREAMED_KEYS_.has(name))
|
|
157
|
+
.map(([name, value]) => `,\n${INDENT_}${JSON.stringify(name)}: ${pretty_(value, 1)}`)
|
|
158
|
+
.join("");
|
|
159
|
+
this.enqueue_(`${this.conditionsText_(remaining)}\n${INDENT_}]${tail}\n}\n`);
|
|
34
160
|
}
|
|
161
|
+
await this.pending;
|
|
35
162
|
await this.writer.close();
|
|
36
163
|
}
|
|
164
|
+
enqueue_(text) {
|
|
165
|
+
this.pending = this.pending.then(() => this.writer.write(text));
|
|
166
|
+
}
|
|
167
|
+
/** The header on first use, then `conditions` as array elements. */
|
|
168
|
+
conditionsText_(conditions) {
|
|
169
|
+
let text = "";
|
|
170
|
+
if (!this.opened) {
|
|
171
|
+
this.opened = true;
|
|
172
|
+
const { format, version, machine } = this.builder.build();
|
|
173
|
+
text += `{\n${INDENT_}"format": ${JSON.stringify(format)},\n${INDENT_}"version": ${JSON.stringify(version)},\n${INDENT_}"machine": ${pretty_(machine, 1)},\n${INDENT_}"conditions": [`;
|
|
174
|
+
}
|
|
175
|
+
for (const condition of conditions) {
|
|
176
|
+
text += `${this.written.size > 0 ? "," : ""}\n${INDENT_.repeat(2)}${pretty_(condition, 2)}`;
|
|
177
|
+
this.written.add(condition.key);
|
|
178
|
+
}
|
|
179
|
+
return text;
|
|
180
|
+
}
|
|
37
181
|
}
|
|
38
182
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAQ7E;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAC3B,OAAO,GAAwB,EAAE;IAEjC,OAAO,oBAAoB,CAAC;QAC3B,EAAE,EAAE,MAAM;QACV,UAAU,EAAE,CAAC,OAAO,EAAE,EAAE,CACvB,IAAI,YAAY,CACf,IAAI,cAAc,CAAC;YAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,WAAW,EAAE,OAAO,CAAC,WAAW,KAAK,IAAI;SACzC,CAAC,EACF,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,OAAO,CAAC,CACrE;KACF,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CACjC,IAAY;IAEZ,IAAI,CAAC;QACJ,OAAO,EAAE,GAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAA2B,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC3E,CAAC;IAAC,MAAM,CAAC;QACR,4BAA4B;IAC7B,CAAC;IAED,MAAM,GAAG,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAC;IAEzC,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,CAAC;QACJ,OAAO;YACN,GAAI,IAAI,CAAC,KAAK,CACb,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,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AM,OAAO,aAAa,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,OAAO,cAAc,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,OAAO,cAAc,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC;QACxL,CAAC;QAED,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACpC,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;YAC5F,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACjC,CAAC;QAED,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ac-bench/reporter-json",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "JSON reporter for @ac-bench: writes a run as one archive document, conditions titled and keyed, without raw samples unless asked.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"benchmark",
|
|
7
7
|
"json",
|
|
8
8
|
"reporter"
|
|
9
9
|
],
|
|
10
|
-
"homepage": "https://
|
|
10
|
+
"homepage": "https://anthochamp.pages.grenadine.io/node-essentials/bench/",
|
|
11
11
|
"bugs": {
|
|
12
12
|
"url": "https://git.grenadine.io/anthochamp/node-essentials/issues"
|
|
13
13
|
},
|
|
@@ -43,21 +43,25 @@
|
|
|
43
43
|
"prepack": "yarn build"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@ac-bench/core": "^0.
|
|
47
|
-
"@ac-kit/app-report": "^0.
|
|
46
|
+
"@ac-bench/core": "^0.5.0",
|
|
47
|
+
"@ac-kit/app-report": "^0.4.0",
|
|
48
48
|
"@types/web": "^0.0.367"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@ac-kit/model-dataset": "^0.3.
|
|
51
|
+
"@ac-kit/model-dataset": "^0.3.1",
|
|
52
52
|
"@ac-kit/tsconfig": "0.1.0",
|
|
53
53
|
"@ac-kit/typedoc-config": "0.1.0",
|
|
54
|
-
"@ac-kit/vitest-config": "0.
|
|
54
|
+
"@ac-kit/vitest-config": "0.3.0",
|
|
55
55
|
"@typescript/native": "typescript@7.0.2",
|
|
56
56
|
"rimraf": "6.1.4",
|
|
57
57
|
"typedoc": "0.28.20",
|
|
58
58
|
"typescript": "@typescript/typescript6@6.0.2",
|
|
59
59
|
"vite": "8.4.0",
|
|
60
|
-
"vitest": "5.1.2"
|
|
60
|
+
"vitest": "5.1.2",
|
|
61
|
+
"zod": "^4.5.4"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"zod": "^4.5.4"
|
|
61
65
|
},
|
|
62
66
|
"engines": {
|
|
63
67
|
"node": ">=24"
|