1 Commits
Author SHA1 Message Date
Rafael Vescovi 267c9e1379 fix: load WASM grammars sequentially to avoid Node 20+ race condition
web-tree-sitter has a known race condition when loading multiple WASM
grammars concurrently on Node.js 19+ (V8 10.8+). External scanner
symbols from one grammar can overwrite another's GOT entries, causing
"bad export type" errors for TypeScript, TSX, and other languages.

Replace Promise.allSettled(entries.map(...)) with a sequential for...of
loop so each grammar fully initializes before the next one starts.

Ref: https://github.com/tree-sitter/tree-sitter/issues/2338
2026-02-17 10:33:39 -06:00