From 1a75d60174e474e613baf2fcb49715262518cf1f Mon Sep 17 00:00:00 2001 From: imccyu <276526105+imccyu@users.noreply.github.com> Date: Thu, 30 Jul 2026 21:59:07 +0800 Subject: [PATCH] ci: vitest forks --- vitest.config.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vitest.config.ts b/vitest.config.ts index 750bb6ddf2..a0d8b6d58a 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -62,10 +62,12 @@ export default defineConfig({ plugins: [pathsPlugin()], test: { name: 'thread-safe', - // Node 24 has aborted in its CJS lexer from a macOS arm64 worker - // thread. A fork contains that external runtime failure to the test - // process; other hosts retain the lower-overhead thread pool. - pool: process.platform === 'darwin' ? 'forks' : 'threads', + // Node 24 has aborted in its CJS lexer (v8::ToLocalChecked Empty + // MaybeLocal in cjs_lexer::Parse) from worker threads on macOS + // arm64 and later on Linux. A fork contains that external runtime + // failure to the test process; Windows keeps the thread pool, where + // the abort has not reproduced and process spawn is costlier. + pool: process.platform === 'win32' ? 'threads' : 'forks', setupFiles: ['./scripts/test-invariants.ts'], include: testIncludes, exclude: [