Commit graph

5923 commits

Author SHA1 Message Date
Amaan Qureshi
39a67eec61 feat: migrate to ESM 2025-09-16 02:24:11 -04:00
Amaan Qureshi
67f50b85f5 docs: document the native js runtime 2025-09-16 02:24:11 -04:00
Amaan Qureshi
eedbec8f24 feat: remove the need of an external JS runtime for processing grammars 2025-09-16 02:24:11 -04:00
dependabot[bot]
7ba7c4a8ce build(deps): bump the cargo group with 7 updates
Bumps the cargo group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [cc](https://github.com/rust-lang/cc-rs) | `1.2.36` | `1.2.37` |
| [indexmap](https://github.com/indexmap-rs/indexmap) | `2.11.0` | `2.11.1` |
| [semver](https://github.com/dtolnay/semver) | `1.0.26` | `1.0.27` |
| [serde](https://github.com/serde-rs/serde) | `1.0.219` | `1.0.224` |
| [serde_derive](https://github.com/serde-rs/serde) | `1.0.219` | `1.0.224` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.143` | `1.0.145` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.21.0` | `3.22.0` |


Updates `cc` from 1.2.36 to 1.2.37
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.36...cc-v1.2.37)

Updates `indexmap` from 2.11.0 to 2.11.1
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.11.0...2.11.1)

Updates `semver` from 1.0.26 to 1.0.27
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.26...1.0.27)

Updates `serde` from 1.0.219 to 1.0.224
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.219...v1.0.224)

Updates `serde_derive` from 1.0.219 to 1.0.224
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.219...v1.0.224)

Updates `serde_json` from 1.0.143 to 1.0.145
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.143...v1.0.145)

Updates `tempfile` from 3.21.0 to 3.22.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.21.0...v3.22.0)

---
updated-dependencies:
- dependency-name: cc
  dependency-version: 1.2.37
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: indexmap
  dependency-version: 2.11.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: semver
  dependency-version: 1.0.27
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde
  dependency-version: 1.0.224
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_derive
  dependency-version: 1.0.224
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-version: 1.0.145
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tempfile
  dependency-version: 3.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-15 19:32:27 -04:00
dependabot[bot]
b6f45b0a2e build(deps): bump the npm group across 1 directory with 4 updates
Bumps the npm group with 4 updates in the /lib/binding_web directory: [@types/emscripten](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/emscripten), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [typescript](https://github.com/microsoft/TypeScript) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `@types/emscripten` from 1.41.1 to 1.41.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/emscripten)

Updates `@types/node` from 24.3.1 to 24.5.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `typescript` from 5.8.3 to 5.9.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.8.3...v5.9.2)

Updates `typescript-eslint` from 8.43.0 to 8.44.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.44.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@types/emscripten"
  dependency-version: 1.41.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@types/node"
  dependency-version: 24.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: typescript
  dependency-version: 5.9.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: typescript-eslint
  dependency-version: 8.44.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-15 19:32:20 -04:00
ObserverOfTime
3d26b8e500 feat(bindings): use CapsuleType in Python stub 2025-09-14 19:00:25 -04:00
Amaan Qureshi
46f7f860e6 docs: correct explanation about @ignore capture 2025-09-14 16:45:39 -04:00
Amaan Qureshi
2ae677162f docs: clarify that only the whitespace character class is simplfied 2025-09-14 16:45:39 -04:00
Amaan Qureshi
4dbfb5b49a docs: document the @ignore capture in tags 2025-09-14 06:27:27 -04:00
Amaan Qureshi
3a911d578c docs: add more information on supertype nodes for grammars and queries 2025-09-14 06:25:35 -04:00
Amaan Qureshi
63f48afaeb docs: explain extras in a bit more detail 2025-09-14 06:02:00 -04:00
Will Lillis
ac39aed7c5 fix(lib/wasm): return NULL for 0-sized allocations
Co-authored-by: Amaan Qureshi <contact@amaanq.com>
2025-09-13 22:29:47 -04:00
Amaan Qureshi
c4d02a5254 build(lib): regenerate wasm stdlib
Co-authored-by: Will Lillis <will.lillis24@gmail.com>
2025-09-13 22:29:47 -04:00
Amaan Qureshi
69c42450c3 fix(lib/wasm): keep track of freed blocks that are not the last allocated pointer
This fixes issues where the scanner allocates and frees a lot of data
during a single parse.

