@willbooster/tree-sitter-bash 8.0.0 → 10.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.45.0-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
7
+ [![wbfy](https://img.shields.io/badge/wbfy-20.48.9-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
@@ -17,19 +17,20 @@ As a result, its syntax trees differ from the original grammar's; review your qu
17
17
  ## Usage
18
18
 
19
19
  The npm package ships `tree-sitter-bash.wasm` for
20
- [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) 13.0.0 or later in the 13.x series,
20
+ [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) 15.0.0 or later in the 15.x series,
21
21
  a peer dependency.
22
- The parser carries the ABI number of WillBooster/tree-sitter (`0x57420009`), so only that runtime loads it; the
22
+ The parser carries the ABI number of WillBooster/tree-sitter (`0x5742000b`), so only that runtime loads it; the
23
23
  original tree-sitter runtime rejects it, and earlier WillBooster runtime ABIs do too:
24
24
 
25
25
  ```sh
26
- npm install @willbooster/tree-sitter-bash @willbooster/web-tree-sitter@^13.0.0
26
+ npm install @willbooster/tree-sitter-bash @willbooster/web-tree-sitter@^15.0.0
27
27
  ```
28
28
 
29
29
  In Node.js and Bun, load the grammar from its path:
30
30
 
31
31
  ```js
32
32
  import { fileURLToPath } from 'node:url';
33
+
33
34
  import { Language, Parser } from '@willbooster/web-tree-sitter';
34
35
 
35
36
  await Parser.init();
@@ -42,9 +43,9 @@ const tree = parser.parse('cat <<EOF; echo done\n$(date)\nEOF\n');
42
43
  In browsers, serve both `.wasm` files and pass their URLs; with Vite, for example:
43
44
 
44
45
  ```js
46
+ import bashUrl from '@willbooster/tree-sitter-bash/tree-sitter-bash.wasm?url';
45
47
  import { Language, Parser } from '@willbooster/web-tree-sitter';
46
48
  import runtimeUrl from '@willbooster/web-tree-sitter/web-tree-sitter.wasm?url';
47
- import bashUrl from '@willbooster/tree-sitter-bash/tree-sitter-bash.wasm?url';
48
49
 
49
50
  await Parser.init({ locateFile: () => runtimeUrl });
50
51
  const parser = new Parser();
@@ -56,9 +57,9 @@ precompiles, and pass them to `Parser.init` and `Language.load`. This works with
56
57
  flag:
57
58
 
58
59
  ```js
60
+ import bash from '@willbooster/tree-sitter-bash/tree-sitter-bash.wasm';
59
61
  import { Language, Parser } from '@willbooster/web-tree-sitter';
60
62
  import runtime from '@willbooster/web-tree-sitter/web-tree-sitter.wasm';
61
- import bash from '@willbooster/tree-sitter-bash/tree-sitter-bash.wasm';
62
63
 
63
64
  await Parser.init({ wasmModule: runtime });
64
65
  const parser = new Parser();
@@ -67,7 +68,7 @@ parser.setLanguage(await Language.load(bash));
67
68
 
68
69
  The package also ships the queries in `queries/` and the node types in `src/node-types.json`.
69
70
 
70
- Upgrade `@willbooster/web-tree-sitter` to 13.0.0 or later in the 13.x series when upgrading this package. Recovery trees
71
+ Upgrade `@willbooster/web-tree-sitter` to 15.0.0 or later in the 15.x series when upgrading this package. Recovery trees
71
72
  for malformed scripts can differ across runtime versions, so review consumers that depend on the exact shape of
72
73
  `ERROR` nodes.
73
74
 
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-bash",
3
- "version": "8.0.0",
3
+ "version": "10.0.0",
4
4
  "description": "Bash grammar for tree-sitter",
5
5
  "keywords": [
6
+ "bash",
6
7
  "incremental",
7
8
  "parsing",
8
- "tree-sitter",
9
- "bash"
9
+ "tree-sitter"
10
10
  ],
11
+ "license": "MIT",
12
+ "author": "WillBooster Inc.",
11
13
  "repository": {
12
14
  "type": "git",
13
15
  "url": "git+https://github.com/WillBooster/tree-sitter-bash.git"
14
16
  },
15
- "license": "MIT",
16
- "author": "WillBooster Inc.",
17
17
  "files": [
18
18
  "grammar.js",
19
19
  "tree-sitter.json",
@@ -21,6 +21,10 @@
21
21
  "src/node-types.json",
22
22
  "*.wasm"
23
23
  ],
24
+ "publishConfig": {
25
+ "access": "public",
26
+ "registry": "https://registry.npmjs.org/"
27
+ },
24
28
  "scripts": {
25
29
  "build-wasm": "script/generate --build-wasm",
26
30
  "build/ci": "bun run build-wasm",
@@ -42,33 +46,26 @@
42
46
  "devDependencies": {
43
47
  "@tsconfig/bun": "1.0.11",
44
48
  "@types/bun": "1.4.3",
45
- "@vitest/browser-playwright": "5.0.3",
46
- "@willbooster/oxfmt-config": "1.2.2",
47
- "@willbooster/oxlint-config": "1.4.8",
48
- "@willbooster/wb": "22.26.2",
49
- "@willbooster/web-tree-sitter": "13.0.0",
49
+ "@vitest/browser-playwright": "5.0.5",
50
+ "@willbooster/oxlint-config": "1.4.9",
51
+ "@willbooster/wb": "22.29.3",
52
+ "@willbooster/web-tree-sitter": "15.0.0",
50
53
  "conventional-changelog-conventionalcommits": "10.4.1",
51
54
  "lefthook": "2.2.2",
52
- "oxfmt": "0.73.0",
53
55
  "oxlint": "1.88.0",
54
56
  "oxlint-tsgolint": "7.0.2004",
55
- "playwright": "1.64.0",
57
+ "playwright": "1.64.1",
56
58
  "semantic-release": "25.0.9",
57
- "sort-package-json": "4.1.0",
58
59
  "vite": "8.3.4",
59
- "vitest": "5.0.3",
60
- "wrangler": "4.149.0"
60
+ "vitest": "5.0.5",
61
+ "wrangler": "4.151.1"
61
62
  },
62
63
  "peerDependencies": {
63
- "@willbooster/web-tree-sitter": "^13.0.0"
64
+ "@willbooster/web-tree-sitter": "^15.0.0"
64
65
  },
65
66
  "peerDependenciesMeta": {
66
67
  "@willbooster/web-tree-sitter": {
67
68
  "optional": true
68
69
  }
69
- },
70
- "publishConfig": {
71
- "access": "public",
72
- "registry": "https://registry.npmjs.org/"
73
70
  }
74
71
  }
Binary file
package/tree-sitter.json CHANGED
@@ -18,7 +18,7 @@
18
18
  }
19
19
  ],
20
20
  "metadata": {
21
- "version": "8.0.0",
21
+ "version": "10.0.0",
22
22
  "license": "MIT",
23
23
  "description": "Bash grammar for tree-sitter",
24
24
  "authors": [