tstyche 2.1.0 → 2.1.1
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/build/tstyche.d.ts +3 -3
- package/build/tstyche.js +58 -50
- package/package.json +10 -12
package/build/tstyche.d.ts
CHANGED
|
@@ -274,12 +274,12 @@ declare enum Color {
|
|
|
274
274
|
Gray = "90"
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
type ScribblerNode = Array<ScribblerNode> | ScribblerJsx.Element | string | undefined;
|
|
277
|
+
type ScribblerNode = Array<ScribblerNode> | ScribblerJsx.Element | string | number | undefined;
|
|
278
278
|
type FunctionComponent = (props: Record<string, unknown>) => ScribblerJsx.Element;
|
|
279
279
|
declare namespace ScribblerJsx {
|
|
280
280
|
interface Element {
|
|
281
281
|
props: Record<string, unknown>;
|
|
282
|
-
type: FunctionComponent | string;
|
|
282
|
+
type: FunctionComponent | number | string;
|
|
283
283
|
}
|
|
284
284
|
interface ElementChildrenAttribute {
|
|
285
285
|
children: ScribblerNode;
|
|
@@ -658,7 +658,7 @@ declare class ExpectDiagnosticText {
|
|
|
658
658
|
static componentDoesNotAcceptProps(isTypeNode: boolean): string;
|
|
659
659
|
static matcherIsDeprecated(matcherNameText: string): Array<string>;
|
|
660
660
|
static matcherIsNotSupported(matcherNameText: string): string;
|
|
661
|
-
static overloadGaveTheFollowingError(
|
|
661
|
+
static overloadGaveTheFollowingError(index: number, count: number, signatureText: string): string;
|
|
662
662
|
static raisedTypeError(count?: number): string;
|
|
663
663
|
static typeArgumentMustBe(argumentNameText: string, expectedText: string): string;
|
|
664
664
|
static typeDidNotRaiseError(isTypeNode: boolean): string;
|
package/build/tstyche.js
CHANGED
|
@@ -505,7 +505,7 @@ class Environment {
|
|
|
505
505
|
}
|
|
506
506
|
static #resolveTimeout() {
|
|
507
507
|
if (process.env["TSTYCHE_TIMEOUT"] != null) {
|
|
508
|
-
return Number(process.env["TSTYCHE_TIMEOUT"]);
|
|
508
|
+
return Number.parseFloat(process.env["TSTYCHE_TIMEOUT"]);
|
|
509
509
|
}
|
|
510
510
|
return 30;
|
|
511
511
|
}
|
|
@@ -589,7 +589,7 @@ class Scribbler {
|
|
|
589
589
|
#visitChildren(children) {
|
|
590
590
|
const text = [];
|
|
591
591
|
for (const child of children) {
|
|
592
|
-
if (typeof child === "string") {
|
|
592
|
+
if (typeof child === "string" || typeof child === "number") {
|
|
593
593
|
text.push(child);
|
|
594
594
|
continue;
|
|
595
595
|
}
|
|
@@ -616,61 +616,72 @@ function describeNameText(name, indent = 0) {
|
|
|
616
616
|
function BreadcrumbsText({ ancestor }) {
|
|
617
617
|
const text = [];
|
|
618
618
|
while ("name" in ancestor) {
|
|
619
|
-
text.
|
|
619
|
+
text.push(ancestor.name);
|
|
620
620
|
ancestor = ancestor.parent;
|
|
621
621
|
}
|
|
622
|
-
|
|
622
|
+
text.push("");
|
|
623
|
+
return jsx(Text, { color: "90", children: text.reverse().join(" ❭ ") });
|
|
623
624
|
}
|
|
624
|
-
function CodeLineText({
|
|
625
|
-
return (jsx(Line, { children: [jsx(Text, { color: lineNumberColor, children:
|
|
625
|
+
function CodeLineText({ gutterWidth, lineNumber, lineNumberColor = "90", lineText }) {
|
|
626
|
+
return (jsx(Line, { children: [jsx(Text, { color: lineNumberColor, children: lineNumber.toString().padStart(gutterWidth) }), jsx(Text, { color: "90", children: " | " }), lineText] }));
|
|
626
627
|
}
|
|
627
|
-
function SquiggleLineText({ gutterWidth, indentWidth = 0, squiggleWidth }) {
|
|
628
|
-
return (jsx(Line, { children: [" ".repeat(gutterWidth), jsx(Text, { color: "90", children: " | " }), " ".repeat(indentWidth), jsx(Text, { color:
|
|
628
|
+
function SquiggleLineText({ gutterWidth, indentWidth = 0, squiggleColor, squiggleWidth }) {
|
|
629
|
+
return (jsx(Line, { children: [" ".repeat(gutterWidth), jsx(Text, { color: "90", children: " | " }), " ".repeat(indentWidth), jsx(Text, { color: squiggleColor, children: "~".repeat(squiggleWidth === 0 ? 1 : squiggleWidth) })] }));
|
|
629
630
|
}
|
|
630
|
-
function CodeSpanText({ diagnosticOrigin }) {
|
|
631
|
+
function CodeSpanText({ diagnosticCategory, diagnosticOrigin }) {
|
|
631
632
|
const lastLineInFile = diagnosticOrigin.sourceFile.getLineAndCharacterOfPosition(diagnosticOrigin.sourceFile.text.length).line;
|
|
632
633
|
const { character: firstMarkedLineCharacter, line: firstMarkedLine } = diagnosticOrigin.sourceFile.getLineAndCharacterOfPosition(diagnosticOrigin.start);
|
|
633
634
|
const { character: lastMarkedLineCharacter, line: lastMarkedLine } = diagnosticOrigin.sourceFile.getLineAndCharacterOfPosition(diagnosticOrigin.end);
|
|
634
635
|
const firstLine = Math.max(firstMarkedLine - 2, 0);
|
|
635
636
|
const lastLine = Math.min(firstLine + 5, lastLineInFile);
|
|
636
|
-
const gutterWidth =
|
|
637
|
+
const gutterWidth = (lastLine + 1).toString().length + 2;
|
|
638
|
+
let highlightColor;
|
|
639
|
+
switch (diagnosticCategory) {
|
|
640
|
+
case "error": {
|
|
641
|
+
highlightColor = "31";
|
|
642
|
+
break;
|
|
643
|
+
}
|
|
644
|
+
case "warning": {
|
|
645
|
+
highlightColor = "33";
|
|
646
|
+
break;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
637
649
|
const codeSpan = [];
|
|
638
650
|
for (let index = firstLine; index <= lastLine; index++) {
|
|
639
651
|
const lineStart = diagnosticOrigin.sourceFile.getPositionOfLineAndCharacter(index, 0);
|
|
640
652
|
const lineEnd = index === lastLineInFile
|
|
641
653
|
? diagnosticOrigin.sourceFile.text.length
|
|
642
654
|
: diagnosticOrigin.sourceFile.getPositionOfLineAndCharacter(index + 1, 0);
|
|
643
|
-
const lineNumberText = String(index + 1);
|
|
644
655
|
const lineText = diagnosticOrigin.sourceFile.text.slice(lineStart, lineEnd).trimEnd().replace(/\t/g, " ");
|
|
645
656
|
if (index >= firstMarkedLine && index <= lastMarkedLine) {
|
|
646
|
-
codeSpan.push(jsx(CodeLineText, { gutterWidth: gutterWidth,
|
|
657
|
+
codeSpan.push(jsx(CodeLineText, { gutterWidth: gutterWidth, lineNumber: index + 1, lineNumberColor: highlightColor, lineText: lineText }));
|
|
647
658
|
if (index === firstMarkedLine) {
|
|
648
659
|
const squiggleLength = index === lastMarkedLine
|
|
649
660
|
? lastMarkedLineCharacter - firstMarkedLineCharacter
|
|
650
661
|
: lineText.length - firstMarkedLineCharacter;
|
|
651
|
-
codeSpan.push(jsx(SquiggleLineText, { gutterWidth: gutterWidth, indentWidth: firstMarkedLineCharacter, squiggleWidth: squiggleLength }));
|
|
662
|
+
codeSpan.push(jsx(SquiggleLineText, { gutterWidth: gutterWidth, indentWidth: firstMarkedLineCharacter, squiggleColor: highlightColor, squiggleWidth: squiggleLength }));
|
|
652
663
|
}
|
|
653
664
|
else if (index === lastMarkedLine) {
|
|
654
|
-
codeSpan.push(jsx(SquiggleLineText, { gutterWidth: gutterWidth, squiggleWidth: lastMarkedLineCharacter }));
|
|
665
|
+
codeSpan.push(jsx(SquiggleLineText, { gutterWidth: gutterWidth, squiggleColor: highlightColor, squiggleWidth: lastMarkedLineCharacter }));
|
|
655
666
|
}
|
|
656
667
|
else {
|
|
657
|
-
codeSpan.push(jsx(SquiggleLineText, { gutterWidth: gutterWidth, squiggleWidth: lineText.length }));
|
|
668
|
+
codeSpan.push(jsx(SquiggleLineText, { gutterWidth: gutterWidth, squiggleColor: highlightColor, squiggleWidth: lineText.length }));
|
|
658
669
|
}
|
|
659
670
|
}
|
|
660
671
|
else {
|
|
661
|
-
codeSpan.push(jsx(CodeLineText, { gutterWidth: gutterWidth,
|
|
672
|
+
codeSpan.push(jsx(CodeLineText, { gutterWidth: gutterWidth, lineNumber: index + 1, lineText: lineText }));
|
|
662
673
|
}
|
|
663
674
|
}
|
|
664
|
-
const location = (jsx(Line, { children: [" ".repeat(gutterWidth + 2), jsx(Text, { color: "90", children: " at " }), jsx(Text, { color: "36", children: Path.relative("", diagnosticOrigin.sourceFile.fileName) }), jsx(Text, { color: "90", children:
|
|
675
|
+
const location = (jsx(Line, { children: [" ".repeat(gutterWidth + 2), jsx(Text, { color: "90", children: " at " }), jsx(Text, { color: "36", children: Path.relative("", diagnosticOrigin.sourceFile.fileName) }), jsx(Text, { color: "90", children: `:${firstMarkedLine + 1}:${firstMarkedLineCharacter + 1}` }), diagnosticOrigin.assertion && jsx(BreadcrumbsText, { ancestor: diagnosticOrigin.assertion.parent })] }));
|
|
665
676
|
return (jsx(Text, { children: [codeSpan, jsx(Line, {}), location] }));
|
|
666
677
|
}
|
|
667
678
|
|
|
668
679
|
function DiagnosticText({ diagnostic }) {
|
|
669
|
-
const code =
|
|
680
|
+
const code = diagnostic.code ? jsx(Text, { color: "90", children: [" ", diagnostic.code] }) : undefined;
|
|
670
681
|
const text = Array.isArray(diagnostic.text) ? diagnostic.text : [diagnostic.text];
|
|
671
682
|
const message = text.map((text, index) => (jsx(Text, { children: [index === 1 ? jsx(Line, {}) : undefined, jsx(Line, { children: [text, code] })] })));
|
|
672
683
|
const related = diagnostic.related?.map((relatedDiagnostic) => jsx(DiagnosticText, { diagnostic: relatedDiagnostic }));
|
|
673
|
-
const codeSpan = diagnostic.origin ? (jsx(Text, { children: [jsx(Line, {}), jsx(CodeSpanText, { diagnosticOrigin: diagnostic.origin })] })) : undefined;
|
|
684
|
+
const codeSpan = diagnostic.origin ? (jsx(Text, { children: [jsx(Line, {}), jsx(CodeSpanText, { diagnosticCategory: diagnostic.category, diagnosticOrigin: diagnostic.origin })] })) : undefined;
|
|
674
685
|
return (jsx(Text, { children: [message, codeSpan, jsx(Line, {}), jsx(Text, { indent: 2, children: related })] }));
|
|
675
686
|
}
|
|
676
687
|
function diagnosticText(diagnostic) {
|
|
@@ -747,11 +758,7 @@ function HelpHeaderText({ tstycheVersion }) {
|
|
|
747
758
|
return (jsx(Line, { children: ["The TSTyche Type Test Runner", jsx(HintText, { children: tstycheVersion })] }));
|
|
748
759
|
}
|
|
749
760
|
function CommandText({ hint, text }) {
|
|
750
|
-
|
|
751
|
-
if (hint != null) {
|
|
752
|
-
hintText = jsx(HintText, { children: hint });
|
|
753
|
-
}
|
|
754
|
-
return (jsx(Line, { indent: 1, children: [jsx(Text, { color: "34", children: text }), hintText] }));
|
|
761
|
+
return (jsx(Line, { indent: 1, children: [jsx(Text, { color: "34", children: text }), hint && jsx(HintText, { children: hint })] }));
|
|
755
762
|
}
|
|
756
763
|
function OptionDescriptionText({ text }) {
|
|
757
764
|
return jsx(Line, { indent: 1, children: text });
|
|
@@ -766,11 +773,11 @@ function CommandLineUsageText() {
|
|
|
766
773
|
return jsx(Text, { children: usageText });
|
|
767
774
|
}
|
|
768
775
|
function CommandLineOptionNameText({ text }) {
|
|
769
|
-
return jsx(Text, { children:
|
|
776
|
+
return jsx(Text, { children: `--${text}` });
|
|
770
777
|
}
|
|
771
778
|
function CommandLineOptionHintText({ definition }) {
|
|
772
779
|
if (definition.brand === "list") {
|
|
773
|
-
return
|
|
780
|
+
return jsx(Text, { children: `${definition.brand} of ${definition.items.brand}s` });
|
|
774
781
|
}
|
|
775
782
|
return jsx(Text, { children: definition.brand });
|
|
776
783
|
}
|
|
@@ -835,16 +842,16 @@ function RowText({ label, text }) {
|
|
|
835
842
|
return (jsx(Line, { children: [`${label}:`.padEnd(12), text] }));
|
|
836
843
|
}
|
|
837
844
|
function CountText({ failed, passed, skipped, todo, total }) {
|
|
838
|
-
return (jsx(Text, { children: [failed > 0 ? (jsx(Text, { children: [jsx(Text, { color: "31", children: [
|
|
845
|
+
return (jsx(Text, { children: [failed > 0 ? (jsx(Text, { children: [jsx(Text, { color: "31", children: [failed, " failed"] }), jsx(Text, { children: ", " })] })) : undefined, skipped > 0 ? (jsx(Text, { children: [jsx(Text, { color: "33", children: [skipped, " skipped"] }), jsx(Text, { children: ", " })] })) : undefined, todo > 0 ? (jsx(Text, { children: [jsx(Text, { color: "35", children: [todo, " todo"] }), jsx(Text, { children: ", " })] })) : undefined, passed > 0 ? (jsx(Text, { children: [jsx(Text, { color: "32", children: [passed, " passed"] }), jsx(Text, { children: ", " })] })) : undefined, jsx(Text, { children: [total, " total"] })] }));
|
|
839
846
|
}
|
|
840
847
|
function DurationText({ seconds }) {
|
|
841
|
-
return jsx(Text, { children: `${
|
|
848
|
+
return jsx(Text, { children: `${Math.round(seconds * 10) / 10}s` });
|
|
842
849
|
}
|
|
843
850
|
function MatchText({ text }) {
|
|
844
851
|
if (typeof text === "string") {
|
|
845
852
|
return jsx(Text, { children: ["'", text, "'"] });
|
|
846
853
|
}
|
|
847
|
-
if (text.length
|
|
854
|
+
if (text.length === 1) {
|
|
848
855
|
return jsx(Text, { children: ["'", ...text, "'"] });
|
|
849
856
|
}
|
|
850
857
|
const lastItem = text.pop();
|
|
@@ -856,7 +863,7 @@ function RanFilesText({ onlyMatch, pathMatch, skipMatch }) {
|
|
|
856
863
|
testNameMatchText.push(jsx(Text, { children: [jsx(Text, { color: "90", children: "matching " }), jsx(MatchText, { text: onlyMatch })] }));
|
|
857
864
|
}
|
|
858
865
|
if (skipMatch != null) {
|
|
859
|
-
testNameMatchText.push(jsx(Text, { children: [onlyMatch
|
|
866
|
+
testNameMatchText.push(jsx(Text, { children: [onlyMatch && jsx(Text, { color: "90", children: " and " }), jsx(Text, { color: "90", children: "not matching " }), jsx(MatchText, { text: skipMatch })] }));
|
|
860
867
|
}
|
|
861
868
|
let pathMatchText;
|
|
862
869
|
if (pathMatch.length > 0) {
|
|
@@ -1297,7 +1304,7 @@ class Diagnostic {
|
|
|
1297
1304
|
}
|
|
1298
1305
|
static fromDiagnostics(diagnostics, compiler) {
|
|
1299
1306
|
return diagnostics.map((diagnostic) => {
|
|
1300
|
-
const code = `ts(${
|
|
1307
|
+
const code = `ts(${diagnostic.code})`;
|
|
1301
1308
|
let origin;
|
|
1302
1309
|
if (Diagnostic.#isTsDiagnosticWithLocation(diagnostic)) {
|
|
1303
1310
|
origin = new DiagnosticOrigin(diagnostic.start, diagnostic.start + diagnostic.length, diagnostic.file);
|
|
@@ -1913,8 +1920,8 @@ class ExpectDiagnosticText {
|
|
|
1913
1920
|
static matcherIsNotSupported(matcherNameText) {
|
|
1914
1921
|
return `The '.${matcherNameText}()' matcher is not supported.`;
|
|
1915
1922
|
}
|
|
1916
|
-
static overloadGaveTheFollowingError(
|
|
1917
|
-
return `Overload ${
|
|
1923
|
+
static overloadGaveTheFollowingError(index, count, signatureText) {
|
|
1924
|
+
return `Overload ${index} of ${count}, '${signatureText}', gave the following error.`;
|
|
1918
1925
|
}
|
|
1919
1926
|
static raisedTypeError(count = 1) {
|
|
1920
1927
|
return `The raised type error${count === 1 ? "" : "s"}:`;
|
|
@@ -1967,7 +1974,7 @@ class ExpectDiagnosticText {
|
|
|
1967
1974
|
static typeRaisedError(isTypeNode, count, targetCount) {
|
|
1968
1975
|
let countText = "a";
|
|
1969
1976
|
if (count > 1 || targetCount > 1) {
|
|
1970
|
-
countText = count > targetCount ?
|
|
1977
|
+
countText = count > targetCount ? `${count}` : `only ${count}`;
|
|
1971
1978
|
}
|
|
1972
1979
|
return `${isTypeNode ? "Type" : "Expression type"} raised ${countText} type error${count === 1 ? "" : "s"}.`;
|
|
1973
1980
|
}
|
|
@@ -2058,19 +2065,19 @@ class MatchWorker {
|
|
|
2058
2065
|
return type;
|
|
2059
2066
|
}
|
|
2060
2067
|
isAnyOrNeverType(type) {
|
|
2061
|
-
return
|
|
2068
|
+
return !!(type.flags & (this.#compiler.TypeFlags.Any | this.#compiler.TypeFlags.Never));
|
|
2062
2069
|
}
|
|
2063
2070
|
isStringOrNumberLiteralType(type) {
|
|
2064
|
-
return
|
|
2071
|
+
return !!(type.flags & this.#compiler.TypeFlags.StringOrNumberLiteral);
|
|
2065
2072
|
}
|
|
2066
2073
|
isObjectType(type) {
|
|
2067
|
-
return
|
|
2074
|
+
return !!(type.flags & this.#compiler.TypeFlags.Object);
|
|
2068
2075
|
}
|
|
2069
2076
|
isUnionType(type) {
|
|
2070
|
-
return
|
|
2077
|
+
return !!(type.flags & this.#compiler.TypeFlags.Union);
|
|
2071
2078
|
}
|
|
2072
2079
|
isUniqueSymbolType(type) {
|
|
2073
|
-
return
|
|
2080
|
+
return !!(type.flags & this.#compiler.TypeFlags.UniqueESSymbol);
|
|
2074
2081
|
}
|
|
2075
2082
|
resolveDiagnosticOrigin(symbol, enclosingNode) {
|
|
2076
2083
|
if (symbol.valueDeclaration != null &&
|
|
@@ -2097,7 +2104,7 @@ class PrimitiveTypeMatcher {
|
|
|
2097
2104
|
}
|
|
2098
2105
|
match(matchWorker, sourceNode) {
|
|
2099
2106
|
const sourceType = matchWorker.getType(sourceNode);
|
|
2100
|
-
const isMatch =
|
|
2107
|
+
const isMatch = !!(sourceType.flags & this.#targetTypeFlag);
|
|
2101
2108
|
return {
|
|
2102
2109
|
explain: () => this.#explain(matchWorker, sourceNode),
|
|
2103
2110
|
isMatch,
|
|
@@ -2122,7 +2129,7 @@ class ToAcceptProps {
|
|
|
2122
2129
|
const origin = DiagnosticOrigin.fromNode(targetNode, matchWorker.assertion);
|
|
2123
2130
|
if (signatures.length > 1) {
|
|
2124
2131
|
const signatureText = this.#typeChecker.signatureToString(signature, sourceNode);
|
|
2125
|
-
const overloadText = ExpectDiagnosticText.overloadGaveTheFollowingError(
|
|
2132
|
+
const overloadText = ExpectDiagnosticText.overloadGaveTheFollowingError(index + 1, signatures.length, signatureText);
|
|
2126
2133
|
diagnostic = Diagnostic.error([introText, overloadText], origin);
|
|
2127
2134
|
}
|
|
2128
2135
|
else {
|
|
@@ -2343,7 +2350,7 @@ class ToHaveProperty {
|
|
|
2343
2350
|
const targetType = matchWorker.getType(targetNode);
|
|
2344
2351
|
let propertyNameText;
|
|
2345
2352
|
if (matchWorker.isStringOrNumberLiteralType(targetType)) {
|
|
2346
|
-
propertyNameText =
|
|
2353
|
+
propertyNameText = targetType.value.toString();
|
|
2347
2354
|
}
|
|
2348
2355
|
else {
|
|
2349
2356
|
propertyNameText = `[${this.#compiler.unescapeLeadingUnderscores(targetType.symbol.escapedName)}]`;
|
|
@@ -2367,7 +2374,7 @@ class ToHaveProperty {
|
|
|
2367
2374
|
const targetType = matchWorker.getType(targetNode);
|
|
2368
2375
|
let propertyNameText;
|
|
2369
2376
|
if (matchWorker.isStringOrNumberLiteralType(targetType)) {
|
|
2370
|
-
propertyNameText =
|
|
2377
|
+
propertyNameText = targetType.value.toString();
|
|
2371
2378
|
}
|
|
2372
2379
|
else if (matchWorker.isUniqueSymbolType(targetType)) {
|
|
2373
2380
|
propertyNameText = this.#compiler.unescapeLeadingUnderscores(targetType.escapedName);
|
|
@@ -2473,7 +2480,7 @@ class ToRaiseError {
|
|
|
2473
2480
|
if (this.#compiler.isStringLiteralLike(targetNode)) {
|
|
2474
2481
|
return this.#compiler.flattenDiagnosticMessageText(diagnostic.messageText, " ", 0).includes(targetNode.text);
|
|
2475
2482
|
}
|
|
2476
|
-
return Number(targetNode.text) === diagnostic.code;
|
|
2483
|
+
return Number.parseInt(targetNode.text) === diagnostic.code;
|
|
2477
2484
|
}
|
|
2478
2485
|
}
|
|
2479
2486
|
|
|
@@ -3032,7 +3039,7 @@ class TSTyche {
|
|
|
3032
3039
|
#selectService;
|
|
3033
3040
|
#storeService;
|
|
3034
3041
|
#taskRunner;
|
|
3035
|
-
static version = "2.1.
|
|
3042
|
+
static version = "2.1.1";
|
|
3036
3043
|
constructor(resolvedConfig, outputService, selectService, storeService) {
|
|
3037
3044
|
this.#resolvedConfig = resolvedConfig;
|
|
3038
3045
|
this.#outputService = outputService;
|
|
@@ -3616,13 +3623,13 @@ class StoreDiagnosticText {
|
|
|
3616
3623
|
return `Failed to fetch metadata of the 'typescript' package from '${registryUrl.toString()}'.`;
|
|
3617
3624
|
}
|
|
3618
3625
|
static failedWithStatusCode(code) {
|
|
3619
|
-
return `Request failed with status code ${
|
|
3626
|
+
return `Request failed with status code ${code}.`;
|
|
3620
3627
|
}
|
|
3621
3628
|
static maybeNetworkConnectionIssue() {
|
|
3622
3629
|
return "Might be there is an issue with the registry or the network connection.";
|
|
3623
3630
|
}
|
|
3624
3631
|
static setupTimeoutExceeded(timeout) {
|
|
3625
|
-
return `Setup timeout of ${
|
|
3632
|
+
return `Setup timeout of ${timeout / 1000}s was exceeded.`;
|
|
3626
3633
|
}
|
|
3627
3634
|
}
|
|
3628
3635
|
|
|
@@ -3779,7 +3786,7 @@ class Lock {
|
|
|
3779
3786
|
break;
|
|
3780
3787
|
}
|
|
3781
3788
|
if (Date.now() - waitStartTime > options.timeout) {
|
|
3782
|
-
options.onDiagnostics?.(`Lock wait timeout of ${
|
|
3789
|
+
options.onDiagnostics?.(`Lock wait timeout of ${options.timeout / 1000}s was exceeded.`);
|
|
3783
3790
|
break;
|
|
3784
3791
|
}
|
|
3785
3792
|
await Lock.#sleep(1000);
|
|
@@ -3864,9 +3871,9 @@ class PackageInstaller {
|
|
|
3864
3871
|
resolve();
|
|
3865
3872
|
}
|
|
3866
3873
|
if (signal != null) {
|
|
3867
|
-
reject(new Error(`setup timeout of ${
|
|
3874
|
+
reject(new Error(`setup timeout of ${this.#timeout / 1000}s was exceeded`));
|
|
3868
3875
|
}
|
|
3869
|
-
reject(new Error(`process exited with code ${
|
|
3876
|
+
reject(new Error(`process exited with code ${code}`));
|
|
3870
3877
|
});
|
|
3871
3878
|
});
|
|
3872
3879
|
}
|
|
@@ -3939,6 +3946,7 @@ class StoreService {
|
|
|
3939
3946
|
continue;
|
|
3940
3947
|
}
|
|
3941
3948
|
const toExpose = [
|
|
3949
|
+
"getTypeOfSymbol",
|
|
3942
3950
|
"isTypeRelatedTo",
|
|
3943
3951
|
"relation: { assignable: assignableRelation, identity: identityRelation, subtype: strictSubtypeRelation }",
|
|
3944
3952
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tstyche",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "The Essential Type Testing Tool.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -53,29 +53,27 @@
|
|
|
53
53
|
"test:coverage:collect": "yarn build --sourcemap && NODE_V8_COVERAGE='./coverage/v8-coverage' yarn test:e2e",
|
|
54
54
|
"test:coverage:report": "node ./scripts/report-coverage.js",
|
|
55
55
|
"test:e2e": "yarn test:e2e:parallel && yarn test:e2e:serial",
|
|
56
|
-
"test:e2e:parallel": "yarn
|
|
57
|
-
"test:e2e:serial": "yarn
|
|
56
|
+
"test:e2e:parallel": "yarn poku ./tests --exclude='store|target|update|versions|watch' --parallel",
|
|
57
|
+
"test:e2e:serial": "yarn poku tests/*-{store,target,update,versions,watch}.test.*",
|
|
58
58
|
"test:examples": "tstyche examples",
|
|
59
|
-
"test:run": "mocha --config mocha.config.json",
|
|
60
59
|
"test:types": "tstyche typetests",
|
|
61
|
-
"test:unit": "yarn
|
|
60
|
+
"test:unit": "yarn poku **/__tests__/*.test.* --parallel"
|
|
62
61
|
},
|
|
63
62
|
"devDependencies": {
|
|
64
63
|
"@biomejs/biome": "1.8.3",
|
|
65
64
|
"@rollup/plugin-typescript": "11.1.6",
|
|
66
|
-
"@types/
|
|
67
|
-
"@types/node": "20.14.10",
|
|
65
|
+
"@types/node": "20.14.12",
|
|
68
66
|
"@types/react": "18.3.3",
|
|
69
67
|
"ajv": "8.17.1",
|
|
70
|
-
"cspell": "8.
|
|
68
|
+
"cspell": "8.12.1",
|
|
71
69
|
"magic-string": "0.30.10",
|
|
72
|
-
"
|
|
73
|
-
"
|
|
70
|
+
"monocart-coverage-reports": "2.9.3",
|
|
71
|
+
"poku": "2.2.3",
|
|
74
72
|
"pretty-ansi": "2.0.0",
|
|
75
|
-
"rollup": "4.
|
|
73
|
+
"rollup": "4.19.1",
|
|
76
74
|
"rollup-plugin-dts": "6.1.1",
|
|
77
75
|
"tslib": "2.6.3",
|
|
78
|
-
"typescript": "5.5.
|
|
76
|
+
"typescript": "5.5.4"
|
|
79
77
|
},
|
|
80
78
|
"peerDependencies": {
|
|
81
79
|
"typescript": "4.x || 5.x"
|