Co-authored-by: Will Lillis <will.lillis24@gmail.com>
2025-09-13 22:29:47 -04:00
Amaan Qureshi
b863b16454 fix(xtask): make building the wasm stdlib work again
Co-authored-by: Will Lillis <will.lillis24@gmail.com>
2025-09-13 22:29:47 -04:00
Will Lillis
0c35511aea fix(lib): improve wasm scanner serialization error handling
Co-authored-by: Amaan Qureshi <contact@amaanq.com>
2025-09-13 22:29:47 -04:00
Amaan Qureshi
06741d0d5d fix(playground): check that languageVersion exists for compat 2025-09-13 22:12:11 -04:00
RedCMD
ca8b944b53
build(web): fix cjs build 2025-09-13 05:51:42 -04:00
Amaan Qureshi
580cd9541a feat(web)!: remove deprecated functions 2025-09-12 02:50:30 -04:00
Amaan Qureshi
d60ef9ad0a feat(rust)!: remove deprecated functions 2025-09-12 02:50:30 -04:00
Amaan Qureshi
821cf797f2 feat(lib)!: remove deprecated functions 2025-09-12 02:50:30 -04:00
Amaan Qureshi
917895e6a3 build(nix): build cli with all features 2025-09-11 19:33:52 -04:00
Antonin Delpeuch
6e53dcc8e1
fix(playground): add missing <html> tag 2025-09-11 17:06:34 -04:00
ObserverOfTime
56325d2a3b chore: copy license to all packages 2025-09-11 03:12:35 -04:00
kilo52
d1160cb820 build(cmake)!: move CMakeLists.txt to the source root 2025-09-11 01:59:37 -04:00
kilo52
5528cfee17 build(cmake): change include directory scope to public
When a project adds tree-sitter as a dependency via the CMake
FetchContent machinery, the project fails to build because the
tree-sitter header cannot be found. This is because the include
directory is specified with the private scope instead of public.
2025-09-11 01:59:37 -04:00
Daniel Müller
937dcf5fd1 feat(rust)!: use ops::ControlFlow as parse and query progress return value
Instead of returning an undocumented boolean flag, use a
core::ops::ControlFlow object. At the expense of being a bit more
verbose, this is a type that should be self-explanatory in the context
of a callback, as an indication of whether to continue processing or
stop.
2025-09-11 01:59:21 -04:00
dependabot[bot]
57e2f41f42 build(deps): bump vite from 7.1.3 to 7.1.5 in /lib/binding_web
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.1.3 to 7.1.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 23:27:36 -04:00
Amaan Qureshi
3c1f02a7f9 docs(playground): show toast when tree is copied 2025-09-09 03:13:35 -04:00
Amaan Qureshi
907c7bc80b docs(playground): add version information in playground
Co-authored-by: Will Lillis <will.lillis24@gmail.com>
2025-09-09 03:13:35 -04:00
Amaan Qureshi
40a8678989 refactor(xtask): don't use docker to run wasi-sdk's clang
This now relies on TREE_SITTER_WASI_SDK_PATH being set
2025-09-09 03:13:35 -04:00
Amaan Qureshi
6451d2f65d fix(web): correct metadata function 2025-09-09 03:13:35 -04:00
faukah
e4e643086b
refactor: rework nix flake
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2025-09-09 03:03:35 -04:00
Amaan Qureshi
e9e4316569 feat(xtask): update nix 2025-09-09 04:45:57 +02:00
Amaan Qureshi
0719bd6ffb feat(xtask): bump versions in package-lock.json 2025-09-09 04:45:57 +02:00
Amaan Qureshi
8d6d19de1b build: add package-lock.json for npm cli package 2025-09-09 04:45:57 +02:00
dependabot[bot]
16502e19dd build(deps): bump the npm group across 1 directory with 6 updates
Bumps the npm group with 6 updates in the /lib/binding_web directory:

