@willbooster/tree-sitter-cpp 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
@@ -5,7 +5,7 @@
5
5
  [![Test](https://github.com/WillBooster/tree-sitter-cpp/actions/workflows/test.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-cpp/actions/workflows/test.yml)
6
6
  [![Test rust](https://github.com/WillBooster/tree-sitter-cpp/actions/workflows/test-rust.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-cpp/actions/workflows/test-rust.yml)
7
7
  [![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)
8
- [![wbfy](https://img.shields.io/badge/wbfy-20.43.2-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
8
+ [![wbfy](https://img.shields.io/badge/wbfy-20.48.9-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
9
9
  [![crates.io](https://img.shields.io/crates/v/willbooster-tree-sitter-cpp.svg)](https://crates.io/crates/willbooster-tree-sitter-cpp)
10
10
 
11
11
  C++ grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forked from
@@ -42,8 +42,8 @@ the compiler's interpretation.
42
42
 
43
43
  The npm package ships `tree-sitter-cpp.wasm` for
44
44
  [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter), which runs in Node.js, Bun,
45
- browsers, and Cloudflare Workers. Use runtime version 10.0.2 or later within major version 10. The parser uses the
46
- WillBooster/tree-sitter ABI `0x57420007`; upgrade the grammar and runtime together. Install both:
45
+ browsers, and Cloudflare Workers. Use runtime version 14.0.0 or later within major version 14. The parser uses the
46
+ WillBooster/tree-sitter ABI `0x5742000a`; upgrade the grammar and runtime together. Install both:
47
47
 
48
48
  ```sh
49
49
  npm install @willbooster/tree-sitter-cpp @willbooster/web-tree-sitter
@@ -53,6 +53,7 @@ In Node.js and Bun, load the `.wasm` file from its path:
53
53
 
54
54
  ```js
55
55
  import { fileURLToPath } from 'node:url';
56
+
56
57
  import { Language, Parser } from '@willbooster/web-tree-sitter';
57
58
 
58
59
  await Parser.init();
@@ -65,9 +66,9 @@ const tree = parser.parse('int main() {}\n');
65
66
  In browsers, serve both `.wasm` files and load them by URL. With Vite:
66
67
 
67
68
  ```js
69
+ import cppUrl from '@willbooster/tree-sitter-cpp/tree-sitter-cpp.wasm?url';
68
70
  import { Language, Parser } from '@willbooster/web-tree-sitter';
69
71
  import runtimeUrl from '@willbooster/web-tree-sitter/web-tree-sitter.wasm?url';
70
- import cppUrl from '@willbooster/tree-sitter-cpp/tree-sitter-cpp.wasm?url';
71
72
 
72
73
  await Parser.init({ locateFile: () => runtimeUrl });
73
74
  const parser = new Parser();
@@ -77,9 +78,9 @@ parser.setLanguage(await Language.load(cppUrl));
77
78
  In Cloudflare Workers, which do not allow compiling Wasm at run time, import both `.wasm` files as modules:
78
79
 
79
80
  ```js
81
+ import cpp from '@willbooster/tree-sitter-cpp/tree-sitter-cpp.wasm';
80
82
  import { Language, Parser } from '@willbooster/web-tree-sitter';
81
83
  import runtime from '@willbooster/web-tree-sitter/web-tree-sitter.wasm';
82
- import cpp from '@willbooster/tree-sitter-cpp/tree-sitter-cpp.wasm';
83
84
 
84
85
  await Parser.init({ wasmModule: runtime });
85
86
  const parser = new Parser();
@@ -91,10 +92,10 @@ grammar's in `queries/` and, in `queries/c/`, the highlights of the C grammar it
91
92
 
92
93
  In Rust, depend on the [crate](https://crates.io/crates/willbooster-tree-sitter-cpp) and on
93
94
  [willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter), the runtime this package is tested and
94
- fuzzed with. Use runtime version 10.0.2 or later within major version 10:
95
+ fuzzed with. Use runtime version 14.0.0 or later within major version 14:
95
96
 
96
97
  ```sh
97
- cargo add --rename tree-sitter willbooster-tree-sitter@10.0.2
98
+ cargo add --rename tree-sitter willbooster-tree-sitter@14.0.0
98
99
  cargo add --rename tree-sitter-cpp willbooster-tree-sitter-cpp
99
100
  ```
100
101
 
package/package.json CHANGED
@@ -1,25 +1,29 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-cpp",
3
- "version": "17.0.0",
3
+ "version": "19.0.0",
4
4
  "description": "C++ grammar for tree-sitter",
5
5
  "keywords": [
6
+ "cpp",
6
7
  "incremental",
7
8
  "parsing",
8
- "tree-sitter",
9
- "cpp"
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-cpp.git"
14
16
  },
15
- "license": "MIT",
16
- "author": "WillBooster Inc.",
17
17
  "files": [
18
18
  "queries/**/*.scm",
19
19
  "tree-sitter.json",
20
20
  "src/node-types.json",
21
21
  "*.wasm"
22
22
  ],
23
+ "publishConfig": {
24
+ "access": "public",
25
+ "registry": "https://registry.npmjs.org/"
26
+ },
23
27
  "scripts": {
24
28
  "build-wasm": "script/generate --build-wasm",
25
29
  "build/ci": "bun run build-wasm",
@@ -42,34 +46,27 @@
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",
49
+ "@vitest/browser-playwright": "5.0.5",
50
+ "@willbooster/oxlint-config": "1.4.9",
48
51
  "@willbooster/tree-sitter-c": "9.0.1",
49
- "@willbooster/wb": "22.26.2",
50
- "@willbooster/web-tree-sitter": "10.0.2",
52
+ "@willbooster/wb": "22.29.3",
53
+ "@willbooster/web-tree-sitter": "14.0.2",
51
54
  "conventional-changelog-conventionalcommits": "10.4.1",
52
55
  "lefthook": "2.2.2",
53
- "oxfmt": "0.73.0",
54
56
  "oxlint": "1.88.0",
55
57
  "oxlint-tsgolint": "7.0.2004",
56
- "playwright": "1.64.0",
58
+ "playwright": "1.64.1",
57
59
  "semantic-release": "25.0.9",
58
- "sort-package-json": "4.0.0",
59
60
  "vite": "8.3.4",
60
- "vitest": "5.0.3",
61
- "wrangler": "4.149.0"
61
+ "vitest": "5.0.5",
62
+ "wrangler": "4.151.1"
62
63
  },
63
64
  "peerDependencies": {
64
- "@willbooster/web-tree-sitter": "^10.0.2"
65
+ "@willbooster/web-tree-sitter": "^14.0.0"
65
66
  },
66
67
  "peerDependenciesMeta": {
67
68
  "@willbooster/web-tree-sitter": {
68
69
  "optional": true
69
70
  }
70
- },
71
- "publishConfig": {
72
- "access": "public",
73
- "registry": "https://registry.npmjs.org/"
74
71
  }
75
72
  }
Binary file
package/tree-sitter.json CHANGED
@@ -24,7 +24,7 @@
24
24
  }
25
25
  ],
26
26
  "metadata": {
27
- "version": "17.0.0",
27
+ "version": "19.0.0",
28
28
  "license": "MIT",
29
29
  "description": "C++ grammar for tree-sitter",
30
30
  "authors": [