@willbooster/tree-sitter-bash 10.0.0 → 11.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
@@ -4,7 +4,7 @@
4
4
  [![license](https://img.shields.io/npm/l/@willbooster/tree-sitter-bash.svg)](https://www.npmjs.com/package/@willbooster/tree-sitter-bash)
5
5
  [![Test](https://github.com/WillBooster/tree-sitter-bash/actions/workflows/test.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-bash/actions/workflows/test.yml)
6
6
  [![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)
7
- [![wbfy](https://img.shields.io/badge/wbfy-20.48.9-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
7
+ [![wbfy](https://img.shields.io/badge/wbfy-20.51.1-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
8
8
 
9
9
  Bash grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forked from
10
10
  [tree-sitter/tree-sitter-bash](https://github.com/tree-sitter/tree-sitter-bash). We are grateful to its authors and
@@ -14,6 +14,13 @@ This fork aims to parse scripts exactly as bash runs them, so that tools can tel
14
14
  scripts. It fixes parsing bugs and raises conformance with bash, checked by differential tests against bash itself.
15
15
  As a result, its syntax trees differ from the original grammar's; review your queries when migrating.
16
16
 
17
+ ## Support Scope
18
+
19
+ This fork maintains only full parsing: valid input yields a correct tree, and invalid input yields `ERROR` or `MISSING`
20
+ nodes without crashing, hanging, or taking more than linear time. Incremental parsing works as in upstream tree-sitter
21
+ but is not tested here, and no queries (highlights, locals, injections, tags) are shipped. Node types, field names, and
22
+ the trees that error recovery produces may change; such changes are released as new major versions.
23
+
17
24
  ## Usage
18
25
 
19
26
  The npm package ships `tree-sitter-bash.wasm` for
@@ -66,7 +73,7 @@ const parser = new Parser();
66
73
  parser.setLanguage(await Language.load(bash));
67
74
  ```
68
75
 
69
- The package also ships the queries in `queries/` and the node types in `src/node-types.json`.
76
+ The package also ships the node types in `src/node-types.json`.
70
77
 
71
78
  Upgrade `@willbooster/web-tree-sitter` to 15.0.0 or later in the 15.x series when upgrading this package. Recovery trees
72
79
  for malformed scripts can differ across runtime versions, so review consumers that depend on the exact shape of
@@ -92,7 +99,7 @@ bun run verify
92
99
  bun run test
93
100
  ```
94
101
 
95
- - [Parser generation and validation](docs/development.md): read before changing grammar inputs, refreshing examples, or reproducing a fuzz or differential failure.
102
+ - [Parser generation and validation](docs/development.md): read before changing grammar inputs, refreshing examples, or reproducing a differential failure.
96
103
 
97
104
  ## References
98
105
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-bash",
3
- "version": "10.0.0",
3
+ "version": "11.0.0",
4
4
  "description": "Bash grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "bash",
@@ -17,7 +17,6 @@
17
17
  "files": [
18
18
  "grammar.js",
19
19
  "tree-sitter.json",
20
- "queries/*",
21
20
  "src/node-types.json",
22
21
  "*.wasm"
23
22
  ],
@@ -45,15 +44,15 @@
45
44
  },
46
45
  "devDependencies": {
47
46
  "@tsconfig/bun": "1.0.11",
48
- "@types/bun": "1.4.3",
47
+ "@types/bun": "1.4.4",
49
48
  "@vitest/browser-playwright": "5.0.5",
50
49
  "@willbooster/oxlint-config": "1.4.9",
51
- "@willbooster/wb": "22.29.3",
50
+ "@willbooster/wb": "22.32.3",
52
51
  "@willbooster/web-tree-sitter": "15.0.0",
53
52
  "conventional-changelog-conventionalcommits": "10.4.1",
54
53
  "lefthook": "2.2.2",
55
- "oxlint": "1.88.0",
56
- "oxlint-tsgolint": "7.0.2004",
54
+ "oxlint": "1.89.0",
55
+ "oxlint-tsgolint": "7.0.2005",
57
56
  "playwright": "1.64.1",
58
57
  "semantic-release": "25.0.9",
59
58
  "vite": "8.3.4",
Binary file
package/tree-sitter.json CHANGED
@@ -18,7 +18,7 @@
18
18
  }
19
19
  ],
20
20
  "metadata": {
21
- "version": "10.0.0",
21
+ "version": "11.0.0",
22
22
  "license": "MIT",
23
23
  "description": "Bash grammar for tree-sitter",
24
24
  "authors": [
@@ -1,77 +0,0 @@
1
- [
2
- (string)
3
- (raw_string)
4
- (ansi_c_string)
5
- (translated_string)
6
- (heredoc_body)
7
- (heredoc_start)
8
- ] @string
9
-
10
- (regex) @string.regexp
11
-
12
- (command_name) @function
13
-
14
- (function_definition
15
- name: (word) @function)
16
-
17
- (variable_name) @property
18
-
19
- (special_variable_name) @variable.builtin
20
-
21
- [
22
- "case"
23
- "coproc"
24
- "do"
25
- "done"
26
- "elif"
27
- "else"
28
- "esac"
29
- "fi"
30
- "for"
31
- "function"
32
- "if"
33
- "in"
34
- "select"
35
- "then"
36
- "time"
37
- "until"
38
- "while"
39
- ] @keyword
40
-
41
- (comment) @comment
42
-
43
- [
44
- (file_descriptor)
45
- (number)
46
- ] @number
47
-
48
- [
49
- (command_substitution)
50
- (process_substitution)
51
- (expansion)
52
- (arithmetic_expansion)
53
- ] @embedded
54
-
55
- (test_operator) @operator
56
-
57
- [
58
- "!"
59
- "&&"
60
- "||"
61
- "|"
62
- "|&"
63
- ">"
64
- ">>"
65
- "<"
66
- "<<<"
67
- "&>"
68
- "&>>"
69
- "<&"
70
- ">&"
71
- ">|"
72
- "=~"
73
- ] @operator
74
-
75
- ((command
76
- argument: (word) @constant)
77
- (#match? @constant "^-"))