@willbooster/tree-sitter-kotlin 8.0.0 → 8.0.1
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 +4 -3
- package/package.json +15 -18
- package/tree-sitter-kotlin.wasm +0 -0
- package/tree-sitter.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://github.com/WillBooster/tree-sitter-kotlin/actions/workflows/test.yml)
|
|
6
6
|
[](https://github.com/WillBooster/tree-sitter-kotlin/actions/workflows/test-rust.yml)
|
|
7
7
|
[](https://github.com/semantic-release/semantic-release)
|
|
8
|
-
[](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
|
|
9
9
|
[](https://crates.io/crates/willbooster-tree-sitter-kotlin)
|
|
10
10
|
|
|
11
11
|
Kotlin grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forked from
|
|
@@ -25,6 +25,7 @@ In Node.js and Bun:
|
|
|
25
25
|
|
|
26
26
|
```js
|
|
27
27
|
import { fileURLToPath } from 'node:url';
|
|
28
|
+
|
|
28
29
|
import { Language, Parser } from '@willbooster/web-tree-sitter';
|
|
29
30
|
|
|
30
31
|
await Parser.init();
|
|
@@ -37,9 +38,9 @@ const tree = parser.parse('fun main() = println("Hello")\n');
|
|
|
37
38
|
In browsers, load both `.wasm` files by URL. With Vite:
|
|
38
39
|
|
|
39
40
|
```js
|
|
41
|
+
import kotlinUrl from '@willbooster/tree-sitter-kotlin/tree-sitter-kotlin.wasm?url';
|
|
40
42
|
import { Language, Parser } from '@willbooster/web-tree-sitter';
|
|
41
43
|
import runtimeUrl from '@willbooster/web-tree-sitter/web-tree-sitter.wasm?url';
|
|
42
|
-
import kotlinUrl from '@willbooster/tree-sitter-kotlin/tree-sitter-kotlin.wasm?url';
|
|
43
44
|
|
|
44
45
|
await Parser.init({ locateFile: () => runtimeUrl });
|
|
45
46
|
const parser = new Parser();
|
|
@@ -50,9 +51,9 @@ In Cloudflare Workers, which do not allow compiling Wasm at run time, import bot
|
|
|
50
51
|
without Node.js compatibility):
|
|
51
52
|
|
|
52
53
|
```js
|
|
54
|
+
import kotlin from '@willbooster/tree-sitter-kotlin/tree-sitter-kotlin.wasm';
|
|
53
55
|
import { Language, Parser } from '@willbooster/web-tree-sitter';
|
|
54
56
|
import runtime from '@willbooster/web-tree-sitter/web-tree-sitter.wasm';
|
|
55
|
-
import kotlin from '@willbooster/tree-sitter-kotlin/tree-sitter-kotlin.wasm';
|
|
56
57
|
|
|
57
58
|
await Parser.init({ wasmModule: runtime });
|
|
58
59
|
const parser = new Parser();
|
package/package.json
CHANGED
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/tree-sitter-kotlin",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "Kotlin grammar for tree-sitter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"incremental",
|
|
7
|
+
"kotlin",
|
|
7
8
|
"parsing",
|
|
8
|
-
"tree-sitter"
|
|
9
|
-
"kotlin"
|
|
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-kotlin.git"
|
|
14
16
|
},
|
|
15
|
-
"license": "MIT",
|
|
16
|
-
"author": "WillBooster Inc.",
|
|
17
17
|
"files": [
|
|
18
18
|
"grammar.js",
|
|
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,22 +46,19 @@
|
|
|
42
46
|
"devDependencies": {
|
|
43
47
|
"@tsconfig/bun": "1.0.11",
|
|
44
48
|
"@types/bun": "1.4.3",
|
|
45
|
-
"@vitest/browser-playwright": "5.0.
|
|
46
|
-
"@willbooster/
|
|
47
|
-
"@willbooster/
|
|
48
|
-
"@willbooster/wb": "22.26.2",
|
|
49
|
+
"@vitest/browser-playwright": "5.0.5",
|
|
50
|
+
"@willbooster/oxlint-config": "1.4.9",
|
|
51
|
+
"@willbooster/wb": "22.29.3",
|
|
49
52
|
"@willbooster/web-tree-sitter": "13.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.
|
|
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.
|
|
60
|
-
"wrangler": "4.
|
|
60
|
+
"vitest": "5.0.5",
|
|
61
|
+
"wrangler": "4.151.1"
|
|
61
62
|
},
|
|
62
63
|
"peerDependencies": {
|
|
63
64
|
"@willbooster/web-tree-sitter": "^13.0.0"
|
|
@@ -66,9 +67,5 @@
|
|
|
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
|
}
|
package/tree-sitter-kotlin.wasm
CHANGED
|
Binary file
|