@willbooster/tree-sitter-python 17.0.0 → 19.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
@@ -14,22 +14,23 @@ to its authors and contributors. This is not an official release of that project
14
14
 
15
15
  This fork builds on upstream v0.25.0 with grammar and scanner fixes, including Python 3.15
16
16
  unpacking comprehensions. It ships a compact parser generated by the parser generator of
17
- [WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter). The parser carries that fork's own ABI number, so
18
- it loads only with the WillBooster runtime (`willbooster-tree-sitter` or `@willbooster/web-tree-sitter`) 17.0.1 or later within 17.x,
19
- not with upstream's tree-sitter.
17
+ [WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter). Its ABI (`0x5742000c`) rejects upstream
18
+ Tree-sitter runtimes. Use this parser with `willbooster-tree-sitter` or `@willbooster/web-tree-sitter` 20.0.0 or later
19
+ within 20.x, the runtime line it is tested and fuzzed with: pre-19.1.0 WillBooster runtimes share ABI `0x5742000c` and
20
+ pass the ABI check, while dereferencing `TSLanguage` tables that this parser omits.
20
21
 
21
22
  ## Support Scope
22
23
 
23
24
  This fork maintains only full parsing: valid input yields a correct tree, and invalid input yields `ERROR` or `MISSING`
24
- nodes without crashing, hanging, or taking more than linear time. Incremental parsing works as in upstream tree-sitter
25
- but is not tested here, and no queries (highlights, locals, injections, tags) are shipped. Node types, field names, and
26
- the trees that error recovery produces may change; such changes are released as new major versions.
25
+ nodes without crashing, hanging, or taking more than linear time. Incremental parsing and queries (highlights, locals,
26
+ injections, tags) are not supported. Node types, field names, and the trees that error recovery produces may change;
27
+ such changes are released as new major versions.
27
28
 
28
29
  ## Usage
29
30
 
30
31
  The npm package ships `tree-sitter-python.wasm` for
31
32
  [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter), which runs in Node.js, Bun,
32
- browsers, and Cloudflare Workers. The parser requires runtime 17.0.1 or later within 17.x.
33
+ browsers, and Cloudflare Workers. Package peer dependencies require `@willbooster/web-tree-sitter` `^20.0.0`.
33
34
 
34
35
  In Node.js and Bun, load the grammar from its path:
35
36
 
@@ -74,11 +75,10 @@ The package also ships the node types in `src/node-types.json`.
74
75
  Qualified generic bases use `member_type` inside `generic_type`. Generic bases in annotations also recognize the contextual identifier spellings `match`, `print`, `exec` and `lazy`, while ordinary value subscripts retain their expression trees. Plain qualified generic arguments also expose `member_type` inside their `type` operand. Structured unpacked annotations and unpacked generic arguments use a `type` child inside `splat_type`. Expression-valued starred parameter annotations, such as `*args: *factory()`, keep a direct expression child instead. Ordinary value unpacks keep their expression tree.
75
76
 
76
77
  In Rust, depend on the [crate](https://crates.io/crates/willbooster-tree-sitter-python) and on
77
- [willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter), the runtime this package is tested and
78
- fuzzed with. The parser requires runtime 17.0.1 or later within 17.x:
78
+ [willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter) 20.0.0 or later within 20.x:
79
79
 
80
80
  ```sh
81
- cargo add willbooster-tree-sitter@17.0.1 --rename tree-sitter
81
+ cargo add willbooster-tree-sitter@20.0.0 --rename tree-sitter
82
82
  cargo add willbooster-tree-sitter-python --rename tree-sitter-python
83
83
  ```
84
84
 
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-python",
3
- "version": "17.0.0",
3
+ "version": "19.0.0",
4
4
  "description": "Python grammar for tree-sitter",
5
5
  "keywords": [
6
- "incremental",
7
6
  "parsing",
8
7
  "python",
9
8
  "tree-sitter"
@@ -49,7 +48,7 @@
49
48
  "@vitest/browser-playwright": "5.0.5",
50
49
  "@willbooster/oxlint-config": "1.4.9",
51
50
  "@willbooster/wb": "23.3.0",
52
- "@willbooster/web-tree-sitter": "18.0.3",
51
+ "@willbooster/web-tree-sitter": "20.0.0",
53
52
  "conventional-changelog-conventionalcommits": "10.4.1",
54
53
  "lefthook": "2.2.2",
55
54
  "oxlint": "1.90.0",
@@ -61,7 +60,7 @@
61
60
  "wrangler": "4.156.0"
62
61
  },
63
62
  "peerDependencies": {
64
- "@willbooster/web-tree-sitter": "^17.0.1 || ^18.0.0"
63
+ "@willbooster/web-tree-sitter": "^20.0.0"
65
64
  },
66
65
  "peerDependenciesMeta": {
67
66
  "@willbooster/web-tree-sitter": {
Binary file
package/tree-sitter.json CHANGED
@@ -13,7 +13,7 @@
13
13
  }
14
14
  ],
15
15
  "metadata": {
16
- "version": "17.0.0",
16
+ "version": "19.0.0",
17
17
  "license": "MIT",
18
18
  "description": "Python grammar for tree-sitter",
19
19
  "authors": [