@willbooster/tree-sitter-javascript 22.0.2 → 23.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
@@ -27,7 +27,7 @@ the trees that error recovery produces may change; such changes are released as
27
27
  The npm package ships two languages for
28
28
  [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter), which runs in Node.js, Bun,
29
29
  browsers, and Cloudflare Workers. The parser carries the ABI number of WillBooster/tree-sitter (`0x5742000c`), so it
30
- requires that runtime ABI; the upstream runtime rejects it. This package is tested with runtime 17.0.1, and its optional peer dependency requires 17.0.1 or later within 17.x. In Node.js and Bun, load it from
30
+ requires that runtime ABI; the upstream runtime rejects it. This package is tested with runtime 19.1.0, and its optional peer dependency requires 19.1.0 or later within 19.x. In Node.js and Bun, load it from
31
31
  the package. Choose `tree-sitter-javascript.wasm` for the Module goal, or
32
32
  `tree-sitter-javascript_script.wasm` for the Script goal. The source goal comes from the host or file type;
33
33
  `.mjs` uses Module and `.cjs` uses Script, while `.js` depends on the host. For example, `await\nvalue` is one
@@ -81,10 +81,10 @@ array/formal and object-rest extension hooks. Their external scanners can includ
81
81
  characters and escapes and JSX text for the tokens they pass it. The crate ships `tree-sitter.json` too.
82
82
 
83
83
  In Rust, depend on the [crate](https://crates.io/crates/willbooster-tree-sitter-javascript) and the
84
- [willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter) runtime with the matching ABI. The tested version is 17.0.1:
84
+ [willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter) runtime with the matching ABI. The tested version is 19.1.0:
85
85
 
86
86
  ```sh
87
- cargo add willbooster-tree-sitter@17.0.1 --rename tree-sitter
87
+ cargo add willbooster-tree-sitter@19.1.0 --rename tree-sitter
88
88
  cargo add willbooster-tree-sitter-javascript --rename tree-sitter-javascript
89
89
  ```
90
90
 
package/grammar.js CHANGED
@@ -1608,14 +1608,11 @@ module.exports = grammar({
1608
1608
  seq(
1609
1609
  optional('static'),
1610
1610
  choice(
1611
- seq(
1612
- field('property', $._field_name),
1613
- optional(choice($._field_initializer, sym('_line_break_after_field')))
1614
- ),
1611
+ seq(field('name', $._field_name), optional(choice($._field_initializer, sym('_line_break_after_field')))),
1615
1612
  // A line break after `get` or `set` continues a getter or setter. Allowing both sentinels here tells
1616
1613
  // the scanner that a `*` on the next line cannot continue the member, unlike after `static`.
1617
1614
  seq(
1618
- field('property', alias(choice('get', 'set'), sym('property_identifier'))),
1615
+ field('name', alias(choice('get', 'set'), sym('property_identifier'))),
1619
1616
  optional(
1620
1617
  choice($._field_initializer, sym('_line_break_after_modifier'), sym('_line_break_after_field'))
1621
1618
  )
@@ -1624,12 +1621,12 @@ module.exports = grammar({
1624
1621
  ),
1625
1622
  // A line break after a leading `static` continues a static member; after `static static`, it ends the field.
1626
1623
  seq(
1627
- field('property', alias('static', sym('property_identifier'))),
1624
+ field('name', alias('static', sym('property_identifier'))),
1628
1625
  optional(choice($._field_initializer, sym('_line_break_after_modifier')))
1629
1626
  ),
1630
1627
  seq(
1631
1628
  'static',
1632
- field('property', alias('static', sym('property_identifier'))),
1629
+ field('name', alias('static', sym('property_identifier'))),
1633
1630
  optional(choice($._field_initializer, sym('_line_break_after_field')))
1634
1631
  )
1635
1632
  )
@@ -1227,7 +1227,7 @@
1227
1227
  }
1228
1228
  ]
1229
1229
  },
1230
- "property": {
1230
+ "name": {
1231
1231
  "multiple": false,
1232
1232
  "required": true,
1233
1233
  "types": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-javascript",
3
- "version": "22.0.2",
3
+ "version": "23.0.0",
4
4
  "description": "JavaScript grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -53,7 +53,7 @@
53
53
  "@vitest/browser-playwright": "5.0.5",
54
54
  "@willbooster/oxlint-config": "1.4.9",
55
55
  "@willbooster/wb": "23.3.0",
56
- "@willbooster/web-tree-sitter": "17.0.1",
56
+ "@willbooster/web-tree-sitter": "19.1.0",
57
57
  "acorn": "8.19.0",
58
58
  "acorn-jsx": "5.3.2",
59
59
  "conventional-changelog-conventionalcommits": "10.4.1",
@@ -67,7 +67,7 @@
67
67
  "wrangler": "4.156.0"
68
68
  },
69
69
  "peerDependencies": {
70
- "@willbooster/web-tree-sitter": "^17.0.1"
70
+ "@willbooster/web-tree-sitter": "^19.1.0"
71
71
  },
72
72
  "peerDependenciesMeta": {
73
73
  "@willbooster/web-tree-sitter": {
@@ -1227,7 +1227,7 @@
1227
1227
  }
1228
1228
  ]
1229
1229
  },
1230
- "property": {
1230
+ "name": {
1231
1231
  "multiple": false,
1232
1232
  "required": true,
1233
1233
  "types": [
Binary file
Binary file
package/tree-sitter.json CHANGED
@@ -34,7 +34,7 @@
34
34
  }
35
35
  ],
36
36
  "metadata": {
37
- "version": "22.0.2",
37
+ "version": "23.0.0",
38
38
  "license": "MIT",
39
39
  "description": "JavaScript grammar for tree-sitter",
40
40
  "authors": [