@formspec/build 0.1.0-alpha.37 → 0.1.0-alpha.38
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 +35 -0
- package/dist/analyzer/tsdoc-parser.d.ts.map +1 -1
- package/dist/cli.cjs +23 -3
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +23 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +23 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -3
- package/dist/index.js.map +1 -1
- package/dist/internals.cjs +23 -3
- package/dist/internals.cjs.map +1 -1
- package/dist/internals.js +23 -3
- package/dist/internals.js.map +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -2237,6 +2237,16 @@ function buildSupportingDeclarations(sourceFile, extensionTypeNames) {
|
|
|
2237
2237
|
return true;
|
|
2238
2238
|
}).map((statement) => statement.getText(sourceFile));
|
|
2239
2239
|
}
|
|
2240
|
+
function pushUniqueCompilerDiagnostics(target, additions) {
|
|
2241
|
+
for (const diagnostic of additions) {
|
|
2242
|
+
if ((diagnostic.code === "UNSUPPORTED_CUSTOM_TYPE_OVERRIDE" || diagnostic.code === "SYNTHETIC_SETUP_FAILURE") && target.some(
|
|
2243
|
+
(existing) => existing.code === diagnostic.code && existing.message === diagnostic.message
|
|
2244
|
+
)) {
|
|
2245
|
+
continue;
|
|
2246
|
+
}
|
|
2247
|
+
target.push(diagnostic);
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2240
2250
|
function renderSyntheticArgumentExpression(valueKind, argumentText) {
|
|
2241
2251
|
const trimmed = argumentText.trim();
|
|
2242
2252
|
if (trimmed === "") {
|
|
@@ -2503,6 +2513,16 @@ function buildCompilerBackedConstraintDiagnostics(node, sourceFile, tagName, par
|
|
|
2503
2513
|
if (result.diagnostics.length === 0) {
|
|
2504
2514
|
return [];
|
|
2505
2515
|
}
|
|
2516
|
+
const setupDiagnostic = result.diagnostics.find((diagnostic) => diagnostic.kind !== "typescript");
|
|
2517
|
+
if (setupDiagnostic !== void 0) {
|
|
2518
|
+
return [
|
|
2519
|
+
makeDiagnostic(
|
|
2520
|
+
setupDiagnostic.kind === "unsupported-custom-type-override" ? "UNSUPPORTED_CUSTOM_TYPE_OVERRIDE" : "SYNTHETIC_SETUP_FAILURE",
|
|
2521
|
+
setupDiagnostic.message,
|
|
2522
|
+
provenance
|
|
2523
|
+
)
|
|
2524
|
+
];
|
|
2525
|
+
}
|
|
2506
2526
|
const expectedLabel = definition.valueKind === null ? "compatible argument" : capabilityLabel(definition.valueKind);
|
|
2507
2527
|
return [
|
|
2508
2528
|
makeDiagnostic(
|
|
@@ -2666,7 +2686,7 @@ function parseTSDocTags(node, file = "", options) {
|
|
|
2666
2686
|
options
|
|
2667
2687
|
);
|
|
2668
2688
|
if (compilerDiagnostics.length > 0) {
|
|
2669
|
-
diagnostics
|
|
2689
|
+
pushUniqueCompilerDiagnostics(diagnostics, compilerDiagnostics);
|
|
2670
2690
|
continue;
|
|
2671
2691
|
}
|
|
2672
2692
|
const constraintNode = parseConstraintTagValue(
|
|
@@ -2753,7 +2773,7 @@ function parseTSDocTags(node, file = "", options) {
|
|
|
2753
2773
|
options
|
|
2754
2774
|
);
|
|
2755
2775
|
if (compilerDiagnostics.length > 0) {
|
|
2756
|
-
diagnostics
|
|
2776
|
+
pushUniqueCompilerDiagnostics(diagnostics, compilerDiagnostics);
|
|
2757
2777
|
continue;
|
|
2758
2778
|
}
|
|
2759
2779
|
const constraintNode = parseConstraintTagValue(
|
|
@@ -2787,7 +2807,7 @@ function parseTSDocTags(node, file = "", options) {
|
|
|
2787
2807
|
options
|
|
2788
2808
|
);
|
|
2789
2809
|
if (compilerDiagnostics.length > 0) {
|
|
2790
|
-
diagnostics
|
|
2810
|
+
pushUniqueCompilerDiagnostics(diagnostics, compilerDiagnostics);
|
|
2791
2811
|
continue;
|
|
2792
2812
|
}
|
|
2793
2813
|
const constraintNode = parseConstraintTagValue(
|