Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1072 commits
Select commit Hold shift + click to select a range
32c8819
build(deps): bump the cargo group with 2 updates
dependabot[bot] Jul 28, 2025
d3c2fed
fix(rust): correct indices for `Node::utf16_text`
WillLillis Jul 16, 2025
7d0b94c
fix(docs): indicate CJS env var export is different on Windows platforms
WillLillis Aug 2, 2025
5e1daf0
fix(rust)!: take `u32` for index parameter to `Node::{child, named_ch…
WillLillis Aug 2, 2025
acfeed0
feat(cli): allow users to specify dynamic libraries directly for
WillLillis Jul 27, 2025
346080a
refactor(loader): replace `replace_dashes_with_underscores` with rust…
WillLillis Jul 27, 2025
d641249
feat(cli): include language name in `dump-languages` output
WillLillis Jul 27, 2025
d000698
fix(docs): add information on missing cli command options
WillLillis Aug 1, 2025
2368af5
build(deps): bump the cargo group with 5 updates
dependabot[bot] Aug 5, 2025
46a0e94
fix(rust): ignore new mismatched-lifetime-syntaxes lint
WillLillis Aug 7, 2025
49ae48f
fix(ci): ignore mismatched_lifetime_syntaxes lint when building wasmtime
WillLillis Aug 7, 2025
9d619d6
fix(bindings): use custom class name
ObserverOfTime Aug 5, 2025
bbec252
refactor(cli): drop unused function
ObserverOfTime Aug 5, 2025
7e7e376
refactor(cli): conditional assignment consistency
ObserverOfTime Aug 5, 2025
f783874
fix(cli): drop homepage link from config
ObserverOfTime Aug 7, 2025
d87921b
fix(bindings): update zig template files (#4637)
nvlled Aug 9, 2025
9f2dd2f
fix(bindings): fix clean makefile target
ObserverOfTime Jul 20, 2025
3d9f4d1
fix(rust): remove redundant `String` clones
WillLillis Aug 9, 2025
e749a97
fix(rust): make `String` clones more explicit
WillLillis Aug 9, 2025
1562b71
feat(cli): add `--rebuild` flag to `query`, `highlight`, and `tags` c…
WillLillis Jun 7, 2025
aed8b8b
feat(cli): rebuild parsers by default when `--grammar-path` is passed.
WillLillis Jun 7, 2025
21b3800
fix(rust): adapt to new nightly iterator lints
WillLillis Jun 7, 2025
1704c60
feat(test): allow cst as expected output of test case
WillLillis Jul 21, 2025
6f7f9a3
refactor(test): replace long tuples with structs
WillLillis Jul 24, 2025
2c02f07
fix(docs): correct awkward wording in `fail-fast` listing
WillLillis Jul 25, 2025
3294b04
fix(cli): remove trailing whitespace in cst print
WillLillis Aug 10, 2025
3a47bc4
fix(cli): escape delimiters '"' and '`' in cst node text
WillLillis Aug 10, 2025
79a5e6a
build(deps): bump the cargo group with 4 updates
dependabot[bot] Aug 12, 2025
790dcc1
ci: bump the actions group with 2 updates
dependabot[bot] Aug 12, 2025
d45642c
fix(bindings): don't ignore lockfiles
ObserverOfTime Jul 14, 2025
f9f7ae0
fix(bindings): make npm repository field an object
ChocolateNao Aug 13, 2025
c60264b
docs(web): fix deno import example
cscheid Aug 13, 2025
99c121b
docs: replace `TSInput` by `TSInputEdit` in "Advanced Parsing"
SoheilSalmani Aug 13, 2025
0bb43f7
fix(playground): scroll with vanilla JS
ObserverOfTime Jun 15, 2025
7bc8f76
build(deps): bump the cargo group with 5 updates
dependabot[bot] Aug 19, 2025
88e0b4c
docs: change WASM/wasm to Wasm
ObserverOfTime Aug 19, 2025
86b9f81
build(zig)!: upgrade build.zig to zig 0.15
bfredl Aug 20, 2025
be888a5
fix(c): add Haiku support to endian.h
kallisti5 Aug 22, 2025
fee50ad
feat(lib): add lldb pretty-printers for some C lib types
WillLillis Aug 13, 2025
10f5a42
feat(cli): Version updates (#4179)
jpt13653903 Aug 22, 2025
1c640ac
fix(cli): correct resource paths
ObserverOfTime Aug 22, 2025
4602e60
refactor(playground): move style to head
ObserverOfTime Aug 22, 2025
eb5ad7e
feat(playground): add a button to copy the tree
ObserverOfTime Aug 22, 2025
0d914c8
fix(wasm): delete `var_i32_type` after initializing global stack
WillLillis Aug 24, 2025
0a72746
build(deps): bump the cargo group with 8 updates
dependabot[bot] Aug 26, 2025
79177a1
fix(rust): EqCapture accepted cases where number of captured nodes di…
quentinLeDilavrec Aug 27, 2025
e67f9f8
fix(bindings): add tree-sitter as npm dev dependency
ObserverOfTime Aug 23, 2025
107bd80
fix(bindings): improve zig dependency fetching logic
ObserverOfTime Aug 23, 2025
1152bf4
fix(cli): show rule names for rules with metadata
amaanq Aug 28, 2025
99d8b58
docs: clarify that a reserved rule must exist in the grammar
amaanq Aug 28, 2025
340df02
docs: clarify definition of newline
WillLillis Aug 28, 2025
dab84a1
build(zig): expose wasmtimeDep function
ObserverOfTime Aug 22, 2025
2e4b7d2
build(zig): don't link wasmtime in static build
ObserverOfTime Aug 22, 2025
298b677
build(zig): use ArrayListUnmanaged
ObserverOfTime Aug 26, 2025
66ea1a6
style(zig): reformat files
ObserverOfTime Aug 26, 2025
b7f36a1
fix(lib): check if an `ERROR` node is named before assuming it's the …
amaanq Aug 28, 2025
9fdf721
ci: bump actions/upload-pages-artifact from 3 to 4 in the actions group
dependabot[bot] Aug 26, 2025
8387101
fix(lib): allow error nodes to match when they are child nodes
amaanq Aug 28, 2025
e0edfe1
build(zig): support wasmtime for ARM64 Windows (MSVC)
ObserverOfTime Aug 28, 2025
34ef115
feat(ci): build libraries on windows x64 with mingw
WillLillis Jan 21, 2025
c12b4a1
ci: add a spam closing workflow
ObserverOfTime Aug 16, 2025
0be215e
fix(bindings): properly detect MSVC compiler
ObserverOfTime Aug 28, 2025
a1211d3
feat(web): inline C source code in source map
verhovsky Aug 29, 2025
ac171eb
fix(generate): warn users when extra rule can lead to parser hang
WillLillis Aug 29, 2025
721b0e8
fix(web): update `.d.ts` files
RedCMD Aug 30, 2025
88e323c
fix(xtask): commit Cargo.lock in upgrade_wasmtime
ObserverOfTime Aug 20, 2025
489ad07
build(deps): bump wasmtime-c-api to v33.0.2
ObserverOfTime Aug 20, 2025
ed91767
build(rust)!: bump MSRV to 1.84.0
ObserverOfTime Aug 20, 2025
b57b721
fix(rust): make some methods `const`
ObserverOfTime Aug 20, 2025
e6fe91e
build(zig): support wasmtime in more archs
ObserverOfTime Aug 29, 2025
ca27fb5
fix(cli): fix DSL type declarations
ObserverOfTime Aug 30, 2025
4db3eda
fix(web): correct type errors, improve build
vemoo Aug 30, 2025
d188bf6
chore: remove emscripten xtask & workflow
ObserverOfTime Aug 20, 2025
ed2abf8
ci(dependabot): update npm dependencies
ObserverOfTime Aug 30, 2025
90bdd63
fix(npm): add directory to repository fields
ObserverOfTime Aug 30, 2025
a866eb5
build(deps): bump the npm group across 1 directory with 9 updates
dependabot[bot] Aug 30, 2025
5272b6b
refactor(web): use nullish coalescing operator
ObserverOfTime Aug 30, 2025
a0fd1de
build(deps): bump wasmparser from 0.224.1 to 0.229.0 in the cargo group
dependabot[bot] Aug 30, 2025
8b3e023
chore(web): remove source files from package
ObserverOfTime Aug 30, 2025
0c5cdcb
fix(xtask): add heap symbols to emscripten exported methods
ObserverOfTime Aug 30, 2025
dba8446
feat(web)!: use bigint for timeouts
ObserverOfTime Aug 30, 2025
0798647
feat(xtask): automate edits to emscripten generated d.ts
ObserverOfTime Aug 30, 2025
62f93e2
feat(test): pin fixture grammars to specific commits
WillLillis Aug 30, 2025
a12a79b
fix(cli): canonicalize `--lib-path` arguments
WillLillis Aug 30, 2025
47beafb
fix(playground): account for missing button
ObserverOfTime Aug 31, 2025
f9a331a
ci(spam): fix permission check
ObserverOfTime Aug 29, 2025
dbe88f8
fixup: remove permission check
ObserverOfTime Aug 30, 2025
b75196b
feat(c): rename DecodeFunction to TSDecodeFunction
ObserverOfTime Aug 23, 2025
9b23cd5
feat: use `compileStreaming` when loading wasm parsers
verhovsky Sep 2, 2025
da61d7c
feat: add nix flake
amaanq Aug 7, 2025
f2e71ec
fix(xtask): restore stripped `sourcesContent` when building the wasm …
amaanq Aug 30, 2025
94996b2
refactor(web): clean up preserving sourcemap logic, don't copy lib files
amaanq Aug 30, 2025
f0cfaff
build(web): mark `@types/emscripten` as a dev dep
amaanq Aug 31, 2025
22d6585
feat(loader): allow specifying the wasi sdk path
amaanq Aug 31, 2025
6e8ad7e
fix(xtask): update paths in bump-version
ObserverOfTime Aug 29, 2025
4535ea6
refactor(loader): use the curl binary instead of `ureq` to download w…
amaanq Sep 2, 2025
5263cd0
refactor(loader): use the tar binary to extract the wasi sdk
amaanq Sep 2, 2025
5cd6e74
refactor(xtask): use the git binary to perform git operations
amaanq Sep 2, 2025
4559ec5
fix(loader): correct logic when downloading wasi-sdk
amaanq Sep 2, 2025
151130a
ci: pass in matrix target to xtask commands
amaanq Sep 2, 2025
0b836b2
ci: use armv7hf
amaanq Sep 2, 2025
f44cbd4
perf(xtask); check out the tag directly for fixtures
amaanq Sep 3, 2025
6cb9486
test(fixtures): bump javascript grammar to 0.25.0
amaanq Sep 3, 2025
3b0273f
build: bump emscripten to 4.0.12
amaanq Sep 3, 2025
f95a52d
fix(xtask): reset fixtures when checking out new version
amaanq Sep 3, 2025
cc5463a
fix(test): improve readability of corpus error message mismatch
WillLillis Sep 3, 2025
310c0b8
fix(generate): return error when single state transitions have
WillLillis Sep 3, 2025
968d393
ci: switch to arm runner
amaanq Sep 3, 2025
5fd818b
fix(generate): use correct state id when adding terminal states to
WillLillis Sep 4, 2025
1d0ebd1
fix(rust): do not interpret readme doc comments as doc tests
amaanq Sep 4, 2025
cd12e66
fix(lib): don't run code snippet as a doctest
amaanq Sep 4, 2025
3eabba6
fix(xtask): run all tests with the `--all` flag
amaanq Sep 4, 2025
595299a
ci: remove separate step for generate fixtures
amaanq Sep 4, 2025
d287acf
refactor(nix): remove openssl dependency
amaanq Sep 4, 2025
1785416
feat(nix): add cross compilation support
amaanq Sep 4, 2025
86d8662
build(nix): use fenix for rust toolchain
amaanq Sep 4, 2025
643f532
chore: update flake
amaanq Sep 4, 2025
e659ddd
build(nix): add cross and typescript to dev shell
amaanq Sep 4, 2025
27e5147
feat(generate): place file APIs behind a feature flag
shadaj Feb 21, 2025
d517af4
build(deps): bump the cargo group with 3 updates
dependabot[bot] Sep 8, 2025
6b2ed39
ci: bump the actions group with 2 updates
dependabot[bot] Sep 8, 2025
16502e1
build(deps): bump the npm group across 1 directory with 6 updates
dependabot[bot] Sep 8, 2025
8d6d19d
build: add package-lock.json for npm cli package
amaanq Sep 4, 2025
0719bd6
feat(xtask): bump versions in package-lock.json
amaanq Sep 4, 2025
e9e4316
feat(xtask): update nix
amaanq Sep 4, 2025
e4e6430
refactor: rework nix flake
Sep 7, 2025
6451d2f
fix(web): correct metadata function
amaanq Sep 9, 2025
40a8678
refactor(xtask): don't use docker to run wasi-sdk's clang
amaanq Sep 9, 2025
907c7bc
docs(playground): add version information in playground
amaanq Sep 9, 2025
3c1f02a
docs(playground): show toast when tree is copied
amaanq Sep 9, 2025
57e2f41
build(deps): bump vite from 7.1.3 to 7.1.5 in /lib/binding_web
dependabot[bot] Sep 9, 2025
937dcf5
feat(rust)!: use ops::ControlFlow as parse and query progress return …
d-e-s-o Jun 16, 2025
5528cfe
build(cmake): change include directory scope to public
kilo52 Sep 3, 2025
d1160cb
build(cmake)!: move CMakeLists.txt to the source root
kilo52 Sep 6, 2025
56325d2
chore: copy license to all packages
ObserverOfTime Aug 15, 2025
6e53dcc
fix(playground): add missing `<html>` tag
wetneb Sep 11, 2025
917895e
build(nix): build cli with all features
amaanq Sep 11, 2025
821cf79
feat(lib)!: remove deprecated functions
amaanq Sep 11, 2025
d60ef9a
feat(rust)!: remove deprecated functions
amaanq Sep 11, 2025
580cd95
feat(web)!: remove deprecated functions
amaanq Sep 11, 2025
ca8b944
build(web): fix cjs build
RedCMD Sep 13, 2025
06741d0
fix(playground): check that `languageVersion` exists for compat
amaanq Sep 14, 2025
0c35511
fix(lib): improve wasm scanner serialization error handling
WillLillis Sep 12, 2025
b863b16
fix(xtask): make building the wasm stdlib work again
amaanq Sep 12, 2025
69c4245
fix(lib/wasm): keep track of freed blocks that are not the last alloc…
amaanq Sep 12, 2025
c4d02a5
build(lib): regenerate wasm stdlib
amaanq Sep 12, 2025
ac39aed
fix(lib/wasm): return NULL for 0-sized allocations
WillLillis Sep 14, 2025
63f48af
docs: explain extras in a bit more detail
amaanq Sep 14, 2025
3a911d5
docs: add more information on supertype nodes for grammars and queries
amaanq Sep 14, 2025
4dbfb5b
docs: document the `@ignore` capture in tags
amaanq Sep 14, 2025
2ae6771
docs: clarify that only the whitespace character class is simplfied
amaanq Sep 14, 2025
46f7f86
docs: correct explanation about `@ignore` capture
amaanq Sep 14, 2025
3d26b8e
feat(bindings): use CapsuleType in Python stub
ObserverOfTime Sep 14, 2025
b6f45b0
build(deps): bump the npm group across 1 directory with 4 updates
dependabot[bot] Sep 15, 2025
7ba7c4a
build(deps): bump the cargo group with 7 updates
dependabot[bot] Sep 15, 2025
eedbec8
feat: remove the need of an external JS runtime for processing grammars
amaanq Sep 11, 2025
67f50b8
docs: document the native js runtime
amaanq Sep 15, 2025
39a67ee
feat: migrate to ESM
amaanq Sep 15, 2025
fd68c02
fix(init): add missing quote in replacement
amaanq Sep 15, 2025
0269357
feat(generate): allow more characters for keywords
amaanq Sep 14, 2025
9593737
build(generate): remove `tree-sitter` dependency
bbb651 Jan 12, 2025
070b916
fix(rust): appease clippy
WillLillis Sep 16, 2025
c54bc44
fix(test): include failing test's path in error message
WillLillis Sep 16, 2025
31ff624
fix(generate): assert there is a Nfa last state before retrieving it
WillLillis Sep 16, 2025
339bad2
feat(generate): don't embed tree-sitter CLI version in parser
clason Sep 16, 2025
57c6105
fix(generate): remove warning message for CJS grammars
amaanq Sep 16, 2025
04cfee5
build(rust): remove unused dependencies
amaanq Sep 16, 2025
317e2e7
Revert "feat(generate): allow more characters for keywords"
amaanq Sep 17, 2025
db0d05f
ci: fix cache paths
amaanq Sep 17, 2025
6a28a62
test: add safety checks to ensure langauge version constants are kept in
WillLillis Sep 17, 2025
46ea65c
refactor: remove url dependency
WillLillis Sep 17, 2025
22553b3
feat: support compiling to wasm32-unknown-unknown
amaanq Sep 13, 2025
d291325
ci: build wasm32
amaanq Sep 13, 2025
f222db5
fix(bindings): fix ESM errors in Node bindings
ObserverOfTime Sep 16, 2025
f09dc3c
fix(wasm): fix alias map size computation
nia-e Sep 18, 2025
074e991
refactor: deduplicate allocation code in tests
amaanq Sep 18, 2025
9be3e2b
0.26.0
maxbrunsfeld Sep 19, 2025
1a0868c
build: add static and shared targets to Makefile
WillLillis Sep 18, 2025
a69367f
feat: add API for editing points and ranges
amaanq Sep 19, 2025
48a5077
feat(web)!: add API for editing points and ranges
amaanq Sep 19, 2025
0cf2171
feat(rust): add `reborrow` method to `ParseOptions`
amaanq Sep 19, 2025
552ab53
docs(cli): add docs on new `version` features
jpt13653903 Sep 19, 2025
0ca8fe8
feat(playground): add export flag
amaanq Sep 19, 2025
79ef484
ci: cross-compile without cross-rs
ObserverOfTime Sep 20, 2025
6dfa790
feat(loader): respect NM env var
ObserverOfTime Sep 20, 2025
60c3bed
fix(loader): install arm64 wasi-sdk on arm64 windows
ObserverOfTime Sep 20, 2025
311585d
refactor!: rename `stage` flag to `emit`
amaanq Sep 20, 2025
fa28b43
feat(bindings): update Zig bindings to use `Language.fromRaw`
amaanq Sep 21, 2025
804ef22
refactor(cli): use the logger
ObserverOfTime Sep 15, 2025
d13657c
refactor(generate): use the logger
ObserverOfTime Sep 15, 2025
e5c11d9
refactor(config): use the logger
amaanq Sep 20, 2025
d543e2e
refactor(loader): use the logger
amaanq Sep 20, 2025
8873c1a
docs: update options for generate command
wetneb Jul 27, 2025
c89e40f
fix(generate): fix builds outside of crate workspace
amaanq Sep 19, 2025
6214f95
docs: correct new generate flag: "stage"->"emit"
WillLillis Sep 21, 2025
1be51c2
chore: upgrade emscripten to 4.0.15
ObserverOfTime Sep 21, 2025
a1640e4
chore: rebuild wasm stdlib
ObserverOfTime Sep 21, 2025
92678f0
fix(rust): pass correct fd to C lib's ts_tree_print_dot_graph
WillLillis Sep 21, 2025
9b91488
Fix issues preventing releases from successfully publishing (#4867)
maxbrunsfeld Sep 22, 2025
95ab17e
build: define _DARWIN_C_SOURCE
amaanq Sep 22, 2025
e3294c3
build: bump tree-sitter-language to 0.1.5
maxbrunsfeld Sep 22, 2025
cf89840
build(deps): bump the npm group across 1 directory with 6 updates
dependabot[bot] Sep 22, 2025
47c9256
test: clean up parser hang test
amaanq Sep 23, 2025
b0cdab8
refactor(rust): avoid panics where possible
amaanq Sep 23, 2025
ce56465
test(rust): prefer `assert`s to `panic`s
amaanq Sep 23, 2025
021d9c4
test: clean up async boundary test
amaanq Sep 23, 2025
f26bd44
flake: remove cross, add llvm-cov support
amaanq Sep 23, 2025
90ee433
fix(lib): account for unreachable patterns with children
amaanq Sep 23, 2025
8c22426
feat(rust): add `new_raw` to create a raw, unchecked query pointer
ribru17 Sep 23, 2025
9d66dbc
chore: remove CARGO_WORKSPACE_DIR var
ObserverOfTime Sep 24, 2025
ea9c318
docs: update highlight crate link
amaanq Sep 24, 2025
e1b424c
Revert "0.26.0"
amaanq Sep 24, 2025
335bfab
feat(cli): include filenames in parsing xml output
WillLillis Sep 25, 2025
a9bce7c
fix(generate): return error when generated grammar's state count exceeds
WillLillis Sep 25, 2025
5f7806f
feat: add option to disable parse state optimizations
amaanq Sep 25, 2025
422866a
fix(docs): update more broken links
WillLillis Sep 26, 2025
d86e1b4
feat(bindings): generate zig fingerprint
ObserverOfTime Sep 25, 2025
12a6400
fix(test): trim trailing carriage return unconditionally in test
WillLillis Sep 27, 2025
bd02be2
fix(lib): allow anonymous nodes in the supertype query syntax
amaanq Sep 26, 2025
3416658
fix(lib): validate subtypes in supertype queries
amaanq Sep 26, 2025
00e394f
feat(lib)!: disallow whitespace in supertype syntax
amaanq Sep 28, 2025
443acf0
ci(dependabot): enable cooldown period
ObserverOfTime Sep 28, 2025
35b1356
ci(dependabot): update package.json as well
ObserverOfTime Sep 28, 2025
be0c44f
build(deps): bump the cargo group with 7 updates
dependabot[bot] Sep 28, 2025
4edcca9
style(loader): appease clippy
amaanq Sep 28, 2025
122493b
style(cli): appease clippy
amaanq Sep 28, 2025
24c8feb
fix(bindings): fix root detection on windows
amaanq Sep 28, 2025
92efd26
fix(loader): allow parallel compilation on windows
amaanq Sep 21, 2025
c5b22a1
ci: split cross compilation and emscripten tag read
amaanq Sep 29, 2025
1dc4804
build(deps): bump the cargo group with 2 updates
dependabot[bot] Sep 29, 2025
0cf6e7c
fix(cli): prevent crash when parsing stdin
ObserverOfTime Oct 1, 2025
0f5ccc4
Fix typo
mihaidaniel34 Oct 4, 2025
7d0e029
chore: add schema for node-types.json
ObserverOfTime Oct 4, 2025
3355825
fix(cli): don't load languages for `build` command
WillLillis Oct 6, 2025
ae54350
fix(generate): Add missing fields to `NodeInfoJson` sorting
WillLillis Oct 9, 2025
00d172b
fix(generate): correct display of precedence for
WillLillis Oct 6, 2025
262f178
fix(generate): ensure deterministic iteration order for symbol aliases
WillLillis Oct 11, 2025
b3bc770
refactor(generate): make `AliasMap` use `BTreeMap` over `HashMap`
WillLillis Oct 11, 2025
da5926d
build(deps): bump the cargo group across 1 directory with 4 updates
dependabot[bot] Oct 13, 2025
bdee2c2
ci: use macos-15-intel runner
ObserverOfTime Oct 3, 2025
e344837
fix(rust): minor cleanup in generate code
WillLillis Oct 14, 2025
87d778a
fix(rust): apply `Self` usage in struct definition lint
WillLillis Oct 20, 2025
a2f2b16
fix(xtask): require `version` argument for `bump-version` command
WillLillis Oct 6, 2025
605e580
ci: bump the actions group across 1 directory with 3 updates
dependabot[bot] Oct 27, 2025
77363a6
build(deps): cargo update
clason Oct 29, 2025
70cde4a
ci(dependabot): only update patch releases for cargo
clason Oct 29, 2025
6188010
build(deps): bump rquickjs to v0.10.0
clason Oct 29, 2025
ecc787e
fix(test): correct language typo in test name
WillLillis Oct 4, 2025
b8f5221
perf: reduce needless allocations
WillLillis Oct 5, 2025
097c2d4
fix(cli): remove `--emit=lib` generate option
WillLillis Nov 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target
.git
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ insert_final_newline = true
[*.rs]
indent_size = 4

[*.{zig,zon}]
indent_size = 4

[Makefile]
indent_style = tab
indent_size = 8
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
/lib/src/unicode/*.h linguist-vendored
/lib/src/unicode/LICENSE linguist-vendored

/cli/src/generate/prepare_grammar/*.json -diff
Cargo.lock -diff
15 changes: 15 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# These are supported funding model platforms

github: tree-sitter
patreon: # Replace with a single Patreon username
open_collective: tree-sitter # Replace with a single Open Collective username
ko_fi: amaanq
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug Report
description: Report a problem
labels: [bug]
type: Bug
body:
- type: textarea
attributes:
Expand All @@ -13,9 +13,11 @@ body:
attributes:
label: "Steps to reproduce"
placeholder: |
```sh
git clone --depth=1 https://github.com/tree-sitter/tree-sitter-ruby
cd tree-sitter-ruby
tree-sitter generate
```
validations:
required: true

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Feature request
description: Request an enhancement
labels: [enhancement]
type: Feature
body:
- type: markdown
attributes:
Expand Down
25 changes: 13 additions & 12 deletions .github/actions/cache/action.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
name: 'Cache'
description: "This action caches fixtures"
name: Cache

description: This action caches fixtures

outputs:
cache-hit:
description: 'Cache hit'
value: ${{ steps.cache_output.outputs.cache-hit }}
description: Cache hit
value: ${{ steps.cache.outputs.cache-hit }}

runs:
using: "composite"
using: composite
steps:
- uses: actions/cache@v4
id: cache_fixtures
id: cache
with:
path: |
test/fixtures/grammars
target/release/tree-sitter-*.wasm
key: fixtures-${{ join(matrix.*, '_') }}-${{ hashFiles(
'cli/src/generate/**',
'script/generate-fixtures*',
'crates/generate/src/**',
'lib/src/parser.h',
'lib/src/array.h',
'lib/src/alloc.h',
'test/fixtures/grammars/*/**/src/*.c',
'.github/actions/cache/action.yml') }}

- run: echo "cache-hit=${{ steps.cache_fixtures.outputs.cache-hit }}" >> $GITHUB_OUTPUT
shell: bash
id: cache_output
4 changes: 2 additions & 2 deletions script/cliff.toml → .github/cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ body = """
{% for commit in commits%}\
{% if not commit.scope %}\
- {{ commit.message | upper_first }}\
{% if commit.github.pr_number %} (<https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/pull/{{ commit.github.pr_number }}>){%- endif %}
{% if commit.remote.pr_number %} (<https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/pull/{{ commit.remote.pr_number }}>){%- endif %}
{% endif %}\
{% endfor %}\
{% for group, commits in commits | group_by(attribute="scope") %}\
{% for commit in commits %}\
- **{{commit.scope}}**: {{ commit.message | upper_first }}\
{% if commit.github.pr_number %} (<https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/pull/{{ commit.github.pr_number }}>){%- endif %}
{% if commit.remote.pr_number %} (<https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/pull/{{ commit.remote.pr_number }}>){%- endif %}
{% endfor %}\
{% endfor %}
{% endfor %}
Expand Down
39 changes: 35 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,50 @@ updates:
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 3
commit-message:
prefix: "build(deps)"
labels:
- "dependencies"
- "cargo"
groups:
cargo:
patterns:
- "*"
patterns: ["*"]
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major", "version-update:semver-minor"]

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 3
commit-message:
prefix: "ci"
labels:
- "dependencies"
- "github-actions"
groups:
actions:
patterns:
- "*"
patterns: ["*"]

- package-ecosystem: "npm"
versioning-strategy: increase
directories:
- "/crates/npm"
- "/crates/eslint"
- "/lib/binding_web"
schedule:
interval: "weekly"
cooldown:
default-days: 3
commit-message:
prefix: "build(deps)"
labels:
- "dependencies"
- "npm"
groups:
npm:
patterns: ["*"]
29 changes: 29 additions & 0 deletions .github/scripts/close_spam.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = async ({ github, context }) => {
let target = context.payload.issue;
if (target) {
await github.rest.issues.update({
...context.repo,
issue_number: target.number,
state: "closed",
state_reason: "not_planned",
title: "[spam]",
body: "",
type: null,
});
} else {
target = context.payload.pull_request;
await github.rest.pulls.update({
...context.repo,
pull_number: target.number,
state: "closed",
title: "[spam]",
body: "",
});
}

await github.rest.issues.lock({
...context.repo,
issue_number: target.number,
lock_reason: "spam",
});
};
17 changes: 0 additions & 17 deletions .github/scripts/cross.sh

This file was deleted.

19 changes: 0 additions & 19 deletions .github/scripts/make.sh

This file was deleted.

28 changes: 0 additions & 28 deletions .github/scripts/tree-sitter.sh

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Backport Pull Request

on:
pull_request_target:
types: [closed, labeled]

permissions:
contents: write
pull-requests: write

jobs:
backport:
if: github.event.pull_request.merged
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Create app token
uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.BACKPORT_APP }}
private-key: ${{ secrets.BACKPORT_KEY }}

- name: Create backport PR
uses: korthout/backport-action@v3
with:
pull_title: "${pull_title}"
label_pattern: "^ci:backport ([^ ]+)$"
github_token: ${{ steps.app-token.outputs.token }}
30 changes: 30 additions & 0 deletions .github/workflows/bindgen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Check Bindgen Output

on:
pull_request:
paths:
- lib/include/tree_sitter/api.h
- lib/binding_rust/bindings.rs
push:
branches: [master]
paths:
- lib/include/tree_sitter/api.h
- lib/binding_rust/bindings.rs

jobs:
check-bindgen:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Set up stable Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable

- name: Generate bindings
run: cargo xtask generate-bindings

- name: Check if the bindgen output changed
run: git diff --exit-code lib/binding_rust/bindings.rs
Loading