Skip to content

Commit d01f4b3

Browse files
committed
release v1.0.7
1 parent 2d1d2b6 commit d01f4b3

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

benchmarks/compare.mjs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { createRequire } from "node:module";
22
import { fileURLToPath } from "node:url";
3-
import { pulse } from "../dist/index.js";
43
import {
54
appendMarketRows,
65
createDeepState,
@@ -22,6 +21,8 @@ import {
2221

2322
const require = createRequire(import.meta.url);
2423

24+
let pulse;
25+
let pulseRuntimeError = null;
2526
let legendBatch;
2627
let legendObservable;
2728
let proxy;
@@ -33,6 +34,12 @@ const ENABLED_COMPARISON_LIBRARIES = new Set([
3334
"valtio",
3435
]);
3536

37+
try {
38+
({ pulse } = await import("../dist/index.js"));
39+
} catch (error) {
40+
pulseRuntimeError = error;
41+
}
42+
3643
function ensureComparisonDependencies() {
3744
if (
3845
legendBatch !== undefined &&
@@ -57,6 +64,17 @@ function ensureComparisonDependencies() {
5764
}
5865
}
5966

67+
function ensurePulseRuntime() {
68+
if (pulseRuntimeError === null && pulse !== undefined) {
69+
return;
70+
}
71+
72+
throw new Error(
73+
"Pulse benchmark runtime is not built. Run `pnpm build` before executing comparison benchmarks.",
74+
{ cause: pulseRuntimeError ?? undefined },
75+
);
76+
}
77+
6078
function parseComparisonLibraryName(benchmarkName) {
6179
if (benchmarkName === "pulse" || benchmarkName.startsWith("pulse ")) {
6280
return "pulse";
@@ -2497,6 +2515,7 @@ export function createComparisonBenchmarkSections() {
24972515
}
24982516

24992517
export function runComparisonBenchmarkSuite(options = {}) {
2518+
ensurePulseRuntime();
25002519
ensureComparisonDependencies();
25012520

25022521
return runBenchmarkSuite(

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ochairo/pulse",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "Path-aware reactive runtime with explicit get/set/on semantics",
55
"type": "module",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)