@xberg-io/tree-sitter-language-pack 1.11.0 → 1.12.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 +1 -1
- package/index.d.ts +30 -1
- package/package.json +10 -10
- package/ts-pack-core-node.darwin-arm64.node +0 -0
- package/ts-pack-core-node.darwin-x64.node +0 -0
- package/ts-pack-core-node.linux-arm64-gnu.node +0 -0
- package/ts-pack-core-node.linux-x64-gnu.node +0 -0
- package/ts-pack-core-node.win32-arm64-msvc.node +0 -0
- package/ts-pack-core-node.win32-x64-msvc.node +0 -0
package/README.md
CHANGED
|
@@ -123,7 +123,7 @@ console.log(tree.rootNode.toString());
|
|
|
123
123
|
|
|
124
124
|
## Features
|
|
125
125
|
|
|
126
|
-
- **
|
|
126
|
+
- **306 languages** — pre-compiled tree-sitter grammars covering every major programming language and many minor ones.
|
|
127
127
|
- **On-demand download + cache** — parsers fetched at first use; subsequent runs hit the local cache.
|
|
128
128
|
- **Code intelligence** — extract functions, classes, imports, exports, symbols, docstrings, and diagnostics with one API.
|
|
129
129
|
- **Syntax-aware chunking** — semantic chunks for RAG/LLM pipelines.
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
// alef:hash:
|
|
2
|
+
// alef:hash:68133ddb5b8efbe7e41070f6721a242527361da4659243e43afbbacd5396eb50
|
|
3
3
|
// To regenerate: alef generate
|
|
4
4
|
// To verify freshness: alef verify --exit-code
|
|
5
5
|
/* eslint-disable */
|
|
@@ -152,6 +152,14 @@ export declare function downloadedLanguages(): Array<string>;
|
|
|
152
152
|
*/
|
|
153
153
|
export declare function downloadGroup(name: string): number;
|
|
154
154
|
|
|
155
|
+
/**
|
|
156
|
+
* Get the folds query for a language, if bundled.
|
|
157
|
+
*
|
|
158
|
+
* Returns the contents of `folds.scm` (used for code folding) as a static string,
|
|
159
|
+
* or `None` if no folds query is bundled for this language.
|
|
160
|
+
*/
|
|
161
|
+
export declare function getFoldsQuery(language: string): string | null;
|
|
162
|
+
|
|
155
163
|
/**
|
|
156
164
|
* Get the highlights query for a language, if bundled.
|
|
157
165
|
*
|
|
@@ -160,6 +168,14 @@ export declare function downloadGroup(name: string): number;
|
|
|
160
168
|
*/
|
|
161
169
|
export declare function getHighlightsQuery(language: string): string | null;
|
|
162
170
|
|
|
171
|
+
/**
|
|
172
|
+
* Get the indents query for a language, if bundled.
|
|
173
|
+
*
|
|
174
|
+
* Returns the contents of `indents.scm` (used for auto-indentation) as a static
|
|
175
|
+
* string, or `None` if no indents query is bundled for this language.
|
|
176
|
+
*/
|
|
177
|
+
export declare function getIndentsQuery(language: string): string | null;
|
|
178
|
+
|
|
163
179
|
/**
|
|
164
180
|
* Get the injections query for a language, if bundled.
|
|
165
181
|
*
|
|
@@ -1014,6 +1030,19 @@ export declare function languageCount(): number;
|
|
|
1014
1030
|
*/
|
|
1015
1031
|
export declare function manifestLanguages(): Array<string>;
|
|
1016
1032
|
|
|
1033
|
+
/**
|
|
1034
|
+
* Prefetch grammars: download any not already loadable from disk, then load every
|
|
1035
|
+
* requested language into the process registry so a subsequent hot loop only parses.
|
|
1036
|
+
*
|
|
1037
|
+
* Unlike [`download()`], this does not trust in-memory availability — it downloads
|
|
1038
|
+
* whenever a grammar is not actually loadable from disk (fixing the case where a
|
|
1039
|
+
* known-but-not-downloaded grammar is reported present), then resolves and caches
|
|
1040
|
+
* every requested language. Call it once, up front, before a parallel workload.
|
|
1041
|
+
* @throws Returns [`Error::Download`] if a required grammar cannot be fetched, or
|
|
1042
|
+
* [`Error::LanguageNotFound`] if a requested name is unknown.
|
|
1043
|
+
*/
|
|
1044
|
+
export declare function prefetch(languages: Array<string>): void;
|
|
1045
|
+
|
|
1017
1046
|
/**
|
|
1018
1047
|
* Process source code and extract file intelligence using the global registry.
|
|
1019
1048
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xberg-io/tree-sitter-language-pack",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "Pre-compiled tree-sitter grammars for 306 programming languages",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"@napi-rs/cli": "^3.6.2"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@xberg-io/tree-sitter-language-pack-darwin-arm64": "1.
|
|
37
|
-
"@xberg-io/tree-sitter-language-pack-darwin-x64": "1.
|
|
38
|
-
"@xberg-io/tree-sitter-language-pack-linux-arm64-gnu": "1.
|
|
39
|
-
"@xberg-io/tree-sitter-language-pack-linux-arm64-musl": "1.
|
|
40
|
-
"@xberg-io/tree-sitter-language-pack-linux-x64-gnu": "1.
|
|
41
|
-
"@xberg-io/tree-sitter-language-pack-linux-x64-musl": "1.
|
|
42
|
-
"@xberg-io/tree-sitter-language-pack-win32-arm64-msvc": "1.
|
|
43
|
-
"@xberg-io/tree-sitter-language-pack-win32-x64-msvc": "1.
|
|
36
|
+
"@xberg-io/tree-sitter-language-pack-darwin-arm64": "1.12.0",
|
|
37
|
+
"@xberg-io/tree-sitter-language-pack-darwin-x64": "1.12.0",
|
|
38
|
+
"@xberg-io/tree-sitter-language-pack-linux-arm64-gnu": "1.12.0",
|
|
39
|
+
"@xberg-io/tree-sitter-language-pack-linux-arm64-musl": "1.12.0",
|
|
40
|
+
"@xberg-io/tree-sitter-language-pack-linux-x64-gnu": "1.12.0",
|
|
41
|
+
"@xberg-io/tree-sitter-language-pack-linux-x64-musl": "1.12.0",
|
|
42
|
+
"@xberg-io/tree-sitter-language-pack-win32-arm64-msvc": "1.12.0",
|
|
43
|
+
"@xberg-io/tree-sitter-language-pack-win32-x64-msvc": "1.12.0"
|
|
44
44
|
},
|
|
45
45
|
"napi": {
|
|
46
46
|
"binaryName": "ts-pack-core-node",
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
]
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
|
-
"node": ">=
|
|
60
|
+
"node": ">= 22"
|
|
61
61
|
}
|
|
62
62
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|