@willbooster/tree-sitter-javascript 1.0.14 → 1.0.16

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/grammar.js CHANGED
@@ -1192,9 +1192,9 @@ module.exports = grammar({
1192
1192
  // This negative dynamic precedence ensures that during error recovery,
1193
1193
  // unfinished constructs are generally treated as literal expressions,
1194
1194
  // not patterns.
1195
- pattern: ($) => prec.dynamic(-1, choice($._lhs_expression, $.rest_pattern)),
1195
+ pattern: ($) => prec.dynamic(-1, choice($._lhs_expression, $.parenthesized_expression, $.rest_pattern)),
1196
1196
 
1197
- rest_pattern: ($) => prec.right(seq('...', $._lhs_expression)),
1197
+ rest_pattern: ($) => prec.right(seq('...', choice($._lhs_expression, $.parenthesized_expression))),
1198
1198
 
1199
1199
  method_definition: ($) =>
1200
1200
  seq(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-javascript",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "JavaScript grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -29,7 +29,7 @@
29
29
  "lint": "bun wb lint",
30
30
  "lint-fix": "bun wb lint --fix",
31
31
  "prepare": "(bun lefthook install || true) && (test ! -f .lefthook/normalize-bun-lockfile.sh || bash .lefthook/normalize-bun-lockfile.sh)",
32
- "release": "node script/release.mjs",
32
+ "release": "wb release",
33
33
  "prestart": "bun run build-wasm",
34
34
  "start": "tree-sitter playground",
35
35
  "test": "bun wb test",
@@ -40,13 +40,12 @@
40
40
  "verify-full": "bun wb verify --full"
41
41
  },
42
42
  "devDependencies": {
43
- "@semantic-release/exec": "7.1.0",
44
43
  "@tsconfig/bun": "1.0.11",
45
44
  "@types/bun": "1.4.2",
46
45
  "@vitest/browser-playwright": "5.0.1",
47
46
  "@willbooster/oxfmt-config": "1.2.2",
48
47
  "@willbooster/oxlint-config": "1.4.8",
49
- "@willbooster/wb": "22.11.5",
48
+ "@willbooster/wb": "22.13.1",
50
49
  "@willbooster/web-tree-sitter": "1.0.7",
51
50
  "conventional-changelog-conventionalcommits": "10.4.0",
52
51
  "lefthook": "2.1.14",
@@ -103,6 +103,10 @@
103
103
  "type": "object_pattern",
104
104
  "named": true
105
105
  },
106
+ {
107
+ "type": "parenthesized_expression",
108
+ "named": true
109
+ },
106
110
  {
107
111
  "type": "rest_pattern",
108
112
  "named": true
@@ -2509,6 +2513,10 @@
2509
2513
  "type": "object_pattern",
2510
2514
  "named": true
2511
2515
  },
2516
+ {
2517
+ "type": "parenthesized_expression",
2518
+ "named": true
2519
+ },
2512
2520
  {
2513
2521
  "type": "subscript_expression",
2514
2522
  "named": true
Binary file
package/tree-sitter.json CHANGED
@@ -16,7 +16,7 @@
16
16
  }
17
17
  ],
18
18
  "metadata": {
19
- "version": "1.0.14",
19
+ "version": "1.0.16",
20
20
  "license": "MIT",
21
21
  "description": "JavaScript grammar for tree-sitter",
22
22
  "authors": [