Commit 0f07b2f
committed
fix: detect Bun vs Node for worker loading
The previous fix used extname(__filename) === '.ts' to detect source
execution, but ts-jest also sets __filename to .ts while running under
Node. Node cannot load .ts workers directly (only Bun can), so we now
check process.isBun to distinguish between:
- Bun running .ts source -> use tokenizer.worker.ts
- Node/ts-jest running .ts source -> use tokenizer.worker.js from dist/1 parent 27f634f commit 0f07b2f
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
0 commit comments