web-infra-dev
rstest
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(core): guard interop has trap against primitive default export (#1234)
main
4 days ago
docs: use Rspress Prompt component and upgrade to the latest version (#1213)
main
11 days ago
fix(pool): satisfy no-empty lint on killAndWait catch blocks
dp
18 days ago
fix(runtime): use file:// URL href for absolute import specifiers When resolving an absolute import specifier via `pathToFileURL(...)`, `defineRstestDynamicImport` extracted `.pathname` to use as the module path. On Windows that yields `/D:/a/foo.mjs`, which Node's ESM loader later re-resolves against the current drive root, producing `D:\D:\a\foo.mjs` and a MODULE_NOT_FOUND. Switch to `.href` (the full `file:///D:/a/foo.mjs` URL) so the string is a valid import target on both platforms. The downstream checks — `.endsWith('.mjs')`, `.endsWith('.json')`, `.startsWith('node:')`, `shouldInterop`, asModule cache key — all operate on the URL string the same way they did on the raw path; the WASM branch in loadModule.ts already handled a `file://` prefix via `fileURLToPath`. Surfaced by the loadEsModule.test.ts integration tests added in the previous commit, which were the first tests to pass an absolute fixture path through this branch on Windows CI.
dp
19 days ago
fix(runtime): cache vm.SyntheticModule to avoid nodejs/node#54735 crash V8 has a data race in `SyntheticModuleEvaluationStepsCallback` that fires when the same exports are wrapped in multiple `vm.SyntheticModule` instances whose evaluate() calls overlap on the microtask queue — nodejs/node#54735. rstest's `asModule` helpers used to build a fresh SyntheticModule on every call, so any CJS/JSON/Wasm dep imported more than once inside a worker could trigger the segfault. Surfaces as a SIGSEGV during worker bootstrap with the victim test file reported as `(0)` and empty stderr. Structure the wrapping so the cache key can only ever be the resolver's output: - `asModule` now takes a required `resolvedId: string`. Optional `identifier` was the weak link — callers could (and did) reach for raw `specifier`, which is importer-relative and collides across files. - Every SyntheticModule construction lives inside `defineRstestDynamicImport`, where the resolver's absolute path is already in scope. The ESM `link` callback and `importModuleDynamically` hook collapse to pure pass-through — no second wrap site that could re-introduce the wrong key. - Each loader owns a private `Map<resolvedId, SyntheticModule>`. The previous `WeakMap<context, Map<id, SM>>` was dead weight: rstest never creates a custom vm.Context, so every entry landed in the same sentinel bucket. Verified locally with a 50-run repro loop at `maxWorkers=8`, 0 SIGSEGV (baseline reproduced within 7–9 runs). Refs: nodejs/node#54735, vitest-dev/vitest#7741
dp
19 days ago
fix(runtime): cache vm.SyntheticModule to avoid nodejs/node#54735 crash V8 has a data race in `SyntheticModuleEvaluationStepsCallback` that fires when the same exports are wrapped into fresh `vm.SyntheticModule` instances whose evaluate() calls overlap on the microtask queue — see nodejs/node#54735. The original `asModule` helpers new-ed a SyntheticModule every call, so any CJS/JSON/Wasm dep that was re-imported inside a worker was a candidate trigger. Cache the SyntheticModule per `(context, identifier)` pair so each request returns the same instance. Mirrors vitest-dev/vitest#7741. The cache sits behind an optional `identifier` parameter so callers that can't produce a stable key fall back to the old "new each time" path and stay source-compatible. To match vitest's per-executor cache lifetime while keeping rstest's module-level layout, wire a sentinel-bucket cleaner into the existing `clearModuleCache()` — already called from `runInPool.ts` on every `isolate: false` teardown. Context-keyed buckets are WeakMap-held and released with the context itself, so no explicit clearing is needed for those. Local repro loop: with this change and `RSTEST_E2E_MAX_WORKERS=2`, 17 consecutive runs produced zero worker signal exits (baseline reliably crashed within 7–9 runs).
dp
19 days ago
docs(website): improve rstest feature messaging
9aoy/docs-rstest-feature-list
19 days ago
fix(runtime): cache vm.SyntheticModule to avoid nodejs/node#54735 crash V8 has a data race in `SyntheticModuleEvaluationStepsCallback` that fires when the same exports are wrapped into fresh `vm.SyntheticModule` instances whose evaluate() calls overlap on the microtask queue — see nodejs/node#54735. The original `asModule` helpers new-ed a SyntheticModule every call, so any CJS/JSON/Wasm dep that was re-imported inside a worker was a candidate trigger. Cache the SyntheticModule per `(context, identifier)` pair so each request returns the same instance. Mirrors vitest-dev/vitest#7741. The cache sits behind an optional `identifier` parameter so callers that can't produce a stable key fall back to the old "new each time" path and stay source-compatible. To match vitest's per-executor cache lifetime while keeping rstest's module-level layout, wire a sentinel-bucket cleaner into the existing `clearModuleCache()` — already called from `runInPool.ts` on every `isolate: false` teardown. Context-keyed buckets are WeakMap-held and released with the context itself, so no explicit clearing is needed for those. Local repro loop: with this change and `RSTEST_E2E_MAX_WORKERS=2`, 17 consecutive runs produced zero worker signal exits (baseline reliably crashed within 7–9 runs).
dp
19 days ago
Latest Branches
CodSpeed Performance Gauge
+11%
feat(pool): replace tinypool with self-owned worker pool
#1171
18 days ago
708b700
dp
CodSpeed Performance Gauge
+2%
docs(website): improve rstest feature messaging
#1205
19 days ago
d359bc9
9aoy/docs-rstest-feature-list
CodSpeed Performance Gauge
-2%
chore: clear existing lint warnings
#1204
19 days ago
39f2fc8
fix/lint-warnings
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs