@typescript-deploys/pr-build 4.8.0-pr-49157-6 → 4.8.0-pr-48997-18
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 +160 -113
- package/lib/tsserver.js +683 -476
- package/lib/tsserverlibrary.js +683 -476
- package/lib/typescript.js +441 -333
- package/lib/typescriptServices.js +441 -333
- package/lib/typingsInstaller.js +189 -146
- 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.20220523";
|
|
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
|
}
|
|
@@ -3854,7 +3855,7 @@ var ts;
|
|
|
3854
3855
|
}
|
|
3855
3856
|
ts.setSysLog = setSysLog;
|
|
3856
3857
|
function createDirectoryWatcherSupportingRecursive(_a) {
|
|
3857
|
-
var watchDirectory = _a.watchDirectory, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories,
|
|
3858
|
+
var watchDirectory = _a.watchDirectory, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, fileSystemEntryExists = _a.fileSystemEntryExists, realpath = _a.realpath, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout;
|
|
3858
3859
|
var cache = new ts.Map();
|
|
3859
3860
|
var callbackCache = ts.createMultiMap();
|
|
3860
3861
|
var cacheToUpdateChildWatches = new ts.Map();
|
|
@@ -3947,7 +3948,7 @@ var ts;
|
|
|
3947
3948
|
}
|
|
3948
3949
|
function nonSyncUpdateChildWatches(dirName, dirPath, fileName, options) {
|
|
3949
3950
|
var parentWatcher = cache.get(dirPath);
|
|
3950
|
-
if (parentWatcher &&
|
|
3951
|
+
if (parentWatcher && fileSystemEntryExists(dirName, 1)) {
|
|
3951
3952
|
scheduleUpdateChildWatches(dirName, dirPath, fileName, options);
|
|
3952
3953
|
return;
|
|
3953
3954
|
}
|
|
@@ -4015,7 +4016,7 @@ var ts;
|
|
|
4015
4016
|
if (!parentWatcher)
|
|
4016
4017
|
return false;
|
|
4017
4018
|
var newChildWatches;
|
|
4018
|
-
var hasChanges = ts.enumerateInsertsAndDeletes(
|
|
4019
|
+
var hasChanges = ts.enumerateInsertsAndDeletes(fileSystemEntryExists(parentDir, 1) ? ts.mapDefined(getAccessibleSortedChildDirectories(parentDir), function (child) {
|
|
4019
4020
|
var childFullName = ts.getNormalizedAbsolutePath(child, parentDir);
|
|
4020
4021
|
return !isIgnoredPath(childFullName, options) && filePathComparer(childFullName, ts.normalizePath(realpath(childFullName))) === 0 ? childFullName : undefined;
|
|
4021
4022
|
}) : ts.emptyArray, parentWatcher.childWatches, function (child, childWatcher) { return filePathComparer(child, childWatcher.dirName); }, createAndAddChildDirectoryWatcher, ts.closeFileWatcher, addChildDirectoryWatcher);
|
|
@@ -4046,10 +4047,10 @@ var ts;
|
|
|
4046
4047
|
return function (_fileName, eventKind) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", ""); };
|
|
4047
4048
|
}
|
|
4048
4049
|
ts.createFileWatcherCallback = createFileWatcherCallback;
|
|
4049
|
-
function createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4050
|
+
function createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileSystemEntryExists) {
|
|
4050
4051
|
return function (eventName) {
|
|
4051
4052
|
if (eventName === "rename") {
|
|
4052
|
-
callback(fileName,
|
|
4053
|
+
callback(fileName, fileSystemEntryExists(fileName, 0) ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted);
|
|
4053
4054
|
}
|
|
4054
4055
|
else {
|
|
4055
4056
|
callback(fileName, FileWatcherEventKind.Changed);
|
|
@@ -4071,11 +4072,12 @@ var ts;
|
|
|
4071
4072
|
};
|
|
4072
4073
|
}
|
|
4073
4074
|
function createSystemWatchFunctions(_a) {
|
|
4074
|
-
var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout,
|
|
4075
|
+
var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
|
|
4075
4076
|
var dynamicPollingWatchFile;
|
|
4076
4077
|
var fixedChunkSizePollingWatchFile;
|
|
4077
4078
|
var nonPollingWatchFile;
|
|
4078
4079
|
var hostRecursiveDirectoryWatcher;
|
|
4080
|
+
var hitSystemWatcherLimit = false;
|
|
4079
4081
|
return {
|
|
4080
4082
|
watchFile: watchFile,
|
|
4081
4083
|
watchDirectory: watchDirectory
|
|
@@ -4093,7 +4095,7 @@ var ts;
|
|
|
4093
4095
|
case ts.WatchFileKind.FixedChunkSizePolling:
|
|
4094
4096
|
return ensureFixedChunkSizePollingWatchFile()(fileName, callback, undefined, undefined);
|
|
4095
4097
|
case ts.WatchFileKind.UseFsEvents:
|
|
4096
|
-
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4098
|
+
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileSystemEntryExists), false, pollingInterval, ts.getFallbackOptions(options));
|
|
4097
4099
|
case ts.WatchFileKind.UseFsEventsOnParentDirectory:
|
|
4098
4100
|
if (!nonPollingWatchFile) {
|
|
4099
4101
|
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames);
|
|
@@ -4146,7 +4148,7 @@ var ts;
|
|
|
4146
4148
|
hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({
|
|
4147
4149
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
|
|
4148
4150
|
getCurrentDirectory: getCurrentDirectory,
|
|
4149
|
-
|
|
4151
|
+
fileSystemEntryExists: fileSystemEntryExists,
|
|
4150
4152
|
getAccessibleSortedChildDirectories: getAccessibleSortedChildDirectories,
|
|
4151
4153
|
watchDirectory: nonRecursiveWatchDirectory,
|
|
4152
4154
|
realpath: realpath,
|
|
@@ -4191,6 +4193,86 @@ var ts;
|
|
|
4191
4193
|
};
|
|
4192
4194
|
}
|
|
4193
4195
|
}
|
|
4196
|
+
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
4197
|
+
var lastDirectoryPartWithDirectorySeparator;
|
|
4198
|
+
var lastDirectoryPart;
|
|
4199
|
+
if (inodeWatching) {
|
|
4200
|
+
lastDirectoryPartWithDirectorySeparator = fileOrDirectory.substr(fileOrDirectory.lastIndexOf(ts.directorySeparator));
|
|
4201
|
+
lastDirectoryPart = lastDirectoryPartWithDirectorySeparator.slice(ts.directorySeparator.length);
|
|
4202
|
+
}
|
|
4203
|
+
var watcher = !fileSystemEntryExists(fileOrDirectory, entryKind) ?
|
|
4204
|
+
watchMissingFileSystemEntry() :
|
|
4205
|
+
watchPresentFileSystemEntry();
|
|
4206
|
+
return {
|
|
4207
|
+
close: function () {
|
|
4208
|
+
watcher.close();
|
|
4209
|
+
watcher = undefined;
|
|
4210
|
+
}
|
|
4211
|
+
};
|
|
4212
|
+
function updateWatcher(createWatcher) {
|
|
4213
|
+
if (watcher) {
|
|
4214
|
+
sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
|
|
4215
|
+
watcher.close();
|
|
4216
|
+
watcher = createWatcher();
|
|
4217
|
+
}
|
|
4218
|
+
}
|
|
4219
|
+
function watchPresentFileSystemEntry() {
|
|
4220
|
+
if (hitSystemWatcherLimit) {
|
|
4221
|
+
sysLog("sysLog:: " + fileOrDirectory + ":: Defaulting to watchFile");
|
|
4222
|
+
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
4223
|
+
}
|
|
4224
|
+
try {
|
|
4225
|
+
var presentWatcher = fsWatchWorker(fileOrDirectory, recursive, inodeWatching ?
|
|
4226
|
+
callbackChangingToMissingFileSystemEntry :
|
|
4227
|
+
function (eventName, relativeFileName) {
|
|
4228
|
+
sysLog("sysLog:: watchPresentFileSystemEntry:: " + fileOrDirectory + " " + entryKind + " " + eventName + ":: " + relativeFileName);
|
|
4229
|
+
callback(eventName, relativeFileName);
|
|
4230
|
+
});
|
|
4231
|
+
presentWatcher.on("error", function () {
|
|
4232
|
+
sysLog("sysLog:: watchPresentFileSystemEntry:: on Error " + fileOrDirectory + " " + entryKind + " rename, \"\"");
|
|
4233
|
+
callback("rename", "");
|
|
4234
|
+
updateWatcher(watchMissingFileSystemEntry);
|
|
4235
|
+
});
|
|
4236
|
+
return presentWatcher;
|
|
4237
|
+
}
|
|
4238
|
+
catch (e) {
|
|
4239
|
+
hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
|
|
4240
|
+
sysLog("sysLog:: " + fileOrDirectory + ":: Changing to watchFile");
|
|
4241
|
+
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
4242
|
+
}
|
|
4243
|
+
}
|
|
4244
|
+
function callbackChangingToMissingFileSystemEntry(event, relativeName) {
|
|
4245
|
+
sysLog("sysLog:: callbackChangingToMissingFileSystemEntry:: " + fileOrDirectory + " " + entryKind + " " + event + ":: " + relativeName + " " + inodeWatching + " " + lastDirectoryPart + " " + lastDirectoryPartWithDirectorySeparator);
|
|
4246
|
+
callback(event, relativeName);
|
|
4247
|
+
if (event === "rename" &&
|
|
4248
|
+
(!relativeName ||
|
|
4249
|
+
relativeName === lastDirectoryPart ||
|
|
4250
|
+
(relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) !== -1 && relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) === relativeName.length - lastDirectoryPartWithDirectorySeparator.length))) {
|
|
4251
|
+
if (inodeWatching) {
|
|
4252
|
+
updateWatcher(!fileSystemEntryExists(fileOrDirectory, entryKind) ? watchMissingFileSystemEntry : watchPresentFileSystemEntry);
|
|
4253
|
+
}
|
|
4254
|
+
else if (!fileSystemEntryExists(fileOrDirectory, entryKind)) {
|
|
4255
|
+
updateWatcher(watchMissingFileSystemEntry);
|
|
4256
|
+
}
|
|
4257
|
+
}
|
|
4258
|
+
}
|
|
4259
|
+
function watchPresentFileSystemEntryWithFsWatchFile() {
|
|
4260
|
+
return watchFile(fileOrDirectory, createFileWatcherCallback(function (eventName, relativeFileName) {
|
|
4261
|
+
sysLog("sysLog:: watchPresentFileSystemEntryWithFsWatchFile:: " + fileOrDirectory + " " + entryKind + " " + eventName + ":: " + relativeFileName);
|
|
4262
|
+
callback(eventName, relativeFileName);
|
|
4263
|
+
}), fallbackPollingInterval, fallbackOptions);
|
|
4264
|
+
}
|
|
4265
|
+
function watchMissingFileSystemEntry() {
|
|
4266
|
+
return watchFile(fileOrDirectory, function (_fileName, eventKind) {
|
|
4267
|
+
sysLog("sysLog:: watchMissingFileSystemEntry:: " + fileOrDirectory + " " + entryKind + " " + _fileName + ":: " + eventKind);
|
|
4268
|
+
if (eventKind === FileWatcherEventKind.Created && fileSystemEntryExists(fileOrDirectory, entryKind)) {
|
|
4269
|
+
sysLog("sysLog:: watchMissingFileSystemEntry:: Callback :: rename, \"\" and will update the watcher");
|
|
4270
|
+
callback("rename", "");
|
|
4271
|
+
updateWatcher(watchPresentFileSystemEntry);
|
|
4272
|
+
}
|
|
4273
|
+
}, fallbackPollingInterval, fallbackOptions);
|
|
4274
|
+
}
|
|
4275
|
+
}
|
|
4194
4276
|
}
|
|
4195
4277
|
ts.createSystemWatchFunctions = createSystemWatchFunctions;
|
|
4196
4278
|
function patchWriteFileEnsuringDirectory(sys) {
|
|
@@ -4232,7 +4314,6 @@ var ts;
|
|
|
4232
4314
|
}
|
|
4233
4315
|
var activeSession;
|
|
4234
4316
|
var profilePath = "./profile.cpuprofile";
|
|
4235
|
-
var hitSystemWatcherLimit = false;
|
|
4236
4317
|
var Buffer = require("buffer").Buffer;
|
|
4237
4318
|
var nodeVersion = getNodeMajorVersion();
|
|
4238
4319
|
var isNode4OrLater = nodeVersion >= 4;
|
|
@@ -4247,18 +4328,19 @@ var ts;
|
|
|
4247
4328
|
getModifiedTime: getModifiedTime,
|
|
4248
4329
|
setTimeout: setTimeout,
|
|
4249
4330
|
clearTimeout: clearTimeout,
|
|
4250
|
-
|
|
4331
|
+
fsWatchWorker: fsWatchWorker,
|
|
4251
4332
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
|
|
4252
4333
|
getCurrentDirectory: getCurrentDirectory,
|
|
4253
|
-
|
|
4334
|
+
fileSystemEntryExists: fileSystemEntryExists,
|
|
4254
4335
|
fsSupportsRecursiveFsWatch: fsSupportsRecursiveFsWatch,
|
|
4255
|
-
directoryExists: directoryExists,
|
|
4256
4336
|
getAccessibleSortedChildDirectories: function (path) { return getAccessibleFileSystemEntries(path).directories; },
|
|
4257
4337
|
realpath: realpath,
|
|
4258
4338
|
tscWatchFile: process.env.TSC_WATCHFILE,
|
|
4259
4339
|
useNonPollingWatchers: process.env.TSC_NONPOLLING_WATCHER,
|
|
4260
4340
|
tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,
|
|
4261
4341
|
defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
4342
|
+
inodeWatching: isLinuxOrMacOs,
|
|
4343
|
+
sysLog: sysLog,
|
|
4262
4344
|
}), watchFile = _c.watchFile, watchDirectory = _c.watchDirectory;
|
|
4263
4345
|
var nodeSystem = {
|
|
4264
4346
|
args: process.argv.slice(2),
|
|
@@ -4481,76 +4563,9 @@ var ts;
|
|
|
4481
4563
|
callback(fileName, eventKind);
|
|
4482
4564
|
}
|
|
4483
4565
|
}
|
|
4484
|
-
function
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
var lastDirectoryPart;
|
|
4488
|
-
if (isLinuxOrMacOs) {
|
|
4489
|
-
lastDirectoryPartWithDirectorySeparator = fileOrDirectory.substr(fileOrDirectory.lastIndexOf(ts.directorySeparator));
|
|
4490
|
-
lastDirectoryPart = lastDirectoryPartWithDirectorySeparator.slice(ts.directorySeparator.length);
|
|
4491
|
-
}
|
|
4492
|
-
var watcher = !fileSystemEntryExists(fileOrDirectory, entryKind) ?
|
|
4493
|
-
watchMissingFileSystemEntry() :
|
|
4494
|
-
watchPresentFileSystemEntry();
|
|
4495
|
-
return {
|
|
4496
|
-
close: function () {
|
|
4497
|
-
watcher.close();
|
|
4498
|
-
watcher = undefined;
|
|
4499
|
-
}
|
|
4500
|
-
};
|
|
4501
|
-
function invokeCallbackAndUpdateWatcher(createWatcher) {
|
|
4502
|
-
sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
|
|
4503
|
-
callback("rename", "");
|
|
4504
|
-
if (watcher) {
|
|
4505
|
-
watcher.close();
|
|
4506
|
-
watcher = createWatcher();
|
|
4507
|
-
}
|
|
4508
|
-
}
|
|
4509
|
-
function watchPresentFileSystemEntry() {
|
|
4510
|
-
if (options === undefined) {
|
|
4511
|
-
if (fsSupportsRecursiveFsWatch) {
|
|
4512
|
-
options = { persistent: true, recursive: !!recursive };
|
|
4513
|
-
}
|
|
4514
|
-
else {
|
|
4515
|
-
options = { persistent: true };
|
|
4516
|
-
}
|
|
4517
|
-
}
|
|
4518
|
-
if (hitSystemWatcherLimit) {
|
|
4519
|
-
sysLog("sysLog:: " + fileOrDirectory + ":: Defaulting to fsWatchFile");
|
|
4520
|
-
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
4521
|
-
}
|
|
4522
|
-
try {
|
|
4523
|
-
var presentWatcher = _fs.watch(fileOrDirectory, options, isLinuxOrMacOs ?
|
|
4524
|
-
callbackChangingToMissingFileSystemEntry :
|
|
4525
|
-
callback);
|
|
4526
|
-
presentWatcher.on("error", function () { return invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry); });
|
|
4527
|
-
return presentWatcher;
|
|
4528
|
-
}
|
|
4529
|
-
catch (e) {
|
|
4530
|
-
hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
|
|
4531
|
-
sysLog("sysLog:: " + fileOrDirectory + ":: Changing to fsWatchFile");
|
|
4532
|
-
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
4533
|
-
}
|
|
4534
|
-
}
|
|
4535
|
-
function callbackChangingToMissingFileSystemEntry(event, relativeName) {
|
|
4536
|
-
return event === "rename" &&
|
|
4537
|
-
(!relativeName ||
|
|
4538
|
-
relativeName === lastDirectoryPart ||
|
|
4539
|
-
(relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) !== -1 && relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) === relativeName.length - lastDirectoryPartWithDirectorySeparator.length)) &&
|
|
4540
|
-
!fileSystemEntryExists(fileOrDirectory, entryKind) ?
|
|
4541
|
-
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry) :
|
|
4542
|
-
callback(event, relativeName);
|
|
4543
|
-
}
|
|
4544
|
-
function watchPresentFileSystemEntryWithFsWatchFile() {
|
|
4545
|
-
return watchFile(fileOrDirectory, createFileWatcherCallback(callback), fallbackPollingInterval, fallbackOptions);
|
|
4546
|
-
}
|
|
4547
|
-
function watchMissingFileSystemEntry() {
|
|
4548
|
-
return watchFile(fileOrDirectory, function (_fileName, eventKind) {
|
|
4549
|
-
if (eventKind === FileWatcherEventKind.Created && fileSystemEntryExists(fileOrDirectory, entryKind)) {
|
|
4550
|
-
invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry);
|
|
4551
|
-
}
|
|
4552
|
-
}, fallbackPollingInterval, fallbackOptions);
|
|
4553
|
-
}
|
|
4566
|
+
function fsWatchWorker(fileOrDirectory, recursive, callback) {
|
|
4567
|
+
return _fs.watch(fileOrDirectory, fsSupportsRecursiveFsWatch ?
|
|
4568
|
+
{ persistent: true, recursive: !!recursive } : { persistent: true }, callback);
|
|
4554
4569
|
}
|
|
4555
4570
|
function readFileWorker(fileName, _encoding) {
|
|
4556
4571
|
var buffer;
|
|
@@ -51630,7 +51645,7 @@ var ts;
|
|
|
51630
51645
|
function substituteIndexedMappedType(objectType, index) {
|
|
51631
51646
|
var mapper = createTypeMapper([getTypeParameterFromMappedType(objectType)], [index]);
|
|
51632
51647
|
var templateMapper = combineTypeMappers(objectType.mapper, mapper);
|
|
51633
|
-
return instantiateType(getTemplateTypeFromMappedType(objectType), templateMapper);
|
|
51648
|
+
return instantiateType(getTemplateTypeFromMappedType(objectType.target || objectType), templateMapper);
|
|
51634
51649
|
}
|
|
51635
51650
|
function getIndexedAccessType(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) {
|
|
51636
51651
|
if (accessFlags === void 0) { accessFlags = 0; }
|
|
@@ -95544,7 +95559,7 @@ var ts;
|
|
|
95544
95559
|
originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
|
|
95545
95560
|
};
|
|
95546
95561
|
}
|
|
95547
|
-
if (originalDirectoryExists
|
|
95562
|
+
if (originalDirectoryExists) {
|
|
95548
95563
|
host.directoryExists = function (directory) {
|
|
95549
95564
|
var key = toPath(directory);
|
|
95550
95565
|
var value = directoryExistsCache.get(key);
|
|
@@ -95554,11 +95569,13 @@ var ts;
|
|
|
95554
95569
|
directoryExistsCache.set(key, !!newValue);
|
|
95555
95570
|
return newValue;
|
|
95556
95571
|
};
|
|
95557
|
-
|
|
95558
|
-
|
|
95559
|
-
|
|
95560
|
-
|
|
95561
|
-
|
|
95572
|
+
if (originalCreateDirectory) {
|
|
95573
|
+
host.createDirectory = function (directory) {
|
|
95574
|
+
var key = toPath(directory);
|
|
95575
|
+
directoryExistsCache.delete(key);
|
|
95576
|
+
originalCreateDirectory.call(host, directory);
|
|
95577
|
+
};
|
|
95578
|
+
}
|
|
95562
95579
|
}
|
|
95563
95580
|
return {
|
|
95564
95581
|
originalReadFile: originalReadFile,
|
|
@@ -102739,7 +102756,6 @@ var ts;
|
|
|
102739
102756
|
allProjectBuildPending: true,
|
|
102740
102757
|
needsSummary: true,
|
|
102741
102758
|
watchAllProjectsPending: watch,
|
|
102742
|
-
currentInvalidatedProject: undefined,
|
|
102743
102759
|
watch: watch,
|
|
102744
102760
|
allWatchedWildcardDirectories: new ts.Map(),
|
|
102745
102761
|
allWatchedInputFiles: new ts.Map(),
|
|
@@ -102964,7 +102980,6 @@ var ts;
|
|
|
102964
102980
|
})(InvalidatedProjectKind = ts.InvalidatedProjectKind || (ts.InvalidatedProjectKind = {}));
|
|
102965
102981
|
function doneInvalidatedProject(state, projectPath) {
|
|
102966
102982
|
state.projectPendingBuild.delete(projectPath);
|
|
102967
|
-
state.currentInvalidatedProject = undefined;
|
|
102968
102983
|
return state.diagnostics.has(projectPath) ?
|
|
102969
102984
|
ts.ExitStatus.DiagnosticsPresent_OutputsSkipped :
|
|
102970
102985
|
ts.ExitStatus.Success;
|
|
@@ -103299,16 +103314,11 @@ var ts;
|
|
|
103299
103314
|
!!ts.getConfigFileParsingDiagnostics(config).length ||
|
|
103300
103315
|
!ts.isIncrementalCompilation(config.options);
|
|
103301
103316
|
}
|
|
103302
|
-
function
|
|
103317
|
+
function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
|
|
103303
103318
|
if (!state.projectPendingBuild.size)
|
|
103304
103319
|
return undefined;
|
|
103305
103320
|
if (isCircularBuildOrder(buildOrder))
|
|
103306
103321
|
return undefined;
|
|
103307
|
-
if (state.currentInvalidatedProject) {
|
|
103308
|
-
return ts.arrayIsEqualTo(state.currentInvalidatedProject.buildOrder, buildOrder) ?
|
|
103309
|
-
state.currentInvalidatedProject :
|
|
103310
|
-
undefined;
|
|
103311
|
-
}
|
|
103312
103322
|
var options = state.options, projectPendingBuild = state.projectPendingBuild;
|
|
103313
103323
|
for (var projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) {
|
|
103314
103324
|
var project = buildOrder[projectIndex];
|
|
@@ -103340,9 +103350,9 @@ var ts;
|
|
|
103340
103350
|
watchPackageJsonFiles(state, project, projectPath, config);
|
|
103341
103351
|
}
|
|
103342
103352
|
var status = getUpToDateStatus(state, config, projectPath);
|
|
103343
|
-
verboseReportProjectStatus(state, project, status);
|
|
103344
103353
|
if (!options.force) {
|
|
103345
103354
|
if (status.type === ts.UpToDateStatusType.UpToDate) {
|
|
103355
|
+
verboseReportProjectStatus(state, project, status);
|
|
103346
103356
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103347
103357
|
projectPendingBuild.delete(projectPath);
|
|
103348
103358
|
if (options.dry) {
|
|
@@ -103352,10 +103362,18 @@ var ts;
|
|
|
103352
103362
|
}
|
|
103353
103363
|
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
|
|
103354
103364
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103355
|
-
return
|
|
103365
|
+
return {
|
|
103366
|
+
kind: InvalidatedProjectKind.UpdateOutputFileStamps,
|
|
103367
|
+
status: status,
|
|
103368
|
+
project: project,
|
|
103369
|
+
projectPath: projectPath,
|
|
103370
|
+
projectIndex: projectIndex,
|
|
103371
|
+
config: config
|
|
103372
|
+
};
|
|
103356
103373
|
}
|
|
103357
103374
|
}
|
|
103358
103375
|
if (status.type === ts.UpToDateStatusType.UpstreamBlocked) {
|
|
103376
|
+
verboseReportProjectStatus(state, project, status);
|
|
103359
103377
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103360
103378
|
projectPendingBuild.delete(projectPath);
|
|
103361
103379
|
if (options.verbose) {
|
|
@@ -103366,16 +103384,36 @@ var ts;
|
|
|
103366
103384
|
continue;
|
|
103367
103385
|
}
|
|
103368
103386
|
if (status.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
103387
|
+
verboseReportProjectStatus(state, project, status);
|
|
103369
103388
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103370
103389
|
projectPendingBuild.delete(projectPath);
|
|
103371
103390
|
continue;
|
|
103372
103391
|
}
|
|
103373
|
-
return
|
|
103374
|
-
|
|
103375
|
-
|
|
103392
|
+
return {
|
|
103393
|
+
kind: needsBuild(state, status, config) ?
|
|
103394
|
+
InvalidatedProjectKind.Build :
|
|
103395
|
+
InvalidatedProjectKind.UpdateBundle,
|
|
103396
|
+
status: status,
|
|
103397
|
+
project: project,
|
|
103398
|
+
projectPath: projectPath,
|
|
103399
|
+
projectIndex: projectIndex,
|
|
103400
|
+
config: config,
|
|
103401
|
+
};
|
|
103376
103402
|
}
|
|
103377
103403
|
return undefined;
|
|
103378
103404
|
}
|
|
103405
|
+
function createInvalidatedProjectWithInfo(state, info, buildOrder) {
|
|
103406
|
+
verboseReportProjectStatus(state, info.project, info.status);
|
|
103407
|
+
return info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps ?
|
|
103408
|
+
createBuildOrUpdateInvalidedProject(info.kind, state, info.project, info.projectPath, info.projectIndex, info.config, buildOrder) :
|
|
103409
|
+
createUpdateOutputFileStampsProject(state, info.project, info.projectPath, info.config, buildOrder);
|
|
103410
|
+
}
|
|
103411
|
+
function getNextInvalidatedProject(state, buildOrder, reportQueue) {
|
|
103412
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue);
|
|
103413
|
+
if (!info)
|
|
103414
|
+
return info;
|
|
103415
|
+
return createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
103416
|
+
}
|
|
103379
103417
|
function listEmittedFile(_a, proj, file) {
|
|
103380
103418
|
var write = _a.write;
|
|
103381
103419
|
if (write && proj.options.listEmittedFiles) {
|
|
@@ -103779,9 +103817,9 @@ var ts;
|
|
|
103779
103817
|
function invalidateProjectAndScheduleBuilds(state, resolvedPath, reloadLevel) {
|
|
103780
103818
|
state.reportFileChangeDetected = true;
|
|
103781
103819
|
invalidateProject(state, resolvedPath, reloadLevel);
|
|
103782
|
-
scheduleBuildInvalidatedProject(state);
|
|
103820
|
+
scheduleBuildInvalidatedProject(state, 250, true);
|
|
103783
103821
|
}
|
|
103784
|
-
function scheduleBuildInvalidatedProject(state) {
|
|
103822
|
+
function scheduleBuildInvalidatedProject(state, time, changeDetected) {
|
|
103785
103823
|
var hostWithWatch = state.hostWithWatch;
|
|
103786
103824
|
if (!hostWithWatch.setTimeout || !hostWithWatch.clearTimeout) {
|
|
103787
103825
|
return;
|
|
@@ -103789,24 +103827,35 @@ var ts;
|
|
|
103789
103827
|
if (state.timerToBuildInvalidatedProject) {
|
|
103790
103828
|
hostWithWatch.clearTimeout(state.timerToBuildInvalidatedProject);
|
|
103791
103829
|
}
|
|
103792
|
-
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject,
|
|
103830
|
+
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
|
|
103793
103831
|
}
|
|
103794
|
-
function buildNextInvalidatedProject(state) {
|
|
103832
|
+
function buildNextInvalidatedProject(state, changeDetected) {
|
|
103795
103833
|
state.timerToBuildInvalidatedProject = undefined;
|
|
103796
103834
|
if (state.reportFileChangeDetected) {
|
|
103797
103835
|
state.reportFileChangeDetected = false;
|
|
103798
103836
|
state.projectErrorsReported.clear();
|
|
103799
103837
|
reportWatchStatus(state, ts.Diagnostics.File_change_detected_Starting_incremental_compilation);
|
|
103800
103838
|
}
|
|
103839
|
+
var projectsBuilt = 0;
|
|
103801
103840
|
var buildOrder = getBuildOrder(state);
|
|
103802
103841
|
var invalidatedProject = getNextInvalidatedProject(state, buildOrder, false);
|
|
103803
103842
|
if (invalidatedProject) {
|
|
103804
103843
|
invalidatedProject.done();
|
|
103805
|
-
|
|
103806
|
-
|
|
103807
|
-
|
|
103844
|
+
projectsBuilt++;
|
|
103845
|
+
while (state.projectPendingBuild.size) {
|
|
103846
|
+
if (state.timerToBuildInvalidatedProject)
|
|
103847
|
+
return;
|
|
103848
|
+
var info = getNextInvalidatedProjectCreateInfo(state, buildOrder, false);
|
|
103849
|
+
if (!info)
|
|
103850
|
+
break;
|
|
103851
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps && (changeDetected || projectsBuilt === 5)) {
|
|
103852
|
+
scheduleBuildInvalidatedProject(state, 100, false);
|
|
103853
|
+
return;
|
|
103808
103854
|
}
|
|
103809
|
-
|
|
103855
|
+
var project = createInvalidatedProjectWithInfo(state, info, buildOrder);
|
|
103856
|
+
project.done();
|
|
103857
|
+
if (info.kind !== InvalidatedProjectKind.UpdateOutputFileStamps)
|
|
103858
|
+
projectsBuilt++;
|
|
103810
103859
|
}
|
|
103811
103860
|
}
|
|
103812
103861
|
disableCache(state);
|
|
@@ -103906,8 +103955,6 @@ var ts;
|
|
|
103906
103955
|
return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath);
|
|
103907
103956
|
},
|
|
103908
103957
|
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
103958
|
close: function () { return stopWatching(state); },
|
|
103912
103959
|
};
|
|
103913
103960
|
}
|