| Package | From | To |
| --- | --- | --- |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.34.0` | `9.35.0` |
| [@types/emscripten](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/emscripten) | `1.40.0` | `1.41.1` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `24.3.0` | `24.3.1` |
| [eslint](https://github.com/eslint/eslint) | `9.34.0` | `9.35.0` |
| [typescript](https://github.com/microsoft/TypeScript) | `5.8.3` | `5.9.2` |
| [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.41.0` | `8.43.0` |



Updates `@eslint/js` from 9.34.0 to 9.35.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.35.0/packages/js)

Updates `@types/emscripten` from 1.40.0 to 1.41.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/emscripten)

Updates `@types/node` from 24.3.0 to 24.3.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint` from 9.34.0 to 9.35.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.34.0...v9.35.0)

Updates `typescript` from 5.8.3 to 5.9.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.8.3...v5.9.2)

Updates `typescript-eslint` from 8.41.0 to 8.43.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.43.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.35.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@types/emscripten"
  dependency-version: 1.41.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@types/node"
  dependency-version: 24.3.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: eslint
  dependency-version: 9.35.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: typescript
  dependency-version: 5.9.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: typescript-eslint
  dependency-version: 8.43.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-09 04:33:49 +02:00
dependabot[bot]
6b2ed39df6 ci: bump the actions group with 2 updates
Bumps the actions group with 2 updates: [actions/setup-node](https://github.com/actions/setup-node) and [actions/github-script](https://github.com/actions/github-script).


Updates `actions/setup-node` from 4 to 5
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

Updates `actions/github-script` from 7 to 8
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/github-script
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-09 04:33:22 +02:00
dependabot[bot]
d517af4c1a build(deps): bump the cargo group with 3 updates
Bumps the cargo group with 3 updates: [cc](https://github.com/rust-lang/cc-rs), [ctrlc](https://github.com/Detegr/rust-ctrlc) and [log](https://github.com/rust-lang/log).


Updates `cc` from 1.2.35 to 1.2.36
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.35...cc-v1.2.36)

Updates `ctrlc` from 3.4.7 to 3.5.0
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/commits)

Updates `log` from 0.4.27 to 0.4.28
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.27...0.4.28)

---
updated-dependencies:
- dependency-name: cc
  dependency-version: 1.2.36
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: ctrlc
  dependency-version: 3.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: log
  dependency-version: 0.4.28
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-09 04:33:02 +02:00
Shadaj Laddad
27e5147a5f feat(generate): place file APIs behind a feature flag 2025-09-07 11:44:09 +03:00
Amaan Qureshi
e659dddad1 build(nix): add cross and typescript to dev shell 2025-09-04 05:00:14 -04:00
Amaan Qureshi
643f532a70 chore: update flake 2025-09-04 05:00:14 -04:00
Amaan Qureshi
86d86628cb build(nix): use fenix for rust toolchain
This plays more nicely with cross for local testing
2025-09-04 05:00:14 -04:00
Amaan Qureshi
17854168d9 feat(nix): add cross compilation support 2025-09-04 05:00:14 -04:00
Amaan Qureshi
d287acfcc0 refactor(nix): remove openssl dependency 2025-09-04 05:00:14 -04:00
Amaan Qureshi
595299a3c2 ci: remove separate step for generate fixtures 2025-09-04 04:22:32 -04:00
Amaan Qureshi
3eabba637c fix(xtask): run all tests with the --all flag 2025-09-04 04:22:32 -04:00
Amaan Qureshi
cd12e66e67 fix(lib): don't run code snippet as a doctest 2025-09-04 04:22:32 -04:00
Amaan Qureshi
1d0ebd1065 fix(rust): do not interpret readme doc comments as doc tests 2025-09-04 04:22:32 -04:00
Will Lillis
5fd818babe fix(generate): use correct state id when adding terminal states to
non terminal extras
2025-09-04 04:15:51 -04:00