Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ tree-sitter-language = "0.1"
cc = "1.2"

[dev-dependencies]
tree-sitter = { package = "willbooster-tree-sitter", version = "2.0.0" }
tree-sitter = { package = "willbooster-tree-sitter", version = "7.0.5" }
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ This fork is based on tree-sitter-java 0.23.5 and accepts `final` modifiers on s
and typed record-pattern components, plus qualified names in record patterns. Unnamed variables in switch and
`instanceof` type patterns, including typed record-pattern components, use `underscore_pattern` nodes. It ships the
parser as the compact tables that the [WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator
emits under that fork's own ABI number (`0x57420001`), so the parser loads only with that runtime, version 2.0.0 or
later, and not with upstream's tree-sitter.
emits under that fork's own ABI number (`0x57420006`), so the parser loads only with that runtime, version 7.0.5 or
later within major version 7, and not with upstream's tree-sitter.

## Usage

The npm package ships `tree-sitter-java.wasm` for
[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 2.0.0 or later, which runs in Node.js, Bun, browsers, and Cloudflare Workers. In Node.js and Bun, load the grammar from its path:
[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 7.0.5 or later within major version 7, which runs in Node.js, Bun, browsers, and Cloudflare Workers. In Node.js and Bun, load the grammar from its path:

```js
import { fileURLToPath } from 'node:url';
Expand Down Expand Up @@ -68,8 +68,8 @@ fuzzed with:

```toml
[dependencies]
tree-sitter = { package = "willbooster-tree-sitter", version = "2" }
tree-sitter-java = { package = "willbooster-tree-sitter-java", version = "2" }
tree-sitter = { package = "willbooster-tree-sitter", version = "7.0.5" }
tree-sitter-java = { package = "willbooster-tree-sitter-java", version = "4" }
```

```rust
Expand Down
8 changes: 4 additions & 4 deletions bindings/rust/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! This crate provides Java language support for the [tree-sitter] parsing library.
//!
//! The parser carries the ABI number of the WillBooster fork (`0x57420001`), so it loads only with the
//! [`willbooster-tree-sitter`] runtime 2.0.0 or later (depend on it as
//! `tree-sitter = { package = "willbooster-tree-sitter", version = "2" }`); upstream's `tree-sitter` crate and earlier
//! The parser carries the ABI number of the WillBooster fork (`0x57420006`), so it loads only with the
//! [`willbooster-tree-sitter`] runtime 7.0.5 or later within major version 7 (depend on it as
//! `tree-sitter = { package = "willbooster-tree-sitter", version = "7.0.5" }`); upstream's `tree-sitter` crate and earlier
//! versions of the fork's runtime reject it with a `LanguageError`.
//!
//! Typically, you will use the [`LANGUAGE`] constant to add this language to a
Expand All @@ -19,7 +19,7 @@
//! assert!(!tree.root_node().has_error());
//! ```
//!
//! [`Parser`]: https://docs.rs/willbooster-tree-sitter/2/tree_sitter/struct.Parser.html
//! [`Parser`]: https://docs.rs/willbooster-tree-sitter/7/tree_sitter/struct.Parser.html
//! [tree-sitter]: https://tree-sitter.github.io/
//! [`willbooster-tree-sitter`]: https://crates.io/crates/willbooster-tree-sitter

Expand Down
6 changes: 3 additions & 3 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@willbooster/oxfmt-config": "1.2.2",
"@willbooster/oxlint-config": "1.4.8",
"@willbooster/wb": "22.26.1",
"@willbooster/web-tree-sitter": "2.0.1",
"@willbooster/web-tree-sitter": "7.0.5",
"conventional-changelog-conventionalcommits": "10.4.0",
"lefthook": "2.2.1",
"oxfmt": "0.72.0",
Expand All @@ -60,7 +60,7 @@
"wrangler": "4.147.0"
},
"peerDependencies": {
"@willbooster/web-tree-sitter": "^2.0.0"
"@willbooster/web-tree-sitter": "^7.0.5"
},
"peerDependenciesMeta": {
"@willbooster/web-tree-sitter": {
Expand Down
Loading
Loading