@willbooster/tree-sitter-ruby 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-ruby
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@willbooster/tree-sitter-ruby.svg)](https://www.npmjs.com/package/@willbooster/tree-sitter-ruby)
4
+ [![license](https://img.shields.io/npm/l/@willbooster/tree-sitter-ruby.svg)](https://www.npmjs.com/package/@willbooster/tree-sitter-ruby)
3
5
  [![Test](https://github.com/WillBooster/tree-sitter-ruby/actions/workflows/test.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-ruby/actions/workflows/test.yml)
4
6
  [![Test rust](https://github.com/WillBooster/tree-sitter-ruby/actions/workflows/test-rust.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-ruby/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-ruby.svg)](https://crates.io/crates/willbooster-tree-sitter-ruby)
8
10
 
9
11
  Ruby grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forked from
@@ -11,8 +13,9 @@ Ruby 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 ships upstream's grammar with a parser generated by
14
- [WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter), whose compact ABI 16 parse tables make the
15
- parser smaller. The scanner differs from upstream's only where upstream's code aborts the process: when a heredoc word is
16
+ [WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter), whose compact parse tables make the
17
+ parser smaller. The parser carries that fork's own ABI number (`0x57420001`), so it loads only with the WillBooster
18
+ runtime, version 2.0.0 or later; upstream's tree-sitter runtime rejects it. The scanner differs from upstream's only where upstream's code aborts the process: when a heredoc word is
16
19
  longer than 255 bytes, or when the scanner state with the open heredocs would not fit the runtime's serialization
17
20
  buffer, the open heredocs are not recognized and their bodies are parsed as code.
18
21
 
@@ -20,7 +23,7 @@ buffer, the open heredocs are not recognized and their bodies are parsed as code
20
23
 
21
24
  The npm package ships `tree-sitter-ruby.wasm` for
22
25
  [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter), which runs in Node.js, Bun,
23
- browsers, and Cloudflare Workers. The compact ABI 16 parser requires runtime 1.3.0 or later.
26
+ browsers, and Cloudflare Workers. The parser requires runtime 2.0.0 or later.
24
27
 
25
28
  In Node.js and Bun, load the grammar from its path:
26
29
 
@@ -63,12 +66,12 @@ The package also ships the queries in `queries/` and the node types in `src/node
63
66
 
64
67
  In Rust, depend on the [crate](https://crates.io/crates/willbooster-tree-sitter-ruby) and on
65
68
  [willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter), the runtime this package is tested and
66
- fuzzed with. The compact ABI 16 parser requires runtime 1.3.0 or later:
69
+ fuzzed with. The parser requires runtime 2.0.0 or later:
67
70
 
68
71
  ```toml
69
72
  [dependencies]
70
- tree-sitter = { package = "willbooster-tree-sitter", version = "1.3.0" }
71
- tree-sitter-ruby = { package = "willbooster-tree-sitter-ruby", version = "1" }
73
+ tree-sitter = { package = "willbooster-tree-sitter", version = "2.0.0" }
74
+ tree-sitter-ruby = { package = "willbooster-tree-sitter-ruby", version = "2" }
72
75
  ```
73
76
 
74
77
  ```rust
@@ -93,7 +96,7 @@ not the ones this package ships with. Its first run downloads that CLI from the
93
96
  with `cargo` (whose build runs the CMake that `mise.toml` pins) when the download fails or the release has no binary
94
97
  that runs here. Run other CLI commands through it as well (e.g. `script/tree-sitter parse file.rb`).
95
98
 
96
- `bun run generate` records a fresh ABI 16 generation profile from the applicable `test/corpus` cases and Git-tracked
99
+ `bun run generate` records a fresh generation profile from the applicable `test/corpus` cases and Git-tracked
97
100
  files in `examples/`, then generates compact parser tables. The parser also embeds metadata from `tree-sitter.json`.
98
101
  After changing the grammar, `tree-sitter.json`, a corpus case, or a tracked example, regenerate and commit `src/`. Stage
99
102
  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-ruby",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "description": "Ruby 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",
@@ -63,7 +63,7 @@
63
63
  "wrangler": "4.147.0"
64
64
  },
65
65
  "peerDependencies": {
66
- "@willbooster/web-tree-sitter": "^1.3.0"
66
+ "@willbooster/web-tree-sitter": "^2.0.0"
67
67
  },
68
68
  "peerDependenciesMeta": {
69
69
  "@willbooster/web-tree-sitter": {
Binary file
package/tree-sitter.json CHANGED
@@ -19,7 +19,7 @@
19
19
  }
20
20
  ],
21
21
  "metadata": {
22
- "version": "1.0.0",
22
+ "version": "2.0.0",
23
23
  "license": "MIT",
24
24
  "description": "Ruby grammar for tree-sitter",
25
25
  "authors": [