@willbooster/tree-sitter-javascript 4.0.6 → 5.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 +9 -8
- package/package.json +4 -4
- package/tree-sitter-javascript.wasm +0 -0
- package/tree-sitter.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://github.com/WillBooster/tree-sitter-javascript/actions/workflows/test.yml)
|
|
6
6
|
[](https://github.com/WillBooster/tree-sitter-javascript/actions/workflows/test-rust.yml)
|
|
7
7
|
[](https://github.com/semantic-release/semantic-release)
|
|
8
|
-
[](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
|
|
9
9
|
[](https://crates.io/crates/willbooster-tree-sitter-javascript)
|
|
10
10
|
|
|
11
11
|
JavaScript and JSX grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forked from
|
|
@@ -19,8 +19,9 @@ This fork fixes parsing bugs and raises conformance with [ECMAScript (ECMA-262)]
|
|
|
19
19
|
|
|
20
20
|
The npm package ships `tree-sitter-javascript.wasm` for
|
|
21
21
|
[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter), which runs in Node.js, Bun,
|
|
22
|
-
browsers, and Cloudflare Workers. The
|
|
23
|
-
|
|
22
|
+
browsers, and Cloudflare Workers. The parser carries the ABI number of WillBooster/tree-sitter (`0x57420001`), so it
|
|
23
|
+
loads only with that runtime, version 2.0.0 or newer; the upstream runtime rejects it. In Node.js and Bun, load it from
|
|
24
|
+
the package:
|
|
24
25
|
|
|
25
26
|
```js
|
|
26
27
|
import { fileURLToPath } from 'node:url';
|
|
@@ -62,13 +63,13 @@ The package also ships the node types in `src/node-types.json`, the highlight, i
|
|
|
62
63
|
`queries/` that `tree-sitter.json` lists, and `grammar.js` for grammars that extend this one (e.g.
|
|
63
64
|
`require('@willbooster/tree-sitter-javascript/grammar')`). The crate ships `tree-sitter.json` and `queries/` too.
|
|
64
65
|
|
|
65
|
-
In Rust, depend on the [crate](https://crates.io/crates/willbooster-tree-sitter-javascript) and the
|
|
66
|
-
[willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter) runtime:
|
|
66
|
+
In Rust, depend on the [crate](https://crates.io/crates/willbooster-tree-sitter-javascript) and the
|
|
67
|
+
[willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter) runtime, 2.0.0 or newer:
|
|
67
68
|
|
|
68
69
|
```toml
|
|
69
70
|
[dependencies]
|
|
70
|
-
tree-sitter = { package = "willbooster-tree-sitter", version = "
|
|
71
|
-
tree-sitter-javascript = { package = "willbooster-tree-sitter-javascript", version = "
|
|
71
|
+
tree-sitter = { package = "willbooster-tree-sitter", version = "2" }
|
|
72
|
+
tree-sitter-javascript = { package = "willbooster-tree-sitter-javascript", version = "5" }
|
|
72
73
|
```
|
|
73
74
|
|
|
74
75
|
```rust
|
|
@@ -92,7 +93,7 @@ locked in `Cargo.lock` (`script/tree-sitter`), whose generator and runtime have
|
|
|
92
93
|
`script/fork-cli` downloads that CLI into `.tmp/` from its GitHub Release on first use, or builds it with `cargo` when
|
|
93
94
|
the download fails or the release has no binary that runs here.
|
|
94
95
|
|
|
95
|
-
`bun run generate` records a fresh
|
|
96
|
+
`bun run generate` records a fresh generation profile from the applicable `test/corpus` cases and Git-tracked
|
|
96
97
|
files in `examples/`, then generates compact parser tables. The parser also embeds metadata from `tree-sitter.json`. After changing a grammar,
|
|
97
98
|
`tree-sitter.json`, a corpus case, or a tracked example,
|
|
98
99
|
regenerate and commit `src/`. Stage added or removed examples with `git add -A examples` before generation so the profile uses the intended file list.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/tree-sitter-javascript",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "JavaScript grammar for tree-sitter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"incremental",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@vitest/browser-playwright": "5.0.3",
|
|
47
47
|
"@willbooster/oxfmt-config": "1.2.2",
|
|
48
48
|
"@willbooster/oxlint-config": "1.4.8",
|
|
49
|
-
"@willbooster/wb": "22.
|
|
50
|
-
"@willbooster/web-tree-sitter": "
|
|
49
|
+
"@willbooster/wb": "22.24.0",
|
|
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",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"wrangler": "4.147.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@willbooster/web-tree-sitter": "^
|
|
66
|
+
"@willbooster/web-tree-sitter": "^2.0.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependenciesMeta": {
|
|
69
69
|
"@willbooster/web-tree-sitter": {
|
|
Binary file
|