triangulum 0.24.2 → 0.25.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.
- checksums.yaml +4 -4
- data/lib/triangulum/js/single-validation.js +21 -8
- data/lib/triangulum/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e556b1bfd1c1ddac53b4e4c3677302ea31f72c00e53c1256193566f62e68675b
|
|
4
|
+
data.tar.gz: 4430e7a5369e4f916529b9381365c405097b38c571e19b4c62e9a3cc7c05819e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 16cce865c2410f8202785b9f8fb42f1d5f760228671e9a8260750b6217680be4abb6633e2efdd8ef2e9bac7e101ff3a8d687f46a0c9e04a81c8515c23cafc003
|
|
7
|
+
data.tar.gz: d8459741fea64a0acc1ee811af3b49ed801418cb50c03cafbe8f7cb3de8629bc9dda9c8f0956c063f5eb79356c403e0059c8199e2873373c9f66addda1ad316f
|
|
@@ -175825,16 +175825,29 @@ var E3 = (e6, n3, r3) => {
|
|
|
175825
175825
|
severity: "error"
|
|
175826
175826
|
}]
|
|
175827
175827
|
};
|
|
175828
|
-
let i3 =
|
|
175828
|
+
let i3 = new Set(n3?.map((e7) => e7.identifier)), a3 = (e6.nodes?.nodes ?? []).filter((e7) => e7?.functionDefinition && !i3.has(e7.functionDefinition.identifier)).map((e7) => ({
|
|
175829
|
+
nodeId: e7.id,
|
|
175830
|
+
parameterIndex: null,
|
|
175831
|
+
code: 0,
|
|
175832
|
+
message: `The function definition "${e7.functionDefinition.identifier}" is not reachable.`,
|
|
175833
|
+
severity: "error"
|
|
175834
|
+
}));
|
|
175835
|
+
if (a3.length > 0)
|
|
175836
|
+
return {
|
|
175837
|
+
isValid: false,
|
|
175838
|
+
returnType: "void",
|
|
175839
|
+
diagnostics: a3
|
|
175840
|
+
};
|
|
175841
|
+
let o4 = C3(e6, n3, r3), s4 = "index.ts", c4 = y4(s4, o4), l4 = c4.getSourceFile(s4), u5 = c4.languageService.getProgram().getSemanticDiagnostics(l4).map((e7) => {
|
|
175829
175842
|
let n4 = import_typescript.flattenDiagnosticMessageText(e7.messageText, `
|
|
175830
175843
|
`), r4, i4 = null;
|
|
175831
175844
|
if (e7.start !== undefined) {
|
|
175832
|
-
let t3 =
|
|
175833
|
-
for (;(
|
|
175834
|
-
let t4 = n5 +
|
|
175835
|
-
t4 <= e7.start && t4 > d5 && (d5 = t4,
|
|
175845
|
+
let t3 = l4.getFullText(), n5 = Math.max(0, e7.start - 300), a4 = Math.min(t3.length, e7.start), o5 = t3.substring(n5, a4), s5 = /\/\* @pos ([^ ]+) (\d+|null) \*\//g, c5, u6 = null, d5 = -1;
|
|
175846
|
+
for (;(c5 = s5.exec(o5)) !== null; ) {
|
|
175847
|
+
let t4 = n5 + c5.index + c5[0].length;
|
|
175848
|
+
t4 <= e7.start && t4 > d5 && (d5 = t4, u6 = c5);
|
|
175836
175849
|
}
|
|
175837
|
-
|
|
175850
|
+
u6 && (r4 = u6[1] === "null" ? null : u6[1], i4 = parseInt(u6[2], 10));
|
|
175838
175851
|
}
|
|
175839
175852
|
return {
|
|
175840
175853
|
message: n4,
|
|
@@ -175845,9 +175858,9 @@ var E3 = (e6, n3, r3) => {
|
|
|
175845
175858
|
};
|
|
175846
175859
|
}).filter((e7) => e7 !== null);
|
|
175847
175860
|
return {
|
|
175848
|
-
isValid: !
|
|
175861
|
+
isValid: !u5.some((e7) => e7?.severity === "error"),
|
|
175849
175862
|
returnType: "void",
|
|
175850
|
-
diagnostics:
|
|
175863
|
+
diagnostics: u5
|
|
175851
175864
|
};
|
|
175852
175865
|
};
|
|
175853
175866
|
|
data/lib/triangulum/version.rb
CHANGED