@typescript-deploys/pr-build 4.8.0-pr-49157-6 → 4.8.0-pr-49233-9
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/lib.es2020.intl.d.ts +1 -0
- package/lib/tsc.js +95 -56
- package/lib/tsserver.js +614 -399
- package/lib/tsserverlibrary.js +614 -399
- package/lib/typescript.js +372 -256
- package/lib/typescriptServices.js +372 -256
- package/lib/typingsInstaller.js +119 -69
- package/package.json +1 -1
package/lib/lib.es2020.intl.d.ts
CHANGED
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.8";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-insiders.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-insiders.20220525";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -1862,6 +1862,7 @@ var ts;
|
|
|
1862
1862
|
startsWith(candidate, prefix) &&
|
|
1863
1863
|
endsWith(candidate, suffix);
|
|
1864
1864
|
}
|
|
1865
|
+
ts.isPatternMatch = isPatternMatch;
|
|
1865
1866
|
function and(f, g) {
|
|
1866
1867
|
return function (arg) { return f(arg) && g(arg); };
|
|
1867
1868
|
}
|
|
@@ -35198,15 +35199,19 @@ var ts;
|
|
|
35198
35199
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35199
35200
|
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
35200
35201
|
}
|
|
35201
|
-
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35202
|
-
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
35203
|
-
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
35204
|
-
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions, redirectedReference);
|
|
35205
|
-
}
|
|
35206
35202
|
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
35207
35203
|
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
35208
35204
|
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
35209
35205
|
var tsconfigExtensions = [Extensions.TSConfig];
|
|
35206
|
+
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35207
|
+
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
35208
|
+
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
35209
|
+
var extensions = compilerOptions.noDtsResolution ? [Extensions.TsOnly, Extensions.JavaScript] : tsExtensions;
|
|
35210
|
+
if (compilerOptions.resolveJsonModule) {
|
|
35211
|
+
extensions = __spreadArray(__spreadArray([], extensions, true), [Extensions.Json], false);
|
|
35212
|
+
}
|
|
35213
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, extensions, redirectedReference);
|
|
35214
|
+
}
|
|
35210
35215
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
35211
35216
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, undefined, jsOnlyExtensions, undefined);
|
|
35212
35217
|
}
|
|
@@ -51630,7 +51635,7 @@ var ts;
|
|
|
51630
51635
|
function substituteIndexedMappedType(objectType, index) {
|
|
51631
51636
|
var mapper = createTypeMapper([getTypeParameterFromMappedType(objectType)], [index]);
|
|
51632
51637
|
var templateMapper = combineTypeMappers(objectType.mapper, mapper);
|
|
51633
|
-
return instantiateType(getTemplateTypeFromMappedType(objectType), templateMapper);
|
|
51638
|
+
return instantiateType(getTemplateTypeFromMappedType(objectType.target || objectType), templateMapper);
|
|
51634
51639
|
}
|
|
51635
51640
|
function getIndexedAccessType(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) {
|
|
51636
51641
|
if (accessFlags === void 0) { accessFlags = 0; }
|
|
@@ -60319,7 +60324,7 @@ var ts;
|
|
|
60319
60324
|
if (result) {
|
|
60320
60325
|
return result;
|
|
60321
60326
|
}
|
|
60322
|
-
if (!(contextFlags & 8) && ts.isBindingPattern(declaration.name)) {
|
|
60327
|
+
if (!(contextFlags & 8) && ts.isBindingPattern(declaration.name) && declaration.name.elements.length > 0) {
|
|
60323
60328
|
return getTypeFromBindingPattern(declaration.name, true, false);
|
|
60324
60329
|
}
|
|
60325
60330
|
}
|
|
@@ -60736,16 +60741,14 @@ var ts;
|
|
|
60736
60741
|
function instantiateContextualType(contextualType, node, contextFlags) {
|
|
60737
60742
|
if (contextualType && maybeTypeOfKind(contextualType, 465829888)) {
|
|
60738
60743
|
var inferenceContext = getInferenceContext(node);
|
|
60739
|
-
if (inferenceContext && ts.some(inferenceContext.inferences, hasInferenceCandidates)) {
|
|
60740
|
-
|
|
60741
|
-
|
|
60742
|
-
|
|
60743
|
-
|
|
60744
|
-
|
|
60745
|
-
|
|
60746
|
-
|
|
60747
|
-
type;
|
|
60748
|
-
}
|
|
60744
|
+
if (inferenceContext && contextFlags & 1 && ts.some(inferenceContext.inferences, hasInferenceCandidates)) {
|
|
60745
|
+
return instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
|
|
60746
|
+
}
|
|
60747
|
+
if (inferenceContext === null || inferenceContext === void 0 ? void 0 : inferenceContext.returnMapper) {
|
|
60748
|
+
var type = instantiateInstantiableTypes(contextualType, inferenceContext.returnMapper);
|
|
60749
|
+
return type.flags & 1048576 && containsType(type.types, regularFalseType) && containsType(type.types, regularTrueType) ?
|
|
60750
|
+
filterType(type, function (t) { return t !== regularFalseType && t !== regularTrueType; }) :
|
|
60751
|
+
type;
|
|
60749
60752
|
}
|
|
60750
60753
|
}
|
|
60751
60754
|
return contextualType;
|
|
@@ -62899,18 +62902,22 @@ var ts;
|
|
|
62899
62902
|
return inferJsxTypeArguments(node, signature, checkMode, context);
|
|
62900
62903
|
}
|
|
62901
62904
|
if (node.kind !== 165) {
|
|
62902
|
-
var
|
|
62905
|
+
var skipBindingPatterns = ts.every(signature.typeParameters, function (p) { return !!getDefaultFromTypeParameter(p); });
|
|
62906
|
+
var contextualType = getContextualType(node, skipBindingPatterns ? 8 : 0);
|
|
62903
62907
|
if (contextualType) {
|
|
62904
62908
|
var inferenceTargetType = getReturnTypeOfSignature(signature);
|
|
62905
62909
|
if (couldContainTypeVariables(inferenceTargetType)) {
|
|
62906
62910
|
var outerContext = getInferenceContext(node);
|
|
62907
|
-
var
|
|
62908
|
-
|
|
62909
|
-
|
|
62910
|
-
|
|
62911
|
-
|
|
62912
|
-
|
|
62913
|
-
|
|
62911
|
+
var isFromBindingPattern = !skipBindingPatterns && getContextualType(node, 8) !== contextualType;
|
|
62912
|
+
if (!isFromBindingPattern) {
|
|
62913
|
+
var outerMapper = getMapperFromContext(cloneInferenceContext(outerContext, 1));
|
|
62914
|
+
var instantiatedType = instantiateType(contextualType, outerMapper);
|
|
62915
|
+
var contextualSignature = getSingleCallSignature(instantiatedType);
|
|
62916
|
+
var inferenceSourceType = contextualSignature && contextualSignature.typeParameters ?
|
|
62917
|
+
getOrCreateTypeFromSignature(getSignatureInstantiationWithoutFillingInTypeArguments(contextualSignature, contextualSignature.typeParameters)) :
|
|
62918
|
+
instantiatedType;
|
|
62919
|
+
inferTypes(context.inferences, inferenceSourceType, inferenceTargetType, 128);
|
|
62920
|
+
}
|
|
62914
62921
|
var returnContext = createInferenceContext(signature.typeParameters, signature, context.flags);
|
|
62915
62922
|
var returnSourceType = instantiateType(contextualType, outerContext && outerContext.returnMapper);
|
|
62916
62923
|
inferTypes(returnContext.inferences, returnSourceType, inferenceTargetType);
|
|
@@ -87834,7 +87841,7 @@ var ts;
|
|
|
87834
87841
|
function visitor(node) {
|
|
87835
87842
|
switch (node.kind) {
|
|
87836
87843
|
case 265:
|
|
87837
|
-
return ts.
|
|
87844
|
+
return ts.getEmitModuleKind(compilerOptions) >= ts.ModuleKind.Node16 ? visitImportEqualsDeclaration(node) : undefined;
|
|
87838
87845
|
case 271:
|
|
87839
87846
|
return visitExportAssignment(node);
|
|
87840
87847
|
case 272:
|
|
@@ -95544,7 +95551,7 @@ var ts;
|
|
|
95544
95551
|
originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
|
|
95545
95552
|
};
|
|
95546
95553
|
}
|
|
95547
|
-
if (originalDirectoryExists
|
|
95554
|
+
if (originalDirectoryExists) {
|
|
95548
95555
|
host.directoryExists = function (directory) {
|
|
95549
95556
|
var key = toPath(directory);
|
|
95550
95557
|
var value = directoryExistsCache.get(key);
|
|
@@ -95554,11 +95561,13 @@ var ts;
|
|
|
95554
95561
|
directoryExistsCache.set(key, !!newValue);
|
|
95555
95562
|
return newValue;
|
|
95556
95563
|
};
|
|
95557
|
-
|
|
95558
|
-
|
|
95559
|
-
|
|
95560
|
-
|
|
95561
|
-
|
|
95564
|
+
if (originalCreateDirectory) {
|
|
95565
|
+
host.createDirectory = function (directory) {
|
|
95566
|
+
var key = toPath(directory);
|
|
95567
|
+
directoryExistsCache.delete(key);
|
|
95568
|
+
originalCreateDirectory.call(host, directory);
|
|
95569
|
+
};
|
|
95570
|
+
}
|
|
95562
95571
|
}
|
|
95563
95572
|
return {
|
|
95564
95573
|
originalReadFile: originalReadFile,
|
|
@@ -102739,7 +102748,6 @@ var ts;
|
|
|
102739
102748
|
allProjectBuildPending: true,
|
|
102740
102749
|
needsSummary: true,
|
|
102741
102750
|
watchAllProjectsPending: watch,
|
|
102742
|
-
currentInvalidatedProject: undefined,
|
|
102743
102751
|
watch: watch,
|
|
102744
102752
|
allWatchedWildcardDirectories: new ts.Map(),
|
|
102745
102753
|
allWatchedInputFiles: new ts.Map(),
|
|
@@ -102964,7 +102972,6 @@ var ts;
|
|
|
102964
102972
|
})(InvalidatedProjectKind = ts.InvalidatedProjectKind || (ts.InvalidatedProjectKind = {}));
|
|
102965
102973
|
function doneInvalidatedProject(state, projectPath) {
|
|
102966
102974
|
state.projectPendingBuild.delete(projectPath);
|
|
102967
|
-
state.currentInvalidatedProject = undefined;
|
|
102968
102975
|
return state.diagnostics.has(projectPath) ?
|
|
102969
102976
|
ts.ExitStatus.DiagnosticsPresent_OutputsSkipped :
|
|
102970
102977
|
ts.ExitStatus.Success;
|
|
@@ -103299,16 +103306,11 @@ var ts;
|
|
|
103299
103306
|
!!ts.getConfigFileParsingDiagnostics(config).length ||
|
|
103300
103307
|
!ts.isIncrementalCompilation(config.options);
|
|
103301
103308
|
}
|
|
103302
|
-
function
|
|
103309
|
+
function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
|
|
103303
103310
|
if (!state.projectPendingBuild.size)
|
|
103304
103311
|
return undefined;
|
|
103305
103312
|
if (isCircularBuildOrder(buildOrder))
|
|
103306
103313
|
return undefined;
|
|
103307
|
-
if (state.currentInvalidatedProject) {
|
|
103308
|
-
return ts.arrayIsEqualTo(state.currentInvalidatedProject.buildOrder, buildOrder) ?
|
|
103309
|
-
state.currentInvalidatedProject :
|
|
103310
|
-
undefined;
|
|
103311
|
-
}
|
|
103312
103314
|
var options = state.options, projectPendingBuild = state.projectPendingBuild;
|
|
103313
103315
|
for (var projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) {
|
|
103314
103316
|
var project = buildOrder[projectIndex];
|
|
@@ -103340,9 +103342,9 @@ var ts;
|
|
|
103340
103342
|
watchPackageJsonFiles(state, project, projectPath, config);
|
|
103341
103343
|
}
|
|
103342
103344
|
var status = getUpToDateStatus(state, config, projectPath);
|
|
103343
|
-
verboseReportProjectStatus(state, project, status);
|
|
103344
103345
|
if (!options.force) {
|
|
103345
103346
|
if (status.type === ts.UpToDateStatusType.UpToDate) {
|
|
103347
|
+
verboseReportProjectStatus(state, project, status);
|
|
103346
103348
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103347
103349
|
projectPendingBuild.delete(projectPath);
|
|
103348
103350
|
if (options.dry) {
|
|
@@ -103352,10 +103354,18 @@ var ts;
|
|
|
103352
103354
|
}
|
|
103353
103355
|
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
|
|
103354
103356
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103355
|
-
return
|
|
103357
|
+
return {
|
|
103358
|
+
kind: InvalidatedProjectKind.UpdateOutputFileStamps,
|
|
103359
|
+
status: status,
|
|
103360
|
+
project: project,
|
|
103361
|
+
projectPath: projectPath,
|
|
103362
|
+
projectIndex: projectIndex,
|
|
103363
|
+
config: config
|
|
103364
|
+
};
|
|
103356
103365
|
}
|
|
103357
103366
|
}
|
|
103358
103367
|
if (status.type === ts.UpToDateStatusType.UpstreamBlocked) {
|
|
103368
|
+
verboseReportProjectStatus(state, project, status);
|
|
103359
103369
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103360
103370
|
projectPendingBuild.delete(projectPath);
|
|
103361
103371
|
if (options.verbose) {
|
|
@@ -103366,16 +103376,36 @@ var ts;
|
|
|
103366
103376
|
continue;
|
|
103367
103377
|
}
|
|
103368
103378
|
if (status.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
103379
|
+
verboseReportProjectStatus(state, project, status);
|
|
103369
103380
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103370
103381
|
projectPendingBuild.delete(projectPath);
|
|
103371
103382
|
continue;
|
|
103372
103383
|
}
|
|
103373
|
-
return
|
|
103374
|
-
|
|
103375
|
-
|
|
103384
|
+
return {
|
|
103385
|
+
kind: needsBuild(state, status, config) ?
|
|
103386
|
+
InvalidatedProjectKind.Build :
|
|
103387
|
+
InvalidatedProjectKind.UpdateBundle,
|
|
103388
|
+
status: status,
|
|
103389
|
+
project: project,
|
|
103390
|
+
projectPath: projectPath,
|
|
103391
|
+
projectIndex: projectIndex,
|
|
103392
|
+
config: config,
|
|
103393
|
+
};
|
|
103376
103394
|
}
|
|
103377
103395
|
return undefined;
|
|
103378
103396
|
}
|
|
103397
|
+
function createInvalidatedProjectWithInfo(state, info, buildOrder) {
|
|
103398
|
+
verboseReportProjectStatus(state, info.project, info.status);
|
|
103399
|
+
return info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps ?
|
|
103400
|
+
createBuildOrUpdateInvalidedProject(info.kind, state, info.project, info.projectPath, info.projectIndex, info.config, buildOrder) :
|
|
103401
|
+
createUpdateOutputFileStampsProject(state, info.project, info.projectPath, info.config, buildOrder);
|
|
103402
|
+
}
|
|
103403
|
+
function getNextInvalidatedProject(state, buildOrder, reportQueue) {
|
|
103404
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue);
|
|
103405
|
+
if (!info)
|
|
103406
|
+
return info;
|
|
103407
|
+
return createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
103408
|
+
}
|
|
103379
103409
|
function listEmittedFile(_a, proj, file) {
|
|
103380
103410
|
var write = _a.write;
|
|
103381
103411
|
if (write && proj.options.listEmittedFiles) {
|
|
@@ -103779,9 +103809,9 @@ var ts;
|
|
|
103779
103809
|
function invalidateProjectAndScheduleBuilds(state, resolvedPath, reloadLevel) {
|
|
103780
103810
|
state.reportFileChangeDetected = true;
|
|
103781
103811
|
invalidateProject(state, resolvedPath, reloadLevel);
|
|
103782
|
-
scheduleBuildInvalidatedProject(state);
|
|
103812
|
+
scheduleBuildInvalidatedProject(state, 250, true);
|
|
103783
103813
|
}
|
|
103784
|
-
function scheduleBuildInvalidatedProject(state) {
|
|
103814
|
+
function scheduleBuildInvalidatedProject(state, time, changeDetected) {
|
|
103785
103815
|
var hostWithWatch = state.hostWithWatch;
|
|
103786
103816
|
if (!hostWithWatch.setTimeout || !hostWithWatch.clearTimeout) {
|
|
103787
103817
|
return;
|
|
@@ -103789,24 +103819,35 @@ var ts;
|
|
|
103789
103819
|
if (state.timerToBuildInvalidatedProject) {
|
|
103790
103820
|
hostWithWatch.clearTimeout(state.timerToBuildInvalidatedProject);
|
|
103791
103821
|
}
|
|
103792
|
-
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject,
|
|
103822
|
+
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
|
|
103793
103823
|
}
|
|
103794
|
-
function buildNextInvalidatedProject(state) {
|
|
103824
|
+
function buildNextInvalidatedProject(state, changeDetected) {
|
|
103795
103825
|
state.timerToBuildInvalidatedProject = undefined;
|
|
103796
103826
|
if (state.reportFileChangeDetected) {
|
|
103797
103827
|
state.reportFileChangeDetected = false;
|
|
103798
103828
|
state.projectErrorsReported.clear();
|
|
103799
103829
|
reportWatchStatus(state, ts.Diagnostics.File_change_detected_Starting_incremental_compilation);
|
|
103800
103830
|
}
|
|
103831
|
+
var projectsBuilt = 0;
|
|
103801
103832
|
var buildOrder = getBuildOrder(state);
|
|
103802
103833
|
var invalidatedProject = getNextInvalidatedProject(state, buildOrder, false);
|
|
103803
103834
|
if (invalidatedProject) {
|
|
103804
103835
|
invalidatedProject.done();
|
|
103805
|
-
|
|
103806
|
-
|
|
103807
|
-
|
|
103836
|
+
projectsBuilt++;
|
|
103837
|
+
while (state.projectPendingBuild.size) {
|
|
103838
|
+
if (state.timerToBuildInvalidatedProject)
|
|
103839
|
+
return;
|
|
103840
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, false);
|
|
103841
|
+
if (!info)
|
|
103842
|
+
break;
|
|
103843
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps && (changeDetected || projectsBuilt === 5)) {
|
|
103844
|
+
scheduleBuildInvalidatedProject(state, 100, false);
|
|
103845
|
+
return;
|
|
103808
103846
|
}
|
|
103809
|
-
|
|
103847
|
+
var project = createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
103848
|
+
project.done();
|
|
103849
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps)
|
|
103850
|
+
projectsBuilt++;
|
|
103810
103851
|
}
|
|
103811
103852
|
}
|
|
103812
103853
|
disableCache(state);
|
|
@@ -103906,8 +103947,6 @@ var ts;
|
|
|
103906
103947
|
return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath);
|
|
103907
103948
|
},
|
|
103908
103949
|
invalidateProject: function (configFilePath, reloadLevel) { return invalidateProject(state, configFilePath, reloadLevel || ts.ConfigFileProgramReloadLevel.None); },
|
|
103909
|
-
buildNextInvalidatedProject: function () { return buildNextInvalidatedProject(state); },
|
|
103910
|
-
getAllParsedConfigs: function () { return ts.arrayFrom(ts.mapDefinedIterator(state.configFileCache.values(), function (config) { return isParsedCommandLine(config) ? config : undefined; })); },
|
|
103911
103950
|
close: function () { return stopWatching(state); },
|
|
103912
103951
|
};
|
|
103913
103952
|
}
|