@typescript-deploys/pr-build 5.5.0-pr-58352-3 → 5.5.0-pr-58361-3
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/lib/tsc.js +69 -55
- package/lib/typescript.js +72 -58
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -12623,35 +12623,6 @@ function packageIdToString(packageId) {
|
|
|
12623
12623
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
12624
12624
|
return oldResolution === newResolution || oldResolution.resolvedTypeReferenceDirective === newResolution.resolvedTypeReferenceDirective || !!oldResolution.resolvedTypeReferenceDirective && !!newResolution.resolvedTypeReferenceDirective && oldResolution.resolvedTypeReferenceDirective.resolvedFileName === newResolution.resolvedTypeReferenceDirective.resolvedFileName && !!oldResolution.resolvedTypeReferenceDirective.primary === !!newResolution.resolvedTypeReferenceDirective.primary && oldResolution.resolvedTypeReferenceDirective.originalPath === newResolution.resolvedTypeReferenceDirective.originalPath;
|
|
12625
12625
|
}
|
|
12626
|
-
function fileIncludeReasonIsEqual(a, b) {
|
|
12627
|
-
if (a === b)
|
|
12628
|
-
return true;
|
|
12629
|
-
if (a.kind !== b.kind)
|
|
12630
|
-
return false;
|
|
12631
|
-
switch (a.kind) {
|
|
12632
|
-
case 0 /* RootFile */:
|
|
12633
|
-
Debug.type(b);
|
|
12634
|
-
return a.index === b.index;
|
|
12635
|
-
case 6 /* LibFile */:
|
|
12636
|
-
Debug.type(b);
|
|
12637
|
-
return a.index === b.index;
|
|
12638
|
-
case 1 /* SourceFromProjectReference */:
|
|
12639
|
-
case 2 /* OutputFromProjectReference */:
|
|
12640
|
-
Debug.type(b);
|
|
12641
|
-
return a.index === b.index;
|
|
12642
|
-
case 3 /* Import */:
|
|
12643
|
-
case 4 /* ReferenceFile */:
|
|
12644
|
-
case 5 /* TypeReferenceDirective */:
|
|
12645
|
-
case 7 /* LibReferenceDirective */:
|
|
12646
|
-
Debug.type(b);
|
|
12647
|
-
return a.file === b.file && a.index === b.index;
|
|
12648
|
-
case 8 /* AutomaticTypeDirectiveFile */:
|
|
12649
|
-
Debug.type(b);
|
|
12650
|
-
return a.typeReference === b.typeReference && packageIdIsEqual(a.packageId, b.packageId);
|
|
12651
|
-
default:
|
|
12652
|
-
return Debug.assertNever(a);
|
|
12653
|
-
}
|
|
12654
|
-
}
|
|
12655
12626
|
function hasChangesInResolutions(names, newResolutions, getOldResolution, comparer) {
|
|
12656
12627
|
Debug.assert(names.length === newResolutions.length);
|
|
12657
12628
|
for (let i = 0; i < names.length; i++) {
|
|
@@ -13565,7 +13536,8 @@ function createFileDiagnosticFromMessageChain(file, start, length2, messageChain
|
|
|
13565
13536
|
code: messageChain.code,
|
|
13566
13537
|
category: messageChain.category,
|
|
13567
13538
|
messageText: messageChain.next ? messageChain : messageChain.messageText,
|
|
13568
|
-
relatedInformation
|
|
13539
|
+
relatedInformation,
|
|
13540
|
+
canonicalHead: messageChain.canonicalHead
|
|
13569
13541
|
};
|
|
13570
13542
|
}
|
|
13571
13543
|
function createDiagnosticForFileFromMessageChain(sourceFile, messageChain, relatedInformation) {
|
|
@@ -13597,6 +13569,12 @@ function createDiagnosticForRange(sourceFile, range, message) {
|
|
|
13597
13569
|
messageText: message.message
|
|
13598
13570
|
};
|
|
13599
13571
|
}
|
|
13572
|
+
function getCanonicalDiagnostic(message, ...args) {
|
|
13573
|
+
return {
|
|
13574
|
+
code: message.code,
|
|
13575
|
+
messageText: formatMessage(message, ...args)
|
|
13576
|
+
};
|
|
13577
|
+
}
|
|
13600
13578
|
function getSpanOfTokenAtPosition(sourceFile, pos) {
|
|
13601
13579
|
const scanner = createScanner(
|
|
13602
13580
|
sourceFile.languageVersion,
|
|
@@ -17409,7 +17387,9 @@ function compareDiagnostics(d1, d2) {
|
|
|
17409
17387
|
return compareDiagnosticsSkipRelatedInformation(d1, d2) || compareRelatedInformation(d1, d2) || 0 /* EqualTo */;
|
|
17410
17388
|
}
|
|
17411
17389
|
function compareDiagnosticsSkipRelatedInformation(d1, d2) {
|
|
17412
|
-
|
|
17390
|
+
const code1 = getDiagnosticCode(d1);
|
|
17391
|
+
const code2 = getDiagnosticCode(d2);
|
|
17392
|
+
return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) || compareValues(d1.start, d2.start) || compareValues(d1.length, d2.length) || compareValues(code1, code2) || compareMessageText(d1, d2) || 0 /* EqualTo */;
|
|
17413
17393
|
}
|
|
17414
17394
|
function compareRelatedInformation(d1, d2) {
|
|
17415
17395
|
if (!d1.relatedInformation && !d2.relatedInformation) {
|
|
@@ -17423,21 +17403,32 @@ function compareRelatedInformation(d1, d2) {
|
|
|
17423
17403
|
}
|
|
17424
17404
|
return d1.relatedInformation ? -1 /* LessThan */ : 1 /* GreaterThan */;
|
|
17425
17405
|
}
|
|
17426
|
-
function compareMessageText(
|
|
17427
|
-
|
|
17428
|
-
|
|
17406
|
+
function compareMessageText(d1, d2) {
|
|
17407
|
+
let headMsg1 = getDiagnosticMessage(d1);
|
|
17408
|
+
let headMsg2 = getDiagnosticMessage(d2);
|
|
17409
|
+
if (typeof headMsg1 !== "string") {
|
|
17410
|
+
headMsg1 = headMsg1.messageText;
|
|
17429
17411
|
}
|
|
17430
|
-
if (typeof
|
|
17431
|
-
|
|
17412
|
+
if (typeof headMsg2 !== "string") {
|
|
17413
|
+
headMsg2 = headMsg2.messageText;
|
|
17432
17414
|
}
|
|
17433
|
-
|
|
17434
|
-
|
|
17415
|
+
const chain1 = typeof d1.messageText !== "string" ? d1.messageText.next : void 0;
|
|
17416
|
+
const chain2 = typeof d2.messageText !== "string" ? d2.messageText.next : void 0;
|
|
17417
|
+
let res = compareStringsCaseSensitive(headMsg1, headMsg2);
|
|
17418
|
+
if (res) {
|
|
17419
|
+
return res;
|
|
17435
17420
|
}
|
|
17436
|
-
|
|
17421
|
+
res = compareMessageChain(chain1, chain2);
|
|
17437
17422
|
if (res) {
|
|
17438
17423
|
return res;
|
|
17439
17424
|
}
|
|
17440
|
-
|
|
17425
|
+
if (d1.canonicalHead && !d2.canonicalHead) {
|
|
17426
|
+
return -1 /* LessThan */;
|
|
17427
|
+
}
|
|
17428
|
+
if (d2.canonicalHead && !d1.canonicalHead) {
|
|
17429
|
+
return 1 /* GreaterThan */;
|
|
17430
|
+
}
|
|
17431
|
+
return 0 /* EqualTo */;
|
|
17441
17432
|
}
|
|
17442
17433
|
function compareMessageChain(c1, c2) {
|
|
17443
17434
|
if (c1 === void 0 && c2 === void 0) {
|
|
@@ -17491,7 +17482,19 @@ function compareMessageChainContent(c1, c2) {
|
|
|
17491
17482
|
return 0 /* EqualTo */;
|
|
17492
17483
|
}
|
|
17493
17484
|
function diagnosticsEqualityComparer(d1, d2) {
|
|
17494
|
-
|
|
17485
|
+
const code1 = getDiagnosticCode(d1);
|
|
17486
|
+
const code2 = getDiagnosticCode(d2);
|
|
17487
|
+
const msg1 = getDiagnosticMessage(d1);
|
|
17488
|
+
const msg2 = getDiagnosticMessage(d2);
|
|
17489
|
+
return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) === 0 /* EqualTo */ && compareValues(d1.start, d2.start) === 0 /* EqualTo */ && compareValues(d1.length, d2.length) === 0 /* EqualTo */ && compareValues(code1, code2) === 0 /* EqualTo */ && messageTextEqualityComparer(msg1, msg2);
|
|
17490
|
+
}
|
|
17491
|
+
function getDiagnosticCode(d) {
|
|
17492
|
+
var _a;
|
|
17493
|
+
return ((_a = d.canonicalHead) == null ? void 0 : _a.code) || d.code;
|
|
17494
|
+
}
|
|
17495
|
+
function getDiagnosticMessage(d) {
|
|
17496
|
+
var _a;
|
|
17497
|
+
return ((_a = d.canonicalHead) == null ? void 0 : _a.messageText) || d.messageText;
|
|
17495
17498
|
}
|
|
17496
17499
|
function messageTextEqualityComparer(m1, m2) {
|
|
17497
17500
|
const t1 = typeof m1 === "string" ? m1 : m1.messageText;
|
|
@@ -47025,6 +47028,7 @@ function createTypeChecker(host) {
|
|
|
47025
47028
|
);
|
|
47026
47029
|
const message = meaning === 1920 /* Namespace */ || nameArg && typeof nameArg !== "string" && nodeIsSynthesized(nameArg) ? Diagnostics.Cannot_find_namespace_0_Did_you_mean_1 : isUncheckedJS ? Diagnostics.Could_not_find_name_0_Did_you_mean_1 : Diagnostics.Cannot_find_name_0_Did_you_mean_1;
|
|
47027
47030
|
const diagnostic = createError(errorLocation, message, diagnosticName(nameArg), suggestionName);
|
|
47031
|
+
diagnostic.canonicalHead = getCanonicalDiagnostic(nameNotFoundMessage, diagnosticName(nameArg));
|
|
47028
47032
|
addErrorOrSuggestion(!isUncheckedJS, diagnostic);
|
|
47029
47033
|
if (suggestion.valueDeclaration) {
|
|
47030
47034
|
addRelatedInfo(
|
|
@@ -63197,6 +63201,16 @@ function createTypeChecker(host) {
|
|
|
63197
63201
|
errorInfo = elaborateNeverIntersection(errorInfo, originalTarget);
|
|
63198
63202
|
}
|
|
63199
63203
|
if (!headMessage2 && maybeSuppress) {
|
|
63204
|
+
const savedErrorState = captureErrorCalculationState();
|
|
63205
|
+
reportRelationError(headMessage2, source2, target2);
|
|
63206
|
+
let canonical;
|
|
63207
|
+
if (errorInfo && errorInfo !== savedErrorState.errorInfo) {
|
|
63208
|
+
canonical = { code: errorInfo.code, messageText: errorInfo.messageText };
|
|
63209
|
+
}
|
|
63210
|
+
resetErrorInfo(savedErrorState);
|
|
63211
|
+
if (canonical && errorInfo) {
|
|
63212
|
+
errorInfo.canonicalHead = canonical;
|
|
63213
|
+
}
|
|
63200
63214
|
lastSkippedInfo = [source2, target2];
|
|
63201
63215
|
return;
|
|
63202
63216
|
}
|
|
@@ -118954,7 +118968,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
118954
118968
|
const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions;
|
|
118955
118969
|
const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion2 } = createProgramOptions;
|
|
118956
118970
|
let { oldProgram } = createProgramOptions;
|
|
118957
|
-
const reportInvalidIgnoreDeprecations = memoize(() => createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations));
|
|
118958
118971
|
let processingDefaultLibFiles;
|
|
118959
118972
|
let processingOtherFiles;
|
|
118960
118973
|
let files;
|
|
@@ -119241,6 +119254,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
119241
119254
|
resolvedLibProcessing = void 0;
|
|
119242
119255
|
resolvedModulesProcessing = void 0;
|
|
119243
119256
|
resolvedTypeReferenceDirectiveNamesProcessing = void 0;
|
|
119257
|
+
let ignoreDeprecationsVersion;
|
|
119244
119258
|
const program = {
|
|
119245
119259
|
getRootFileNames: () => rootNames,
|
|
119246
119260
|
getSourceFile,
|
|
@@ -120811,12 +120825,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
120811
120825
|
return file;
|
|
120812
120826
|
}
|
|
120813
120827
|
function addFileIncludeReason(file, reason) {
|
|
120814
|
-
if (file)
|
|
120815
|
-
const existing = fileReasons.get(file.path);
|
|
120816
|
-
if (some(existing, (r) => fileIncludeReasonIsEqual(r, reason)))
|
|
120817
|
-
return;
|
|
120828
|
+
if (file)
|
|
120818
120829
|
fileReasons.add(file.path, reason);
|
|
120819
|
-
}
|
|
120820
120830
|
}
|
|
120821
120831
|
function addFileToFilesByName(file, path, fileName, redirectedPath) {
|
|
120822
120832
|
if (redirectedPath) {
|
|
@@ -121496,22 +121506,26 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
121496
121506
|
}
|
|
121497
121507
|
}
|
|
121498
121508
|
function getIgnoreDeprecationsVersion() {
|
|
121499
|
-
|
|
121500
|
-
|
|
121501
|
-
|
|
121502
|
-
|
|
121509
|
+
if (!ignoreDeprecationsVersion) {
|
|
121510
|
+
ignoreDeprecationsVersion = Version.zero;
|
|
121511
|
+
const ignoreDeprecations = options.ignoreDeprecations;
|
|
121512
|
+
if (ignoreDeprecations) {
|
|
121513
|
+
if (ignoreDeprecations === "5.0") {
|
|
121514
|
+
ignoreDeprecationsVersion = new Version(ignoreDeprecations);
|
|
121515
|
+
} else {
|
|
121516
|
+
createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations);
|
|
121517
|
+
}
|
|
121503
121518
|
}
|
|
121504
|
-
reportInvalidIgnoreDeprecations();
|
|
121505
121519
|
}
|
|
121506
|
-
return
|
|
121520
|
+
return ignoreDeprecationsVersion;
|
|
121507
121521
|
}
|
|
121508
121522
|
function checkDeprecations(deprecatedIn, removedIn, createDiagnostic, fn) {
|
|
121509
121523
|
const deprecatedInVersion = new Version(deprecatedIn);
|
|
121510
121524
|
const removedInVersion = new Version(removedIn);
|
|
121511
121525
|
const typescriptVersion = new Version(typeScriptVersion2 || versionMajorMinor);
|
|
121512
|
-
const
|
|
121526
|
+
const ignoreDeprecationsVersion2 = getIgnoreDeprecationsVersion();
|
|
121513
121527
|
const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion) === 1 /* GreaterThan */);
|
|
121514
|
-
const canBeSilenced = !mustBeRemoved &&
|
|
121528
|
+
const canBeSilenced = !mustBeRemoved && ignoreDeprecationsVersion2.compareTo(deprecatedInVersion) === -1 /* LessThan */;
|
|
121515
121529
|
if (mustBeRemoved || canBeSilenced) {
|
|
121516
121530
|
fn((name, value, useInstead) => {
|
|
121517
121531
|
if (mustBeRemoved) {
|
package/lib/typescript.js
CHANGED
|
@@ -572,7 +572,6 @@ __export(typescript_exports, {
|
|
|
572
572
|
factory: () => factory,
|
|
573
573
|
fileExtensionIs: () => fileExtensionIs,
|
|
574
574
|
fileExtensionIsOneOf: () => fileExtensionIsOneOf,
|
|
575
|
-
fileIncludeReasonIsEqual: () => fileIncludeReasonIsEqual,
|
|
576
575
|
fileIncludeReasonToDiagnostics: () => fileIncludeReasonToDiagnostics,
|
|
577
576
|
fileShouldUseJavaScriptRequire: () => fileShouldUseJavaScriptRequire,
|
|
578
577
|
filter: () => filter,
|
|
@@ -686,6 +685,7 @@ __export(typescript_exports, {
|
|
|
686
685
|
getBuildOrderFromAnyBuildOrder: () => getBuildOrderFromAnyBuildOrder,
|
|
687
686
|
getBuilderCreationParameters: () => getBuilderCreationParameters,
|
|
688
687
|
getBuilderFileEmit: () => getBuilderFileEmit,
|
|
688
|
+
getCanonicalDiagnostic: () => getCanonicalDiagnostic,
|
|
689
689
|
getCheckFlags: () => getCheckFlags,
|
|
690
690
|
getClassExtendsHeritageElement: () => getClassExtendsHeritageElement,
|
|
691
691
|
getClassLikeDeclarationOfSymbol: () => getClassLikeDeclarationOfSymbol,
|
|
@@ -16442,35 +16442,6 @@ function packageIdToString(packageId) {
|
|
|
16442
16442
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
16443
16443
|
return oldResolution === newResolution || oldResolution.resolvedTypeReferenceDirective === newResolution.resolvedTypeReferenceDirective || !!oldResolution.resolvedTypeReferenceDirective && !!newResolution.resolvedTypeReferenceDirective && oldResolution.resolvedTypeReferenceDirective.resolvedFileName === newResolution.resolvedTypeReferenceDirective.resolvedFileName && !!oldResolution.resolvedTypeReferenceDirective.primary === !!newResolution.resolvedTypeReferenceDirective.primary && oldResolution.resolvedTypeReferenceDirective.originalPath === newResolution.resolvedTypeReferenceDirective.originalPath;
|
|
16444
16444
|
}
|
|
16445
|
-
function fileIncludeReasonIsEqual(a, b) {
|
|
16446
|
-
if (a === b)
|
|
16447
|
-
return true;
|
|
16448
|
-
if (a.kind !== b.kind)
|
|
16449
|
-
return false;
|
|
16450
|
-
switch (a.kind) {
|
|
16451
|
-
case 0 /* RootFile */:
|
|
16452
|
-
Debug.type(b);
|
|
16453
|
-
return a.index === b.index;
|
|
16454
|
-
case 6 /* LibFile */:
|
|
16455
|
-
Debug.type(b);
|
|
16456
|
-
return a.index === b.index;
|
|
16457
|
-
case 1 /* SourceFromProjectReference */:
|
|
16458
|
-
case 2 /* OutputFromProjectReference */:
|
|
16459
|
-
Debug.type(b);
|
|
16460
|
-
return a.index === b.index;
|
|
16461
|
-
case 3 /* Import */:
|
|
16462
|
-
case 4 /* ReferenceFile */:
|
|
16463
|
-
case 5 /* TypeReferenceDirective */:
|
|
16464
|
-
case 7 /* LibReferenceDirective */:
|
|
16465
|
-
Debug.type(b);
|
|
16466
|
-
return a.file === b.file && a.index === b.index;
|
|
16467
|
-
case 8 /* AutomaticTypeDirectiveFile */:
|
|
16468
|
-
Debug.type(b);
|
|
16469
|
-
return a.typeReference === b.typeReference && packageIdIsEqual(a.packageId, b.packageId);
|
|
16470
|
-
default:
|
|
16471
|
-
return Debug.assertNever(a);
|
|
16472
|
-
}
|
|
16473
|
-
}
|
|
16474
16445
|
function hasChangesInResolutions(names, newResolutions, getOldResolution, comparer) {
|
|
16475
16446
|
Debug.assert(names.length === newResolutions.length);
|
|
16476
16447
|
for (let i = 0; i < names.length; i++) {
|
|
@@ -17490,7 +17461,8 @@ function createFileDiagnosticFromMessageChain(file, start, length2, messageChain
|
|
|
17490
17461
|
code: messageChain.code,
|
|
17491
17462
|
category: messageChain.category,
|
|
17492
17463
|
messageText: messageChain.next ? messageChain : messageChain.messageText,
|
|
17493
|
-
relatedInformation
|
|
17464
|
+
relatedInformation,
|
|
17465
|
+
canonicalHead: messageChain.canonicalHead
|
|
17494
17466
|
};
|
|
17495
17467
|
}
|
|
17496
17468
|
function createDiagnosticForFileFromMessageChain(sourceFile, messageChain, relatedInformation) {
|
|
@@ -17522,6 +17494,12 @@ function createDiagnosticForRange(sourceFile, range, message) {
|
|
|
17522
17494
|
messageText: message.message
|
|
17523
17495
|
};
|
|
17524
17496
|
}
|
|
17497
|
+
function getCanonicalDiagnostic(message, ...args) {
|
|
17498
|
+
return {
|
|
17499
|
+
code: message.code,
|
|
17500
|
+
messageText: formatMessage(message, ...args)
|
|
17501
|
+
};
|
|
17502
|
+
}
|
|
17525
17503
|
function getSpanOfTokenAtPosition(sourceFile, pos) {
|
|
17526
17504
|
const scanner2 = createScanner(
|
|
17527
17505
|
sourceFile.languageVersion,
|
|
@@ -21655,7 +21633,9 @@ function compareDiagnostics(d1, d2) {
|
|
|
21655
21633
|
return compareDiagnosticsSkipRelatedInformation(d1, d2) || compareRelatedInformation(d1, d2) || 0 /* EqualTo */;
|
|
21656
21634
|
}
|
|
21657
21635
|
function compareDiagnosticsSkipRelatedInformation(d1, d2) {
|
|
21658
|
-
|
|
21636
|
+
const code1 = getDiagnosticCode(d1);
|
|
21637
|
+
const code2 = getDiagnosticCode(d2);
|
|
21638
|
+
return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) || compareValues(d1.start, d2.start) || compareValues(d1.length, d2.length) || compareValues(code1, code2) || compareMessageText(d1, d2) || 0 /* EqualTo */;
|
|
21659
21639
|
}
|
|
21660
21640
|
function compareRelatedInformation(d1, d2) {
|
|
21661
21641
|
if (!d1.relatedInformation && !d2.relatedInformation) {
|
|
@@ -21669,21 +21649,32 @@ function compareRelatedInformation(d1, d2) {
|
|
|
21669
21649
|
}
|
|
21670
21650
|
return d1.relatedInformation ? -1 /* LessThan */ : 1 /* GreaterThan */;
|
|
21671
21651
|
}
|
|
21672
|
-
function compareMessageText(
|
|
21673
|
-
|
|
21674
|
-
|
|
21652
|
+
function compareMessageText(d1, d2) {
|
|
21653
|
+
let headMsg1 = getDiagnosticMessage(d1);
|
|
21654
|
+
let headMsg2 = getDiagnosticMessage(d2);
|
|
21655
|
+
if (typeof headMsg1 !== "string") {
|
|
21656
|
+
headMsg1 = headMsg1.messageText;
|
|
21675
21657
|
}
|
|
21676
|
-
if (typeof
|
|
21677
|
-
|
|
21658
|
+
if (typeof headMsg2 !== "string") {
|
|
21659
|
+
headMsg2 = headMsg2.messageText;
|
|
21678
21660
|
}
|
|
21679
|
-
|
|
21680
|
-
|
|
21661
|
+
const chain1 = typeof d1.messageText !== "string" ? d1.messageText.next : void 0;
|
|
21662
|
+
const chain2 = typeof d2.messageText !== "string" ? d2.messageText.next : void 0;
|
|
21663
|
+
let res = compareStringsCaseSensitive(headMsg1, headMsg2);
|
|
21664
|
+
if (res) {
|
|
21665
|
+
return res;
|
|
21681
21666
|
}
|
|
21682
|
-
|
|
21667
|
+
res = compareMessageChain(chain1, chain2);
|
|
21683
21668
|
if (res) {
|
|
21684
21669
|
return res;
|
|
21685
21670
|
}
|
|
21686
|
-
|
|
21671
|
+
if (d1.canonicalHead && !d2.canonicalHead) {
|
|
21672
|
+
return -1 /* LessThan */;
|
|
21673
|
+
}
|
|
21674
|
+
if (d2.canonicalHead && !d1.canonicalHead) {
|
|
21675
|
+
return 1 /* GreaterThan */;
|
|
21676
|
+
}
|
|
21677
|
+
return 0 /* EqualTo */;
|
|
21687
21678
|
}
|
|
21688
21679
|
function compareMessageChain(c1, c2) {
|
|
21689
21680
|
if (c1 === void 0 && c2 === void 0) {
|
|
@@ -21737,7 +21728,19 @@ function compareMessageChainContent(c1, c2) {
|
|
|
21737
21728
|
return 0 /* EqualTo */;
|
|
21738
21729
|
}
|
|
21739
21730
|
function diagnosticsEqualityComparer(d1, d2) {
|
|
21740
|
-
|
|
21731
|
+
const code1 = getDiagnosticCode(d1);
|
|
21732
|
+
const code2 = getDiagnosticCode(d2);
|
|
21733
|
+
const msg1 = getDiagnosticMessage(d1);
|
|
21734
|
+
const msg2 = getDiagnosticMessage(d2);
|
|
21735
|
+
return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) === 0 /* EqualTo */ && compareValues(d1.start, d2.start) === 0 /* EqualTo */ && compareValues(d1.length, d2.length) === 0 /* EqualTo */ && compareValues(code1, code2) === 0 /* EqualTo */ && messageTextEqualityComparer(msg1, msg2);
|
|
21736
|
+
}
|
|
21737
|
+
function getDiagnosticCode(d) {
|
|
21738
|
+
var _a;
|
|
21739
|
+
return ((_a = d.canonicalHead) == null ? void 0 : _a.code) || d.code;
|
|
21740
|
+
}
|
|
21741
|
+
function getDiagnosticMessage(d) {
|
|
21742
|
+
var _a;
|
|
21743
|
+
return ((_a = d.canonicalHead) == null ? void 0 : _a.messageText) || d.messageText;
|
|
21741
21744
|
}
|
|
21742
21745
|
function messageTextEqualityComparer(m1, m2) {
|
|
21743
21746
|
const t1 = typeof m1 === "string" ? m1 : m1.messageText;
|
|
@@ -51856,6 +51859,7 @@ function createTypeChecker(host) {
|
|
|
51856
51859
|
);
|
|
51857
51860
|
const message = meaning === 1920 /* Namespace */ || nameArg && typeof nameArg !== "string" && nodeIsSynthesized(nameArg) ? Diagnostics.Cannot_find_namespace_0_Did_you_mean_1 : isUncheckedJS ? Diagnostics.Could_not_find_name_0_Did_you_mean_1 : Diagnostics.Cannot_find_name_0_Did_you_mean_1;
|
|
51858
51861
|
const diagnostic = createError(errorLocation, message, diagnosticName(nameArg), suggestionName);
|
|
51862
|
+
diagnostic.canonicalHead = getCanonicalDiagnostic(nameNotFoundMessage, diagnosticName(nameArg));
|
|
51859
51863
|
addErrorOrSuggestion(!isUncheckedJS, diagnostic);
|
|
51860
51864
|
if (suggestion.valueDeclaration) {
|
|
51861
51865
|
addRelatedInfo(
|
|
@@ -68028,6 +68032,16 @@ function createTypeChecker(host) {
|
|
|
68028
68032
|
errorInfo = elaborateNeverIntersection(errorInfo, originalTarget);
|
|
68029
68033
|
}
|
|
68030
68034
|
if (!headMessage2 && maybeSuppress) {
|
|
68035
|
+
const savedErrorState = captureErrorCalculationState();
|
|
68036
|
+
reportRelationError(headMessage2, source2, target2);
|
|
68037
|
+
let canonical;
|
|
68038
|
+
if (errorInfo && errorInfo !== savedErrorState.errorInfo) {
|
|
68039
|
+
canonical = { code: errorInfo.code, messageText: errorInfo.messageText };
|
|
68040
|
+
}
|
|
68041
|
+
resetErrorInfo(savedErrorState);
|
|
68042
|
+
if (canonical && errorInfo) {
|
|
68043
|
+
errorInfo.canonicalHead = canonical;
|
|
68044
|
+
}
|
|
68031
68045
|
lastSkippedInfo = [source2, target2];
|
|
68032
68046
|
return;
|
|
68033
68047
|
}
|
|
@@ -124029,7 +124043,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
124029
124043
|
const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions;
|
|
124030
124044
|
const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion3 } = createProgramOptions;
|
|
124031
124045
|
let { oldProgram } = createProgramOptions;
|
|
124032
|
-
const reportInvalidIgnoreDeprecations = memoize(() => createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations));
|
|
124033
124046
|
let processingDefaultLibFiles;
|
|
124034
124047
|
let processingOtherFiles;
|
|
124035
124048
|
let files;
|
|
@@ -124316,6 +124329,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
124316
124329
|
resolvedLibProcessing = void 0;
|
|
124317
124330
|
resolvedModulesProcessing = void 0;
|
|
124318
124331
|
resolvedTypeReferenceDirectiveNamesProcessing = void 0;
|
|
124332
|
+
let ignoreDeprecationsVersion;
|
|
124319
124333
|
const program = {
|
|
124320
124334
|
getRootFileNames: () => rootNames,
|
|
124321
124335
|
getSourceFile,
|
|
@@ -125886,12 +125900,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
125886
125900
|
return file;
|
|
125887
125901
|
}
|
|
125888
125902
|
function addFileIncludeReason(file, reason) {
|
|
125889
|
-
if (file)
|
|
125890
|
-
const existing = fileReasons.get(file.path);
|
|
125891
|
-
if (some(existing, (r) => fileIncludeReasonIsEqual(r, reason)))
|
|
125892
|
-
return;
|
|
125903
|
+
if (file)
|
|
125893
125904
|
fileReasons.add(file.path, reason);
|
|
125894
|
-
}
|
|
125895
125905
|
}
|
|
125896
125906
|
function addFileToFilesByName(file, path, fileName, redirectedPath) {
|
|
125897
125907
|
if (redirectedPath) {
|
|
@@ -126571,22 +126581,26 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
126571
126581
|
}
|
|
126572
126582
|
}
|
|
126573
126583
|
function getIgnoreDeprecationsVersion() {
|
|
126574
|
-
|
|
126575
|
-
|
|
126576
|
-
|
|
126577
|
-
|
|
126584
|
+
if (!ignoreDeprecationsVersion) {
|
|
126585
|
+
ignoreDeprecationsVersion = Version.zero;
|
|
126586
|
+
const ignoreDeprecations = options.ignoreDeprecations;
|
|
126587
|
+
if (ignoreDeprecations) {
|
|
126588
|
+
if (ignoreDeprecations === "5.0") {
|
|
126589
|
+
ignoreDeprecationsVersion = new Version(ignoreDeprecations);
|
|
126590
|
+
} else {
|
|
126591
|
+
createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations);
|
|
126592
|
+
}
|
|
126578
126593
|
}
|
|
126579
|
-
reportInvalidIgnoreDeprecations();
|
|
126580
126594
|
}
|
|
126581
|
-
return
|
|
126595
|
+
return ignoreDeprecationsVersion;
|
|
126582
126596
|
}
|
|
126583
126597
|
function checkDeprecations(deprecatedIn, removedIn, createDiagnostic, fn) {
|
|
126584
126598
|
const deprecatedInVersion = new Version(deprecatedIn);
|
|
126585
126599
|
const removedInVersion = new Version(removedIn);
|
|
126586
126600
|
const typescriptVersion = new Version(typeScriptVersion3 || versionMajorMinor);
|
|
126587
|
-
const
|
|
126601
|
+
const ignoreDeprecationsVersion2 = getIgnoreDeprecationsVersion();
|
|
126588
126602
|
const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion) === 1 /* GreaterThan */);
|
|
126589
|
-
const canBeSilenced = !mustBeRemoved &&
|
|
126603
|
+
const canBeSilenced = !mustBeRemoved && ignoreDeprecationsVersion2.compareTo(deprecatedInVersion) === -1 /* LessThan */;
|
|
126590
126604
|
if (mustBeRemoved || canBeSilenced) {
|
|
126591
126605
|
fn((name, value, useInstead) => {
|
|
126592
126606
|
if (mustBeRemoved) {
|
|
@@ -178385,7 +178399,6 @@ __export(ts_exports2, {
|
|
|
178385
178399
|
factory: () => factory,
|
|
178386
178400
|
fileExtensionIs: () => fileExtensionIs,
|
|
178387
178401
|
fileExtensionIsOneOf: () => fileExtensionIsOneOf,
|
|
178388
|
-
fileIncludeReasonIsEqual: () => fileIncludeReasonIsEqual,
|
|
178389
178402
|
fileIncludeReasonToDiagnostics: () => fileIncludeReasonToDiagnostics,
|
|
178390
178403
|
fileShouldUseJavaScriptRequire: () => fileShouldUseJavaScriptRequire,
|
|
178391
178404
|
filter: () => filter,
|
|
@@ -178499,6 +178512,7 @@ __export(ts_exports2, {
|
|
|
178499
178512
|
getBuildOrderFromAnyBuildOrder: () => getBuildOrderFromAnyBuildOrder,
|
|
178500
178513
|
getBuilderCreationParameters: () => getBuilderCreationParameters,
|
|
178501
178514
|
getBuilderFileEmit: () => getBuilderFileEmit,
|
|
178515
|
+
getCanonicalDiagnostic: () => getCanonicalDiagnostic,
|
|
178502
178516
|
getCheckFlags: () => getCheckFlags,
|
|
178503
178517
|
getClassExtendsHeritageElement: () => getClassExtendsHeritageElement,
|
|
178504
178518
|
getClassLikeDeclarationOfSymbol: () => getClassLikeDeclarationOfSymbol,
|
|
@@ -192813,7 +192827,6 @@ if (typeof console !== "undefined") {
|
|
|
192813
192827
|
factory,
|
|
192814
192828
|
fileExtensionIs,
|
|
192815
192829
|
fileExtensionIsOneOf,
|
|
192816
|
-
fileIncludeReasonIsEqual,
|
|
192817
192830
|
fileIncludeReasonToDiagnostics,
|
|
192818
192831
|
fileShouldUseJavaScriptRequire,
|
|
192819
192832
|
filter,
|
|
@@ -192927,6 +192940,7 @@ if (typeof console !== "undefined") {
|
|
|
192927
192940
|
getBuildOrderFromAnyBuildOrder,
|
|
192928
192941
|
getBuilderCreationParameters,
|
|
192929
192942
|
getBuilderFileEmit,
|
|
192943
|
+
getCanonicalDiagnostic,
|
|
192930
192944
|
getCheckFlags,
|
|
192931
192945
|
getClassExtendsHeritageElement,
|
|
192932
192946
|
getClassLikeDeclarationOfSymbol,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.5.0-pr-
|
|
5
|
+
"version": "5.5.0-pr-58361-3",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|