typescript 4.8.0-dev.20220523 → 4.8.0-dev.20220524
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 +55 -25
- package/lib/tsserver.js +58 -27
- package/lib/tsserverlibrary.js +58 -27
- package/lib/typescript.js +58 -27
- package/lib/typescriptServices.js +58 -27
- package/lib/typingsInstaller.js +58 -27
- package/package.json +1 -1
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-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220524";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -51631,7 +51631,7 @@ var ts;
|
|
|
51631
51631
|
function substituteIndexedMappedType(objectType, index) {
|
|
51632
51632
|
var mapper = createTypeMapper([getTypeParameterFromMappedType(objectType)], [index]);
|
|
51633
51633
|
var templateMapper = combineTypeMappers(objectType.mapper, mapper);
|
|
51634
|
-
return instantiateType(getTemplateTypeFromMappedType(objectType), templateMapper);
|
|
51634
|
+
return instantiateType(getTemplateTypeFromMappedType(objectType.target || objectType), templateMapper);
|
|
51635
51635
|
}
|
|
51636
51636
|
function getIndexedAccessType(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) {
|
|
51637
51637
|
if (accessFlags === void 0) { accessFlags = 0; }
|
|
@@ -102742,7 +102742,6 @@ var ts;
|
|
|
102742
102742
|
allProjectBuildPending: true,
|
|
102743
102743
|
needsSummary: true,
|
|
102744
102744
|
watchAllProjectsPending: watch,
|
|
102745
|
-
currentInvalidatedProject: undefined,
|
|
102746
102745
|
watch: watch,
|
|
102747
102746
|
allWatchedWildcardDirectories: new ts.Map(),
|
|
102748
102747
|
allWatchedInputFiles: new ts.Map(),
|
|
@@ -102967,7 +102966,6 @@ var ts;
|
|
|
102967
102966
|
})(InvalidatedProjectKind = ts.InvalidatedProjectKind || (ts.InvalidatedProjectKind = {}));
|
|
102968
102967
|
function doneInvalidatedProject(state, projectPath) {
|
|
102969
102968
|
state.projectPendingBuild.delete(projectPath);
|
|
102970
|
-
state.currentInvalidatedProject = undefined;
|
|
102971
102969
|
return state.diagnostics.has(projectPath) ?
|
|
102972
102970
|
ts.ExitStatus.DiagnosticsPresent_OutputsSkipped :
|
|
102973
102971
|
ts.ExitStatus.Success;
|
|
@@ -103302,16 +103300,11 @@ var ts;
|
|
|
103302
103300
|
!!ts.getConfigFileParsingDiagnostics(config).length ||
|
|
103303
103301
|
!ts.isIncrementalCompilation(config.options);
|
|
103304
103302
|
}
|
|
103305
|
-
function
|
|
103303
|
+
function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
|
|
103306
103304
|
if (!state.projectPendingBuild.size)
|
|
103307
103305
|
return undefined;
|
|
103308
103306
|
if (isCircularBuildOrder(buildOrder))
|
|
103309
103307
|
return undefined;
|
|
103310
|
-
if (state.currentInvalidatedProject) {
|
|
103311
|
-
return ts.arrayIsEqualTo(state.currentInvalidatedProject.buildOrder, buildOrder) ?
|
|
103312
|
-
state.currentInvalidatedProject :
|
|
103313
|
-
undefined;
|
|
103314
|
-
}
|
|
103315
103308
|
var options = state.options, projectPendingBuild = state.projectPendingBuild;
|
|
103316
103309
|
for (var projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) {
|
|
103317
103310
|
var project = buildOrder[projectIndex];
|
|
@@ -103343,9 +103336,9 @@ var ts;
|
|
|
103343
103336
|
watchPackageJsonFiles(state, project, projectPath, config);
|
|
103344
103337
|
}
|
|
103345
103338
|
var status = getUpToDateStatus(state, config, projectPath);
|
|
103346
|
-
verboseReportProjectStatus(state, project, status);
|
|
103347
103339
|
if (!options.force) {
|
|
103348
103340
|
if (status.type === ts.UpToDateStatusType.UpToDate) {
|
|
103341
|
+
verboseReportProjectStatus(state, project, status);
|
|
103349
103342
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103350
103343
|
projectPendingBuild.delete(projectPath);
|
|
103351
103344
|
if (options.dry) {
|
|
@@ -103355,10 +103348,18 @@ var ts;
|
|
|
103355
103348
|
}
|
|
103356
103349
|
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
|
|
103357
103350
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103358
|
-
return
|
|
103351
|
+
return {
|
|
103352
|
+
kind: InvalidatedProjectKind.UpdateOutputFileStamps,
|
|
103353
|
+
status: status,
|
|
103354
|
+
project: project,
|
|
103355
|
+
projectPath: projectPath,
|
|
103356
|
+
projectIndex: projectIndex,
|
|
103357
|
+
config: config
|
|
103358
|
+
};
|
|
103359
103359
|
}
|
|
103360
103360
|
}
|
|
103361
103361
|
if (status.type === ts.UpToDateStatusType.UpstreamBlocked) {
|
|
103362
|
+
verboseReportProjectStatus(state, project, status);
|
|
103362
103363
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103363
103364
|
projectPendingBuild.delete(projectPath);
|
|
103364
103365
|
if (options.verbose) {
|
|
@@ -103369,16 +103370,36 @@ var ts;
|
|
|
103369
103370
|
continue;
|
|
103370
103371
|
}
|
|
103371
103372
|
if (status.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
103373
|
+
verboseReportProjectStatus(state, project, status);
|
|
103372
103374
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103373
103375
|
projectPendingBuild.delete(projectPath);
|
|
103374
103376
|
continue;
|
|
103375
103377
|
}
|
|
103376
|
-
return
|
|
103377
|
-
|
|
103378
|
-
|
|
103378
|
+
return {
|
|
103379
|
+
kind: needsBuild(state, status, config) ?
|
|
103380
|
+
InvalidatedProjectKind.Build :
|
|
103381
|
+
InvalidatedProjectKind.UpdateBundle,
|
|
103382
|
+
status: status,
|
|
103383
|
+
project: project,
|
|
103384
|
+
projectPath: projectPath,
|
|
103385
|
+
projectIndex: projectIndex,
|
|
103386
|
+
config: config,
|
|
103387
|
+
};
|
|
103379
103388
|
}
|
|
103380
103389
|
return undefined;
|
|
103381
103390
|
}
|
|
103391
|
+
function createInvalidatedProjectWithInfo(state, info, buildOrder) {
|
|
103392
|
+
verboseReportProjectStatus(state, info.project, info.status);
|
|
103393
|
+
return info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps ?
|
|
103394
|
+
createBuildOrUpdateInvalidedProject(info.kind, state, info.project, info.projectPath, info.projectIndex, info.config, buildOrder) :
|
|
103395
|
+
createUpdateOutputFileStampsProject(state, info.project, info.projectPath, info.config, buildOrder);
|
|
103396
|
+
}
|
|
103397
|
+
function getNextInvalidatedProject(state, buildOrder, reportQueue) {
|
|
103398
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue);
|
|
103399
|
+
if (!info)
|
|
103400
|
+
return info;
|
|
103401
|
+
return createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
103402
|
+
}
|
|
103382
103403
|
function listEmittedFile(_a, proj, file) {
|
|
103383
103404
|
var write = _a.write;
|
|
103384
103405
|
if (write && proj.options.listEmittedFiles) {
|
|
@@ -103782,9 +103803,9 @@ var ts;
|
|
|
103782
103803
|
function invalidateProjectAndScheduleBuilds(state, resolvedPath, reloadLevel) {
|
|
103783
103804
|
state.reportFileChangeDetected = true;
|
|
103784
103805
|
invalidateProject(state, resolvedPath, reloadLevel);
|
|
103785
|
-
scheduleBuildInvalidatedProject(state);
|
|
103806
|
+
scheduleBuildInvalidatedProject(state, 250, true);
|
|
103786
103807
|
}
|
|
103787
|
-
function scheduleBuildInvalidatedProject(state) {
|
|
103808
|
+
function scheduleBuildInvalidatedProject(state, time, changeDetected) {
|
|
103788
103809
|
var hostWithWatch = state.hostWithWatch;
|
|
103789
103810
|
if (!hostWithWatch.setTimeout || !hostWithWatch.clearTimeout) {
|
|
103790
103811
|
return;
|
|
@@ -103792,24 +103813,35 @@ var ts;
|
|
|
103792
103813
|
if (state.timerToBuildInvalidatedProject) {
|
|
103793
103814
|
hostWithWatch.clearTimeout(state.timerToBuildInvalidatedProject);
|
|
103794
103815
|
}
|
|
103795
|
-
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject,
|
|
103816
|
+
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
|
|
103796
103817
|
}
|
|
103797
|
-
function buildNextInvalidatedProject(state) {
|
|
103818
|
+
function buildNextInvalidatedProject(state, changeDetected) {
|
|
103798
103819
|
state.timerToBuildInvalidatedProject = undefined;
|
|
103799
103820
|
if (state.reportFileChangeDetected) {
|
|
103800
103821
|
state.reportFileChangeDetected = false;
|
|
103801
103822
|
state.projectErrorsReported.clear();
|
|
103802
103823
|
reportWatchStatus(state, ts.Diagnostics.File_change_detected_Starting_incremental_compilation);
|
|
103803
103824
|
}
|
|
103825
|
+
var projectsBuilt = 0;
|
|
103804
103826
|
var buildOrder = getBuildOrder(state);
|
|
103805
103827
|
var invalidatedProject = getNextInvalidatedProject(state, buildOrder, false);
|
|
103806
103828
|
if (invalidatedProject) {
|
|
103807
103829
|
invalidatedProject.done();
|
|
103808
|
-
|
|
103809
|
-
|
|
103810
|
-
|
|
103830
|
+
projectsBuilt++;
|
|
103831
|
+
while (state.projectPendingBuild.size) {
|
|
103832
|
+
if (state.timerToBuildInvalidatedProject)
|
|
103833
|
+
return;
|
|
103834
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, false);
|
|
103835
|
+
if (!info)
|
|
103836
|
+
break;
|
|
103837
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps && (changeDetected || projectsBuilt === 5)) {
|
|
103838
|
+
scheduleBuildInvalidatedProject(state, 100, false);
|
|
103839
|
+
return;
|
|
103811
103840
|
}
|
|
103812
|
-
|
|
103841
|
+
var project = createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
103842
|
+
project.done();
|
|
103843
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps)
|
|
103844
|
+
projectsBuilt++;
|
|
103813
103845
|
}
|
|
103814
103846
|
}
|
|
103815
103847
|
disableCache(state);
|
|
@@ -103909,8 +103941,6 @@ var ts;
|
|
|
103909
103941
|
return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath);
|
|
103910
103942
|
},
|
|
103911
103943
|
invalidateProject: function (configFilePath, reloadLevel) { return invalidateProject(state, configFilePath, reloadLevel || ts.ConfigFileProgramReloadLevel.None); },
|
|
103912
|
-
buildNextInvalidatedProject: function () { return buildNextInvalidatedProject(state); },
|
|
103913
|
-
getAllParsedConfigs: function () { return ts.arrayFrom(ts.mapDefinedIterator(state.configFileCache.values(), function (config) { return isParsedCommandLine(config) ? config : undefined; })); },
|
|
103914
103944
|
close: function () { return stopWatching(state); },
|
|
103915
103945
|
};
|
|
103916
103946
|
}
|
package/lib/tsserver.js
CHANGED
|
@@ -100,7 +100,7 @@ var ts;
|
|
|
100
100
|
// The following is baselined as a literal template type without intervention
|
|
101
101
|
/** The version of the TypeScript compiler release */
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
103
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
103
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220524";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -62184,7 +62184,7 @@ var ts;
|
|
|
62184
62184
|
function substituteIndexedMappedType(objectType, index) {
|
|
62185
62185
|
var mapper = createTypeMapper([getTypeParameterFromMappedType(objectType)], [index]);
|
|
62186
62186
|
var templateMapper = combineTypeMappers(objectType.mapper, mapper);
|
|
62187
|
-
return instantiateType(getTemplateTypeFromMappedType(objectType), templateMapper);
|
|
62187
|
+
return instantiateType(getTemplateTypeFromMappedType(objectType.target || objectType), templateMapper);
|
|
62188
62188
|
}
|
|
62189
62189
|
function getIndexedAccessType(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) {
|
|
62190
62190
|
if (accessFlags === void 0) { accessFlags = 0 /* None */; }
|
|
@@ -124092,7 +124092,6 @@ var ts;
|
|
|
124092
124092
|
allProjectBuildPending: true,
|
|
124093
124093
|
needsSummary: true,
|
|
124094
124094
|
watchAllProjectsPending: watch,
|
|
124095
|
-
currentInvalidatedProject: undefined,
|
|
124096
124095
|
// Watch state
|
|
124097
124096
|
watch: watch,
|
|
124098
124097
|
allWatchedWildcardDirectories: new ts.Map(),
|
|
@@ -124325,7 +124324,6 @@ var ts;
|
|
|
124325
124324
|
})(InvalidatedProjectKind = ts.InvalidatedProjectKind || (ts.InvalidatedProjectKind = {}));
|
|
124326
124325
|
function doneInvalidatedProject(state, projectPath) {
|
|
124327
124326
|
state.projectPendingBuild.delete(projectPath);
|
|
124328
|
-
state.currentInvalidatedProject = undefined;
|
|
124329
124327
|
return state.diagnostics.has(projectPath) ?
|
|
124330
124328
|
ts.ExitStatus.DiagnosticsPresent_OutputsSkipped :
|
|
124331
124329
|
ts.ExitStatus.Success;
|
|
@@ -124676,17 +124674,11 @@ var ts;
|
|
|
124676
124674
|
!!ts.getConfigFileParsingDiagnostics(config).length ||
|
|
124677
124675
|
!ts.isIncrementalCompilation(config.options);
|
|
124678
124676
|
}
|
|
124679
|
-
function
|
|
124677
|
+
function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
|
|
124680
124678
|
if (!state.projectPendingBuild.size)
|
|
124681
124679
|
return undefined;
|
|
124682
124680
|
if (isCircularBuildOrder(buildOrder))
|
|
124683
124681
|
return undefined;
|
|
124684
|
-
if (state.currentInvalidatedProject) {
|
|
124685
|
-
// Only if same buildOrder the currentInvalidated project can be sent again
|
|
124686
|
-
return ts.arrayIsEqualTo(state.currentInvalidatedProject.buildOrder, buildOrder) ?
|
|
124687
|
-
state.currentInvalidatedProject :
|
|
124688
|
-
undefined;
|
|
124689
|
-
}
|
|
124690
124682
|
var options = state.options, projectPendingBuild = state.projectPendingBuild;
|
|
124691
124683
|
for (var projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) {
|
|
124692
124684
|
var project = buildOrder[projectIndex];
|
|
@@ -124719,9 +124711,9 @@ var ts;
|
|
|
124719
124711
|
watchPackageJsonFiles(state, project, projectPath, config);
|
|
124720
124712
|
}
|
|
124721
124713
|
var status = getUpToDateStatus(state, config, projectPath);
|
|
124722
|
-
verboseReportProjectStatus(state, project, status);
|
|
124723
124714
|
if (!options.force) {
|
|
124724
124715
|
if (status.type === ts.UpToDateStatusType.UpToDate) {
|
|
124716
|
+
verboseReportProjectStatus(state, project, status);
|
|
124725
124717
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124726
124718
|
projectPendingBuild.delete(projectPath);
|
|
124727
124719
|
// Up to date, skip
|
|
@@ -124733,10 +124725,18 @@ var ts;
|
|
|
124733
124725
|
}
|
|
124734
124726
|
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
|
|
124735
124727
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124736
|
-
return
|
|
124728
|
+
return {
|
|
124729
|
+
kind: InvalidatedProjectKind.UpdateOutputFileStamps,
|
|
124730
|
+
status: status,
|
|
124731
|
+
project: project,
|
|
124732
|
+
projectPath: projectPath,
|
|
124733
|
+
projectIndex: projectIndex,
|
|
124734
|
+
config: config
|
|
124735
|
+
};
|
|
124737
124736
|
}
|
|
124738
124737
|
}
|
|
124739
124738
|
if (status.type === ts.UpToDateStatusType.UpstreamBlocked) {
|
|
124739
|
+
verboseReportProjectStatus(state, project, status);
|
|
124740
124740
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124741
124741
|
projectPendingBuild.delete(projectPath);
|
|
124742
124742
|
if (options.verbose) {
|
|
@@ -124747,17 +124747,37 @@ var ts;
|
|
|
124747
124747
|
continue;
|
|
124748
124748
|
}
|
|
124749
124749
|
if (status.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
124750
|
+
verboseReportProjectStatus(state, project, status);
|
|
124750
124751
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124751
124752
|
projectPendingBuild.delete(projectPath);
|
|
124752
124753
|
// Do nothing
|
|
124753
124754
|
continue;
|
|
124754
124755
|
}
|
|
124755
|
-
return
|
|
124756
|
-
|
|
124757
|
-
|
|
124756
|
+
return {
|
|
124757
|
+
kind: needsBuild(state, status, config) ?
|
|
124758
|
+
InvalidatedProjectKind.Build :
|
|
124759
|
+
InvalidatedProjectKind.UpdateBundle,
|
|
124760
|
+
status: status,
|
|
124761
|
+
project: project,
|
|
124762
|
+
projectPath: projectPath,
|
|
124763
|
+
projectIndex: projectIndex,
|
|
124764
|
+
config: config,
|
|
124765
|
+
};
|
|
124758
124766
|
}
|
|
124759
124767
|
return undefined;
|
|
124760
124768
|
}
|
|
124769
|
+
function createInvalidatedProjectWithInfo(state, info, buildOrder) {
|
|
124770
|
+
verboseReportProjectStatus(state, info.project, info.status);
|
|
124771
|
+
return info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps ?
|
|
124772
|
+
createBuildOrUpdateInvalidedProject(info.kind, state, info.project, info.projectPath, info.projectIndex, info.config, buildOrder) :
|
|
124773
|
+
createUpdateOutputFileStampsProject(state, info.project, info.projectPath, info.config, buildOrder);
|
|
124774
|
+
}
|
|
124775
|
+
function getNextInvalidatedProject(state, buildOrder, reportQueue) {
|
|
124776
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue);
|
|
124777
|
+
if (!info)
|
|
124778
|
+
return info;
|
|
124779
|
+
return createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
124780
|
+
}
|
|
124761
124781
|
function listEmittedFile(_a, proj, file) {
|
|
124762
124782
|
var write = _a.write;
|
|
124763
124783
|
if (write && proj.options.listEmittedFiles) {
|
|
@@ -125198,9 +125218,9 @@ var ts;
|
|
|
125198
125218
|
function invalidateProjectAndScheduleBuilds(state, resolvedPath, reloadLevel) {
|
|
125199
125219
|
state.reportFileChangeDetected = true;
|
|
125200
125220
|
invalidateProject(state, resolvedPath, reloadLevel);
|
|
125201
|
-
scheduleBuildInvalidatedProject(state);
|
|
125221
|
+
scheduleBuildInvalidatedProject(state, 250, /*changeDetected*/ true);
|
|
125202
125222
|
}
|
|
125203
|
-
function scheduleBuildInvalidatedProject(state) {
|
|
125223
|
+
function scheduleBuildInvalidatedProject(state, time, changeDetected) {
|
|
125204
125224
|
var hostWithWatch = state.hostWithWatch;
|
|
125205
125225
|
if (!hostWithWatch.setTimeout || !hostWithWatch.clearTimeout) {
|
|
125206
125226
|
return;
|
|
@@ -125208,25 +125228,38 @@ var ts;
|
|
|
125208
125228
|
if (state.timerToBuildInvalidatedProject) {
|
|
125209
125229
|
hostWithWatch.clearTimeout(state.timerToBuildInvalidatedProject);
|
|
125210
125230
|
}
|
|
125211
|
-
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject,
|
|
125231
|
+
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
|
|
125212
125232
|
}
|
|
125213
|
-
function buildNextInvalidatedProject(state) {
|
|
125233
|
+
function buildNextInvalidatedProject(state, changeDetected) {
|
|
125214
125234
|
state.timerToBuildInvalidatedProject = undefined;
|
|
125215
125235
|
if (state.reportFileChangeDetected) {
|
|
125216
125236
|
state.reportFileChangeDetected = false;
|
|
125217
125237
|
state.projectErrorsReported.clear();
|
|
125218
125238
|
reportWatchStatus(state, ts.Diagnostics.File_change_detected_Starting_incremental_compilation);
|
|
125219
125239
|
}
|
|
125240
|
+
var projectsBuilt = 0;
|
|
125220
125241
|
var buildOrder = getBuildOrder(state);
|
|
125221
125242
|
var invalidatedProject = getNextInvalidatedProject(state, buildOrder, /*reportQueue*/ false);
|
|
125222
125243
|
if (invalidatedProject) {
|
|
125223
125244
|
invalidatedProject.done();
|
|
125224
|
-
|
|
125225
|
-
|
|
125226
|
-
|
|
125227
|
-
|
|
125245
|
+
projectsBuilt++;
|
|
125246
|
+
while (state.projectPendingBuild.size) {
|
|
125247
|
+
// If already scheduled, skip
|
|
125248
|
+
if (state.timerToBuildInvalidatedProject)
|
|
125249
|
+
return;
|
|
125250
|
+
// Before scheduling check if the next project needs build
|
|
125251
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, /*reportQueue*/ false);
|
|
125252
|
+
if (!info)
|
|
125253
|
+
break; // Nothing to build any more
|
|
125254
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps && (changeDetected || projectsBuilt === 5)) {
|
|
125255
|
+
// Schedule next project for build
|
|
125256
|
+
scheduleBuildInvalidatedProject(state, 100, /*changeDetected*/ false);
|
|
125257
|
+
return;
|
|
125228
125258
|
}
|
|
125229
|
-
|
|
125259
|
+
var project = createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
125260
|
+
project.done();
|
|
125261
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps)
|
|
125262
|
+
projectsBuilt++;
|
|
125230
125263
|
}
|
|
125231
125264
|
}
|
|
125232
125265
|
disableCache(state);
|
|
@@ -125330,8 +125363,6 @@ var ts;
|
|
|
125330
125363
|
return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath);
|
|
125331
125364
|
},
|
|
125332
125365
|
invalidateProject: function (configFilePath, reloadLevel) { return invalidateProject(state, configFilePath, reloadLevel || ts.ConfigFileProgramReloadLevel.None); },
|
|
125333
|
-
buildNextInvalidatedProject: function () { return buildNextInvalidatedProject(state); },
|
|
125334
|
-
getAllParsedConfigs: function () { return ts.arrayFrom(ts.mapDefinedIterator(state.configFileCache.values(), function (config) { return isParsedCommandLine(config) ? config : undefined; })); },
|
|
125335
125366
|
close: function () { return stopWatching(state); },
|
|
125336
125367
|
};
|
|
125337
125368
|
}
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220524";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -62378,7 +62378,7 @@ var ts;
|
|
|
62378
62378
|
function substituteIndexedMappedType(objectType, index) {
|
|
62379
62379
|
var mapper = createTypeMapper([getTypeParameterFromMappedType(objectType)], [index]);
|
|
62380
62380
|
var templateMapper = combineTypeMappers(objectType.mapper, mapper);
|
|
62381
|
-
return instantiateType(getTemplateTypeFromMappedType(objectType), templateMapper);
|
|
62381
|
+
return instantiateType(getTemplateTypeFromMappedType(objectType.target || objectType), templateMapper);
|
|
62382
62382
|
}
|
|
62383
62383
|
function getIndexedAccessType(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) {
|
|
62384
62384
|
if (accessFlags === void 0) { accessFlags = 0 /* None */; }
|
|
@@ -124286,7 +124286,6 @@ var ts;
|
|
|
124286
124286
|
allProjectBuildPending: true,
|
|
124287
124287
|
needsSummary: true,
|
|
124288
124288
|
watchAllProjectsPending: watch,
|
|
124289
|
-
currentInvalidatedProject: undefined,
|
|
124290
124289
|
// Watch state
|
|
124291
124290
|
watch: watch,
|
|
124292
124291
|
allWatchedWildcardDirectories: new ts.Map(),
|
|
@@ -124519,7 +124518,6 @@ var ts;
|
|
|
124519
124518
|
})(InvalidatedProjectKind = ts.InvalidatedProjectKind || (ts.InvalidatedProjectKind = {}));
|
|
124520
124519
|
function doneInvalidatedProject(state, projectPath) {
|
|
124521
124520
|
state.projectPendingBuild.delete(projectPath);
|
|
124522
|
-
state.currentInvalidatedProject = undefined;
|
|
124523
124521
|
return state.diagnostics.has(projectPath) ?
|
|
124524
124522
|
ts.ExitStatus.DiagnosticsPresent_OutputsSkipped :
|
|
124525
124523
|
ts.ExitStatus.Success;
|
|
@@ -124870,17 +124868,11 @@ var ts;
|
|
|
124870
124868
|
!!ts.getConfigFileParsingDiagnostics(config).length ||
|
|
124871
124869
|
!ts.isIncrementalCompilation(config.options);
|
|
124872
124870
|
}
|
|
124873
|
-
function
|
|
124871
|
+
function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
|
|
124874
124872
|
if (!state.projectPendingBuild.size)
|
|
124875
124873
|
return undefined;
|
|
124876
124874
|
if (isCircularBuildOrder(buildOrder))
|
|
124877
124875
|
return undefined;
|
|
124878
|
-
if (state.currentInvalidatedProject) {
|
|
124879
|
-
// Only if same buildOrder the currentInvalidated project can be sent again
|
|
124880
|
-
return ts.arrayIsEqualTo(state.currentInvalidatedProject.buildOrder, buildOrder) ?
|
|
124881
|
-
state.currentInvalidatedProject :
|
|
124882
|
-
undefined;
|
|
124883
|
-
}
|
|
124884
124876
|
var options = state.options, projectPendingBuild = state.projectPendingBuild;
|
|
124885
124877
|
for (var projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) {
|
|
124886
124878
|
var project = buildOrder[projectIndex];
|
|
@@ -124913,9 +124905,9 @@ var ts;
|
|
|
124913
124905
|
watchPackageJsonFiles(state, project, projectPath, config);
|
|
124914
124906
|
}
|
|
124915
124907
|
var status = getUpToDateStatus(state, config, projectPath);
|
|
124916
|
-
verboseReportProjectStatus(state, project, status);
|
|
124917
124908
|
if (!options.force) {
|
|
124918
124909
|
if (status.type === ts.UpToDateStatusType.UpToDate) {
|
|
124910
|
+
verboseReportProjectStatus(state, project, status);
|
|
124919
124911
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124920
124912
|
projectPendingBuild.delete(projectPath);
|
|
124921
124913
|
// Up to date, skip
|
|
@@ -124927,10 +124919,18 @@ var ts;
|
|
|
124927
124919
|
}
|
|
124928
124920
|
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
|
|
124929
124921
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124930
|
-
return
|
|
124922
|
+
return {
|
|
124923
|
+
kind: InvalidatedProjectKind.UpdateOutputFileStamps,
|
|
124924
|
+
status: status,
|
|
124925
|
+
project: project,
|
|
124926
|
+
projectPath: projectPath,
|
|
124927
|
+
projectIndex: projectIndex,
|
|
124928
|
+
config: config
|
|
124929
|
+
};
|
|
124931
124930
|
}
|
|
124932
124931
|
}
|
|
124933
124932
|
if (status.type === ts.UpToDateStatusType.UpstreamBlocked) {
|
|
124933
|
+
verboseReportProjectStatus(state, project, status);
|
|
124934
124934
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124935
124935
|
projectPendingBuild.delete(projectPath);
|
|
124936
124936
|
if (options.verbose) {
|
|
@@ -124941,17 +124941,37 @@ var ts;
|
|
|
124941
124941
|
continue;
|
|
124942
124942
|
}
|
|
124943
124943
|
if (status.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
124944
|
+
verboseReportProjectStatus(state, project, status);
|
|
124944
124945
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124945
124946
|
projectPendingBuild.delete(projectPath);
|
|
124946
124947
|
// Do nothing
|
|
124947
124948
|
continue;
|
|
124948
124949
|
}
|
|
124949
|
-
return
|
|
124950
|
-
|
|
124951
|
-
|
|
124950
|
+
return {
|
|
124951
|
+
kind: needsBuild(state, status, config) ?
|
|
124952
|
+
InvalidatedProjectKind.Build :
|
|
124953
|
+
InvalidatedProjectKind.UpdateBundle,
|
|
124954
|
+
status: status,
|
|
124955
|
+
project: project,
|
|
124956
|
+
projectPath: projectPath,
|
|
124957
|
+
projectIndex: projectIndex,
|
|
124958
|
+
config: config,
|
|
124959
|
+
};
|
|
124952
124960
|
}
|
|
124953
124961
|
return undefined;
|
|
124954
124962
|
}
|
|
124963
|
+
function createInvalidatedProjectWithInfo(state, info, buildOrder) {
|
|
124964
|
+
verboseReportProjectStatus(state, info.project, info.status);
|
|
124965
|
+
return info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps ?
|
|
124966
|
+
createBuildOrUpdateInvalidedProject(info.kind, state, info.project, info.projectPath, info.projectIndex, info.config, buildOrder) :
|
|
124967
|
+
createUpdateOutputFileStampsProject(state, info.project, info.projectPath, info.config, buildOrder);
|
|
124968
|
+
}
|
|
124969
|
+
function getNextInvalidatedProject(state, buildOrder, reportQueue) {
|
|
124970
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue);
|
|
124971
|
+
if (!info)
|
|
124972
|
+
return info;
|
|
124973
|
+
return createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
124974
|
+
}
|
|
124955
124975
|
function listEmittedFile(_a, proj, file) {
|
|
124956
124976
|
var write = _a.write;
|
|
124957
124977
|
if (write && proj.options.listEmittedFiles) {
|
|
@@ -125392,9 +125412,9 @@ var ts;
|
|
|
125392
125412
|
function invalidateProjectAndScheduleBuilds(state, resolvedPath, reloadLevel) {
|
|
125393
125413
|
state.reportFileChangeDetected = true;
|
|
125394
125414
|
invalidateProject(state, resolvedPath, reloadLevel);
|
|
125395
|
-
scheduleBuildInvalidatedProject(state);
|
|
125415
|
+
scheduleBuildInvalidatedProject(state, 250, /*changeDetected*/ true);
|
|
125396
125416
|
}
|
|
125397
|
-
function scheduleBuildInvalidatedProject(state) {
|
|
125417
|
+
function scheduleBuildInvalidatedProject(state, time, changeDetected) {
|
|
125398
125418
|
var hostWithWatch = state.hostWithWatch;
|
|
125399
125419
|
if (!hostWithWatch.setTimeout || !hostWithWatch.clearTimeout) {
|
|
125400
125420
|
return;
|
|
@@ -125402,25 +125422,38 @@ var ts;
|
|
|
125402
125422
|
if (state.timerToBuildInvalidatedProject) {
|
|
125403
125423
|
hostWithWatch.clearTimeout(state.timerToBuildInvalidatedProject);
|
|
125404
125424
|
}
|
|
125405
|
-
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject,
|
|
125425
|
+
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
|
|
125406
125426
|
}
|
|
125407
|
-
function buildNextInvalidatedProject(state) {
|
|
125427
|
+
function buildNextInvalidatedProject(state, changeDetected) {
|
|
125408
125428
|
state.timerToBuildInvalidatedProject = undefined;
|
|
125409
125429
|
if (state.reportFileChangeDetected) {
|
|
125410
125430
|
state.reportFileChangeDetected = false;
|
|
125411
125431
|
state.projectErrorsReported.clear();
|
|
125412
125432
|
reportWatchStatus(state, ts.Diagnostics.File_change_detected_Starting_incremental_compilation);
|
|
125413
125433
|
}
|
|
125434
|
+
var projectsBuilt = 0;
|
|
125414
125435
|
var buildOrder = getBuildOrder(state);
|
|
125415
125436
|
var invalidatedProject = getNextInvalidatedProject(state, buildOrder, /*reportQueue*/ false);
|
|
125416
125437
|
if (invalidatedProject) {
|
|
125417
125438
|
invalidatedProject.done();
|
|
125418
|
-
|
|
125419
|
-
|
|
125420
|
-
|
|
125421
|
-
|
|
125439
|
+
projectsBuilt++;
|
|
125440
|
+
while (state.projectPendingBuild.size) {
|
|
125441
|
+
// If already scheduled, skip
|
|
125442
|
+
if (state.timerToBuildInvalidatedProject)
|
|
125443
|
+
return;
|
|
125444
|
+
// Before scheduling check if the next project needs build
|
|
125445
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, /*reportQueue*/ false);
|
|
125446
|
+
if (!info)
|
|
125447
|
+
break; // Nothing to build any more
|
|
125448
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps && (changeDetected || projectsBuilt === 5)) {
|
|
125449
|
+
// Schedule next project for build
|
|
125450
|
+
scheduleBuildInvalidatedProject(state, 100, /*changeDetected*/ false);
|
|
125451
|
+
return;
|
|
125422
125452
|
}
|
|
125423
|
-
|
|
125453
|
+
var project = createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
125454
|
+
project.done();
|
|
125455
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps)
|
|
125456
|
+
projectsBuilt++;
|
|
125424
125457
|
}
|
|
125425
125458
|
}
|
|
125426
125459
|
disableCache(state);
|
|
@@ -125524,8 +125557,6 @@ var ts;
|
|
|
125524
125557
|
return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath);
|
|
125525
125558
|
},
|
|
125526
125559
|
invalidateProject: function (configFilePath, reloadLevel) { return invalidateProject(state, configFilePath, reloadLevel || ts.ConfigFileProgramReloadLevel.None); },
|
|
125527
|
-
buildNextInvalidatedProject: function () { return buildNextInvalidatedProject(state); },
|
|
125528
|
-
getAllParsedConfigs: function () { return ts.arrayFrom(ts.mapDefinedIterator(state.configFileCache.values(), function (config) { return isParsedCommandLine(config) ? config : undefined; })); },
|
|
125529
125560
|
close: function () { return stopWatching(state); },
|
|
125530
125561
|
};
|
|
125531
125562
|
}
|
package/lib/typescript.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220524";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -62378,7 +62378,7 @@ var ts;
|
|
|
62378
62378
|
function substituteIndexedMappedType(objectType, index) {
|
|
62379
62379
|
var mapper = createTypeMapper([getTypeParameterFromMappedType(objectType)], [index]);
|
|
62380
62380
|
var templateMapper = combineTypeMappers(objectType.mapper, mapper);
|
|
62381
|
-
return instantiateType(getTemplateTypeFromMappedType(objectType), templateMapper);
|
|
62381
|
+
return instantiateType(getTemplateTypeFromMappedType(objectType.target || objectType), templateMapper);
|
|
62382
62382
|
}
|
|
62383
62383
|
function getIndexedAccessType(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) {
|
|
62384
62384
|
if (accessFlags === void 0) { accessFlags = 0 /* None */; }
|
|
@@ -124286,7 +124286,6 @@ var ts;
|
|
|
124286
124286
|
allProjectBuildPending: true,
|
|
124287
124287
|
needsSummary: true,
|
|
124288
124288
|
watchAllProjectsPending: watch,
|
|
124289
|
-
currentInvalidatedProject: undefined,
|
|
124290
124289
|
// Watch state
|
|
124291
124290
|
watch: watch,
|
|
124292
124291
|
allWatchedWildcardDirectories: new ts.Map(),
|
|
@@ -124519,7 +124518,6 @@ var ts;
|
|
|
124519
124518
|
})(InvalidatedProjectKind = ts.InvalidatedProjectKind || (ts.InvalidatedProjectKind = {}));
|
|
124520
124519
|
function doneInvalidatedProject(state, projectPath) {
|
|
124521
124520
|
state.projectPendingBuild.delete(projectPath);
|
|
124522
|
-
state.currentInvalidatedProject = undefined;
|
|
124523
124521
|
return state.diagnostics.has(projectPath) ?
|
|
124524
124522
|
ts.ExitStatus.DiagnosticsPresent_OutputsSkipped :
|
|
124525
124523
|
ts.ExitStatus.Success;
|
|
@@ -124870,17 +124868,11 @@ var ts;
|
|
|
124870
124868
|
!!ts.getConfigFileParsingDiagnostics(config).length ||
|
|
124871
124869
|
!ts.isIncrementalCompilation(config.options);
|
|
124872
124870
|
}
|
|
124873
|
-
function
|
|
124871
|
+
function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
|
|
124874
124872
|
if (!state.projectPendingBuild.size)
|
|
124875
124873
|
return undefined;
|
|
124876
124874
|
if (isCircularBuildOrder(buildOrder))
|
|
124877
124875
|
return undefined;
|
|
124878
|
-
if (state.currentInvalidatedProject) {
|
|
124879
|
-
// Only if same buildOrder the currentInvalidated project can be sent again
|
|
124880
|
-
return ts.arrayIsEqualTo(state.currentInvalidatedProject.buildOrder, buildOrder) ?
|
|
124881
|
-
state.currentInvalidatedProject :
|
|
124882
|
-
undefined;
|
|
124883
|
-
}
|
|
124884
124876
|
var options = state.options, projectPendingBuild = state.projectPendingBuild;
|
|
124885
124877
|
for (var projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) {
|
|
124886
124878
|
var project = buildOrder[projectIndex];
|
|
@@ -124913,9 +124905,9 @@ var ts;
|
|
|
124913
124905
|
watchPackageJsonFiles(state, project, projectPath, config);
|
|
124914
124906
|
}
|
|
124915
124907
|
var status = getUpToDateStatus(state, config, projectPath);
|
|
124916
|
-
verboseReportProjectStatus(state, project, status);
|
|
124917
124908
|
if (!options.force) {
|
|
124918
124909
|
if (status.type === ts.UpToDateStatusType.UpToDate) {
|
|
124910
|
+
verboseReportProjectStatus(state, project, status);
|
|
124919
124911
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124920
124912
|
projectPendingBuild.delete(projectPath);
|
|
124921
124913
|
// Up to date, skip
|
|
@@ -124927,10 +124919,18 @@ var ts;
|
|
|
124927
124919
|
}
|
|
124928
124920
|
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
|
|
124929
124921
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124930
|
-
return
|
|
124922
|
+
return {
|
|
124923
|
+
kind: InvalidatedProjectKind.UpdateOutputFileStamps,
|
|
124924
|
+
status: status,
|
|
124925
|
+
project: project,
|
|
124926
|
+
projectPath: projectPath,
|
|
124927
|
+
projectIndex: projectIndex,
|
|
124928
|
+
config: config
|
|
124929
|
+
};
|
|
124931
124930
|
}
|
|
124932
124931
|
}
|
|
124933
124932
|
if (status.type === ts.UpToDateStatusType.UpstreamBlocked) {
|
|
124933
|
+
verboseReportProjectStatus(state, project, status);
|
|
124934
124934
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124935
124935
|
projectPendingBuild.delete(projectPath);
|
|
124936
124936
|
if (options.verbose) {
|
|
@@ -124941,17 +124941,37 @@ var ts;
|
|
|
124941
124941
|
continue;
|
|
124942
124942
|
}
|
|
124943
124943
|
if (status.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
124944
|
+
verboseReportProjectStatus(state, project, status);
|
|
124944
124945
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124945
124946
|
projectPendingBuild.delete(projectPath);
|
|
124946
124947
|
// Do nothing
|
|
124947
124948
|
continue;
|
|
124948
124949
|
}
|
|
124949
|
-
return
|
|
124950
|
-
|
|
124951
|
-
|
|
124950
|
+
return {
|
|
124951
|
+
kind: needsBuild(state, status, config) ?
|
|
124952
|
+
InvalidatedProjectKind.Build :
|
|
124953
|
+
InvalidatedProjectKind.UpdateBundle,
|
|
124954
|
+
status: status,
|
|
124955
|
+
project: project,
|
|
124956
|
+
projectPath: projectPath,
|
|
124957
|
+
projectIndex: projectIndex,
|
|
124958
|
+
config: config,
|
|
124959
|
+
};
|
|
124952
124960
|
}
|
|
124953
124961
|
return undefined;
|
|
124954
124962
|
}
|
|
124963
|
+
function createInvalidatedProjectWithInfo(state, info, buildOrder) {
|
|
124964
|
+
verboseReportProjectStatus(state, info.project, info.status);
|
|
124965
|
+
return info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps ?
|
|
124966
|
+
createBuildOrUpdateInvalidedProject(info.kind, state, info.project, info.projectPath, info.projectIndex, info.config, buildOrder) :
|
|
124967
|
+
createUpdateOutputFileStampsProject(state, info.project, info.projectPath, info.config, buildOrder);
|
|
124968
|
+
}
|
|
124969
|
+
function getNextInvalidatedProject(state, buildOrder, reportQueue) {
|
|
124970
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue);
|
|
124971
|
+
if (!info)
|
|
124972
|
+
return info;
|
|
124973
|
+
return createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
124974
|
+
}
|
|
124955
124975
|
function listEmittedFile(_a, proj, file) {
|
|
124956
124976
|
var write = _a.write;
|
|
124957
124977
|
if (write && proj.options.listEmittedFiles) {
|
|
@@ -125392,9 +125412,9 @@ var ts;
|
|
|
125392
125412
|
function invalidateProjectAndScheduleBuilds(state, resolvedPath, reloadLevel) {
|
|
125393
125413
|
state.reportFileChangeDetected = true;
|
|
125394
125414
|
invalidateProject(state, resolvedPath, reloadLevel);
|
|
125395
|
-
scheduleBuildInvalidatedProject(state);
|
|
125415
|
+
scheduleBuildInvalidatedProject(state, 250, /*changeDetected*/ true);
|
|
125396
125416
|
}
|
|
125397
|
-
function scheduleBuildInvalidatedProject(state) {
|
|
125417
|
+
function scheduleBuildInvalidatedProject(state, time, changeDetected) {
|
|
125398
125418
|
var hostWithWatch = state.hostWithWatch;
|
|
125399
125419
|
if (!hostWithWatch.setTimeout || !hostWithWatch.clearTimeout) {
|
|
125400
125420
|
return;
|
|
@@ -125402,25 +125422,38 @@ var ts;
|
|
|
125402
125422
|
if (state.timerToBuildInvalidatedProject) {
|
|
125403
125423
|
hostWithWatch.clearTimeout(state.timerToBuildInvalidatedProject);
|
|
125404
125424
|
}
|
|
125405
|
-
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject,
|
|
125425
|
+
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
|
|
125406
125426
|
}
|
|
125407
|
-
function buildNextInvalidatedProject(state) {
|
|
125427
|
+
function buildNextInvalidatedProject(state, changeDetected) {
|
|
125408
125428
|
state.timerToBuildInvalidatedProject = undefined;
|
|
125409
125429
|
if (state.reportFileChangeDetected) {
|
|
125410
125430
|
state.reportFileChangeDetected = false;
|
|
125411
125431
|
state.projectErrorsReported.clear();
|
|
125412
125432
|
reportWatchStatus(state, ts.Diagnostics.File_change_detected_Starting_incremental_compilation);
|
|
125413
125433
|
}
|
|
125434
|
+
var projectsBuilt = 0;
|
|
125414
125435
|
var buildOrder = getBuildOrder(state);
|
|
125415
125436
|
var invalidatedProject = getNextInvalidatedProject(state, buildOrder, /*reportQueue*/ false);
|
|
125416
125437
|
if (invalidatedProject) {
|
|
125417
125438
|
invalidatedProject.done();
|
|
125418
|
-
|
|
125419
|
-
|
|
125420
|
-
|
|
125421
|
-
|
|
125439
|
+
projectsBuilt++;
|
|
125440
|
+
while (state.projectPendingBuild.size) {
|
|
125441
|
+
// If already scheduled, skip
|
|
125442
|
+
if (state.timerToBuildInvalidatedProject)
|
|
125443
|
+
return;
|
|
125444
|
+
// Before scheduling check if the next project needs build
|
|
125445
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, /*reportQueue*/ false);
|
|
125446
|
+
if (!info)
|
|
125447
|
+
break; // Nothing to build any more
|
|
125448
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps && (changeDetected || projectsBuilt === 5)) {
|
|
125449
|
+
// Schedule next project for build
|
|
125450
|
+
scheduleBuildInvalidatedProject(state, 100, /*changeDetected*/ false);
|
|
125451
|
+
return;
|
|
125422
125452
|
}
|
|
125423
|
-
|
|
125453
|
+
var project = createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
125454
|
+
project.done();
|
|
125455
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps)
|
|
125456
|
+
projectsBuilt++;
|
|
125424
125457
|
}
|
|
125425
125458
|
}
|
|
125426
125459
|
disableCache(state);
|
|
@@ -125524,8 +125557,6 @@ var ts;
|
|
|
125524
125557
|
return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath);
|
|
125525
125558
|
},
|
|
125526
125559
|
invalidateProject: function (configFilePath, reloadLevel) { return invalidateProject(state, configFilePath, reloadLevel || ts.ConfigFileProgramReloadLevel.None); },
|
|
125527
|
-
buildNextInvalidatedProject: function () { return buildNextInvalidatedProject(state); },
|
|
125528
|
-
getAllParsedConfigs: function () { return ts.arrayFrom(ts.mapDefinedIterator(state.configFileCache.values(), function (config) { return isParsedCommandLine(config) ? config : undefined; })); },
|
|
125529
125560
|
close: function () { return stopWatching(state); },
|
|
125530
125561
|
};
|
|
125531
125562
|
}
|
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220524";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -62378,7 +62378,7 @@ var ts;
|
|
|
62378
62378
|
function substituteIndexedMappedType(objectType, index) {
|
|
62379
62379
|
var mapper = createTypeMapper([getTypeParameterFromMappedType(objectType)], [index]);
|
|
62380
62380
|
var templateMapper = combineTypeMappers(objectType.mapper, mapper);
|
|
62381
|
-
return instantiateType(getTemplateTypeFromMappedType(objectType), templateMapper);
|
|
62381
|
+
return instantiateType(getTemplateTypeFromMappedType(objectType.target || objectType), templateMapper);
|
|
62382
62382
|
}
|
|
62383
62383
|
function getIndexedAccessType(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) {
|
|
62384
62384
|
if (accessFlags === void 0) { accessFlags = 0 /* None */; }
|
|
@@ -124286,7 +124286,6 @@ var ts;
|
|
|
124286
124286
|
allProjectBuildPending: true,
|
|
124287
124287
|
needsSummary: true,
|
|
124288
124288
|
watchAllProjectsPending: watch,
|
|
124289
|
-
currentInvalidatedProject: undefined,
|
|
124290
124289
|
// Watch state
|
|
124291
124290
|
watch: watch,
|
|
124292
124291
|
allWatchedWildcardDirectories: new ts.Map(),
|
|
@@ -124519,7 +124518,6 @@ var ts;
|
|
|
124519
124518
|
})(InvalidatedProjectKind = ts.InvalidatedProjectKind || (ts.InvalidatedProjectKind = {}));
|
|
124520
124519
|
function doneInvalidatedProject(state, projectPath) {
|
|
124521
124520
|
state.projectPendingBuild.delete(projectPath);
|
|
124522
|
-
state.currentInvalidatedProject = undefined;
|
|
124523
124521
|
return state.diagnostics.has(projectPath) ?
|
|
124524
124522
|
ts.ExitStatus.DiagnosticsPresent_OutputsSkipped :
|
|
124525
124523
|
ts.ExitStatus.Success;
|
|
@@ -124870,17 +124868,11 @@ var ts;
|
|
|
124870
124868
|
!!ts.getConfigFileParsingDiagnostics(config).length ||
|
|
124871
124869
|
!ts.isIncrementalCompilation(config.options);
|
|
124872
124870
|
}
|
|
124873
|
-
function
|
|
124871
|
+
function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
|
|
124874
124872
|
if (!state.projectPendingBuild.size)
|
|
124875
124873
|
return undefined;
|
|
124876
124874
|
if (isCircularBuildOrder(buildOrder))
|
|
124877
124875
|
return undefined;
|
|
124878
|
-
if (state.currentInvalidatedProject) {
|
|
124879
|
-
// Only if same buildOrder the currentInvalidated project can be sent again
|
|
124880
|
-
return ts.arrayIsEqualTo(state.currentInvalidatedProject.buildOrder, buildOrder) ?
|
|
124881
|
-
state.currentInvalidatedProject :
|
|
124882
|
-
undefined;
|
|
124883
|
-
}
|
|
124884
124876
|
var options = state.options, projectPendingBuild = state.projectPendingBuild;
|
|
124885
124877
|
for (var projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) {
|
|
124886
124878
|
var project = buildOrder[projectIndex];
|
|
@@ -124913,9 +124905,9 @@ var ts;
|
|
|
124913
124905
|
watchPackageJsonFiles(state, project, projectPath, config);
|
|
124914
124906
|
}
|
|
124915
124907
|
var status = getUpToDateStatus(state, config, projectPath);
|
|
124916
|
-
verboseReportProjectStatus(state, project, status);
|
|
124917
124908
|
if (!options.force) {
|
|
124918
124909
|
if (status.type === ts.UpToDateStatusType.UpToDate) {
|
|
124910
|
+
verboseReportProjectStatus(state, project, status);
|
|
124919
124911
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124920
124912
|
projectPendingBuild.delete(projectPath);
|
|
124921
124913
|
// Up to date, skip
|
|
@@ -124927,10 +124919,18 @@ var ts;
|
|
|
124927
124919
|
}
|
|
124928
124920
|
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
|
|
124929
124921
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124930
|
-
return
|
|
124922
|
+
return {
|
|
124923
|
+
kind: InvalidatedProjectKind.UpdateOutputFileStamps,
|
|
124924
|
+
status: status,
|
|
124925
|
+
project: project,
|
|
124926
|
+
projectPath: projectPath,
|
|
124927
|
+
projectIndex: projectIndex,
|
|
124928
|
+
config: config
|
|
124929
|
+
};
|
|
124931
124930
|
}
|
|
124932
124931
|
}
|
|
124933
124932
|
if (status.type === ts.UpToDateStatusType.UpstreamBlocked) {
|
|
124933
|
+
verboseReportProjectStatus(state, project, status);
|
|
124934
124934
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124935
124935
|
projectPendingBuild.delete(projectPath);
|
|
124936
124936
|
if (options.verbose) {
|
|
@@ -124941,17 +124941,37 @@ var ts;
|
|
|
124941
124941
|
continue;
|
|
124942
124942
|
}
|
|
124943
124943
|
if (status.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
124944
|
+
verboseReportProjectStatus(state, project, status);
|
|
124944
124945
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124945
124946
|
projectPendingBuild.delete(projectPath);
|
|
124946
124947
|
// Do nothing
|
|
124947
124948
|
continue;
|
|
124948
124949
|
}
|
|
124949
|
-
return
|
|
124950
|
-
|
|
124951
|
-
|
|
124950
|
+
return {
|
|
124951
|
+
kind: needsBuild(state, status, config) ?
|
|
124952
|
+
InvalidatedProjectKind.Build :
|
|
124953
|
+
InvalidatedProjectKind.UpdateBundle,
|
|
124954
|
+
status: status,
|
|
124955
|
+
project: project,
|
|
124956
|
+
projectPath: projectPath,
|
|
124957
|
+
projectIndex: projectIndex,
|
|
124958
|
+
config: config,
|
|
124959
|
+
};
|
|
124952
124960
|
}
|
|
124953
124961
|
return undefined;
|
|
124954
124962
|
}
|
|
124963
|
+
function createInvalidatedProjectWithInfo(state, info, buildOrder) {
|
|
124964
|
+
verboseReportProjectStatus(state, info.project, info.status);
|
|
124965
|
+
return info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps ?
|
|
124966
|
+
createBuildOrUpdateInvalidedProject(info.kind, state, info.project, info.projectPath, info.projectIndex, info.config, buildOrder) :
|
|
124967
|
+
createUpdateOutputFileStampsProject(state, info.project, info.projectPath, info.config, buildOrder);
|
|
124968
|
+
}
|
|
124969
|
+
function getNextInvalidatedProject(state, buildOrder, reportQueue) {
|
|
124970
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue);
|
|
124971
|
+
if (!info)
|
|
124972
|
+
return info;
|
|
124973
|
+
return createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
124974
|
+
}
|
|
124955
124975
|
function listEmittedFile(_a, proj, file) {
|
|
124956
124976
|
var write = _a.write;
|
|
124957
124977
|
if (write && proj.options.listEmittedFiles) {
|
|
@@ -125392,9 +125412,9 @@ var ts;
|
|
|
125392
125412
|
function invalidateProjectAndScheduleBuilds(state, resolvedPath, reloadLevel) {
|
|
125393
125413
|
state.reportFileChangeDetected = true;
|
|
125394
125414
|
invalidateProject(state, resolvedPath, reloadLevel);
|
|
125395
|
-
scheduleBuildInvalidatedProject(state);
|
|
125415
|
+
scheduleBuildInvalidatedProject(state, 250, /*changeDetected*/ true);
|
|
125396
125416
|
}
|
|
125397
|
-
function scheduleBuildInvalidatedProject(state) {
|
|
125417
|
+
function scheduleBuildInvalidatedProject(state, time, changeDetected) {
|
|
125398
125418
|
var hostWithWatch = state.hostWithWatch;
|
|
125399
125419
|
if (!hostWithWatch.setTimeout || !hostWithWatch.clearTimeout) {
|
|
125400
125420
|
return;
|
|
@@ -125402,25 +125422,38 @@ var ts;
|
|
|
125402
125422
|
if (state.timerToBuildInvalidatedProject) {
|
|
125403
125423
|
hostWithWatch.clearTimeout(state.timerToBuildInvalidatedProject);
|
|
125404
125424
|
}
|
|
125405
|
-
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject,
|
|
125425
|
+
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
|
|
125406
125426
|
}
|
|
125407
|
-
function buildNextInvalidatedProject(state) {
|
|
125427
|
+
function buildNextInvalidatedProject(state, changeDetected) {
|
|
125408
125428
|
state.timerToBuildInvalidatedProject = undefined;
|
|
125409
125429
|
if (state.reportFileChangeDetected) {
|
|
125410
125430
|
state.reportFileChangeDetected = false;
|
|
125411
125431
|
state.projectErrorsReported.clear();
|
|
125412
125432
|
reportWatchStatus(state, ts.Diagnostics.File_change_detected_Starting_incremental_compilation);
|
|
125413
125433
|
}
|
|
125434
|
+
var projectsBuilt = 0;
|
|
125414
125435
|
var buildOrder = getBuildOrder(state);
|
|
125415
125436
|
var invalidatedProject = getNextInvalidatedProject(state, buildOrder, /*reportQueue*/ false);
|
|
125416
125437
|
if (invalidatedProject) {
|
|
125417
125438
|
invalidatedProject.done();
|
|
125418
|
-
|
|
125419
|
-
|
|
125420
|
-
|
|
125421
|
-
|
|
125439
|
+
projectsBuilt++;
|
|
125440
|
+
while (state.projectPendingBuild.size) {
|
|
125441
|
+
// If already scheduled, skip
|
|
125442
|
+
if (state.timerToBuildInvalidatedProject)
|
|
125443
|
+
return;
|
|
125444
|
+
// Before scheduling check if the next project needs build
|
|
125445
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, /*reportQueue*/ false);
|
|
125446
|
+
if (!info)
|
|
125447
|
+
break; // Nothing to build any more
|
|
125448
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps && (changeDetected || projectsBuilt === 5)) {
|
|
125449
|
+
// Schedule next project for build
|
|
125450
|
+
scheduleBuildInvalidatedProject(state, 100, /*changeDetected*/ false);
|
|
125451
|
+
return;
|
|
125422
125452
|
}
|
|
125423
|
-
|
|
125453
|
+
var project = createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
125454
|
+
project.done();
|
|
125455
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps)
|
|
125456
|
+
projectsBuilt++;
|
|
125424
125457
|
}
|
|
125425
125458
|
}
|
|
125426
125459
|
disableCache(state);
|
|
@@ -125524,8 +125557,6 @@ var ts;
|
|
|
125524
125557
|
return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath);
|
|
125525
125558
|
},
|
|
125526
125559
|
invalidateProject: function (configFilePath, reloadLevel) { return invalidateProject(state, configFilePath, reloadLevel || ts.ConfigFileProgramReloadLevel.None); },
|
|
125527
|
-
buildNextInvalidatedProject: function () { return buildNextInvalidatedProject(state); },
|
|
125528
|
-
getAllParsedConfigs: function () { return ts.arrayFrom(ts.mapDefinedIterator(state.configFileCache.values(), function (config) { return isParsedCommandLine(config) ? config : undefined; })); },
|
|
125529
125560
|
close: function () { return stopWatching(state); },
|
|
125530
125561
|
};
|
|
125531
125562
|
}
|
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 = ts.versionMajorMinor + ".0-dev.
|
|
92
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220524";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -62173,7 +62173,7 @@ var ts;
|
|
|
62173
62173
|
function substituteIndexedMappedType(objectType, index) {
|
|
62174
62174
|
var mapper = createTypeMapper([getTypeParameterFromMappedType(objectType)], [index]);
|
|
62175
62175
|
var templateMapper = combineTypeMappers(objectType.mapper, mapper);
|
|
62176
|
-
return instantiateType(getTemplateTypeFromMappedType(objectType), templateMapper);
|
|
62176
|
+
return instantiateType(getTemplateTypeFromMappedType(objectType.target || objectType), templateMapper);
|
|
62177
62177
|
}
|
|
62178
62178
|
function getIndexedAccessType(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) {
|
|
62179
62179
|
if (accessFlags === void 0) { accessFlags = 0 /* None */; }
|
|
@@ -124081,7 +124081,6 @@ var ts;
|
|
|
124081
124081
|
allProjectBuildPending: true,
|
|
124082
124082
|
needsSummary: true,
|
|
124083
124083
|
watchAllProjectsPending: watch,
|
|
124084
|
-
currentInvalidatedProject: undefined,
|
|
124085
124084
|
// Watch state
|
|
124086
124085
|
watch: watch,
|
|
124087
124086
|
allWatchedWildcardDirectories: new ts.Map(),
|
|
@@ -124314,7 +124313,6 @@ var ts;
|
|
|
124314
124313
|
})(InvalidatedProjectKind = ts.InvalidatedProjectKind || (ts.InvalidatedProjectKind = {}));
|
|
124315
124314
|
function doneInvalidatedProject(state, projectPath) {
|
|
124316
124315
|
state.projectPendingBuild.delete(projectPath);
|
|
124317
|
-
state.currentInvalidatedProject = undefined;
|
|
124318
124316
|
return state.diagnostics.has(projectPath) ?
|
|
124319
124317
|
ts.ExitStatus.DiagnosticsPresent_OutputsSkipped :
|
|
124320
124318
|
ts.ExitStatus.Success;
|
|
@@ -124665,17 +124663,11 @@ var ts;
|
|
|
124665
124663
|
!!ts.getConfigFileParsingDiagnostics(config).length ||
|
|
124666
124664
|
!ts.isIncrementalCompilation(config.options);
|
|
124667
124665
|
}
|
|
124668
|
-
function
|
|
124666
|
+
function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
|
|
124669
124667
|
if (!state.projectPendingBuild.size)
|
|
124670
124668
|
return undefined;
|
|
124671
124669
|
if (isCircularBuildOrder(buildOrder))
|
|
124672
124670
|
return undefined;
|
|
124673
|
-
if (state.currentInvalidatedProject) {
|
|
124674
|
-
// Only if same buildOrder the currentInvalidated project can be sent again
|
|
124675
|
-
return ts.arrayIsEqualTo(state.currentInvalidatedProject.buildOrder, buildOrder) ?
|
|
124676
|
-
state.currentInvalidatedProject :
|
|
124677
|
-
undefined;
|
|
124678
|
-
}
|
|
124679
124671
|
var options = state.options, projectPendingBuild = state.projectPendingBuild;
|
|
124680
124672
|
for (var projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) {
|
|
124681
124673
|
var project = buildOrder[projectIndex];
|
|
@@ -124708,9 +124700,9 @@ var ts;
|
|
|
124708
124700
|
watchPackageJsonFiles(state, project, projectPath, config);
|
|
124709
124701
|
}
|
|
124710
124702
|
var status = getUpToDateStatus(state, config, projectPath);
|
|
124711
|
-
verboseReportProjectStatus(state, project, status);
|
|
124712
124703
|
if (!options.force) {
|
|
124713
124704
|
if (status.type === ts.UpToDateStatusType.UpToDate) {
|
|
124705
|
+
verboseReportProjectStatus(state, project, status);
|
|
124714
124706
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124715
124707
|
projectPendingBuild.delete(projectPath);
|
|
124716
124708
|
// Up to date, skip
|
|
@@ -124722,10 +124714,18 @@ var ts;
|
|
|
124722
124714
|
}
|
|
124723
124715
|
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
|
|
124724
124716
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124725
|
-
return
|
|
124717
|
+
return {
|
|
124718
|
+
kind: InvalidatedProjectKind.UpdateOutputFileStamps,
|
|
124719
|
+
status: status,
|
|
124720
|
+
project: project,
|
|
124721
|
+
projectPath: projectPath,
|
|
124722
|
+
projectIndex: projectIndex,
|
|
124723
|
+
config: config
|
|
124724
|
+
};
|
|
124726
124725
|
}
|
|
124727
124726
|
}
|
|
124728
124727
|
if (status.type === ts.UpToDateStatusType.UpstreamBlocked) {
|
|
124728
|
+
verboseReportProjectStatus(state, project, status);
|
|
124729
124729
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124730
124730
|
projectPendingBuild.delete(projectPath);
|
|
124731
124731
|
if (options.verbose) {
|
|
@@ -124736,17 +124736,37 @@ var ts;
|
|
|
124736
124736
|
continue;
|
|
124737
124737
|
}
|
|
124738
124738
|
if (status.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
124739
|
+
verboseReportProjectStatus(state, project, status);
|
|
124739
124740
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
124740
124741
|
projectPendingBuild.delete(projectPath);
|
|
124741
124742
|
// Do nothing
|
|
124742
124743
|
continue;
|
|
124743
124744
|
}
|
|
124744
|
-
return
|
|
124745
|
-
|
|
124746
|
-
|
|
124745
|
+
return {
|
|
124746
|
+
kind: needsBuild(state, status, config) ?
|
|
124747
|
+
InvalidatedProjectKind.Build :
|
|
124748
|
+
InvalidatedProjectKind.UpdateBundle,
|
|
124749
|
+
status: status,
|
|
124750
|
+
project: project,
|
|
124751
|
+
projectPath: projectPath,
|
|
124752
|
+
projectIndex: projectIndex,
|
|
124753
|
+
config: config,
|
|
124754
|
+
};
|
|
124747
124755
|
}
|
|
124748
124756
|
return undefined;
|
|
124749
124757
|
}
|
|
124758
|
+
function createInvalidatedProjectWithInfo(state, info, buildOrder) {
|
|
124759
|
+
verboseReportProjectStatus(state, info.project, info.status);
|
|
124760
|
+
return info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps ?
|
|
124761
|
+
createBuildOrUpdateInvalidedProject(info.kind, state, info.project, info.projectPath, info.projectIndex, info.config, buildOrder) :
|
|
124762
|
+
createUpdateOutputFileStampsProject(state, info.project, info.projectPath, info.config, buildOrder);
|
|
124763
|
+
}
|
|
124764
|
+
function getNextInvalidatedProject(state, buildOrder, reportQueue) {
|
|
124765
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue);
|
|
124766
|
+
if (!info)
|
|
124767
|
+
return info;
|
|
124768
|
+
return createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
124769
|
+
}
|
|
124750
124770
|
function listEmittedFile(_a, proj, file) {
|
|
124751
124771
|
var write = _a.write;
|
|
124752
124772
|
if (write && proj.options.listEmittedFiles) {
|
|
@@ -125187,9 +125207,9 @@ var ts;
|
|
|
125187
125207
|
function invalidateProjectAndScheduleBuilds(state, resolvedPath, reloadLevel) {
|
|
125188
125208
|
state.reportFileChangeDetected = true;
|
|
125189
125209
|
invalidateProject(state, resolvedPath, reloadLevel);
|
|
125190
|
-
scheduleBuildInvalidatedProject(state);
|
|
125210
|
+
scheduleBuildInvalidatedProject(state, 250, /*changeDetected*/ true);
|
|
125191
125211
|
}
|
|
125192
|
-
function scheduleBuildInvalidatedProject(state) {
|
|
125212
|
+
function scheduleBuildInvalidatedProject(state, time, changeDetected) {
|
|
125193
125213
|
var hostWithWatch = state.hostWithWatch;
|
|
125194
125214
|
if (!hostWithWatch.setTimeout || !hostWithWatch.clearTimeout) {
|
|
125195
125215
|
return;
|
|
@@ -125197,25 +125217,38 @@ var ts;
|
|
|
125197
125217
|
if (state.timerToBuildInvalidatedProject) {
|
|
125198
125218
|
hostWithWatch.clearTimeout(state.timerToBuildInvalidatedProject);
|
|
125199
125219
|
}
|
|
125200
|
-
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject,
|
|
125220
|
+
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
|
|
125201
125221
|
}
|
|
125202
|
-
function buildNextInvalidatedProject(state) {
|
|
125222
|
+
function buildNextInvalidatedProject(state, changeDetected) {
|
|
125203
125223
|
state.timerToBuildInvalidatedProject = undefined;
|
|
125204
125224
|
if (state.reportFileChangeDetected) {
|
|
125205
125225
|
state.reportFileChangeDetected = false;
|
|
125206
125226
|
state.projectErrorsReported.clear();
|
|
125207
125227
|
reportWatchStatus(state, ts.Diagnostics.File_change_detected_Starting_incremental_compilation);
|
|
125208
125228
|
}
|
|
125229
|
+
var projectsBuilt = 0;
|
|
125209
125230
|
var buildOrder = getBuildOrder(state);
|
|
125210
125231
|
var invalidatedProject = getNextInvalidatedProject(state, buildOrder, /*reportQueue*/ false);
|
|
125211
125232
|
if (invalidatedProject) {
|
|
125212
125233
|
invalidatedProject.done();
|
|
125213
|
-
|
|
125214
|
-
|
|
125215
|
-
|
|
125216
|
-
|
|
125234
|
+
projectsBuilt++;
|
|
125235
|
+
while (state.projectPendingBuild.size) {
|
|
125236
|
+
// If already scheduled, skip
|
|
125237
|
+
if (state.timerToBuildInvalidatedProject)
|
|
125238
|
+
return;
|
|
125239
|
+
// Before scheduling check if the next project needs build
|
|
125240
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, /*reportQueue*/ false);
|
|
125241
|
+
if (!info)
|
|
125242
|
+
break; // Nothing to build any more
|
|
125243
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps && (changeDetected || projectsBuilt === 5)) {
|
|
125244
|
+
// Schedule next project for build
|
|
125245
|
+
scheduleBuildInvalidatedProject(state, 100, /*changeDetected*/ false);
|
|
125246
|
+
return;
|
|
125217
125247
|
}
|
|
125218
|
-
|
|
125248
|
+
var project = createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
125249
|
+
project.done();
|
|
125250
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps)
|
|
125251
|
+
projectsBuilt++;
|
|
125219
125252
|
}
|
|
125220
125253
|
}
|
|
125221
125254
|
disableCache(state);
|
|
@@ -125319,8 +125352,6 @@ var ts;
|
|
|
125319
125352
|
return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath);
|
|
125320
125353
|
},
|
|
125321
125354
|
invalidateProject: function (configFilePath, reloadLevel) { return invalidateProject(state, configFilePath, reloadLevel || ts.ConfigFileProgramReloadLevel.None); },
|
|
125322
|
-
buildNextInvalidatedProject: function () { return buildNextInvalidatedProject(state); },
|
|
125323
|
-
getAllParsedConfigs: function () { return ts.arrayFrom(ts.mapDefinedIterator(state.configFileCache.values(), function (config) { return isParsedCommandLine(config) ? config : undefined; })); },
|
|
125324
125355
|
close: function () { return stopWatching(state); },
|
|
125325
125356
|
};
|
|
125326
125357
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "4.8.0-dev.
|
|
5
|
+
"version": "4.8.0-dev.20220524",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|