@willbooster/tree-sitter-typescript 0.0.0-placeholder.0 → 1.1.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/package.json CHANGED
@@ -1,13 +1,79 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-typescript",
3
- "version": "0.0.0-placeholder.0",
4
- "description": "Placeholder for WillBooster's fork of tree-sitter-typescript; the first release is 1.0.0",
3
+ "version": "1.1.0",
4
+ "description": "TypeScript and TSX grammars for tree-sitter",
5
+ "keywords": [
6
+ "incremental",
7
+ "parsing",
8
+ "tree-sitter",
9
+ "typescript",
10
+ "tsx"
11
+ ],
5
12
  "repository": {
6
13
  "type": "git",
7
14
  "url": "git+https://github.com/WillBooster/tree-sitter-typescript.git"
8
15
  },
9
16
  "license": "MIT",
10
17
  "author": "WillBooster Inc.",
18
+ "files": [
19
+ "common/defineGrammar.js",
20
+ "typescript/grammar.js",
21
+ "tsx/grammar.js",
22
+ "tree-sitter.json",
23
+ "typescript/src/node-types.json",
24
+ "tsx/src/node-types.json",
25
+ "*.wasm"
26
+ ],
27
+ "scripts": {
28
+ "build-wasm": "tree-sitter build --wasm typescript && tree-sitter build --wasm tsx",
29
+ "build/ci": "tree-sitter generate typescript/grammar.js && tree-sitter generate tsx/grammar.js && bun run build-wasm",
30
+ "cleanup": "bun wb lint --fix --format",
31
+ "format": "bun wb lint --format",
32
+ "lint": "bun wb lint",
33
+ "lint-fix": "bun wb lint --fix",
34
+ "prepare": "(bun lefthook install || true) && (test ! -f .lefthook/normalize-bun-lockfile.sh || bash .lefthook/normalize-bun-lockfile.sh)",
35
+ "release": "wb release",
36
+ "prestart": "bun run build-wasm",
37
+ "start": "tree-sitter playground",
38
+ "test": "bun wb test",
39
+ "test/ci": "bun wb test-on-ci",
40
+ "test/ci-setup": "playwright install --with-deps chromium",
41
+ "typecheck": "bun wb typecheck",
42
+ "verify": "bun wb verify",
43
+ "verify-full": "bun wb verify --full"
44
+ },
45
+ "devDependencies": {
46
+ "@semantic-release/exec": "7.1.0",
47
+ "@tsconfig/bun": "1.0.11",
48
+ "@types/bun": "1.4.2",
49
+ "@vitest/browser-playwright": "5.0.1",
50
+ "@willbooster/oxfmt-config": "1.2.2",
51
+ "@willbooster/oxlint-config": "1.4.8",
52
+ "@willbooster/wb": "22.11.5",
53
+ "@willbooster/web-tree-sitter": "1.0.0",
54
+ "conventional-changelog-conventionalcommits": "10.4.0",
55
+ "lefthook": "2.1.14",
56
+ "oxfmt": "0.70.0",
57
+ "oxlint": "1.85.0",
58
+ "oxlint-tsgolint": "7.0.2002",
59
+ "playwright": "1.63.0",
60
+ "semantic-release": "25.0.9",
61
+ "sort-package-json": "4.0.0",
62
+ "tree-sitter-cli": "0.27.0",
63
+ "tree-sitter-javascript": "0.23.1",
64
+ "typescript": "7.0.2",
65
+ "vite": "8.3.0",
66
+ "vitest": "5.0.1",
67
+ "wrangler": "4.135.0"
68
+ },
69
+ "peerDependencies": {
70
+ "@willbooster/web-tree-sitter": "^1.0.0"
71
+ },
72
+ "peerDependenciesMeta": {
73
+ "@willbooster/web-tree-sitter": {
74
+ "optional": true
75
+ }
76
+ },
11
77
  "publishConfig": {
12
78
  "access": "public",
13
79
  "registry": "https://registry.npmjs.org/"
Binary file
Binary file
@@ -0,0 +1,102 @@
1
+ {
2
+ "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/config.schema.json",
3
+ "grammars": [
4
+ {
5
+ "name": "typescript",
6
+ "camelcase": "TypeScript",
7
+ "scope": "source.ts",
8
+ "path": "typescript",
9
+ "external-files": [
10
+ "common/scanner.h"
11
+ ],
12
+ "file-types": [
13
+ "ts"
14
+ ],
15
+ "highlights": [
16
+ "queries/highlights.scm",
17
+ "node_modules/tree-sitter-javascript/queries/highlights.scm"
18
+ ],
19
+ "injections": "node_modules/tree-sitter-javascript/queries/injections.scm",
20
+ "locals": [
21
+ "queries/locals.scm",
22
+ "node_modules/tree-sitter-javascript/queries/locals.scm"
23
+ ],
24
+ "tags": [
25
+ "queries/tags.scm",
26
+ "node_modules/tree-sitter-javascript/queries/tags.scm"
27
+ ],
28
+ "injection-regex": "^(ts|typescript)$"
29
+ },
30
+ {
31
+ "name": "tsx",
32
+ "camelcase": "TSX",
33
+ "scope": "source.tsx",
34
+ "path": "tsx",
35
+ "external-files": [
36
+ "common/scanner.h"
37
+ ],
38
+ "file-types": [
39
+ "tsx"
40
+ ],
41
+ "highlights": [
42
+ "queries/highlights.scm",
43
+ "node_modules/tree-sitter-javascript/queries/highlights-jsx.scm",
44
+ "node_modules/tree-sitter-javascript/queries/highlights.scm"
45
+ ],
46
+ "injections": "node_modules/tree-sitter-javascript/queries/injections.scm",
47
+ "locals": "node_modules/tree-sitter-javascript/queries/locals.scm",
48
+ "tags": [
49
+ "queries/tags.scm",
50
+ "node_modules/tree-sitter-javascript/queries/tags.scm"
51
+ ],
52
+ "injection-regex": "^(ts|typescript)$"
53
+ },
54
+ {
55
+ "name": "flow",
56
+ "camelcase": "Flow",
57
+ "scope": "source.js.flow",
58
+ "path": "tsx",
59
+ "external-files": [
60
+ "common/scanner.h"
61
+ ],
62
+ "file-types": [
63
+ "js"
64
+ ],
65
+ "highlights": [
66
+ "queries/highlights.scm",
67
+ "node_modules/tree-sitter-javascript/queries/highlights-jsx.scm",
68
+ "node_modules/tree-sitter-javascript/queries/highlights.scm"
69
+ ],
70
+ "injections": "node_modules/tree-sitter-javascript/queries/injections.scm",
71
+ "locals": "node_modules/tree-sitter-javascript/queries/locals.scm",
72
+ "tags": [
73
+ "queries/tags.scm",
74
+ "node_modules/tree-sitter-javascript/queries/tags.scm"
75
+ ],
76
+ "content-regex": "@flow"
77
+ }
78
+ ],
79
+ "metadata": {
80
+ "version": "1.1.0",
81
+ "license": "MIT",
82
+ "description": "TypeScript and TSX grammars for tree-sitter",
83
+ "authors": [
84
+ {
85
+ "name": "WillBooster Inc."
86
+ }
87
+ ],
88
+ "links": {
89
+ "repository": "https://github.com/WillBooster/tree-sitter-typescript"
90
+ }
91
+ },
92
+ "bindings": {
93
+ "c": false,
94
+ "go": false,
95
+ "java": false,
96
+ "node": false,
97
+ "python": false,
98
+ "rust": true,
99
+ "swift": false,
100
+ "zig": false
101
+ }
102
+ }
package/tsx/grammar.js ADDED
@@ -0,0 +1,4 @@
1
+ // oxlint-disable unicorn/prefer-module -- This package is CommonJS, so tree-sitter loads grammar.js as CommonJS.
2
+ const defineGrammar = require('../common/defineGrammar');
3
+
4
+ module.exports = defineGrammar('tsx');