You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(objectql): make the data-event benchmark typecheck and actually collect samples
The benchmark was added after the local typecheck run, so two real errors rode
into CI:
- `registry.registerObject` requires a `packageId`. The sibling `.test.ts`
calls it with one argument and gets away with it only because this package's
tsconfig excludes `**/*.test.ts` (measured test debt); a `.bench.ts` is not
excluded, so it is checked — correctly.
- The package compiles to CommonJS, where the module-scope `await` used to
build the engine pairs is TS1309.
Hoisting setup into `beforeAll` fixes the types but breaks the benchmark:
vitest's benchmark mode is experimental and does not run the hook, so every
engine stayed `undefined`, every iteration threw, and the summary reported
`NaNx faster` off zero samples. Uses a memoized lazy init inside the benches
instead — construction lands in vitest's warmup, outside the measured samples,
and the settled-promise await is paid identically by both arms.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LYnZrTwXbrctB8E8HpJAPT
0 commit comments