@jefuriiij/synthra 0.1.11 → 0.1.12
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/CHANGELOG.md +13 -0
- package/dist/cli/index.js +9 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/server/index.js +8 -4
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,19 @@ For older versions, see [GitHub Releases](https://github.com/jefuriiij/synthra/r
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [0.1.12] — 2026-05-29
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **`Language.query is deprecated` spam at scan time.** Every parsed file
|
|
15
|
+
printed the warning — 57 prints on a Flutter codebase, one per parsed
|
|
16
|
+
file. Switched all four parsers (TypeScript, JavaScript, Python, Dart,
|
|
17
|
+
plus the generic helper) from the deprecated `language.query(QUERY)`
|
|
18
|
+
to `new Query(language, QUERY)`. No behavior change, just clean
|
|
19
|
+
terminal output.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
10
23
|
## [0.1.11] — 2026-05-29
|
|
11
24
|
|
|
12
25
|
### Fixed
|
package/dist/cli/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var init_package = __esm({
|
|
|
18
18
|
"package.json"() {
|
|
19
19
|
package_default = {
|
|
20
20
|
name: "@jefuriiij/synthra",
|
|
21
|
-
version: "0.1.
|
|
21
|
+
version: "0.1.12",
|
|
22
22
|
publishConfig: {
|
|
23
23
|
access: "public"
|
|
24
24
|
},
|
|
@@ -2247,6 +2247,7 @@ import { createRequire } from "module";
|
|
|
2247
2247
|
import { Language, Parser } from "web-tree-sitter";
|
|
2248
2248
|
|
|
2249
2249
|
// src/scanner/parsers/_generic.ts
|
|
2250
|
+
import { Query } from "web-tree-sitter";
|
|
2250
2251
|
function firstLine(text, max = 200) {
|
|
2251
2252
|
const line = text.split(/\r?\n/, 1)[0] ?? "";
|
|
2252
2253
|
return line.length > max ? line.slice(0, max) + "\u2026" : line;
|
|
@@ -2261,7 +2262,7 @@ async function runGenericParser(config, f, source) {
|
|
|
2261
2262
|
const { parser, language } = await createParser(config.grammar);
|
|
2262
2263
|
const tree = parser.parse(source);
|
|
2263
2264
|
if (!tree) return { file: f, source, symbols, imports, calls: [] };
|
|
2264
|
-
const query = language
|
|
2265
|
+
const query = new Query(language, config.query);
|
|
2265
2266
|
const matches = query.matches(tree.rootNode);
|
|
2266
2267
|
for (const match of matches) {
|
|
2267
2268
|
const byName = /* @__PURE__ */ new Map();
|
|
@@ -2392,6 +2393,7 @@ async function parseCSharp(f, source) {
|
|
|
2392
2393
|
}
|
|
2393
2394
|
|
|
2394
2395
|
// src/scanner/parsers/dart.ts
|
|
2396
|
+
import { Query as Query2 } from "web-tree-sitter";
|
|
2395
2397
|
var QUERY4 = `
|
|
2396
2398
|
(class_definition name: (identifier) @class.name) @class
|
|
2397
2399
|
(mixin_declaration (identifier) @mixin.name) @mixin
|
|
@@ -2439,7 +2441,7 @@ async function parseDart(f, source) {
|
|
|
2439
2441
|
const { parser, language } = await createParser("dart");
|
|
2440
2442
|
const tree = parser.parse(source);
|
|
2441
2443
|
if (!tree) return { file: f, source, symbols, imports, calls: [] };
|
|
2442
|
-
const query = language
|
|
2444
|
+
const query = new Query2(language, QUERY4);
|
|
2443
2445
|
const matches = query.matches(tree.rootNode);
|
|
2444
2446
|
for (const match of matches) {
|
|
2445
2447
|
const byName = /* @__PURE__ */ new Map();
|
|
@@ -2583,6 +2585,7 @@ async function parsePhp(f, source) {
|
|
|
2583
2585
|
}
|
|
2584
2586
|
|
|
2585
2587
|
// src/scanner/parsers/python.ts
|
|
2588
|
+
import { Query as Query3 } from "web-tree-sitter";
|
|
2586
2589
|
var QUERY9 = `
|
|
2587
2590
|
(function_definition name: (identifier) @function.name) @function
|
|
2588
2591
|
(class_definition name: (identifier) @class.name) @class
|
|
@@ -2601,7 +2604,7 @@ async function parsePython(f, source) {
|
|
|
2601
2604
|
const { parser, language } = await createParser("python");
|
|
2602
2605
|
const tree = parser.parse(source);
|
|
2603
2606
|
if (!tree) return { file: f, source, symbols, imports, calls: [] };
|
|
2604
|
-
const query = language
|
|
2607
|
+
const query = new Query3(language, QUERY9);
|
|
2605
2608
|
const matches = query.matches(tree.rootNode);
|
|
2606
2609
|
for (const match of matches) {
|
|
2607
2610
|
const byName = /* @__PURE__ */ new Map();
|
|
@@ -2699,6 +2702,7 @@ async function parseRust(f, source) {
|
|
|
2699
2702
|
}
|
|
2700
2703
|
|
|
2701
2704
|
// src/scanner/parsers/typescript.ts
|
|
2705
|
+
import { Query as Query4 } from "web-tree-sitter";
|
|
2702
2706
|
var TS_QUERY = `
|
|
2703
2707
|
(function_declaration name: (identifier) @function.name) @function
|
|
2704
2708
|
(class_declaration name: (type_identifier) @class.name) @class
|
|
@@ -2748,7 +2752,7 @@ async function parseTypeScript(f, source) {
|
|
|
2748
2752
|
const { parser, language } = await createParser(grammar);
|
|
2749
2753
|
const tree = parser.parse(source);
|
|
2750
2754
|
if (!tree) return { file: f, source, symbols, imports, calls: [] };
|
|
2751
|
-
const query = language
|
|
2755
|
+
const query = new Query4(language, queryFor(grammar));
|
|
2752
2756
|
const matches = query.matches(tree.rootNode);
|
|
2753
2757
|
for (const match of matches) {
|
|
2754
2758
|
const byName = /* @__PURE__ */ new Map();
|