Commit f55a5fe
lib: fix TypeScript support check in jitless mode
WebAssembly is disabled when Node.js is run with --jitless. The
internal TypeScript stripper relies on WebAssembly, and previously
failed obscurely with a ReferenceError in this mode.
This commit adds an explicit check for WebAssembly support when
loading the TypeScript parser. If WebAssembly is unavailable,
it now throws a descriptive ERR_WEBASSEMBLY_NOT_SUPPORTED error.
Fixes: #61353
PR-URL: #61382
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>1 parent ec1cbbe commit f55a5feCopy full SHA for f55a5fe
4 files changed
+26Lines changed: 26 additions & 0 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- doc/api
- lib/internal
- test/es-module
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+8Lines changed: 8 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3350 | 3350 | |
3351 | 3351 | |
3352 | 3352 | |
| 3353 | + |
| 3354 | + |
| 3355 | + |
| 3356 | + |
| 3357 | + |
| 3358 | + |
| 3359 | + |
| 3360 | + |
3353 | 3361 | |
3354 | 3362 | |
3355 | 3363 | |
|
Collapse file
+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1905 | 1905 | |
1906 | 1906 | |
1907 | 1907 | |
| 1908 | + |
| 1909 | + |
| 1910 | + |
1908 | 1911 | |
1909 | 1912 | |
1910 | 1913 | |
|
Collapse file
+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
46 | 46 | |
47 | 47 | |
48 | 48 | |
| 49 | + |
49 | 50 | |
50 | 51 | |
51 | 52 | |
52 | 53 | |
53 | 54 | |
54 | 55 | |
55 | 56 | |
| 57 | + |
56 | 58 | |
57 | 59 | |
58 | 60 | |
| ||
244 | 246 | |
245 | 247 | |
246 | 248 | |
| 249 | + |
| 250 | + |
247 | 251 | |
248 | 252 | |
249 | 253 | |
|
Collapse file
test/es-module/test-typescript.mjs
Copy file name to clipboardExpand all lines: test/es-module/test-typescript.mjs+11Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
342 | 342 | |
343 | 343 | |
344 | 344 | |
| 345 | + |
| 346 | + |
| 347 | + |
| 348 | + |
| 349 | + |
| 350 | + |
| 351 | + |
| 352 | + |
| 353 | + |
| 354 | + |
| 355 | + |
0 commit comments