Skip to content

Commit af6fee8

Browse files
Isolate compiler WASI test forcing.
Apply the NAPI WASI override inside Vitest workers so it validates the compiler binding without forcing the test runner's own Rolldown binding. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f47d33c commit af6fee8

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/compiler-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137

138138
- name: Test WASI binary
139139
working-directory: packages/compiler
140-
run: NODE_NO_WARNINGS=1 NAPI_RS_FORCE_WASI=error pnpm exec vitest run --exclude '**/binding-loader.test.js'
140+
run: NODE_NO_WARNINGS=1 SOLID_COMPILER_TEST_WASI=1 pnpm exec vitest run --exclude '**/binding-loader.test.js'
141141

142142
# Authenticates via OIDC trusted publishing (id-token: write above) —
143143
# no npm token. Each platform package must have this repo + workflow
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
process.env.NAPI_RS_FORCE_WASI = "error";

packages/compiler/vite.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default defineConfig({
88
pool: "threads",
99
globals: true,
1010
include: ["__tests__/**/*.test.js"],
11-
exclude: ["**/node_modules/**"]
11+
exclude: ["**/node_modules/**"],
12+
setupFiles: process.env.SOLID_COMPILER_TEST_WASI ? ["./__tests__/force-wasi.js"] : []
1213
}
1314
});

0 commit comments

Comments
 (0)