Releases: tree-sitter/tree-sitter
Releases Β· tree-sitter/tree-sitter
v0.26.0
What's Changed
- build: do not define _POSIX_C_SOURCE on NetBSD by @0-wiz-0 in #4181
- fix(web): provide type in the exports by @robertohuertasm in #4185
- add generate crate to workspace & adjust to new clippy lints by @amaanq in #4192
- refactor(web): rename tree-sitter.js to web-tree-sitter.js by @amaanq in #4194
- feat: Windows support using MinGW-w64 by @MisterDA in #4201
- Fix crash when loading languages w/ old ABI via wasm by @maxbrunsfeld in #4210
- Ignore external tokens that are zero-length and extra by @maxbrunsfeld in #4213
- Reset
result_symbol
field of lexer in wasm memory in between invocations by @maxbrunsfeld in #4218 - Decrease the MSRV for the tree-sitter-language crate by @maxbrunsfeld in #4221
- fix(wasm): restore passing in ERROR to
descendantsOfType
by @WillLillis in #4226 - typo: but is only works β but it only works by @hippietrail in #4242
- adapt to new rust lints and tweak ci by @WillLillis in #4249
- Mark all format-like macros for Clippy by @nyurik in #4231
- fix symbol leak for character sets by @polazarus in #4255
- Fix cases where error recovery could infinite loop by @maxbrunsfeld in #4257
- fix(rust): adapt to new nightly lint by @WillLillis in #4254
- fix(lib): remove duplicate TSLanguageMetadata typedef by @notxvilka in #4268
- rust bindings: Add information about using WASM grammar files to README by @lucifayr in #4235
- Update build.zig.zon for zig master/0.14 by @nihklas in #4258
- fix(docs): update test command flag from -f to -i by @jonshea in #4263
- fix(cli): properly escape invisible characters in parse error output by @WillLillis in #4276
- feat(lib): quote invalid nodes, fields, and captures by @ribru17 in #4278
- build(deps): bump ring from 0.17.8 to 0.17.13 by @dependabot[bot] in #4272
- fix(build): bump version to 0.26.0 by @clason in #4282
- fix(xtask): error if new version supplied to xtask is less than or equal to current version by @WillLillis in #4287
- fix(make):
make install
shouldnβt fail when a parser bundles no queries by @mavit in #4284 - Change
(Node | null)[]
return types toNode[]
by @tmr232 in #4283 - build(deps): bump the cargo group across 1 directory with 21 updates by @dependabot[bot] in #4275
- chore(cli): remove deprecated
--no-bindings
flag fromgenerate
command by @WillLillis in #4292 - build.zig.zon: Fix package hashes for Zig 0.14 by @JacobCrabill in #4301
- build(deps): bump the cargo group across 1 directory with 8 updates by @dependabot[bot] in #4307
- fix(rust): address new clippy lint for pointer comparisons by @WillLillis in #4305
- fix(rust): use core crates for no_std by @Tiggilyboo in #4303
- build(deps): update emscripten to v4.0.5 by @clason in #4309
- fix(rust): address new nightly lint for pointer comparisons by @WillLillis in #4313
- fix(highlight): account for multiple rows in highlight testing assertions by @WillLillis in #4333
- docs: Fix link to named-vs-anonymous-nodes section by @ZedThree in #4328
- Fix typo of "corresponds" by @bernardosulzbach in #4340
- build(deps): bump the cargo group across 1 directory with 5 updates by @dependabot[bot] in #4342
- ci: bump actions/create-github-app-token from 1 to 2 in the actions group by @dependabot[bot] in #4341
- Add @generated to parser.c header by @edgarogh in #4338
- Fix WASI build by not calling a non-existent function. by @jaboatman in #4343
- fix(rust): clarify error message for non-token reserved words by @jonshea in #4323
- Make highlighting more deterministic when themes are ambiguous by @narpfel in #4327
- fix(lib): reset parser options after use by @ribru17 in #4355
- fix(bindings): report wasm store error in rust bindings
set_language
by @WillLillis in #4348 - build(deps): bump the cargo group with 4 updates by @dependabot[bot] in #4360
- fix(xtask): trim
EMSCRIPTEN_TAG
arg to docker command inbuild-wasm
command by @WillLillis in #4365 - fix(web): correct childWithDescendant() functionality by @ribru17 in #4363
- Tidy up the docs in auto-generated Rust bindings by @LikeLakers2 in #4294
- binding_web: replace dynamic require with import by @tmr232 in #4304
- Refine the documentation and command line help for "parse --edits" by @danielpunkass in #4191
- export wasm files to better support bundling use cases by @vemoo in #4208
- build(deps): bump vite from 6.1.0 to 6.2.6 in /lib/binding_web by @dependabot[bot] in #4352
- style(cli): formatting by @amaanq in #4373
- fix(ci): increase timeouts for flaky tests by @WillLillis in #4371
- perf(highlight): use
BTreeMap
overIndexMap
for highlight configs by @WillLillis in #4372 - build(deps): bump the cargo group with 2 updates by @dependabot[bot] in #4386
- Fixed typo in parsing explanation by @Tamchuk in #4388
- cli: Compile parsers to wasm using
wasi-sdk
, not emscripten by @maxbrunsfeld in #4393 - Fix wasm build issues introduced by switching to wasi-sdk by @maxbrunsfeld in #4407
- fix(xtask): properly trim emscripten version at the source by @WillLillis in #4402
- fix(parse): mark logging closure as
move
by @WillLillis in #4406 - docs(rust): remove adding
cc
as a build dependency for consumers by @amaanq in #4409 - fix(generate): mark url as a Windows-only dependency by @amaanq in #4411
- build(deps): bump the cargo group with 3 updates by @dependabot[bot] in #4416
- fix(lib): do not access the alias sequence for the
end
subtree ints_subtree_summarize_children
by @amaanq in #4414 - build(deps): bump vite from 6.3.2 to 6.3.4 in /lib/binding_web by @dependabot[bot] in #4419
- fix(rust): address some new nightly clippy lints by @WillLillis in #4424
- fix(query): correct
last_child_step_index
in cases where a new step wasn't created. by @WillLillis in #4422 - build(deps): bump the cargo group with 2 updates by @dependabot[bot] in #4433
- fix(lib): return early for empty predicate step slice by @WillLillis in #4440
- build(deps): bump the cargo group with 6 updates by @dependabot[bot] in #4444
- illumos has endian.h by @papertigers in #4450
- build(deps): bump cc from 1.2.22 to 1.2.23 in the cargo group by @dependabot[bot] in #4458
- fix: wasi has endian.h by @tonyfettes in #4452
- Fix crash w/ goto_previous_sibling when parent node has leading extra child by @maxbrunsfeld in #4472
- docs: mention ~ and $HOME for parser-directories by @sogaiu in https:/...
v0.25.9
What's Changed
- Fix: add wasm32 support to portable/endian.h by @tree-sitter-ci-bot[bot] in #4613
- Replace deprecated function on build.zig by @tree-sitter-ci-bot[bot] in #4621
- perf(generate): reserve more
Vec
capacities by @tree-sitter-ci-bot[bot] in #4629 - fix(rust): prevent overflow in error message calculation by @tree-sitter-ci-bot[bot] in #4634
- fix(bindings): use parser title in lib.rs description by @tree-sitter-ci-bot[bot] in #4638
- fix(bindings): only include top level LICENSE file by @tree-sitter-ci-bot[bot] in #4639
- fix(bindings): improve python platform detection by @tree-sitter-ci-bot[bot] in #4640
- test(python): improve bindings test to detect ABI incompatibilities by @tree-sitter-ci-bot[bot] in #4641
- fix(query): prevent cycles when analyzing hidden children by @tree-sitter-ci-bot[bot] in #4659
- Reserved word dsl declarations by @tree-sitter-ci-bot[bot] in #4661
- fix(cli): improve error message in cases where a langauge can't be found for one of many paths by @tree-sitter-ci-bot[bot] in #4662
- fix(bindings): correct indices for
Node::utf16_text
by @tree-sitter-ci-bot[bot] in #4663 - fix(rust): ignore new mismatched-lifetime-syntaxes lint by @ObserverOfTime in #4680
- fix(bindings): use custom class name by @ObserverOfTime in #4679
- fix(bindings): update zig template files (#4637) by @ObserverOfTime in #4684
- Update build.zig.zon by @Omar-xt in #4709
- Backport build.zig.zon fixes by @ObserverOfTime in #4717
- portable/endian: Add Haiku support by @tree-sitter-ci-bot[bot] in #4724
- fix(wasm): delete
var_i32_type
after initializing global stack pointer value by @tree-sitter-ci-bot[bot] in #4732 - fix(rust): EqCapture accepted cases where number of captured nodes differed by one by @tree-sitter-ci-bot[bot] in #4737
- fix(bindings): improve zig dependency fetching logic by @tree-sitter-ci-bot[bot] in #4741
- fix(bindings): add tree-sitter as npm dev dependency by @tree-sitter-ci-bot[bot] in #4738
- [backport] build.zig improvements by @ObserverOfTime in #4743
- fix(lib): check if an
ERROR
node is named before assuming it's the builtin error node by @tree-sitter-ci-bot[bot] in #4746 - fix(lib): allow error nodes to match when they are child nodes by @tree-sitter-ci-bot[bot] in #4748
- build(zig): support wasmtime for ARM64 Windows (MSVC) by @tree-sitter-ci-bot[bot] in #4749
- fix(bindings): properly detect MSVC compiler by @tree-sitter-ci-bot[bot] in #4751
- fix(generate): warn users when extra rule can lead to parser hang by @tree-sitter-ci-bot[bot] in #4763
- fix(cli): fix DSL type declarations by @tree-sitter-ci-bot[bot] in #4770
- fix(npm): add directory to repository fields by @tree-sitter-ci-bot[bot] in #4773
- fix(web): correct type errors, improve build by @ObserverOfTime in #4774
- fix(generate): return error when single state transitions have indirectly recursive cycles by @tree-sitter-ci-bot[bot] in #4790
- fix(generate): use correct state id when adding terminal states to non terminal extras by @tree-sitter-ci-bot[bot] in #4794
- release v0.25.9 by @clason in #4798
- fix(rust): correct crate versions in root Cargo.toml file by @WillLillis in #4800
New Contributors
Full Changelog: v0.25.8...v0.25.9
v0.25.8
What's Changed
- fix(generate): propagate node types error by @tree-sitter-ci-bot[bot] in #4603
- 0.25.8 by @WillLillis in #4605
Full Changelog: v0.25.7...v0.25.8
v0.25.7
What's Changed
- fix(lib): replace raw array accesses with array_get by @tree-sitter-ci-bot[bot] in #4487
- fix(highlight): account for carriage return at EOF and chunk ends by @tree-sitter-ci-bot[bot] in #4488
- Fix test_flatten_grammar_with_recursive_inline_variable by @tree-sitter-ci-bot[bot] in #4491
- fix(bindings): update swift & node dependencies by @tree-sitter-ci-bot[bot] in #4499
- fix(xtask): limit
test
command to a single thread on windows by @tree-sitter-ci-bot[bot] in #4504 - ci(lint): stop linting with nightly by @clason in #4540
- fix(generate): only display conflicting symbol name in non-terminal word token error message if available by @tree-sitter-ci-bot[bot] in #4541
- fix(cli): require correct setuptools version by @tree-sitter-ci-bot[bot] in #4543
- fix(rust): ignore new nightly lint, correct order of lint list by @tree-sitter-ci-bot[bot] in #4562
- Fix population of
extra
field innode-types.json
by @tree-sitter-ci-bot[bot] in #4569 - fix(web): wasm export paths by @vemoo in #4579
- perf: reserve
Vec
capacities where appropriate by @tree-sitter-ci-bot[bot] in #4581 - perf: More efficient computation of used symbols by @tree-sitter-ci-bot[bot] in #4582
- fix(generate): use topological sort for subtype map by @clason in #4586
- perf: reorder expensive conditional operand by @tree-sitter-ci-bot[bot] in #4593
- 0.25.7 by @WillLillis in #4594
Full Changelog: v0.25.6...v0.25.7
v0.25.6
What's Changed
- Ignore lockfiles in grammar repos #4474
- Revert "feat: add build sha to parser.c header comment" by @tree-sitter-ci-bot in #4477
- Fix pkgconfig and use of GNUInstallDirs by @tree-sitter-ci-bot in #4480
- Fully fix field underflow in go_to_previous_sibling by @tree-sitter-ci-bot in #4485
- fix(generate): re-enable default url features by @tree-sitter-ci-bot in #4486
Full Changelog: v0.25.5...v0.25.6
v0.25.5
What's Changed
- illumos has endian.h by @tree-sitter-ci-bot in #4451
- fix: wasi has endian.h by @tree-sitter-ci-bot in #4464
- Fix crash w/ goto_previous_sibling when parent node has leading extra child by @tree-sitter-ci-bot in #4473
Full Changelog: v0.25.4...v0.25.5
v0.25.4
What's Changed
- fix(lib): remove duplicate TSLanguageMetadata typedef by @tree-sitter-ci-bot in #4270
- fix(rust): adapt to new nightly lint by @tree-sitter-ci-bot in #4269
- build(deps): bump ring from 0.17.8 to 0.17.13 by @tree-sitter-ci-bot in #4281
- fix(cli): properly escape invisible characters in parse error output by @tree-sitter-ci-bot in #4279
- fix(xtask): error if new version supplied to xtask is less than or equal to current version by @tree-sitter-ci-bot in #4290
- fix(make):
make install
shouldnβt fail when a parser bundles no queries by @tree-sitter-ci-bot in #4291 - fix(rust): address new clippy lint for pointer comparisons by @tree-sitter-ci-bot in #4310
- fix(rust): use core crates for no_std by @clason in #4311
- fix(rust): address new nightly lint for pointer comparisons by @tree-sitter-ci-bot in #4314
- add generate crate to workspace & adjust to new clippy lints by @tree-sitter-ci-bot in #4197
- fix(highlight): account for multiple rows in highlight testing assertions by @tree-sitter-ci-bot in #4335
- Add @generated to parser.c header by @tree-sitter-ci-bot in #4344
- Fix WASI build by not calling a non-existent function. by @tree-sitter-ci-bot in #4346
- fix(rust): clarify error message for non-token reserved words by @tree-sitter-ci-bot in #4347
- Make highlighting more deterministic when themes are ambiguous by @tree-sitter-ci-bot in #4350
- fix(lib): reset parser options after use by @tree-sitter-ci-bot in #4361
- fix(web): correct childWithDescendant() functionality by @tree-sitter-ci-bot in #4369
- fix(ci): increase timeouts for flaky tests by @tree-sitter-ci-bot in #4374
- export wasm files to better support bundling use cases by @tree-sitter-ci-bot in #4378
- Tidy up the docs in auto-generated Rust bindings by @tree-sitter-ci-bot in #4377
- binding_web: replace dynamic require with import by @tree-sitter-ci-bot in #4380
- Refine the documentation and command line help for "parse --edits" by @tree-sitter-ci-bot in #4379
- perf(highlight): use
BTreeMap
overIndexMap
for highlight configs by @tree-sitter-ci-bot in #4382 - fix(parse): mark logging closure as
move
by @tree-sitter-ci-bot in #4410 - fix(lib): do not access the alias sequence for the
end
subtree ints_subtree_summarize_children
by @tree-sitter-ci-bot in #4418 - fix(generate): mark url as a Windows-only dependency by @tree-sitter-ci-bot in #4415
- fix(rust): address some new nightly clippy lints by @tree-sitter-ci-bot in #4425
- fix(query): correct
last_child_step_index
in cases where a new step wasn't created. by @tree-sitter-ci-bot in #4428 - fix(lib): return early for empty predicate step slice by @tree-sitter-ci-bot in #4441
- 0.25.4 by @WillLillis in #4442
Full Changelog: v0.25.3...v0.25.4
v0.25.3
Bug Fixes
- Fixed an infinite loop that could happen in some grammars during error recovery if the end of the file was reached.
- Fixed a parser-generation error where internal character set constants were given external linkage, which could cause linking errors on some platforms if multiple Tree-sitter parsers were linked into the same application.
v0.25.2
Bug Fixes
- Fixed a crash that could occur when loading WASM-compiled languages that were generated with an earlier version of the Tree-sitter CLI (#4210).
- Fixed incorrect tokenization when using WASM-compiled languages, if the language's external scanner did not assign to
result_symbol
(#4218) - Fixed an infinite loop that could occur if external scanners returned empty extra tokens (#4213)
Build
- Decreased the rustc version required to build the
tree-sitter-languages
andtree-sitter
crates (#4221)
v0.25.1
Changelog
[0.25.1] β 2025-02-02
Features
- cli: Specify abi version via env var (#4173)
Bug Fixes
- bindings: Correct Zig bindings to expose a
language
function - lib: Prevent finished_tree assertion failure (#4176)
Documentation
- Correct build steps for WASM files
Build System and CI
- Use
ubuntu-22.04
for x64 builds (#4175) - Bump version to 0.25.1
Other
- rust: Correct doc comments