v0.43.1
TypeScript/TSX default-parameter parse fix, plus grammar-decode memory improvements and new CI diagnostics.
Fixed
- TypeScript/TSX bare default parameters (
function f(a = 1) {}) no longer collapse toERROR. The fix widens the GLR merge budget when a default-parameter shape is present, covering plain, array-element ([a = 1]), renamed-property ({a: b = 1}), unicode-identifier, and comment-adjacent forms, in both TypeScript and TSX (PR #389). Root cause: the cap-one merge budget discarded the correct derivation by score before any structural comparison. - Destructuring declarations with defaults (
const [a = 1] = arr) now parse correctly — incidental coverage from the same fix.
Improved
- Grammar blob decoding pre-sizes its buffer from the gzip size hint. This cuts total allocation churn about 32% and peak memory about 11% across all 206 grammars.
Added
- CI memory-ceiling test sweeps all 206 grammars and fails any
Language()load above 256 MB. Swift is a documented exception. - Environment-gated diagnostic tests that characterize the incremental insert-retry timing nondeterminism from issue #380 (PR #388).
Known Issues
- Swift's
Language()call still retains about 491 MB. The root cause is upstream in grammargen (the lexer DFA rebuilds once per lex mode). A full fix is tracked.
Full changelog: https://github.com/odvcencio/gotreesitter/blob/main/CHANGELOG.md