@willbooster/tree-sitter-java 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,9 +1,11 @@
1
1
  # @willbooster/tree-sitter-java
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@willbooster/tree-sitter-java.svg)](https://www.npmjs.com/package/@willbooster/tree-sitter-java)
4
+ [![license](https://img.shields.io/npm/l/@willbooster/tree-sitter-java.svg)](https://www.npmjs.com/package/@willbooster/tree-sitter-java)
3
5
  [![Test](https://github.com/WillBooster/tree-sitter-java/actions/workflows/test.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-java/actions/workflows/test.yml)
4
6
  [![Test rust](https://github.com/WillBooster/tree-sitter-java/actions/workflows/test-rust.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-java/actions/workflows/test-rust.yml)
5
7
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
6
- [![wbfy](https://img.shields.io/badge/wbfy-20.36.6-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
8
+ [![wbfy](https://img.shields.io/badge/wbfy-20.36.11-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
7
9
  [![crates.io](https://img.shields.io/crates/v/willbooster-tree-sitter-java.svg)](https://crates.io/crates/willbooster-tree-sitter-java)
8
10
 
9
11
  Java grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forked from
@@ -11,13 +13,14 @@ Java grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), fork
11
13
  to its authors and contributors. This is not an official release of that project.
12
14
 
13
15
  This fork keeps the grammar rules, the queries, and the corpus of tree-sitter-java 0.23.5, so it parses the same
14
- language into the same node types. It ships the parser as the ABI 16 compact tables that the
15
- [WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator emits, which only that runtime loads.
16
+ language into the same node types. It ships the parser as the compact tables that the
17
+ [WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator emits under that fork's own ABI number
18
+ (`0x57420001`), so the parser loads only with that runtime, version 2.0.0 or later, and not with upstream's tree-sitter.
16
19
 
17
20
  ## Usage
18
21
 
19
22
  The npm package ships `tree-sitter-java.wasm` for
20
- [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 1.4.3 or later, which runs in Node.js, Bun, browsers, and Cloudflare Workers. In Node.js and Bun, load the grammar from its path:
23
+ [@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:
21
24
 
22
25
  ```js
23
26
  import { fileURLToPath } from 'node:url';
@@ -63,8 +66,8 @@ fuzzed with:
63
66
 
64
67
  ```toml
65
68
  [dependencies]
66
- tree-sitter = { package = "willbooster-tree-sitter", version = "1.4.3" }
67
- tree-sitter-java = { package = "willbooster-tree-sitter-java", version = "1" }
69
+ tree-sitter = { package = "willbooster-tree-sitter", version = "2" }
70
+ tree-sitter-java = { package = "willbooster-tree-sitter-java", version = "2" }
68
71
  ```
69
72
 
70
73
  ```rust
@@ -93,7 +96,7 @@ well (e.g. `script/tree-sitter parse File.java`).
93
96
  `grammar.js` stays as upstream wrote and formatted it, apart from rule changes, so that it can be compared with
94
97
  upstream's grammar; the linter and the formatter skip it.
95
98
 
96
- `bun run generate` records a fresh ABI 16 generation profile from the applicable `test/corpus` cases and any Git-tracked
99
+ `bun run generate` records a fresh generation profile from the applicable `test/corpus` cases and any Git-tracked
97
100
  files in `examples/`, then generates compact parser tables. The parser also embeds metadata from `tree-sitter.json`. After changing a grammar,
98
101
  `tree-sitter.json`, a corpus case, a tracked example, or the `willbooster-tree-sitter` version in `Cargo.lock` (whose
99
102
  CLI generates the parser),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-java",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "description": "Java grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -47,7 +47,7 @@
47
47
  "@willbooster/oxfmt-config": "1.2.2",
48
48
  "@willbooster/oxlint-config": "1.4.8",
49
49
  "@willbooster/wb": "22.24.0",
50
- "@willbooster/web-tree-sitter": "1.4.7",
50
+ "@willbooster/web-tree-sitter": "2.0.1",
51
51
  "conventional-changelog-conventionalcommits": "10.4.0",
52
52
  "lefthook": "2.1.16",
53
53
  "oxfmt": "0.71.0",
@@ -61,7 +61,7 @@
61
61
  "wrangler": "4.147.0"
62
62
  },
63
63
  "peerDependencies": {
64
- "@willbooster/web-tree-sitter": "^1.4.3"
64
+ "@willbooster/web-tree-sitter": "^2.0.0"
65
65
  },
66
66
  "peerDependenciesMeta": {
67
67
  "@willbooster/web-tree-sitter": {
Binary file
package/tree-sitter.json CHANGED
@@ -14,7 +14,7 @@
14
14
  }
15
15
  ],
16
16
  "metadata": {
17
- "version": "1.0.0",
17
+ "version": "2.0.0",
18
18
  "license": "MIT",
19
19
  "description": "Java grammar for tree-sitter",
20
20
  "authors": [