@willbooster/tree-sitter-go 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-go
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@willbooster/tree-sitter-go.svg)](https://www.npmjs.com/package/@willbooster/tree-sitter-go)
4
+ [![license](https://img.shields.io/npm/l/@willbooster/tree-sitter-go.svg)](https://www.npmjs.com/package/@willbooster/tree-sitter-go)
3
5
  [![Test](https://github.com/WillBooster/tree-sitter-go/actions/workflows/test.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-go/actions/workflows/test.yml)
4
6
  [![Test rust](https://github.com/WillBooster/tree-sitter-go/actions/workflows/test-rust.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-go/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-go.svg)](https://crates.io/crates/willbooster-tree-sitter-go)
8
10
 
9
11
  Go grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forked from
@@ -11,13 +13,14 @@ Go grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forked
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 of upstream's version 0.25.0 and generates the parser with the
14
- [WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator at ABI 16, whose compact parse tables
15
- need that fork's runtime.
16
+ [WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator. The parser carries that fork's own ABI
17
+ number (`0x57420001`), so it loads only with the WillBooster runtime, version 2.0.0 or later
18
+ (`willbooster-tree-sitter`, `@willbooster/web-tree-sitter`), and not with upstream's tree-sitter.
16
19
 
17
20
  ## Usage
18
21
 
19
22
  The npm package ships `tree-sitter-go.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-go = { package = "willbooster-tree-sitter-go", version = "1" }
69
+ tree-sitter = { package = "willbooster-tree-sitter", version = "2" }
70
+ tree-sitter-go = { package = "willbooster-tree-sitter-go", version = "2" }
68
71
  ```
69
72
 
70
73
  ```rust
@@ -90,7 +93,7 @@ not the ones this package ships with. Its first run downloads that CLI from the
90
93
  with `cargo` (whose build runs the CMake that `mise.toml` pins) when the download fails or the release has no binary that runs here. Run other CLI commands through it as
91
94
  well (e.g. `script/tree-sitter parse file.go`).
92
95
 
93
- `bun run generate` records a fresh ABI 16 generation profile from the applicable `test/corpus` cases and Git-tracked
96
+ `bun run generate` records a fresh generation profile from the applicable `test/corpus` cases and Git-tracked
94
97
  files in `examples/`, then generates compact parser tables. The parser also embeds metadata from `tree-sitter.json`. After changing a grammar,
95
98
  `tree-sitter.json`, a corpus case, or a tracked example,
96
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-go",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "description": "Go 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.5.1",
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": "Go grammar for tree-sitter",
20
20
  "authors": [