@kreuzberg/tree-sitter-language-pack-wasm 1.3.0 → 1.3.2

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
@@ -2,7 +2,7 @@
2
2
  "name": "@kreuzberg/tree-sitter-language-pack-wasm",
3
3
  "type": "module",
4
4
  "description": "WebAssembly bindings for tree-sitter language pack",
5
- "version": "1.3.0",
5
+ "version": "1.3.2",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
package/ts_pack_wasm.d.ts CHANGED
@@ -83,7 +83,8 @@ export function extensionAmbiguity(ext: string): string | undefined;
83
83
  * - `language` (string, required): the language name
84
84
  * - `patterns` (object, required): named patterns to extract
85
85
  *
86
- * Returns a JavaScript object with the extraction results.
86
+ * Accepts both camelCase and snake_case config keys.
87
+ * Returns camelCase keys in the result for JavaScript convention.
87
88
  */
88
89
  export function extract(source: string, config: any): any;
89
90
 
@@ -147,7 +148,10 @@ export function parseString(language: string, source: string): WasmTree;
147
148
  *
148
149
  * `config` is a JS object with fields:
149
150
  * - `language` (string, required): the language name
150
- * - `chunk_max_size` (number, optional): maximum chunk size in bytes (default: 1500)
151
+ * - `chunkMaxSize` (number, optional): maximum chunk size in bytes (default: 1500)
152
+ *
153
+ * Accepts both camelCase and snake_case config keys (auto-normalized to snake_case).
154
+ * Returns camelCase keys in the result for JavaScript convention.
151
155
  */
152
156
  export function process(source: string, config: any): any;
153
157
 
@@ -176,7 +180,8 @@ export function treeRootNodeType(tree: WasmTree): string;
176
180
  *
177
181
  * `config` is a JS object with the same shape as for `extract`.
178
182
  *
179
- * Returns a JavaScript object with validation results.
183
+ * Accepts both camelCase and snake_case config keys.
184
+ * Returns camelCase keys in the result for JavaScript convention.
180
185
  */
181
186
  export function validateExtraction(config: any): any;
182
187
 
package/ts_pack_wasm.js CHANGED
@@ -302,7 +302,8 @@ export function extensionAmbiguity(ext) {
302
302
  * - `language` (string, required): the language name
303
303
  * - `patterns` (object, required): named patterns to extract
304
304
  *
305
- * Returns a JavaScript object with the extraction results.
305
+ * Accepts both camelCase and snake_case config keys.
306
+ * Returns camelCase keys in the result for JavaScript convention.
306
307
  * @param {string} source
307
308
  * @param {any} config
308
309
  * @returns {any}
@@ -527,7 +528,10 @@ export function parseString(language, source) {
527
528
  *
528
529
  * `config` is a JS object with fields:
529
530
  * - `language` (string, required): the language name
530
- * - `chunk_max_size` (number, optional): maximum chunk size in bytes (default: 1500)
531
+ * - `chunkMaxSize` (number, optional): maximum chunk size in bytes (default: 1500)
532
+ *
533
+ * Accepts both camelCase and snake_case config keys (auto-normalized to snake_case).
534
+ * Returns camelCase keys in the result for JavaScript convention.
531
535
  * @param {string} source
532
536
  * @param {any} config
533
537
  * @returns {any}
@@ -655,7 +659,8 @@ export function treeRootNodeType(tree) {
655
659
  *
656
660
  * `config` is a JS object with the same shape as for `extract`.
657
661
  *
658
- * Returns a JavaScript object with validation results.
662
+ * Accepts both camelCase and snake_case config keys.
663
+ * Returns camelCase keys in the result for JavaScript convention.
659
664
  * @param {any} config
660
665
  * @returns {any}
661
666
  */
Binary file