@typescript-deploys/pr-build 4.9.0-pr-50776-2 → 4.9.0-pr-50976-13
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/cs/diagnosticMessages.generated.json +4 -2
- package/lib/de/diagnosticMessages.generated.json +3 -0
- package/lib/es/diagnosticMessages.generated.json +3 -0
- package/lib/fr/diagnosticMessages.generated.json +4 -2
- package/lib/it/diagnosticMessages.generated.json +4 -2
- package/lib/ja/diagnosticMessages.generated.json +3 -0
- package/lib/ko/diagnosticMessages.generated.json +3 -0
- package/lib/lib.es2015.symbol.wellknown.d.ts +3 -3
- package/lib/lib.es5.d.ts +2 -2
- package/lib/pl/diagnosticMessages.generated.json +4 -2
- package/lib/pt-br/diagnosticMessages.generated.json +3 -0
- package/lib/ru/diagnosticMessages.generated.json +3 -0
- package/lib/tr/diagnosticMessages.generated.json +3 -0
- package/lib/tsc.js +72 -32
- package/lib/tsserver.js +114 -54
- package/lib/tsserverlibrary.d.ts +3 -2
- package/lib/tsserverlibrary.js +114 -54
- package/lib/typescript.d.ts +3 -2
- package/lib/typescript.js +98 -38
- package/lib/typescriptServices.d.ts +3 -2
- package/lib/typescriptServices.js +98 -38
- package/lib/typingsInstaller.js +94 -34
- package/lib/zh-cn/diagnosticMessages.generated.json +4 -2
- package/lib/zh-tw/diagnosticMessages.generated.json +3 -0
- package/package.json +8 -10
package/lib/typingsInstaller.js
CHANGED
|
@@ -89,7 +89,7 @@ var ts;
|
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-insiders.
|
|
92
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-insiders.20220929");
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -3195,11 +3195,13 @@ var ts;
|
|
|
3195
3195
|
// > alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers
|
|
3196
3196
|
// > MUST NOT include leading zeroes.
|
|
3197
3197
|
var prereleaseRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i;
|
|
3198
|
+
var prereleasePartRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i;
|
|
3198
3199
|
// https://semver.org/#spec-item-10
|
|
3199
3200
|
// > Build metadata MAY be denoted by appending a plus sign and a series of dot separated
|
|
3200
3201
|
// > identifiers immediately following the patch or pre-release version. Identifiers MUST
|
|
3201
3202
|
// > comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty.
|
|
3202
3203
|
var buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i;
|
|
3204
|
+
var buildPartRegExp = /^[a-z0-9-]+$/i;
|
|
3203
3205
|
// https://semver.org/#spec-item-9
|
|
3204
3206
|
// > Numeric identifiers MUST NOT include leading zeroes.
|
|
3205
3207
|
var numericIdentifierRegExp = /^(0|[1-9]\d*)$/;
|
|
@@ -3219,13 +3221,15 @@ var ts;
|
|
|
3219
3221
|
ts.Debug.assert(major >= 0, "Invalid argument: major");
|
|
3220
3222
|
ts.Debug.assert(minor >= 0, "Invalid argument: minor");
|
|
3221
3223
|
ts.Debug.assert(patch >= 0, "Invalid argument: patch");
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
+
var prereleaseArray = prerelease ? ts.isArray(prerelease) ? prerelease : prerelease.split(".") : ts.emptyArray;
|
|
3225
|
+
var buildArray = build ? ts.isArray(build) ? build : build.split(".") : ts.emptyArray;
|
|
3226
|
+
ts.Debug.assert(ts.every(prereleaseArray, function (s) { return prereleasePartRegExp.test(s); }), "Invalid argument: prerelease");
|
|
3227
|
+
ts.Debug.assert(ts.every(buildArray, function (s) { return buildPartRegExp.test(s); }), "Invalid argument: build");
|
|
3224
3228
|
this.major = major;
|
|
3225
3229
|
this.minor = minor;
|
|
3226
3230
|
this.patch = patch;
|
|
3227
|
-
this.prerelease =
|
|
3228
|
-
this.build =
|
|
3231
|
+
this.prerelease = prereleaseArray;
|
|
3232
|
+
this.build = buildArray;
|
|
3229
3233
|
}
|
|
3230
3234
|
Version.tryParse = function (text) {
|
|
3231
3235
|
var result = tryParseComponents(text);
|
|
@@ -3264,6 +3268,10 @@ var ts;
|
|
|
3264
3268
|
default: return ts.Debug.assertNever(field);
|
|
3265
3269
|
}
|
|
3266
3270
|
};
|
|
3271
|
+
Version.prototype.with = function (fields) {
|
|
3272
|
+
var _a = fields.major, major = _a === void 0 ? this.major : _a, _b = fields.minor, minor = _b === void 0 ? this.minor : _b, _c = fields.patch, patch = _c === void 0 ? this.patch : _c, _d = fields.prerelease, prerelease = _d === void 0 ? this.prerelease : _d, _e = fields.build, build = _e === void 0 ? this.build : _e;
|
|
3273
|
+
return new Version(major, minor, patch, prerelease, build);
|
|
3274
|
+
};
|
|
3267
3275
|
Version.prototype.toString = function () {
|
|
3268
3276
|
var result = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch);
|
|
3269
3277
|
if (ts.some(this.prerelease))
|
|
@@ -3272,7 +3280,7 @@ var ts;
|
|
|
3272
3280
|
result += "+".concat(this.build.join("."));
|
|
3273
3281
|
return result;
|
|
3274
3282
|
};
|
|
3275
|
-
Version.zero = new Version(0, 0, 0);
|
|
3283
|
+
Version.zero = new Version(0, 0, 0, ["0"]);
|
|
3276
3284
|
return Version;
|
|
3277
3285
|
}());
|
|
3278
3286
|
ts.Version = Version;
|
|
@@ -3355,6 +3363,10 @@ var ts;
|
|
|
3355
3363
|
}
|
|
3356
3364
|
return undefined;
|
|
3357
3365
|
};
|
|
3366
|
+
/**
|
|
3367
|
+
* Tests whether a version matches the range. This is equivalent to `satisfies(version, range, { includePrerelease: true })`.
|
|
3368
|
+
* in `node-semver`.
|
|
3369
|
+
*/
|
|
3358
3370
|
VersionRange.prototype.test = function (version) {
|
|
3359
3371
|
if (typeof version === "string")
|
|
3360
3372
|
version = new Version(version);
|
|
@@ -3465,19 +3477,20 @@ var ts;
|
|
|
3465
3477
|
break;
|
|
3466
3478
|
case "<":
|
|
3467
3479
|
case ">=":
|
|
3468
|
-
comparators.push(createComparator(operator, version))
|
|
3480
|
+
comparators.push(isWildcard(minor) || isWildcard(patch) ? createComparator(operator, version.with({ prerelease: "0" })) :
|
|
3481
|
+
createComparator(operator, version));
|
|
3469
3482
|
break;
|
|
3470
3483
|
case "<=":
|
|
3471
3484
|
case ">":
|
|
3472
|
-
comparators.push(isWildcard(minor) ? createComparator(operator === "<=" ? "<" : ">=", version.increment("major")) :
|
|
3473
|
-
isWildcard(patch) ? createComparator(operator === "<=" ? "<" : ">=", version.increment("minor")) :
|
|
3485
|
+
comparators.push(isWildcard(minor) ? createComparator(operator === "<=" ? "<" : ">=", version.increment("major").with({ prerelease: "0" })) :
|
|
3486
|
+
isWildcard(patch) ? createComparator(operator === "<=" ? "<" : ">=", version.increment("minor").with({ prerelease: "0" })) :
|
|
3474
3487
|
createComparator(operator, version));
|
|
3475
3488
|
break;
|
|
3476
3489
|
case "=":
|
|
3477
3490
|
case undefined:
|
|
3478
3491
|
if (isWildcard(minor) || isWildcard(patch)) {
|
|
3479
|
-
comparators.push(createComparator(">=", version));
|
|
3480
|
-
comparators.push(createComparator("<", version.increment(isWildcard(minor) ? "major" : "minor")));
|
|
3492
|
+
comparators.push(createComparator(">=", version.with({ prerelease: "0" })));
|
|
3493
|
+
comparators.push(createComparator("<", version.increment(isWildcard(minor) ? "major" : "minor").with({ prerelease: "0" })));
|
|
3481
3494
|
}
|
|
3482
3495
|
else {
|
|
3483
3496
|
comparators.push(createComparator("=", version));
|
|
@@ -57587,16 +57600,32 @@ var ts;
|
|
|
57587
57600
|
return getTypeFromTypeNode(typeNode);
|
|
57588
57601
|
}
|
|
57589
57602
|
}
|
|
57603
|
+
function isParameterOfContextSensitiveSignature(symbol) {
|
|
57604
|
+
var decl = symbol.valueDeclaration;
|
|
57605
|
+
if (!decl) {
|
|
57606
|
+
return false;
|
|
57607
|
+
}
|
|
57608
|
+
if (ts.isBindingElement(decl)) {
|
|
57609
|
+
decl = ts.walkUpBindingElementsAndPatterns(decl);
|
|
57610
|
+
}
|
|
57611
|
+
if (ts.isParameter(decl)) {
|
|
57612
|
+
return isContextSensitiveFunctionOrObjectLiteralMethod(decl.parent);
|
|
57613
|
+
}
|
|
57614
|
+
return false;
|
|
57615
|
+
}
|
|
57590
57616
|
function getTypeOfVariableOrParameterOrProperty(symbol) {
|
|
57591
57617
|
var links = getSymbolLinks(symbol);
|
|
57592
57618
|
if (!links.type) {
|
|
57593
57619
|
var type = getTypeOfVariableOrParameterOrPropertyWorker(symbol);
|
|
57594
57620
|
// For a contextually typed parameter it is possible that a type has already
|
|
57595
57621
|
// been assigned (in assignTypeToParameterAndFixTypeParameters), and we want
|
|
57596
|
-
// to preserve this type.
|
|
57597
|
-
|
|
57622
|
+
// to preserve this type. In fact, we need to _prefer_ that type, but it won't
|
|
57623
|
+
// be assigned until contextual typing is complete, so we need to defer in
|
|
57624
|
+
// cases where contextual typing may take place.
|
|
57625
|
+
if (!links.type && !isParameterOfContextSensitiveSignature(symbol)) {
|
|
57598
57626
|
links.type = type;
|
|
57599
57627
|
}
|
|
57628
|
+
return type;
|
|
57600
57629
|
}
|
|
57601
57630
|
return links.type;
|
|
57602
57631
|
}
|
|
@@ -63323,7 +63352,18 @@ var ts;
|
|
|
63323
63352
|
return accessFlags & 1 /* AccessFlags.IncludeUndefined */ ? getUnionType([indexInfo.type, undefinedType]) : indexInfo.type;
|
|
63324
63353
|
}
|
|
63325
63354
|
errorIfWritingToReadonlyIndex(indexInfo);
|
|
63326
|
-
|
|
63355
|
+
// When accessing an enum object with its own type,
|
|
63356
|
+
// e.g. E[E.A] for enum E { A }, undefined shouldn't
|
|
63357
|
+
// be included in the result type
|
|
63358
|
+
if ((accessFlags & 1 /* AccessFlags.IncludeUndefined */) &&
|
|
63359
|
+
!(objectType.symbol &&
|
|
63360
|
+
objectType.symbol.flags & (256 /* SymbolFlags.RegularEnum */ | 128 /* SymbolFlags.ConstEnum */) &&
|
|
63361
|
+
(indexType.symbol &&
|
|
63362
|
+
indexType.flags & 1024 /* TypeFlags.EnumLiteral */ &&
|
|
63363
|
+
getParentOfSymbol(indexType.symbol) === objectType.symbol))) {
|
|
63364
|
+
return getUnionType([indexInfo.type, undefinedType]);
|
|
63365
|
+
}
|
|
63366
|
+
return indexInfo.type;
|
|
63327
63367
|
}
|
|
63328
63368
|
if (indexType.flags & 131072 /* TypeFlags.Never */) {
|
|
63329
63369
|
return neverType;
|
|
@@ -66980,7 +67020,7 @@ var ts;
|
|
|
66980
67020
|
// with another type parameter unless one extends the other. (Remember: comparability is mostly bidirectional!)
|
|
66981
67021
|
var constraint = getConstraintOfTypeParameter(source);
|
|
66982
67022
|
if (constraint && hasNonCircularBaseConstraint(source)) {
|
|
66983
|
-
while (constraint && constraint.flags & 262144 /* TypeFlags.TypeParameter */) {
|
|
67023
|
+
while (constraint && someType(constraint, function (c) { return !!(c.flags & 262144 /* TypeFlags.TypeParameter */); })) {
|
|
66984
67024
|
if (result = isRelatedTo(constraint, target, 1 /* RecursionFlags.Source */, /*reportErrors*/ false)) {
|
|
66985
67025
|
return result;
|
|
66986
67026
|
}
|
|
@@ -70742,7 +70782,7 @@ var ts;
|
|
|
70742
70782
|
}
|
|
70743
70783
|
if (ts.isEntityNameExpression(node.argumentExpression)) {
|
|
70744
70784
|
var symbol = resolveEntityName(node.argumentExpression, 111551 /* SymbolFlags.Value */, /*ignoreErrors*/ true);
|
|
70745
|
-
if (!symbol || !isConstVariable(symbol))
|
|
70785
|
+
if (!symbol || !(isConstVariable(symbol) || (symbol.flags & 8 /* SymbolFlags.EnumMember */)))
|
|
70746
70786
|
return undefined;
|
|
70747
70787
|
var declaration = symbol.valueDeclaration;
|
|
70748
70788
|
if (declaration === undefined)
|
|
@@ -70756,7 +70796,12 @@ var ts;
|
|
|
70756
70796
|
}
|
|
70757
70797
|
if (ts.hasOnlyExpressionInitializer(declaration) && isBlockScopedNameDeclaredBeforeUse(declaration, node.argumentExpression)) {
|
|
70758
70798
|
var initializer = ts.getEffectiveInitializer(declaration);
|
|
70759
|
-
|
|
70799
|
+
if (initializer) {
|
|
70800
|
+
return tryGetNameFromType(getTypeOfExpression(initializer));
|
|
70801
|
+
}
|
|
70802
|
+
if (ts.isEnumMember(declaration)) {
|
|
70803
|
+
return ts.getTextOfPropertyName(declaration.name);
|
|
70804
|
+
}
|
|
70760
70805
|
}
|
|
70761
70806
|
}
|
|
70762
70807
|
return undefined;
|
|
@@ -118820,7 +118865,7 @@ var ts;
|
|
|
118820
118865
|
* Determines if program structure is upto date or needs to be recreated
|
|
118821
118866
|
*/
|
|
118822
118867
|
/* @internal */
|
|
118823
|
-
function isProgramUptoDate(program, rootFileNames, newOptions, getSourceVersion, fileExists,
|
|
118868
|
+
function isProgramUptoDate(program, rootFileNames, newOptions, getSourceVersion, fileExists, hasInvalidatedResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences) {
|
|
118824
118869
|
// If we haven't created a program yet or have changed automatic type directives, then it is not up-to-date
|
|
118825
118870
|
if (!program || (hasChangedAutomaticTypeDirectiveNames === null || hasChangedAutomaticTypeDirectiveNames === void 0 ? void 0 : hasChangedAutomaticTypeDirectiveNames()))
|
|
118826
118871
|
return false;
|
|
@@ -118848,7 +118893,7 @@ var ts;
|
|
|
118848
118893
|
return true;
|
|
118849
118894
|
function sourceFileNotUptoDate(sourceFile) {
|
|
118850
118895
|
return !sourceFileVersionUptoDate(sourceFile) ||
|
|
118851
|
-
|
|
118896
|
+
hasInvalidatedResolutions(sourceFile.path);
|
|
118852
118897
|
}
|
|
118853
118898
|
function sourceFileVersionUptoDate(sourceFile) {
|
|
118854
118899
|
return sourceFile.version === getSourceVersion(sourceFile.resolvedPath, sourceFile.fileName);
|
|
@@ -119094,7 +119139,7 @@ var ts;
|
|
|
119094
119139
|
var moduleResolutionCache;
|
|
119095
119140
|
var typeReferenceDirectiveResolutionCache;
|
|
119096
119141
|
var actualResolveModuleNamesWorker;
|
|
119097
|
-
var
|
|
119142
|
+
var hasInvalidatedResolutions = host.hasInvalidatedResolutions || ts.returnFalse;
|
|
119098
119143
|
if (host.resolveModuleNames) {
|
|
119099
119144
|
actualResolveModuleNamesWorker = function (moduleNames, containingFile, containingFileName, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.checkEachDefined(moduleNames), containingFileName, reusedNames, redirectedReference, options, containingFile).map(function (resolved) {
|
|
119100
119145
|
// An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName.
|
|
@@ -119541,7 +119586,7 @@ var ts;
|
|
|
119541
119586
|
for (var i = 0; i < moduleNames.length; i++) {
|
|
119542
119587
|
var moduleName = moduleNames[i];
|
|
119543
119588
|
// If the source file is unchanged and doesnt have invalidated resolution, reuse the module resolutions
|
|
119544
|
-
if (file === oldSourceFile && !
|
|
119589
|
+
if (file === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path)) {
|
|
119545
119590
|
var oldResolvedModule = ts.getResolvedModule(oldSourceFile, moduleName, getModeForResolutionAtIndex(oldSourceFile, i));
|
|
119546
119591
|
if (oldResolvedModule) {
|
|
119547
119592
|
if (ts.isTraceEnabled(options, host)) {
|
|
@@ -119777,7 +119822,7 @@ var ts;
|
|
|
119777
119822
|
// tentatively approve the file
|
|
119778
119823
|
modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile });
|
|
119779
119824
|
}
|
|
119780
|
-
else if (
|
|
119825
|
+
else if (hasInvalidatedResolutions(oldSourceFile.path)) {
|
|
119781
119826
|
// 'module/types' references could have changed
|
|
119782
119827
|
structureIsReused = 1 /* StructureIsReused.SafeModules */;
|
|
119783
119828
|
// add file to the modified list so that we will resolve it later
|
|
@@ -122521,10 +122566,16 @@ var ts;
|
|
|
122521
122566
|
var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
|
|
122522
122567
|
var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
|
|
122523
122568
|
!ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
|
|
122569
|
+
// We can only reuse emit signatures (i.e. .d.ts signatures) if the .d.ts file is unchanged,
|
|
122570
|
+
// which will eg be depedent on change in options like declarationDir and outDir options are unchanged.
|
|
122571
|
+
// We need to look in oldState.compilerOptions, rather than oldCompilerOptions (i.e.we need to disregard useOldState) because
|
|
122572
|
+
// oldCompilerOptions can be undefined if there was change in say module from None to some other option
|
|
122573
|
+
// which would make useOldState as false since we can now use reference maps that are needed to track what to emit, what to check etc
|
|
122574
|
+
// but that option change does not affect d.ts file name so emitSignatures should still be reused.
|
|
122524
122575
|
var canCopyEmitSignatures = compilerOptions.composite &&
|
|
122525
122576
|
(oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
|
|
122526
122577
|
!outFilePath &&
|
|
122527
|
-
!ts.compilerOptionsAffectDeclarationPath(compilerOptions,
|
|
122578
|
+
!ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldState.compilerOptions);
|
|
122528
122579
|
if (useOldState) {
|
|
122529
122580
|
// Copy old state's changed files set
|
|
122530
122581
|
(_a = oldState.changedFilesSet) === null || _a === void 0 ? void 0 : _a.forEach(function (value) { return state.changedFilesSet.add(value); });
|
|
@@ -123823,7 +123874,7 @@ var ts;
|
|
|
123823
123874
|
invalidateResolutionOfFile: invalidateResolutionOfFile,
|
|
123824
123875
|
invalidateResolutionsOfFailedLookupLocations: invalidateResolutionsOfFailedLookupLocations,
|
|
123825
123876
|
setFilesWithInvalidatedNonRelativeUnresolvedImports: setFilesWithInvalidatedNonRelativeUnresolvedImports,
|
|
123826
|
-
|
|
123877
|
+
createHasInvalidatedResolutions: createHasInvalidatedResolutions,
|
|
123827
123878
|
isFileWithInvalidatedNonRelativeUnresolvedImports: isFileWithInvalidatedNonRelativeUnresolvedImports,
|
|
123828
123879
|
updateTypeRootsWatch: updateTypeRootsWatch,
|
|
123829
123880
|
closeTypeRootsWatch: closeTypeRootsWatch,
|
|
@@ -123878,12 +123929,12 @@ var ts;
|
|
|
123878
123929
|
var value = filesWithInvalidatedNonRelativeUnresolvedImports.get(path);
|
|
123879
123930
|
return !!value && !!value.length;
|
|
123880
123931
|
}
|
|
123881
|
-
function
|
|
123932
|
+
function createHasInvalidatedResolutions(customHasInvalidatedResolutions) {
|
|
123882
123933
|
// Ensure pending resolutions are applied
|
|
123883
123934
|
invalidateResolutionsOfFailedLookupLocations();
|
|
123884
123935
|
var collected = filesWithInvalidatedResolutions;
|
|
123885
123936
|
filesWithInvalidatedResolutions = undefined;
|
|
123886
|
-
return function (path) { return (
|
|
123937
|
+
return function (path) { return customHasInvalidatedResolutions(path) ||
|
|
123887
123938
|
!!(collected === null || collected === void 0 ? void 0 : collected.has(path)) ||
|
|
123888
123939
|
isFileWithInvalidatedNonRelativeUnresolvedImports(path); };
|
|
123889
123940
|
}
|
|
@@ -126264,7 +126315,10 @@ var ts;
|
|
|
126264
126315
|
ts.maybeBind(host, host.getModuleResolutionCache) :
|
|
126265
126316
|
(function () { return resolutionCache.getModuleResolutionCache(); });
|
|
126266
126317
|
var userProvidedResolution = !!host.resolveModuleNames || !!host.resolveTypeReferenceDirectives;
|
|
126267
|
-
|
|
126318
|
+
// All resolutions are invalid if user provided resolutions and didnt supply hasInvalidatedResolutions
|
|
126319
|
+
var customHasInvalidatedResolutions = userProvidedResolution ?
|
|
126320
|
+
ts.maybeBind(host, host.hasInvalidatedResolutions) || ts.returnTrue :
|
|
126321
|
+
ts.returnFalse;
|
|
126268
126322
|
builderProgram = readBuilderProgram(compilerOptions, compilerHost);
|
|
126269
126323
|
synchronizeProgram();
|
|
126270
126324
|
// Update the wild card directory watch
|
|
@@ -126330,10 +126384,9 @@ var ts;
|
|
|
126330
126384
|
resolutionCache.clear();
|
|
126331
126385
|
}
|
|
126332
126386
|
}
|
|
126333
|
-
|
|
126334
|
-
var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution ? userProvidedHasInvalidatedResolution : undefined);
|
|
126387
|
+
var hasInvalidatedResolutions = resolutionCache.createHasInvalidatedResolutions(customHasInvalidatedResolutions);
|
|
126335
126388
|
var _a = ts.changeCompilerHostLikeToUseCache(compilerHost, toPath), originalReadFile = _a.originalReadFile, originalFileExists = _a.originalFileExists, originalDirectoryExists = _a.originalDirectoryExists, originalCreateDirectory = _a.originalCreateDirectory, originalWriteFile = _a.originalWriteFile;
|
|
126336
|
-
if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, function (fileName) { return compilerHost.fileExists(fileName); },
|
|
126389
|
+
if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, function (fileName) { return compilerHost.fileExists(fileName); }, hasInvalidatedResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
|
|
126337
126390
|
if (hasChangedConfigFileParsingErrors) {
|
|
126338
126391
|
if (reportFileChangeDetectedOnCreateProgram) {
|
|
126339
126392
|
reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation);
|
|
@@ -126346,7 +126399,7 @@ var ts;
|
|
|
126346
126399
|
if (reportFileChangeDetectedOnCreateProgram) {
|
|
126347
126400
|
reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation);
|
|
126348
126401
|
}
|
|
126349
|
-
createNewProgram(
|
|
126402
|
+
createNewProgram(hasInvalidatedResolutions);
|
|
126350
126403
|
}
|
|
126351
126404
|
reportFileChangeDetectedOnCreateProgram = false;
|
|
126352
126405
|
if (host.afterProgramCreate && program !== builderProgram) {
|
|
@@ -126359,7 +126412,7 @@ var ts;
|
|
|
126359
126412
|
compilerHost.writeFile = originalWriteFile;
|
|
126360
126413
|
return builderProgram;
|
|
126361
126414
|
}
|
|
126362
|
-
function createNewProgram(
|
|
126415
|
+
function createNewProgram(hasInvalidatedResolutions) {
|
|
126363
126416
|
// Compile the program
|
|
126364
126417
|
writeLog("CreatingProgramWith::");
|
|
126365
126418
|
writeLog(" roots: ".concat(JSON.stringify(rootFileNames)));
|
|
@@ -126370,7 +126423,7 @@ var ts;
|
|
|
126370
126423
|
hasChangedCompilerOptions = false;
|
|
126371
126424
|
hasChangedConfigFileParsingErrors = false;
|
|
126372
126425
|
resolutionCache.startCachingPerDirectoryResolution();
|
|
126373
|
-
compilerHost.
|
|
126426
|
+
compilerHost.hasInvalidatedResolutions = hasInvalidatedResolutions;
|
|
126374
126427
|
compilerHost.hasChangedAutomaticTypeDirectiveNames = hasChangedAutomaticTypeDirectiveNames;
|
|
126375
126428
|
var oldProgram = getCurrentProgram();
|
|
126376
126429
|
builderProgram = createProgram(rootFileNames, compilerOptions, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences);
|
|
@@ -127957,8 +128010,15 @@ var ts;
|
|
|
127957
128010
|
}
|
|
127958
128011
|
if (buildInfo.program) {
|
|
127959
128012
|
// If there are pending changes that are not emitted, project is out of date
|
|
128013
|
+
// When there are syntax errors, changeFileSet will have list of files changed (irrespective of noEmit)
|
|
128014
|
+
// But in case of semantic error we need special treatment.
|
|
128015
|
+
// Checking presence of affectedFilesPendingEmit list is fast and good way to tell if there were semantic errors and file emit was blocked
|
|
128016
|
+
// But if noEmit is true, affectedFilesPendingEmit will have file list even if there are no semantic errors to preserve list of files to be emitted when running with noEmit false
|
|
128017
|
+
// So with noEmit set to true, check on semantic diagnostics needs to be explicit as oppose to when it is false when only files pending emit is sufficient
|
|
127960
128018
|
if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
|
|
127961
|
-
(!project.options.noEmit
|
|
128019
|
+
(!project.options.noEmit ?
|
|
128020
|
+
(_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length :
|
|
128021
|
+
ts.some(buildInfo.program.semanticDiagnosticsPerFile, ts.isArray))) {
|
|
127962
128022
|
return {
|
|
127963
128023
|
type: ts.UpToDateStatusType.OutOfDateBuildInfo,
|
|
127964
128024
|
buildInfoFile: buildInfoPath
|
|
@@ -1427,7 +1427,6 @@
|
|
|
1427
1427
|
"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362": "算术运算左侧必须是 \"any\"、\"number\"、\"bigint\" 或枚举类型。",
|
|
1428
1428
|
"The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779": "赋值表达式的左侧不能是可选属性访问。",
|
|
1429
1429
|
"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364": "赋值表达式的左侧必须是变量或属性访问。",
|
|
1430
|
-
"The_left_hand_side_of_an_in_expression_must_be_a_private_identifier_or_of_type_any_string_number_or__2360": "\"in\" 表达式的左侧必须是专用标识符或其类型必须为 \"any\"、\"string\"、\"number\" 或 \"symbol\"。",
|
|
1431
1430
|
"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358": "\"instanceof\" 表达式左侧必须是 \"any\" 类型、对象类型或类型参数。",
|
|
1432
1431
|
"The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156": "向用户显示消息时所用的区域设置(例如,\"en-us\")",
|
|
1433
1432
|
"The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136": "用于搜索 node_modules 和加载 JavaScript 文件的最大依赖项深度。",
|
|
@@ -1448,7 +1447,6 @@
|
|
|
1448
1447
|
"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064": "异步函数或方法的返回类型必须为全局 Promise<T> 类型。你是否是指写入 \"Promise<{0}>\"?",
|
|
1449
1448
|
"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407": "\"for...in\" 语句右侧必须是 \"any\" 类型、对象类型或类型参数,但此处的类型为“{0}”。",
|
|
1450
1449
|
"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363": "算术运算右侧必须是 \"any\"、\"number\"、\"bigint\" 或枚举类型。",
|
|
1451
|
-
"The_right_hand_side_of_an_in_expression_must_not_be_a_primitive_2361": "\"in\" 表达式的右侧不得是基元。",
|
|
1452
1450
|
"The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "\"instanceof\" 表达式的右侧必须属于类型 \"any\",或属于可分配给 \"Function\" 接口类型的类型。",
|
|
1453
1451
|
"The_root_value_of_a_0_file_must_be_an_object_5092": "“{0}”文件的根值必须是一个对象。",
|
|
1454
1452
|
"The_shadowing_declaration_of_0_is_defined_here_18017": "在此处定义了“{0}”的阴影声明",
|
|
@@ -1476,6 +1474,7 @@
|
|
|
1476
1474
|
"This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "此 JSX 标记的 \"{0}\" 属性需要 \"{1}\" 类型的子级,但提供了多个子级。",
|
|
1477
1475
|
"This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "此 JSX 标记的 \"{0}\" 属性需要类型 \"{1}\",该类型需要多个子级,但仅提供了一个子级。",
|
|
1478
1476
|
"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367": "此比较似乎是无意的,因为类型“{0}”和“{1}”没有重叠。",
|
|
1477
|
+
"This_condition_will_always_return_0_2845": "此条件将始终返回“{0}”。",
|
|
1479
1478
|
"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839": "此条件将始终返回“{0}”,因为 JavaScript 按引用而不是值比较对象。",
|
|
1480
1479
|
"This_condition_will_always_return_true_since_this_0_is_always_defined_2801": "此条件将始终返回 true,因为此“{0}”已始终定义。",
|
|
1481
1480
|
"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774": "此条件将始终返回 true,因为始终定义了函数。你是想改为调用它吗?",
|
|
@@ -1551,6 +1550,7 @@
|
|
|
1551
1550
|
"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412": "类型 “{0}” 不能分配给“exactOptionalPropertyTypes: true”的类型 “{1}”。请考虑将 “undefined” 添加到目标类型。。",
|
|
1552
1551
|
"Type_0_is_not_comparable_to_type_1_2678": "类型“{0}”不可与类型“{1}”进行比较。",
|
|
1553
1552
|
"Type_0_is_not_generic_2315": "类型“{0}”不是泛型类型。",
|
|
1553
|
+
"Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638": "类型 \"{0}\" 可以表示基元值,该值不允许作为“in”运算符的右操作数。",
|
|
1554
1554
|
"Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504": "类型“{0}”必须具有返回异步迭代器的 \"[Symbol.asyncIterator]()\" 方法。",
|
|
1555
1555
|
"Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488": "类型“{0}”必须具有返回迭代器的 \"[Symbol.iterator]()\" 方法。",
|
|
1556
1556
|
"Type_0_provides_no_match_for_the_signature_1_2658": "类型“{0}”提供的内容与签名“{1}”不匹配。",
|
|
@@ -1649,6 +1649,8 @@
|
|
|
1649
1649
|
"Updating_output_of_project_0_6373": "正在更新项目 \"{0}\" 的输出…",
|
|
1650
1650
|
"Updating_output_timestamps_of_project_0_6359": "正在更新项目“{0}”的输出时间戳...",
|
|
1651
1651
|
"Updating_unchanged_output_timestamps_of_project_0_6371": "正在更新项目 \"{0}\" 未更改的输出时间戳…",
|
|
1652
|
+
"Use_0_95174": "使用 `{0}`",
|
|
1653
|
+
"Use_Number_isNaN_in_all_conditions_95175": "在所有条件下使用 `Number.isNaN`。",
|
|
1652
1654
|
"Use_element_access_for_0_95145": "对“{0}”使用元素访问",
|
|
1653
1655
|
"Use_element_access_for_all_undeclared_properties_95146": "对所有未声明的属性使用元素访问。",
|
|
1654
1656
|
"Use_synthetic_default_member_95016": "使用综合的“默认”成员。",
|
|
@@ -1474,6 +1474,7 @@
|
|
|
1474
1474
|
"This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "此 JSX 標籤的 '{0}' 屬性只能有一個 '{1}' 類型的子系,但提供的子系卻有多個。",
|
|
1475
1475
|
"This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "此 JSX 標籤的 '{0}' 屬性需要必須有多個子系的類型 '{1}',但僅提供的子系只有一個。",
|
|
1476
1476
|
"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367": "此比較似乎是無意的,因為類型 '{0}' 和 '{1}' 沒有重疊。",
|
|
1477
|
+
"This_condition_will_always_return_0_2845": "此條件一律傳回 '{0}'。",
|
|
1477
1478
|
"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839": "此條件一律會傳回 '{0}',因為 JavaScript 會依參照而非值比較物件。",
|
|
1478
1479
|
"This_condition_will_always_return_true_since_this_0_is_always_defined_2801": "因為此 '{0}' 一律會被定義,所以此條件一律傳回 True。",
|
|
1479
1480
|
"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774": "因為永遠會定義此函式,所以此條件永遠會傳回 true。您是要改為呼叫該條件嗎?",
|
|
@@ -1648,6 +1649,8 @@
|
|
|
1648
1649
|
"Updating_output_of_project_0_6373": "正在更新專案 '{0}' 的輸出...",
|
|
1649
1650
|
"Updating_output_timestamps_of_project_0_6359": "正在更新專案 '{0}' 的輸出時間戳記...",
|
|
1650
1651
|
"Updating_unchanged_output_timestamps_of_project_0_6371": "正在更新專案 '{0}' 的未更變輸出時間戳記...",
|
|
1652
|
+
"Use_0_95174": "使用 `{0}`。",
|
|
1653
|
+
"Use_Number_isNaN_in_all_conditions_95175": "在所有條件中都使用 'Number.isNaN'。",
|
|
1651
1654
|
"Use_element_access_for_0_95145": "對 '{0}' 使用元素存取",
|
|
1652
1655
|
"Use_element_access_for_all_undeclared_properties_95146": "對所有未宣告的屬性使用元素存取。",
|
|
1653
1656
|
"Use_synthetic_default_member_95016": "使用綜合 'default' 成員。",
|
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": "4.9.0-pr-
|
|
5
|
+
"version": "4.9.0-pr-50976-13",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -29,18 +29,17 @@
|
|
|
29
29
|
"node": ">=4.2.0"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
32
|
+
"bin",
|
|
33
|
+
"lib",
|
|
34
|
+
"!lib/enu",
|
|
35
|
+
"LICENSE.txt",
|
|
36
|
+
"README.md",
|
|
37
|
+
"SECURITY.md",
|
|
38
|
+
"ThirdPartyNoticeText.txt",
|
|
39
39
|
"!**/.gitattributes"
|
|
40
40
|
],
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@octokit/rest": "latest",
|
|
43
|
-
"@types/async": "latest",
|
|
44
43
|
"@types/chai": "latest",
|
|
45
44
|
"@types/fs-extra": "^9.0.13",
|
|
46
45
|
"@types/glob": "latest",
|
|
@@ -62,7 +61,6 @@
|
|
|
62
61
|
"@typescript-eslint/eslint-plugin": "^5.33.1",
|
|
63
62
|
"@typescript-eslint/parser": "^5.33.1",
|
|
64
63
|
"@typescript-eslint/utils": "^5.33.1",
|
|
65
|
-
"async": "latest",
|
|
66
64
|
"azure-devops-node-api": "^11.2.0",
|
|
67
65
|
"chai": "latest",
|
|
68
66
|
"chalk": "^4.1.2",
|