@typescript-deploys/pr-build 4.7.0-pr-48784-10 → 4.7.0-pr-48997-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS.md +1 -0
- package/lib/cs/diagnosticMessages.generated.json +2 -2
- package/lib/de/diagnosticMessages.generated.json +2 -2
- package/lib/es/diagnosticMessages.generated.json +2 -2
- package/lib/fr/diagnosticMessages.generated.json +2 -2
- package/lib/it/diagnosticMessages.generated.json +2 -2
- package/lib/ja/diagnosticMessages.generated.json +2 -2
- package/lib/ko/diagnosticMessages.generated.json +2 -2
- package/lib/lib.es2020.bigint.d.ts +4 -4
- package/lib/lib.es2022.d.ts +1 -0
- package/lib/lib.es2022.intl.d.ts +111 -0
- package/lib/lib.es5.d.ts +14 -14
- package/lib/pl/diagnosticMessages.generated.json +2 -2
- package/lib/pt-br/diagnosticMessages.generated.json +2 -2
- package/lib/ru/diagnosticMessages.generated.json +2 -2
- package/lib/tr/diagnosticMessages.generated.json +2 -2
- package/lib/tsc.js +885 -1110
- package/lib/tsserver.js +1093 -1254
- package/lib/tsserverlibrary.d.ts +8 -8
- package/lib/tsserverlibrary.js +1093 -1254
- package/lib/typescript.d.ts +8 -8
- package/lib/typescript.js +1078 -1242
- package/lib/typescriptServices.d.ts +8 -8
- package/lib/typescriptServices.js +1078 -1242
- package/lib/typingsInstaller.js +1025 -1206
- package/lib/zh-cn/diagnosticMessages.generated.json +2 -2
- package/lib/zh-tw/diagnosticMessages.generated.json +2 -2
- 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.7";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-insiders.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-insiders.20220506";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -3405,7 +3405,7 @@ var ts;
|
|
|
3405
3405
|
(function (ModuleResolutionKind) {
|
|
3406
3406
|
ModuleResolutionKind[ModuleResolutionKind["Classic"] = 1] = "Classic";
|
|
3407
3407
|
ModuleResolutionKind[ModuleResolutionKind["NodeJs"] = 2] = "NodeJs";
|
|
3408
|
-
ModuleResolutionKind[ModuleResolutionKind["
|
|
3408
|
+
ModuleResolutionKind[ModuleResolutionKind["Node16"] = 3] = "Node16";
|
|
3409
3409
|
ModuleResolutionKind[ModuleResolutionKind["NodeNext"] = 99] = "NodeNext";
|
|
3410
3410
|
})(ModuleResolutionKind = ts.ModuleResolutionKind || (ts.ModuleResolutionKind = {}));
|
|
3411
3411
|
var ModuleDetectionKind;
|
|
@@ -3448,7 +3448,7 @@ var ts;
|
|
|
3448
3448
|
ModuleKind[ModuleKind["ES2020"] = 6] = "ES2020";
|
|
3449
3449
|
ModuleKind[ModuleKind["ES2022"] = 7] = "ES2022";
|
|
3450
3450
|
ModuleKind[ModuleKind["ESNext"] = 99] = "ESNext";
|
|
3451
|
-
ModuleKind[ModuleKind["
|
|
3451
|
+
ModuleKind[ModuleKind["Node16"] = 100] = "Node16";
|
|
3452
3452
|
ModuleKind[ModuleKind["NodeNext"] = 199] = "NodeNext";
|
|
3453
3453
|
})(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {}));
|
|
3454
3454
|
ts.commentPragmas = {
|
|
@@ -3745,7 +3745,7 @@ var ts;
|
|
|
3745
3745
|
};
|
|
3746
3746
|
}
|
|
3747
3747
|
function createDirectoryWatcher(dirName, dirPath, fallbackOptions) {
|
|
3748
|
-
var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName
|
|
3748
|
+
var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName) {
|
|
3749
3749
|
if (!ts.isString(relativeFileName))
|
|
3750
3750
|
return;
|
|
3751
3751
|
var fileName = ts.getNormalizedAbsolutePath(relativeFileName, dirName);
|
|
@@ -3753,7 +3753,7 @@ var ts;
|
|
|
3753
3753
|
if (callbacks) {
|
|
3754
3754
|
for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
|
|
3755
3755
|
var fileCallback = callbacks_1[_i];
|
|
3756
|
-
fileCallback(fileName, FileWatcherEventKind.Changed
|
|
3756
|
+
fileCallback(fileName, FileWatcherEventKind.Changed);
|
|
3757
3757
|
}
|
|
3758
3758
|
}
|
|
3759
3759
|
}, false, PollingInterval.Medium, fallbackOptions);
|
|
@@ -3805,7 +3805,7 @@ var ts;
|
|
|
3805
3805
|
}
|
|
3806
3806
|
else {
|
|
3807
3807
|
cache.set(path, {
|
|
3808
|
-
watcher: watchFile(fileName, function (fileName, eventKind
|
|
3808
|
+
watcher: watchFile(fileName, function (fileName, eventKind) { return ts.forEach(callbacksCache.get(path), function (cb) { return cb(fileName, eventKind); }); }, pollingInterval, options),
|
|
3809
3809
|
refCount: 1
|
|
3810
3810
|
});
|
|
3811
3811
|
}
|
|
@@ -3829,7 +3829,7 @@ var ts;
|
|
|
3829
3829
|
var newTime = modifiedTime.getTime();
|
|
3830
3830
|
if (oldTime !== newTime) {
|
|
3831
3831
|
watchedFile.mtime = modifiedTime;
|
|
3832
|
-
watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime)
|
|
3832
|
+
watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime));
|
|
3833
3833
|
return true;
|
|
3834
3834
|
}
|
|
3835
3835
|
return false;
|
|
@@ -3854,7 +3854,7 @@ var ts;
|
|
|
3854
3854
|
}
|
|
3855
3855
|
ts.setSysLog = setSysLog;
|
|
3856
3856
|
function createDirectoryWatcherSupportingRecursive(_a) {
|
|
3857
|
-
var watchDirectory = _a.watchDirectory, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories,
|
|
3857
|
+
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
3858
|
var cache = new ts.Map();
|
|
3859
3859
|
var callbackCache = ts.createMultiMap();
|
|
3860
3860
|
var cacheToUpdateChildWatches = new ts.Map();
|
|
@@ -3947,7 +3947,7 @@ var ts;
|
|
|
3947
3947
|
}
|
|
3948
3948
|
function nonSyncUpdateChildWatches(dirName, dirPath, fileName, options) {
|
|
3949
3949
|
var parentWatcher = cache.get(dirPath);
|
|
3950
|
-
if (parentWatcher &&
|
|
3950
|
+
if (parentWatcher && fileSystemEntryExists(dirName, 1)) {
|
|
3951
3951
|
scheduleUpdateChildWatches(dirName, dirPath, fileName, options);
|
|
3952
3952
|
return;
|
|
3953
3953
|
}
|
|
@@ -4015,7 +4015,7 @@ var ts;
|
|
|
4015
4015
|
if (!parentWatcher)
|
|
4016
4016
|
return false;
|
|
4017
4017
|
var newChildWatches;
|
|
4018
|
-
var hasChanges = ts.enumerateInsertsAndDeletes(
|
|
4018
|
+
var hasChanges = ts.enumerateInsertsAndDeletes(fileSystemEntryExists(parentDir, 1) ? ts.mapDefined(getAccessibleSortedChildDirectories(parentDir), function (child) {
|
|
4019
4019
|
var childFullName = ts.getNormalizedAbsolutePath(child, parentDir);
|
|
4020
4020
|
return !isIgnoredPath(childFullName, options) && filePathComparer(childFullName, ts.normalizePath(realpath(childFullName))) === 0 ? childFullName : undefined;
|
|
4021
4021
|
}) : ts.emptyArray, parentWatcher.childWatches, function (child, childWatcher) { return filePathComparer(child, childWatcher.dirName); }, createAndAddChildDirectoryWatcher, ts.closeFileWatcher, addChildDirectoryWatcher);
|
|
@@ -4043,17 +4043,16 @@ var ts;
|
|
|
4043
4043
|
}
|
|
4044
4044
|
ts.createDirectoryWatcherSupportingRecursive = createDirectoryWatcherSupportingRecursive;
|
|
4045
4045
|
function createFileWatcherCallback(callback) {
|
|
4046
|
-
return function (_fileName, eventKind
|
|
4046
|
+
return function (_fileName, eventKind) { return callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", ""); };
|
|
4047
4047
|
}
|
|
4048
4048
|
ts.createFileWatcherCallback = createFileWatcherCallback;
|
|
4049
|
-
function createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4050
|
-
return function (eventName
|
|
4049
|
+
function createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileSystemEntryExists) {
|
|
4050
|
+
return function (eventName) {
|
|
4051
4051
|
if (eventName === "rename") {
|
|
4052
|
-
|
|
4053
|
-
callback(fileName, modifiedTime !== ts.missingFileModifiedTime ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted, modifiedTime);
|
|
4052
|
+
callback(fileName, fileSystemEntryExists(fileName, 0) ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted);
|
|
4054
4053
|
}
|
|
4055
4054
|
else {
|
|
4056
|
-
callback(fileName, FileWatcherEventKind.Changed
|
|
4055
|
+
callback(fileName, FileWatcherEventKind.Changed);
|
|
4057
4056
|
}
|
|
4058
4057
|
};
|
|
4059
4058
|
}
|
|
@@ -4072,11 +4071,12 @@ var ts;
|
|
|
4072
4071
|
};
|
|
4073
4072
|
}
|
|
4074
4073
|
function createSystemWatchFunctions(_a) {
|
|
4075
|
-
var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout,
|
|
4074
|
+
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;
|
|
4076
4075
|
var dynamicPollingWatchFile;
|
|
4077
4076
|
var fixedChunkSizePollingWatchFile;
|
|
4078
4077
|
var nonPollingWatchFile;
|
|
4079
4078
|
var hostRecursiveDirectoryWatcher;
|
|
4079
|
+
var hitSystemWatcherLimit = false;
|
|
4080
4080
|
return {
|
|
4081
4081
|
watchFile: watchFile,
|
|
4082
4082
|
watchDirectory: watchDirectory
|
|
@@ -4094,7 +4094,7 @@ var ts;
|
|
|
4094
4094
|
case ts.WatchFileKind.FixedChunkSizePolling:
|
|
4095
4095
|
return ensureFixedChunkSizePollingWatchFile()(fileName, callback, undefined, undefined);
|
|
4096
4096
|
case ts.WatchFileKind.UseFsEvents:
|
|
4097
|
-
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback,
|
|
4097
|
+
return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileSystemEntryExists), false, pollingInterval, ts.getFallbackOptions(options));
|
|
4098
4098
|
case ts.WatchFileKind.UseFsEventsOnParentDirectory:
|
|
4099
4099
|
if (!nonPollingWatchFile) {
|
|
4100
4100
|
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames);
|
|
@@ -4147,7 +4147,7 @@ var ts;
|
|
|
4147
4147
|
hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({
|
|
4148
4148
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
|
|
4149
4149
|
getCurrentDirectory: getCurrentDirectory,
|
|
4150
|
-
|
|
4150
|
+
fileSystemEntryExists: fileSystemEntryExists,
|
|
4151
4151
|
getAccessibleSortedChildDirectories: getAccessibleSortedChildDirectories,
|
|
4152
4152
|
watchDirectory: nonRecursiveWatchDirectory,
|
|
4153
4153
|
realpath: realpath,
|
|
@@ -4192,6 +4192,71 @@ var ts;
|
|
|
4192
4192
|
};
|
|
4193
4193
|
}
|
|
4194
4194
|
}
|
|
4195
|
+
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
4196
|
+
var lastDirectoryPartWithDirectorySeparator;
|
|
4197
|
+
var lastDirectoryPart;
|
|
4198
|
+
if (inodeWatching) {
|
|
4199
|
+
lastDirectoryPartWithDirectorySeparator = fileOrDirectory.substr(fileOrDirectory.lastIndexOf(ts.directorySeparator));
|
|
4200
|
+
lastDirectoryPart = lastDirectoryPartWithDirectorySeparator.slice(ts.directorySeparator.length);
|
|
4201
|
+
}
|
|
4202
|
+
var watcher = !fileSystemEntryExists(fileOrDirectory, entryKind) ?
|
|
4203
|
+
watchMissingFileSystemEntry() :
|
|
4204
|
+
watchPresentFileSystemEntry();
|
|
4205
|
+
return {
|
|
4206
|
+
close: function () {
|
|
4207
|
+
watcher.close();
|
|
4208
|
+
watcher = undefined;
|
|
4209
|
+
}
|
|
4210
|
+
};
|
|
4211
|
+
function updateWatcher(createWatcher) {
|
|
4212
|
+
if (watcher) {
|
|
4213
|
+
sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
|
|
4214
|
+
watcher.close();
|
|
4215
|
+
watcher = createWatcher();
|
|
4216
|
+
}
|
|
4217
|
+
}
|
|
4218
|
+
function watchPresentFileSystemEntry() {
|
|
4219
|
+
if (hitSystemWatcherLimit) {
|
|
4220
|
+
sysLog("sysLog:: " + fileOrDirectory + ":: Defaulting to watchFile");
|
|
4221
|
+
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
4222
|
+
}
|
|
4223
|
+
try {
|
|
4224
|
+
var presentWatcher = fsWatchWorker(fileOrDirectory, recursive, inodeWatching ?
|
|
4225
|
+
callbackChangingToMissingFileSystemEntry :
|
|
4226
|
+
callback);
|
|
4227
|
+
presentWatcher.on("error", function () {
|
|
4228
|
+
callback("rename", "");
|
|
4229
|
+
updateWatcher(watchMissingFileSystemEntry);
|
|
4230
|
+
});
|
|
4231
|
+
return presentWatcher;
|
|
4232
|
+
}
|
|
4233
|
+
catch (e) {
|
|
4234
|
+
hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
|
|
4235
|
+
sysLog("sysLog:: " + fileOrDirectory + ":: Changing to watchFile");
|
|
4236
|
+
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
4237
|
+
}
|
|
4238
|
+
}
|
|
4239
|
+
function callbackChangingToMissingFileSystemEntry(event, relativeName) {
|
|
4240
|
+
callback(event, relativeName);
|
|
4241
|
+
if (event === "rename" &&
|
|
4242
|
+
(!relativeName ||
|
|
4243
|
+
relativeName === lastDirectoryPart ||
|
|
4244
|
+
(relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) !== -1 && relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) === relativeName.length - lastDirectoryPartWithDirectorySeparator.length))) {
|
|
4245
|
+
updateWatcher(!fileSystemEntryExists(fileOrDirectory, entryKind) ? watchMissingFileSystemEntry : watchPresentFileSystemEntry);
|
|
4246
|
+
}
|
|
4247
|
+
}
|
|
4248
|
+
function watchPresentFileSystemEntryWithFsWatchFile() {
|
|
4249
|
+
return watchFile(fileOrDirectory, createFileWatcherCallback(callback), fallbackPollingInterval, fallbackOptions);
|
|
4250
|
+
}
|
|
4251
|
+
function watchMissingFileSystemEntry() {
|
|
4252
|
+
return watchFile(fileOrDirectory, function (_fileName, eventKind) {
|
|
4253
|
+
if (eventKind === FileWatcherEventKind.Created && fileSystemEntryExists(fileOrDirectory, entryKind)) {
|
|
4254
|
+
callback("rename", "");
|
|
4255
|
+
updateWatcher(watchPresentFileSystemEntry);
|
|
4256
|
+
}
|
|
4257
|
+
}, fallbackPollingInterval, fallbackOptions);
|
|
4258
|
+
}
|
|
4259
|
+
}
|
|
4195
4260
|
}
|
|
4196
4261
|
ts.createSystemWatchFunctions = createSystemWatchFunctions;
|
|
4197
4262
|
function patchWriteFileEnsuringDirectory(sys) {
|
|
@@ -4233,7 +4298,6 @@ var ts;
|
|
|
4233
4298
|
}
|
|
4234
4299
|
var activeSession;
|
|
4235
4300
|
var profilePath = "./profile.cpuprofile";
|
|
4236
|
-
var hitSystemWatcherLimit = false;
|
|
4237
4301
|
var Buffer = require("buffer").Buffer;
|
|
4238
4302
|
var nodeVersion = getNodeMajorVersion();
|
|
4239
4303
|
var isNode4OrLater = nodeVersion >= 4;
|
|
@@ -4248,17 +4312,19 @@ var ts;
|
|
|
4248
4312
|
getModifiedTime: getModifiedTime,
|
|
4249
4313
|
setTimeout: setTimeout,
|
|
4250
4314
|
clearTimeout: clearTimeout,
|
|
4251
|
-
|
|
4315
|
+
fsWatchWorker: fsWatchWorker,
|
|
4252
4316
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
|
|
4253
4317
|
getCurrentDirectory: getCurrentDirectory,
|
|
4318
|
+
fileSystemEntryExists: fileSystemEntryExists,
|
|
4254
4319
|
fsSupportsRecursiveFsWatch: fsSupportsRecursiveFsWatch,
|
|
4255
|
-
directoryExists: directoryExists,
|
|
4256
4320
|
getAccessibleSortedChildDirectories: function (path) { return getAccessibleFileSystemEntries(path).directories; },
|
|
4257
4321
|
realpath: realpath,
|
|
4258
4322
|
tscWatchFile: process.env.TSC_WATCHFILE,
|
|
4259
4323
|
useNonPollingWatchers: process.env.TSC_NONPOLLING_WATCHER,
|
|
4260
4324
|
tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,
|
|
4261
4325
|
defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
4326
|
+
inodeWatching: isLinuxOrMacOs,
|
|
4327
|
+
sysLog: sysLog,
|
|
4262
4328
|
}), watchFile = _c.watchFile, watchDirectory = _c.watchDirectory;
|
|
4263
4329
|
var nodeSystem = {
|
|
4264
4330
|
args: process.argv.slice(2),
|
|
@@ -4478,83 +4544,12 @@ var ts;
|
|
|
4478
4544
|
else {
|
|
4479
4545
|
eventKind = FileWatcherEventKind.Changed;
|
|
4480
4546
|
}
|
|
4481
|
-
callback(fileName, eventKind
|
|
4547
|
+
callback(fileName, eventKind);
|
|
4482
4548
|
}
|
|
4483
4549
|
}
|
|
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, modifiedTime) {
|
|
4502
|
-
sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
|
|
4503
|
-
callback("rename", "", modifiedTime);
|
|
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
|
-
var modifiedTime = getModifiedTime(fileOrDirectory) || ts.missingFileModifiedTime;
|
|
4537
|
-
return event === "rename" &&
|
|
4538
|
-
(!relativeName ||
|
|
4539
|
-
relativeName === lastDirectoryPart ||
|
|
4540
|
-
(relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) !== -1 && relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) === relativeName.length - lastDirectoryPartWithDirectorySeparator.length)) &&
|
|
4541
|
-
modifiedTime === ts.missingFileModifiedTime ?
|
|
4542
|
-
invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry, modifiedTime) :
|
|
4543
|
-
callback(event, relativeName, modifiedTime);
|
|
4544
|
-
}
|
|
4545
|
-
function watchPresentFileSystemEntryWithFsWatchFile() {
|
|
4546
|
-
return watchFile(fileOrDirectory, createFileWatcherCallback(callback), fallbackPollingInterval, fallbackOptions);
|
|
4547
|
-
}
|
|
4548
|
-
function watchMissingFileSystemEntry() {
|
|
4549
|
-
return watchFile(fileOrDirectory, function (_fileName, eventKind, modifiedTime) {
|
|
4550
|
-
if (eventKind === FileWatcherEventKind.Created) {
|
|
4551
|
-
modifiedTime || (modifiedTime = getModifiedTime(fileOrDirectory) || ts.missingFileModifiedTime);
|
|
4552
|
-
if (modifiedTime !== ts.missingFileModifiedTime) {
|
|
4553
|
-
invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry, modifiedTime);
|
|
4554
|
-
}
|
|
4555
|
-
}
|
|
4556
|
-
}, fallbackPollingInterval, fallbackOptions);
|
|
4557
|
-
}
|
|
4550
|
+
function fsWatchWorker(fileOrDirectory, recursive, callback) {
|
|
4551
|
+
return _fs.watch(fileOrDirectory, fsSupportsRecursiveFsWatch ?
|
|
4552
|
+
{ persistent: true, recursive: !!recursive } : { persistent: true }, callback);
|
|
4558
4553
|
}
|
|
4559
4554
|
function readFileWorker(fileName, _encoding) {
|
|
4560
4555
|
var buffer;
|
|
@@ -4690,17 +4685,12 @@ var ts;
|
|
|
4690
4685
|
}
|
|
4691
4686
|
function getModifiedTime(path) {
|
|
4692
4687
|
var _a;
|
|
4693
|
-
var originalStackTraceLimit = Error.stackTraceLimit;
|
|
4694
|
-
Error.stackTraceLimit = 0;
|
|
4695
4688
|
try {
|
|
4696
4689
|
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
|
|
4697
4690
|
}
|
|
4698
4691
|
catch (e) {
|
|
4699
4692
|
return undefined;
|
|
4700
4693
|
}
|
|
4701
|
-
finally {
|
|
4702
|
-
Error.stackTraceLimit = originalStackTraceLimit;
|
|
4703
|
-
}
|
|
4704
4694
|
}
|
|
4705
4695
|
function setModifiedTime(path, time) {
|
|
4706
4696
|
try {
|
|
@@ -5451,6 +5441,7 @@ var ts;
|
|
|
5451
5441
|
_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias: diag(1274, ts.DiagnosticCategory.Error, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274", "'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),
|
|
5452
5442
|
with_statements_are_not_allowed_in_an_async_function_block: diag(1300, ts.DiagnosticCategory.Error, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
|
|
5453
5443
|
await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."),
|
|
5444
|
+
The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, ts.DiagnosticCategory.Error, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."),
|
|
5454
5445
|
Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern: diag(1312, ts.DiagnosticCategory.Error, "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."),
|
|
5455
5446
|
The_body_of_an_if_statement_cannot_be_the_empty_statement: diag(1313, ts.DiagnosticCategory.Error, "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", "The body of an 'if' statement cannot be the empty statement."),
|
|
5456
5447
|
Global_module_exports_may_only_appear_in_module_files: diag(1314, ts.DiagnosticCategory.Error, "Global_module_exports_may_only_appear_in_module_files_1314", "Global module exports may only appear in module files."),
|
|
@@ -5462,8 +5453,8 @@ var ts;
|
|
|
5462
5453
|
Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, ts.DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),
|
|
5463
5454
|
Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, ts.DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),
|
|
5464
5455
|
Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, ts.DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),
|
|
5465
|
-
|
|
5466
|
-
|
|
5456
|
+
Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."),
|
|
5457
|
+
Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."),
|
|
5467
5458
|
Argument_of_dynamic_import_cannot_be_spread_element: diag(1325, ts.DiagnosticCategory.Error, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."),
|
|
5468
5459
|
This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: diag(1326, ts.DiagnosticCategory.Error, "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),
|
|
5469
5460
|
String_literal_with_double_quotes_expected: diag(1327, ts.DiagnosticCategory.Error, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."),
|
|
@@ -5480,7 +5471,7 @@ var ts;
|
|
|
5480
5471
|
Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."),
|
|
5481
5472
|
Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),
|
|
5482
5473
|
Type_arguments_cannot_be_used_here: diag(1342, ts.DiagnosticCategory.Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."),
|
|
5483
|
-
|
|
5474
|
+
The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),
|
|
5484
5475
|
A_label_is_not_allowed_here: diag(1344, ts.DiagnosticCategory.Error, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."),
|
|
5485
5476
|
An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, ts.DiagnosticCategory.Error, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."),
|
|
5486
5477
|
This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, ts.DiagnosticCategory.Error, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."),
|
|
@@ -5511,7 +5502,7 @@ var ts;
|
|
|
5511
5502
|
await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
|
|
5512
5503
|
_0_was_imported_here: diag(1376, ts.DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."),
|
|
5513
5504
|
_0_was_exported_here: diag(1377, ts.DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."),
|
|
5514
|
-
|
|
5505
|
+
Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),
|
|
5515
5506
|
An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."),
|
|
5516
5507
|
An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."),
|
|
5517
5508
|
Unexpected_token_Did_you_mean_or_rbrace: diag(1381, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"),
|
|
@@ -5563,7 +5554,7 @@ var ts;
|
|
|
5563
5554
|
File_redirects_to_file_0: diag(1429, ts.DiagnosticCategory.Message, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"),
|
|
5564
5555
|
The_file_is_in_the_program_because_Colon: diag(1430, ts.DiagnosticCategory.Message, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"),
|
|
5565
5556
|
for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1431, ts.DiagnosticCategory.Error, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
|
|
5566
|
-
|
|
5557
|
+
Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(1432, ts.DiagnosticCategory.Error, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),
|
|
5567
5558
|
Decorators_may_not_be_applied_to_this_parameters: diag(1433, ts.DiagnosticCategory.Error, "Decorators_may_not_be_applied_to_this_parameters_1433", "Decorators may not be applied to 'this' parameters."),
|
|
5568
5559
|
Unexpected_keyword_or_identifier: diag(1434, ts.DiagnosticCategory.Error, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."),
|
|
5569
5560
|
Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, ts.DiagnosticCategory.Error, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"),
|
|
@@ -5581,7 +5572,7 @@ var ts;
|
|
|
5581
5572
|
Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, ts.DiagnosticCategory.Message, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."),
|
|
5582
5573
|
Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, ts.DiagnosticCategory.Message, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"),
|
|
5583
5574
|
Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, ts.DiagnosticCategory.Error, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),
|
|
5584
|
-
|
|
5575
|
+
Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, ts.DiagnosticCategory.Error, "Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "Resolution modes are only supported when `moduleResolution` is `node16` or `nodenext`."),
|
|
5585
5576
|
resolution_mode_should_be_either_require_or_import: diag(1453, ts.DiagnosticCategory.Error, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."),
|
|
5586
5577
|
resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, ts.DiagnosticCategory.Error, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."),
|
|
5587
5578
|
resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, ts.DiagnosticCategory.Error, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."),
|
|
@@ -5592,7 +5583,7 @@ var ts;
|
|
|
5592
5583
|
An_import_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1473, ts.DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473", "An import declaration can only be used at the top level of a module."),
|
|
5593
5584
|
An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, ts.DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."),
|
|
5594
5585
|
Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, ts.DiagnosticCategory.Message, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."),
|
|
5595
|
-
|
|
5586
|
+
auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, ts.DiagnosticCategory.Message, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."),
|
|
5596
5587
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
5597
5588
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
5598
5589
|
Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", undefined, true),
|
|
@@ -5601,7 +5592,8 @@ var ts;
|
|
|
5601
5592
|
Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2205, ts.DiagnosticCategory.Error, "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", undefined, true),
|
|
5602
5593
|
The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: diag(2206, ts.DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),
|
|
5603
5594
|
The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: diag(2207, ts.DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),
|
|
5604
|
-
|
|
5595
|
+
The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2209, ts.DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209", "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),
|
|
5596
|
+
The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2210, ts.DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210", "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),
|
|
5605
5597
|
Duplicate_identifier_0: diag(2300, ts.DiagnosticCategory.Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."),
|
|
5606
5598
|
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2301, ts.DiagnosticCategory.Error, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
|
|
5607
5599
|
Static_members_cannot_reference_class_type_parameters: diag(2302, ts.DiagnosticCategory.Error, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."),
|
|
@@ -6079,8 +6071,8 @@ var ts;
|
|
|
6079
6071
|
Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, ts.DiagnosticCategory.Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."),
|
|
6080
6072
|
Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, ts.DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
|
|
6081
6073
|
Cannot_find_namespace_0_Did_you_mean_1: diag(2833, ts.DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
|
|
6082
|
-
|
|
6083
|
-
|
|
6074
|
+
Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, ts.DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),
|
|
6075
|
+
Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, ts.DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),
|
|
6084
6076
|
Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, ts.DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),
|
|
6085
6077
|
Import_assertion_values_must_be_string_literal_expressions: diag(2837, ts.DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
|
|
6086
6078
|
All_declarations_of_0_must_have_identical_constraints: diag(2838, ts.DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
|
|
@@ -6493,8 +6485,8 @@ var ts;
|
|
|
6493
6485
|
Cannot_prepend_project_0_because_it_does_not_have_outFile_set: diag(6308, ts.DiagnosticCategory.Error, "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308", "Cannot prepend project '{0}' because it does not have 'outFile' set"),
|
|
6494
6486
|
Output_file_0_from_project_1_does_not_exist: diag(6309, ts.DiagnosticCategory.Error, "Output_file_0_from_project_1_does_not_exist_6309", "Output file '{0}' from project '{1}' does not exist"),
|
|
6495
6487
|
Referenced_project_0_may_not_disable_emit: diag(6310, ts.DiagnosticCategory.Error, "Referenced_project_0_may_not_disable_emit_6310", "Referenced project '{0}' may not disable emit."),
|
|
6496
|
-
|
|
6497
|
-
|
|
6488
|
+
Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2: diag(6350, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350", "Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'"),
|
|
6489
|
+
Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2: diag(6351, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'"),
|
|
6498
6490
|
Project_0_is_out_of_date_because_output_file_1_does_not_exist: diag(6352, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", "Project '{0}' is out of date because output file '{1}' does not exist"),
|
|
6499
6491
|
Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date: diag(6353, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", "Project '{0}' is out of date because its dependency '{1}' is out of date"),
|
|
6500
6492
|
Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies: diag(6354, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", "Project '{0}' is up to date with .d.ts files from its dependencies"),
|
|
@@ -6538,8 +6530,6 @@ var ts;
|
|
|
6538
6530
|
Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6396, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),
|
|
6539
6531
|
Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6397, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),
|
|
6540
6532
|
Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6398, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),
|
|
6541
|
-
Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_are_not_emitted: diag(6399, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_are_not_emitted_6399", "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes are not emitted"),
|
|
6542
|
-
Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_files: diag(6400, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs update to timestamps of output files that are older than input files"),
|
|
6543
6533
|
The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"),
|
|
6544
6534
|
The_expected_type_comes_from_this_index_signature: diag(6501, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."),
|
|
6545
6535
|
The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."),
|
|
@@ -6748,7 +6738,6 @@ var ts;
|
|
|
6748
6738
|
This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: diag(7059, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),
|
|
6749
6739
|
This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: diag(7060, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),
|
|
6750
6740
|
A_mapped_type_may_not_declare_properties_or_methods: diag(7061, ts.DiagnosticCategory.Error, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."),
|
|
6751
|
-
JSON_imports_are_experimental_in_ES_module_mode_imports: diag(7062, ts.DiagnosticCategory.Error, "JSON_imports_are_experimental_in_ES_module_mode_imports_7062", "JSON imports are experimental in ES module mode imports."),
|
|
6752
6741
|
You_cannot_rename_this_element: diag(8000, ts.DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."),
|
|
6753
6742
|
You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, ts.DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."),
|
|
6754
6743
|
import_can_only_be_used_in_TypeScript_files: diag(8002, ts.DiagnosticCategory.Error, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."),
|
|
@@ -11346,7 +11335,7 @@ var ts;
|
|
|
11346
11335
|
}
|
|
11347
11336
|
ts.getNonAugmentationDeclaration = getNonAugmentationDeclaration;
|
|
11348
11337
|
function isCommonJSContainingModuleKind(kind) {
|
|
11349
|
-
return kind === ts.ModuleKind.CommonJS || kind === ts.ModuleKind.
|
|
11338
|
+
return kind === ts.ModuleKind.CommonJS || kind === ts.ModuleKind.Node16 || kind === ts.ModuleKind.NodeNext;
|
|
11350
11339
|
}
|
|
11351
11340
|
function isEffectiveExternalModule(node, compilerOptions) {
|
|
11352
11341
|
return ts.isExternalModule(node) || compilerOptions.isolatedModules || (isCommonJSContainingModuleKind(getEmitModuleKind(compilerOptions)) && !!node.commonJsModuleIndicator);
|
|
@@ -14288,6 +14277,13 @@ var ts;
|
|
|
14288
14277
|
".d.ts";
|
|
14289
14278
|
}
|
|
14290
14279
|
ts.getDeclarationEmitExtensionForPath = getDeclarationEmitExtensionForPath;
|
|
14280
|
+
function getPossibleOriginalInputExtensionForExtension(path) {
|
|
14281
|
+
return ts.fileExtensionIsOneOf(path, [".d.mts", ".mjs", ".mts"]) ? [".mts", ".mjs"] :
|
|
14282
|
+
ts.fileExtensionIsOneOf(path, [".d.cts", ".cjs", ".cts"]) ? [".cts", ".cjs"] :
|
|
14283
|
+
ts.fileExtensionIsOneOf(path, [".json.d.ts"]) ? [".json"] :
|
|
14284
|
+
[".tsx", ".ts", ".jsx", ".js"];
|
|
14285
|
+
}
|
|
14286
|
+
ts.getPossibleOriginalInputExtensionForExtension = getPossibleOriginalInputExtensionForExtension;
|
|
14291
14287
|
function outFile(options) {
|
|
14292
14288
|
return options.outFile || options.out;
|
|
14293
14289
|
}
|
|
@@ -15859,7 +15855,7 @@ var ts;
|
|
|
15859
15855
|
checks.push(isFileModuleFromUsingJSXTag);
|
|
15860
15856
|
}
|
|
15861
15857
|
var moduleKind = getEmitModuleKind(options);
|
|
15862
|
-
if (moduleKind === ts.ModuleKind.
|
|
15858
|
+
if (moduleKind === ts.ModuleKind.Node16 || moduleKind === ts.ModuleKind.NodeNext) {
|
|
15863
15859
|
checks.push(isFileForcedToBeModuleByFormat);
|
|
15864
15860
|
}
|
|
15865
15861
|
var combined_1 = ts.or.apply(void 0, checks);
|
|
@@ -15870,7 +15866,7 @@ var ts;
|
|
|
15870
15866
|
ts.getSetExternalModuleIndicator = getSetExternalModuleIndicator;
|
|
15871
15867
|
function getEmitScriptTarget(compilerOptions) {
|
|
15872
15868
|
return compilerOptions.target ||
|
|
15873
|
-
(compilerOptions.module === ts.ModuleKind.
|
|
15869
|
+
(compilerOptions.module === ts.ModuleKind.Node16 && 9) ||
|
|
15874
15870
|
(compilerOptions.module === ts.ModuleKind.NodeNext && 99) ||
|
|
15875
15871
|
0;
|
|
15876
15872
|
}
|
|
@@ -15888,8 +15884,8 @@ var ts;
|
|
|
15888
15884
|
case ts.ModuleKind.CommonJS:
|
|
15889
15885
|
moduleResolution = ts.ModuleResolutionKind.NodeJs;
|
|
15890
15886
|
break;
|
|
15891
|
-
case ts.ModuleKind.
|
|
15892
|
-
moduleResolution = ts.ModuleResolutionKind.
|
|
15887
|
+
case ts.ModuleKind.Node16:
|
|
15888
|
+
moduleResolution = ts.ModuleResolutionKind.Node16;
|
|
15893
15889
|
break;
|
|
15894
15890
|
case ts.ModuleKind.NodeNext:
|
|
15895
15891
|
moduleResolution = ts.ModuleResolutionKind.NodeNext;
|
|
@@ -15914,7 +15910,7 @@ var ts;
|
|
|
15914
15910
|
case ts.ModuleKind.ES2020:
|
|
15915
15911
|
case ts.ModuleKind.ES2022:
|
|
15916
15912
|
case ts.ModuleKind.ESNext:
|
|
15917
|
-
case ts.ModuleKind.
|
|
15913
|
+
case ts.ModuleKind.Node16:
|
|
15918
15914
|
case ts.ModuleKind.NodeNext:
|
|
15919
15915
|
return true;
|
|
15920
15916
|
default:
|
|
@@ -15939,7 +15935,7 @@ var ts;
|
|
|
15939
15935
|
return compilerOptions.esModuleInterop;
|
|
15940
15936
|
}
|
|
15941
15937
|
switch (getEmitModuleKind(compilerOptions)) {
|
|
15942
|
-
case ts.ModuleKind.
|
|
15938
|
+
case ts.ModuleKind.Node16:
|
|
15943
15939
|
case ts.ModuleKind.NodeNext:
|
|
15944
15940
|
return true;
|
|
15945
15941
|
}
|
|
@@ -15986,10 +15982,6 @@ var ts;
|
|
|
15986
15982
|
return optionsHaveChanges(oldOptions, newOptions, ts.affectsEmitOptionDeclarations);
|
|
15987
15983
|
}
|
|
15988
15984
|
ts.compilerOptionsAffectEmit = compilerOptionsAffectEmit;
|
|
15989
|
-
function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {
|
|
15990
|
-
return optionsHaveChanges(oldOptions, newOptions, ts.affectsDeclarationPathOptionDeclarations);
|
|
15991
|
-
}
|
|
15992
|
-
ts.compilerOptionsAffectDeclarationPath = compilerOptionsAffectDeclarationPath;
|
|
15993
15985
|
function getCompilerOptionValue(options, option) {
|
|
15994
15986
|
return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
|
|
15995
15987
|
}
|
|
@@ -21078,7 +21070,7 @@ var ts;
|
|
|
21078
21070
|
return node;
|
|
21079
21071
|
}
|
|
21080
21072
|
function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) {
|
|
21081
|
-
var node = baseFactory.createBaseSourceFileNode(305);
|
|
21073
|
+
var node = (source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory.createBaseSourceFileNode(305));
|
|
21082
21074
|
for (var p in source) {
|
|
21083
21075
|
if (p === "emitNode" || ts.hasProperty(node, p) || !ts.hasProperty(source, p))
|
|
21084
21076
|
continue;
|
|
@@ -25190,7 +25182,7 @@ var ts;
|
|
|
25190
25182
|
function parseIsolatedEntityName(content, languageVersion) {
|
|
25191
25183
|
initializeState("", content, languageVersion, undefined, 1);
|
|
25192
25184
|
nextToken();
|
|
25193
|
-
var entityName = parseEntityName(true
|
|
25185
|
+
var entityName = parseEntityName(true);
|
|
25194
25186
|
var isInvalid = token() === 1 && !parseDiagnostics.length;
|
|
25195
25187
|
clearState();
|
|
25196
25188
|
return isInvalid ? entityName : undefined;
|
|
@@ -26520,7 +26512,7 @@ var ts;
|
|
|
26520
26512
|
}
|
|
26521
26513
|
return createMissingList();
|
|
26522
26514
|
}
|
|
26523
|
-
function parseEntityName(allowReservedWords,
|
|
26515
|
+
function parseEntityName(allowReservedWords, diagnosticMessage) {
|
|
26524
26516
|
var pos = getNodePos();
|
|
26525
26517
|
var entity = allowReservedWords ? parseIdentifierName(diagnosticMessage) : parseIdentifier(diagnosticMessage);
|
|
26526
26518
|
var dotPos = getNodePos();
|
|
@@ -26530,7 +26522,7 @@ var ts;
|
|
|
26530
26522
|
break;
|
|
26531
26523
|
}
|
|
26532
26524
|
dotPos = getNodePos();
|
|
26533
|
-
entity = finishNode(factory.createQualifiedName(entity, parseRightSideOfDot(allowReservedWords,
|
|
26525
|
+
entity = finishNode(factory.createQualifiedName(entity, parseRightSideOfDot(allowReservedWords, false)), pos);
|
|
26534
26526
|
}
|
|
26535
26527
|
return entity;
|
|
26536
26528
|
}
|
|
@@ -26633,7 +26625,7 @@ var ts;
|
|
|
26633
26625
|
return finishNode(node, pos);
|
|
26634
26626
|
}
|
|
26635
26627
|
function parseEntityNameOfTypeReference() {
|
|
26636
|
-
return parseEntityName(true,
|
|
26628
|
+
return parseEntityName(true, ts.Diagnostics.Type_expected);
|
|
26637
26629
|
}
|
|
26638
26630
|
function parseTypeArgumentsOfTypeReference() {
|
|
26639
26631
|
if (!scanner.hasPrecedingLineBreak() && reScanLessThanToken() === 29) {
|
|
@@ -26747,7 +26739,7 @@ var ts;
|
|
|
26747
26739
|
function parseTypeQuery() {
|
|
26748
26740
|
var pos = getNodePos();
|
|
26749
26741
|
parseExpected(112);
|
|
26750
|
-
var entityName = parseEntityName(true
|
|
26742
|
+
var entityName = parseEntityName(true);
|
|
26751
26743
|
var typeArguments = !scanner.hasPrecedingLineBreak() ? tryParseTypeArguments() : undefined;
|
|
26752
26744
|
return finishNode(factory.createTypeQueryNode(entityName, typeArguments), pos);
|
|
26753
26745
|
}
|
|
@@ -27582,10 +27574,10 @@ var ts;
|
|
|
27582
27574
|
setDecoratorContext(false);
|
|
27583
27575
|
}
|
|
27584
27576
|
var pos = getNodePos();
|
|
27585
|
-
var expr = parseAssignmentExpressionOrHigher(
|
|
27577
|
+
var expr = parseAssignmentExpressionOrHigher();
|
|
27586
27578
|
var operatorToken;
|
|
27587
27579
|
while ((operatorToken = parseOptionalToken(27))) {
|
|
27588
|
-
expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher(
|
|
27580
|
+
expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher(), pos);
|
|
27589
27581
|
}
|
|
27590
27582
|
if (saveDecoratorContext) {
|
|
27591
27583
|
setDecoratorContext(true);
|
|
@@ -27593,23 +27585,23 @@ var ts;
|
|
|
27593
27585
|
return expr;
|
|
27594
27586
|
}
|
|
27595
27587
|
function parseInitializer() {
|
|
27596
|
-
return parseOptional(63) ? parseAssignmentExpressionOrHigher(
|
|
27588
|
+
return parseOptional(63) ? parseAssignmentExpressionOrHigher() : undefined;
|
|
27597
27589
|
}
|
|
27598
|
-
function parseAssignmentExpressionOrHigher(
|
|
27590
|
+
function parseAssignmentExpressionOrHigher() {
|
|
27599
27591
|
if (isYieldExpression()) {
|
|
27600
27592
|
return parseYieldExpression();
|
|
27601
27593
|
}
|
|
27602
|
-
var arrowExpression = tryParseParenthesizedArrowFunctionExpression(
|
|
27594
|
+
var arrowExpression = tryParseParenthesizedArrowFunctionExpression() || tryParseAsyncSimpleArrowFunctionExpression();
|
|
27603
27595
|
if (arrowExpression) {
|
|
27604
27596
|
return arrowExpression;
|
|
27605
27597
|
}
|
|
27606
27598
|
var pos = getNodePos();
|
|
27607
27599
|
var expr = parseBinaryExpressionOrHigher(0);
|
|
27608
27600
|
if (expr.kind === 79 && token() === 38) {
|
|
27609
|
-
return parseSimpleArrowFunctionExpression(pos, expr,
|
|
27601
|
+
return parseSimpleArrowFunctionExpression(pos, expr, undefined);
|
|
27610
27602
|
}
|
|
27611
27603
|
if (ts.isLeftHandSideExpression(expr) && ts.isAssignmentOperator(reScanGreaterToken())) {
|
|
27612
|
-
return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher(
|
|
27604
|
+
return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher(), pos);
|
|
27613
27605
|
}
|
|
27614
27606
|
return parseConditionalExpressionRest(expr, pos);
|
|
27615
27607
|
}
|
|
@@ -27631,30 +27623,30 @@ var ts;
|
|
|
27631
27623
|
nextToken();
|
|
27632
27624
|
if (!scanner.hasPrecedingLineBreak() &&
|
|
27633
27625
|
(token() === 41 || isStartOfExpression())) {
|
|
27634
|
-
return finishNode(factory.createYieldExpression(parseOptionalToken(41), parseAssignmentExpressionOrHigher(
|
|
27626
|
+
return finishNode(factory.createYieldExpression(parseOptionalToken(41), parseAssignmentExpressionOrHigher()), pos);
|
|
27635
27627
|
}
|
|
27636
27628
|
else {
|
|
27637
27629
|
return finishNode(factory.createYieldExpression(undefined, undefined), pos);
|
|
27638
27630
|
}
|
|
27639
27631
|
}
|
|
27640
|
-
function parseSimpleArrowFunctionExpression(pos, identifier,
|
|
27632
|
+
function parseSimpleArrowFunctionExpression(pos, identifier, asyncModifier) {
|
|
27641
27633
|
ts.Debug.assert(token() === 38, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
|
|
27642
27634
|
var parameter = factory.createParameterDeclaration(undefined, undefined, undefined, identifier, undefined, undefined, undefined);
|
|
27643
27635
|
finishNode(parameter, identifier.pos);
|
|
27644
27636
|
var parameters = createNodeArray([parameter], parameter.pos, parameter.end);
|
|
27645
27637
|
var equalsGreaterThanToken = parseExpectedToken(38);
|
|
27646
|
-
var body = parseArrowFunctionExpressionBody(!!asyncModifier
|
|
27638
|
+
var body = parseArrowFunctionExpressionBody(!!asyncModifier);
|
|
27647
27639
|
var node = factory.createArrowFunction(asyncModifier, undefined, parameters, undefined, equalsGreaterThanToken, body);
|
|
27648
27640
|
return addJSDocComment(finishNode(node, pos));
|
|
27649
27641
|
}
|
|
27650
|
-
function tryParseParenthesizedArrowFunctionExpression(
|
|
27642
|
+
function tryParseParenthesizedArrowFunctionExpression() {
|
|
27651
27643
|
var triState = isParenthesizedArrowFunctionExpression();
|
|
27652
27644
|
if (triState === 0) {
|
|
27653
27645
|
return undefined;
|
|
27654
27646
|
}
|
|
27655
27647
|
return triState === 1 ?
|
|
27656
|
-
parseParenthesizedArrowFunctionExpression(true
|
|
27657
|
-
tryParse(
|
|
27648
|
+
parseParenthesizedArrowFunctionExpression(true) :
|
|
27649
|
+
tryParse(parsePossibleParenthesizedArrowFunctionExpression);
|
|
27658
27650
|
}
|
|
27659
27651
|
function isParenthesizedArrowFunctionExpression() {
|
|
27660
27652
|
if (token() === 20 || token() === 29 || token() === 131) {
|
|
@@ -27748,24 +27740,24 @@ var ts;
|
|
|
27748
27740
|
return 2;
|
|
27749
27741
|
}
|
|
27750
27742
|
}
|
|
27751
|
-
function parsePossibleParenthesizedArrowFunctionExpression(
|
|
27743
|
+
function parsePossibleParenthesizedArrowFunctionExpression() {
|
|
27752
27744
|
var tokenPos = scanner.getTokenPos();
|
|
27753
27745
|
if (notParenthesizedArrow === null || notParenthesizedArrow === void 0 ? void 0 : notParenthesizedArrow.has(tokenPos)) {
|
|
27754
27746
|
return undefined;
|
|
27755
27747
|
}
|
|
27756
|
-
var result = parseParenthesizedArrowFunctionExpression(false
|
|
27748
|
+
var result = parseParenthesizedArrowFunctionExpression(false);
|
|
27757
27749
|
if (!result) {
|
|
27758
27750
|
(notParenthesizedArrow || (notParenthesizedArrow = new ts.Set())).add(tokenPos);
|
|
27759
27751
|
}
|
|
27760
27752
|
return result;
|
|
27761
27753
|
}
|
|
27762
|
-
function tryParseAsyncSimpleArrowFunctionExpression(
|
|
27754
|
+
function tryParseAsyncSimpleArrowFunctionExpression() {
|
|
27763
27755
|
if (token() === 131) {
|
|
27764
27756
|
if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1) {
|
|
27765
27757
|
var pos = getNodePos();
|
|
27766
27758
|
var asyncModifier = parseModifiersForArrowFunction();
|
|
27767
27759
|
var expr = parseBinaryExpressionOrHigher(0);
|
|
27768
|
-
return parseSimpleArrowFunctionExpression(pos, expr,
|
|
27760
|
+
return parseSimpleArrowFunctionExpression(pos, expr, asyncModifier);
|
|
27769
27761
|
}
|
|
27770
27762
|
}
|
|
27771
27763
|
return undefined;
|
|
@@ -27783,7 +27775,7 @@ var ts;
|
|
|
27783
27775
|
}
|
|
27784
27776
|
return 0;
|
|
27785
27777
|
}
|
|
27786
|
-
function parseParenthesizedArrowFunctionExpression(allowAmbiguity
|
|
27778
|
+
function parseParenthesizedArrowFunctionExpression(allowAmbiguity) {
|
|
27787
27779
|
var pos = getNodePos();
|
|
27788
27780
|
var hasJSDoc = hasPrecedingJSDocComment();
|
|
27789
27781
|
var modifiers = parseModifiersForArrowFunction();
|
|
@@ -27811,9 +27803,6 @@ var ts;
|
|
|
27811
27803
|
return undefined;
|
|
27812
27804
|
}
|
|
27813
27805
|
}
|
|
27814
|
-
if (disallowReturnTypeInArrowFunction && token() === 58) {
|
|
27815
|
-
return undefined;
|
|
27816
|
-
}
|
|
27817
27806
|
var type = parseReturnType(58, false);
|
|
27818
27807
|
if (type && !allowAmbiguity && typeHasArrowFunctionBlockingParseError(type)) {
|
|
27819
27808
|
return undefined;
|
|
@@ -27829,12 +27818,12 @@ var ts;
|
|
|
27829
27818
|
var lastToken = token();
|
|
27830
27819
|
var equalsGreaterThanToken = parseExpectedToken(38);
|
|
27831
27820
|
var body = (lastToken === 38 || lastToken === 18)
|
|
27832
|
-
? parseArrowFunctionExpressionBody(ts.some(modifiers, ts.isAsyncModifier)
|
|
27821
|
+
? parseArrowFunctionExpressionBody(ts.some(modifiers, ts.isAsyncModifier))
|
|
27833
27822
|
: parseIdentifier();
|
|
27834
27823
|
var node = factory.createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body);
|
|
27835
27824
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
27836
27825
|
}
|
|
27837
|
-
function parseArrowFunctionExpressionBody(isAsync
|
|
27826
|
+
function parseArrowFunctionExpressionBody(isAsync) {
|
|
27838
27827
|
if (token() === 18) {
|
|
27839
27828
|
return parseFunctionBlock(isAsync ? 2 : 0);
|
|
27840
27829
|
}
|
|
@@ -27848,8 +27837,8 @@ var ts;
|
|
|
27848
27837
|
var savedTopLevel = topLevel;
|
|
27849
27838
|
topLevel = false;
|
|
27850
27839
|
var node = isAsync
|
|
27851
|
-
? doInAwaitContext(
|
|
27852
|
-
: doOutsideOfAwaitContext(
|
|
27840
|
+
? doInAwaitContext(parseAssignmentExpressionOrHigher)
|
|
27841
|
+
: doOutsideOfAwaitContext(parseAssignmentExpressionOrHigher);
|
|
27853
27842
|
topLevel = savedTopLevel;
|
|
27854
27843
|
return node;
|
|
27855
27844
|
}
|
|
@@ -27859,8 +27848,8 @@ var ts;
|
|
|
27859
27848
|
return leftOperand;
|
|
27860
27849
|
}
|
|
27861
27850
|
var colonToken;
|
|
27862
|
-
return finishNode(factory.createConditionalExpression(leftOperand, questionToken, doOutsideOfContext(disallowInAndDecoratorContext,
|
|
27863
|
-
? parseAssignmentExpressionOrHigher(
|
|
27851
|
+
return finishNode(factory.createConditionalExpression(leftOperand, questionToken, doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher), colonToken = parseExpectedToken(58), ts.nodeIsPresent(colonToken)
|
|
27852
|
+
? parseAssignmentExpressionOrHigher()
|
|
27864
27853
|
: createMissingNode(79, false, ts.Diagnostics._0_expected, ts.tokenToString(58))), pos);
|
|
27865
27854
|
}
|
|
27866
27855
|
function parseBinaryExpressionOrHigher(precedence) {
|
|
@@ -28511,13 +28500,13 @@ var ts;
|
|
|
28511
28500
|
function parseSpreadElement() {
|
|
28512
28501
|
var pos = getNodePos();
|
|
28513
28502
|
parseExpected(25);
|
|
28514
|
-
var expression = parseAssignmentExpressionOrHigher(
|
|
28503
|
+
var expression = parseAssignmentExpressionOrHigher();
|
|
28515
28504
|
return finishNode(factory.createSpreadElement(expression), pos);
|
|
28516
28505
|
}
|
|
28517
28506
|
function parseArgumentOrArrayLiteralElement() {
|
|
28518
28507
|
return token() === 25 ? parseSpreadElement() :
|
|
28519
28508
|
token() === 27 ? finishNode(factory.createOmittedExpression(), getNodePos()) :
|
|
28520
|
-
parseAssignmentExpressionOrHigher(
|
|
28509
|
+
parseAssignmentExpressionOrHigher();
|
|
28521
28510
|
}
|
|
28522
28511
|
function parseArgumentExpression() {
|
|
28523
28512
|
return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement);
|
|
@@ -28535,7 +28524,7 @@ var ts;
|
|
|
28535
28524
|
var pos = getNodePos();
|
|
28536
28525
|
var hasJSDoc = hasPrecedingJSDocComment();
|
|
28537
28526
|
if (parseOptionalToken(25)) {
|
|
28538
|
-
var expression = parseAssignmentExpressionOrHigher(
|
|
28527
|
+
var expression = parseAssignmentExpressionOrHigher();
|
|
28539
28528
|
return withJSDoc(finishNode(factory.createSpreadAssignment(expression), pos), hasJSDoc);
|
|
28540
28529
|
}
|
|
28541
28530
|
var decorators = parseDecorators();
|
|
@@ -28558,13 +28547,13 @@ var ts;
|
|
|
28558
28547
|
var isShorthandPropertyAssignment = tokenIsIdentifier && (token() !== 58);
|
|
28559
28548
|
if (isShorthandPropertyAssignment) {
|
|
28560
28549
|
var equalsToken = parseOptionalToken(63);
|
|
28561
|
-
var objectAssignmentInitializer = equalsToken ? allowInAnd(
|
|
28550
|
+
var objectAssignmentInitializer = equalsToken ? allowInAnd(parseAssignmentExpressionOrHigher) : undefined;
|
|
28562
28551
|
node = factory.createShorthandPropertyAssignment(name, objectAssignmentInitializer);
|
|
28563
28552
|
node.equalsToken = equalsToken;
|
|
28564
28553
|
}
|
|
28565
28554
|
else {
|
|
28566
28555
|
parseExpected(58);
|
|
28567
|
-
var initializer = allowInAnd(
|
|
28556
|
+
var initializer = allowInAnd(parseAssignmentExpressionOrHigher);
|
|
28568
28557
|
node = factory.createPropertyAssignment(name, initializer);
|
|
28569
28558
|
}
|
|
28570
28559
|
node.decorators = decorators;
|
|
@@ -28724,7 +28713,7 @@ var ts;
|
|
|
28724
28713
|
}
|
|
28725
28714
|
var node;
|
|
28726
28715
|
if (awaitToken ? parseExpected(160) : parseOptional(160)) {
|
|
28727
|
-
var expression = allowInAnd(
|
|
28716
|
+
var expression = allowInAnd(parseAssignmentExpressionOrHigher);
|
|
28728
28717
|
parseExpected(21);
|
|
28729
28718
|
node = factory.createForOfStatement(awaitToken, initializer, expression, parseStatement());
|
|
28730
28719
|
}
|
|
@@ -29762,7 +29751,7 @@ var ts;
|
|
|
29762
29751
|
var pos = getNodePos();
|
|
29763
29752
|
var name = ts.tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(10);
|
|
29764
29753
|
parseExpected(58);
|
|
29765
|
-
var value = parseAssignmentExpressionOrHigher(
|
|
29754
|
+
var value = parseAssignmentExpressionOrHigher();
|
|
29766
29755
|
return finishNode(factory.createAssertEntry(name, value), pos);
|
|
29767
29756
|
}
|
|
29768
29757
|
function parseAssertClause(skipAssertKeyword) {
|
|
@@ -29812,7 +29801,7 @@ var ts;
|
|
|
29812
29801
|
function parseModuleReference() {
|
|
29813
29802
|
return isExternalModuleReference()
|
|
29814
29803
|
? parseExternalModuleReference()
|
|
29815
|
-
: parseEntityName(false
|
|
29804
|
+
: parseEntityName(false);
|
|
29816
29805
|
}
|
|
29817
29806
|
function parseExternalModuleReference() {
|
|
29818
29807
|
var pos = getNodePos();
|
|
@@ -29956,7 +29945,7 @@ var ts;
|
|
|
29956
29945
|
else {
|
|
29957
29946
|
parseExpected(88);
|
|
29958
29947
|
}
|
|
29959
|
-
var expression = parseAssignmentExpressionOrHigher(
|
|
29948
|
+
var expression = parseAssignmentExpressionOrHigher();
|
|
29960
29949
|
parseSemicolon();
|
|
29961
29950
|
setAwaitContext(savedAwaitContext);
|
|
29962
29951
|
var node = factory.createExportAssignment(decorators, modifiers, isExportEquals, expression);
|
|
@@ -29994,7 +29983,7 @@ var ts;
|
|
|
29994
29983
|
var pos = getNodePos();
|
|
29995
29984
|
var hasBrace = parseOptional(18);
|
|
29996
29985
|
var p2 = getNodePos();
|
|
29997
|
-
var entityName = parseEntityName(false
|
|
29986
|
+
var entityName = parseEntityName(false);
|
|
29998
29987
|
while (token() === 80) {
|
|
29999
29988
|
reScanHashToken();
|
|
30000
29989
|
nextTokenJSDoc();
|
|
@@ -30396,7 +30385,7 @@ var ts;
|
|
|
30396
30385
|
skipWhitespace();
|
|
30397
30386
|
var p2 = getNodePos();
|
|
30398
30387
|
var name = ts.tokenIsIdentifierOrKeyword(token())
|
|
30399
|
-
? parseEntityName(true
|
|
30388
|
+
? parseEntityName(true)
|
|
30400
30389
|
: undefined;
|
|
30401
30390
|
if (name) {
|
|
30402
30391
|
while (token() === 80) {
|
|
@@ -31484,6 +31473,7 @@ var ts;
|
|
|
31484
31473
|
["es2021.intl", "lib.es2021.intl.d.ts"],
|
|
31485
31474
|
["es2022.array", "lib.es2022.array.d.ts"],
|
|
31486
31475
|
["es2022.error", "lib.es2022.error.d.ts"],
|
|
31476
|
+
["es2022.intl", "lib.es2022.intl.d.ts"],
|
|
31487
31477
|
["es2022.object", "lib.es2022.object.d.ts"],
|
|
31488
31478
|
["es2022.string", "lib.es2022.string.d.ts"],
|
|
31489
31479
|
["esnext.array", "lib.es2022.array.d.ts"],
|
|
@@ -31684,7 +31674,6 @@ var ts;
|
|
|
31684
31674
|
type: "boolean",
|
|
31685
31675
|
affectsSemanticDiagnostics: true,
|
|
31686
31676
|
affectsEmit: true,
|
|
31687
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31688
31677
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
31689
31678
|
description: ts.Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,
|
|
31690
31679
|
defaultValueDescription: false,
|
|
@@ -31718,39 +31707,12 @@ var ts;
|
|
|
31718
31707
|
affectsSourceFile: true,
|
|
31719
31708
|
affectsModuleResolution: true,
|
|
31720
31709
|
affectsEmit: true,
|
|
31721
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31722
31710
|
paramType: ts.Diagnostics.VERSION,
|
|
31723
31711
|
showInSimplifiedHelpView: true,
|
|
31724
31712
|
category: ts.Diagnostics.Language_and_Environment,
|
|
31725
31713
|
description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
31726
31714
|
defaultValueDescription: 0,
|
|
31727
31715
|
};
|
|
31728
|
-
ts.moduleOptionDeclaration = {
|
|
31729
|
-
name: "module",
|
|
31730
|
-
shortName: "m",
|
|
31731
|
-
type: new ts.Map(ts.getEntries({
|
|
31732
|
-
none: ts.ModuleKind.None,
|
|
31733
|
-
commonjs: ts.ModuleKind.CommonJS,
|
|
31734
|
-
amd: ts.ModuleKind.AMD,
|
|
31735
|
-
system: ts.ModuleKind.System,
|
|
31736
|
-
umd: ts.ModuleKind.UMD,
|
|
31737
|
-
es6: ts.ModuleKind.ES2015,
|
|
31738
|
-
es2015: ts.ModuleKind.ES2015,
|
|
31739
|
-
es2020: ts.ModuleKind.ES2020,
|
|
31740
|
-
es2022: ts.ModuleKind.ES2022,
|
|
31741
|
-
esnext: ts.ModuleKind.ESNext,
|
|
31742
|
-
node12: ts.ModuleKind.Node12,
|
|
31743
|
-
nodenext: ts.ModuleKind.NodeNext,
|
|
31744
|
-
})),
|
|
31745
|
-
affectsModuleResolution: true,
|
|
31746
|
-
affectsEmit: true,
|
|
31747
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31748
|
-
paramType: ts.Diagnostics.KIND,
|
|
31749
|
-
showInSimplifiedHelpView: true,
|
|
31750
|
-
category: ts.Diagnostics.Modules,
|
|
31751
|
-
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
31752
|
-
defaultValueDescription: undefined,
|
|
31753
|
-
};
|
|
31754
31716
|
var commandOptionsWithoutBuild = [
|
|
31755
31717
|
{
|
|
31756
31718
|
name: "all",
|
|
@@ -31811,13 +31773,36 @@ var ts;
|
|
|
31811
31773
|
category: ts.Diagnostics.Command_line_Options,
|
|
31812
31774
|
affectsSemanticDiagnostics: true,
|
|
31813
31775
|
affectsEmit: true,
|
|
31814
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31815
31776
|
isCommandLineOnly: true,
|
|
31816
31777
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
31817
31778
|
defaultValueDescription: false,
|
|
31818
31779
|
},
|
|
31819
31780
|
ts.targetOptionDeclaration,
|
|
31820
|
-
|
|
31781
|
+
{
|
|
31782
|
+
name: "module",
|
|
31783
|
+
shortName: "m",
|
|
31784
|
+
type: new ts.Map(ts.getEntries({
|
|
31785
|
+
none: ts.ModuleKind.None,
|
|
31786
|
+
commonjs: ts.ModuleKind.CommonJS,
|
|
31787
|
+
amd: ts.ModuleKind.AMD,
|
|
31788
|
+
system: ts.ModuleKind.System,
|
|
31789
|
+
umd: ts.ModuleKind.UMD,
|
|
31790
|
+
es6: ts.ModuleKind.ES2015,
|
|
31791
|
+
es2015: ts.ModuleKind.ES2015,
|
|
31792
|
+
es2020: ts.ModuleKind.ES2020,
|
|
31793
|
+
es2022: ts.ModuleKind.ES2022,
|
|
31794
|
+
esnext: ts.ModuleKind.ESNext,
|
|
31795
|
+
node16: ts.ModuleKind.Node16,
|
|
31796
|
+
nodenext: ts.ModuleKind.NodeNext,
|
|
31797
|
+
})),
|
|
31798
|
+
affectsModuleResolution: true,
|
|
31799
|
+
affectsEmit: true,
|
|
31800
|
+
paramType: ts.Diagnostics.KIND,
|
|
31801
|
+
showInSimplifiedHelpView: true,
|
|
31802
|
+
category: ts.Diagnostics.Modules,
|
|
31803
|
+
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
31804
|
+
defaultValueDescription: undefined,
|
|
31805
|
+
},
|
|
31821
31806
|
{
|
|
31822
31807
|
name: "lib",
|
|
31823
31808
|
type: "list",
|
|
@@ -31854,7 +31839,6 @@ var ts;
|
|
|
31854
31839
|
type: jsxOptionMap,
|
|
31855
31840
|
affectsSourceFile: true,
|
|
31856
31841
|
affectsEmit: true,
|
|
31857
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31858
31842
|
affectsModuleResolution: true,
|
|
31859
31843
|
paramType: ts.Diagnostics.KIND,
|
|
31860
31844
|
showInSimplifiedHelpView: true,
|
|
@@ -31867,7 +31851,6 @@ var ts;
|
|
|
31867
31851
|
shortName: "d",
|
|
31868
31852
|
type: "boolean",
|
|
31869
31853
|
affectsEmit: true,
|
|
31870
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31871
31854
|
showInSimplifiedHelpView: true,
|
|
31872
31855
|
category: ts.Diagnostics.Emit,
|
|
31873
31856
|
transpileOptionValue: undefined,
|
|
@@ -31878,7 +31861,6 @@ var ts;
|
|
|
31878
31861
|
name: "declarationMap",
|
|
31879
31862
|
type: "boolean",
|
|
31880
31863
|
affectsEmit: true,
|
|
31881
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31882
31864
|
showInSimplifiedHelpView: true,
|
|
31883
31865
|
category: ts.Diagnostics.Emit,
|
|
31884
31866
|
transpileOptionValue: undefined,
|
|
@@ -31889,7 +31871,6 @@ var ts;
|
|
|
31889
31871
|
name: "emitDeclarationOnly",
|
|
31890
31872
|
type: "boolean",
|
|
31891
31873
|
affectsEmit: true,
|
|
31892
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31893
31874
|
showInSimplifiedHelpView: true,
|
|
31894
31875
|
category: ts.Diagnostics.Emit,
|
|
31895
31876
|
description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
|
|
@@ -31900,7 +31881,6 @@ var ts;
|
|
|
31900
31881
|
name: "sourceMap",
|
|
31901
31882
|
type: "boolean",
|
|
31902
31883
|
affectsEmit: true,
|
|
31903
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31904
31884
|
showInSimplifiedHelpView: true,
|
|
31905
31885
|
category: ts.Diagnostics.Emit,
|
|
31906
31886
|
defaultValueDescription: false,
|
|
@@ -31910,9 +31890,6 @@ var ts;
|
|
|
31910
31890
|
name: "outFile",
|
|
31911
31891
|
type: "string",
|
|
31912
31892
|
affectsEmit: true,
|
|
31913
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31914
|
-
affectsDeclarationPath: true,
|
|
31915
|
-
affectsBundleEmitBuildInfo: true,
|
|
31916
31893
|
isFilePath: true,
|
|
31917
31894
|
paramType: ts.Diagnostics.FILE,
|
|
31918
31895
|
showInSimplifiedHelpView: true,
|
|
@@ -31924,8 +31901,6 @@ var ts;
|
|
|
31924
31901
|
name: "outDir",
|
|
31925
31902
|
type: "string",
|
|
31926
31903
|
affectsEmit: true,
|
|
31927
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31928
|
-
affectsDeclarationPath: true,
|
|
31929
31904
|
isFilePath: true,
|
|
31930
31905
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
31931
31906
|
showInSimplifiedHelpView: true,
|
|
@@ -31936,8 +31911,6 @@ var ts;
|
|
|
31936
31911
|
name: "rootDir",
|
|
31937
31912
|
type: "string",
|
|
31938
31913
|
affectsEmit: true,
|
|
31939
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31940
|
-
affectsDeclarationPath: true,
|
|
31941
31914
|
isFilePath: true,
|
|
31942
31915
|
paramType: ts.Diagnostics.LOCATION,
|
|
31943
31916
|
category: ts.Diagnostics.Modules,
|
|
@@ -31948,8 +31921,6 @@ var ts;
|
|
|
31948
31921
|
name: "composite",
|
|
31949
31922
|
type: "boolean",
|
|
31950
31923
|
affectsEmit: true,
|
|
31951
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31952
|
-
affectsBundleEmitBuildInfo: true,
|
|
31953
31924
|
isTSConfigOnly: true,
|
|
31954
31925
|
category: ts.Diagnostics.Projects,
|
|
31955
31926
|
transpileOptionValue: undefined,
|
|
@@ -31960,8 +31931,6 @@ var ts;
|
|
|
31960
31931
|
name: "tsBuildInfoFile",
|
|
31961
31932
|
type: "string",
|
|
31962
31933
|
affectsEmit: true,
|
|
31963
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31964
|
-
affectsBundleEmitBuildInfo: true,
|
|
31965
31934
|
isFilePath: true,
|
|
31966
31935
|
paramType: ts.Diagnostics.FILE,
|
|
31967
31936
|
category: ts.Diagnostics.Projects,
|
|
@@ -31973,7 +31942,6 @@ var ts;
|
|
|
31973
31942
|
name: "removeComments",
|
|
31974
31943
|
type: "boolean",
|
|
31975
31944
|
affectsEmit: true,
|
|
31976
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31977
31945
|
showInSimplifiedHelpView: true,
|
|
31978
31946
|
category: ts.Diagnostics.Emit,
|
|
31979
31947
|
defaultValueDescription: false,
|
|
@@ -31992,7 +31960,6 @@ var ts;
|
|
|
31992
31960
|
name: "importHelpers",
|
|
31993
31961
|
type: "boolean",
|
|
31994
31962
|
affectsEmit: true,
|
|
31995
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31996
31963
|
category: ts.Diagnostics.Emit,
|
|
31997
31964
|
description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
31998
31965
|
defaultValueDescription: false,
|
|
@@ -32006,7 +31973,6 @@ var ts;
|
|
|
32006
31973
|
})),
|
|
32007
31974
|
affectsEmit: true,
|
|
32008
31975
|
affectsSemanticDiagnostics: true,
|
|
32009
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32010
31976
|
category: ts.Diagnostics.Emit,
|
|
32011
31977
|
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
|
|
32012
31978
|
defaultValueDescription: 0,
|
|
@@ -32015,7 +31981,6 @@ var ts;
|
|
|
32015
31981
|
name: "downlevelIteration",
|
|
32016
31982
|
type: "boolean",
|
|
32017
31983
|
affectsEmit: true,
|
|
32018
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32019
31984
|
category: ts.Diagnostics.Emit,
|
|
32020
31985
|
description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
|
|
32021
31986
|
defaultValueDescription: false,
|
|
@@ -32031,7 +31996,6 @@ var ts;
|
|
|
32031
31996
|
{
|
|
32032
31997
|
name: "strict",
|
|
32033
31998
|
type: "boolean",
|
|
32034
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32035
31999
|
showInSimplifiedHelpView: true,
|
|
32036
32000
|
category: ts.Diagnostics.Type_Checking,
|
|
32037
32001
|
description: ts.Diagnostics.Enable_all_strict_type_checking_options,
|
|
@@ -32041,7 +32005,6 @@ var ts;
|
|
|
32041
32005
|
name: "noImplicitAny",
|
|
32042
32006
|
type: "boolean",
|
|
32043
32007
|
affectsSemanticDiagnostics: true,
|
|
32044
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32045
32008
|
strictFlag: true,
|
|
32046
32009
|
category: ts.Diagnostics.Type_Checking,
|
|
32047
32010
|
description: ts.Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
|
|
@@ -32051,7 +32014,6 @@ var ts;
|
|
|
32051
32014
|
name: "strictNullChecks",
|
|
32052
32015
|
type: "boolean",
|
|
32053
32016
|
affectsSemanticDiagnostics: true,
|
|
32054
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32055
32017
|
strictFlag: true,
|
|
32056
32018
|
category: ts.Diagnostics.Type_Checking,
|
|
32057
32019
|
description: ts.Diagnostics.When_type_checking_take_into_account_null_and_undefined,
|
|
@@ -32060,8 +32022,6 @@ var ts;
|
|
|
32060
32022
|
{
|
|
32061
32023
|
name: "strictFunctionTypes",
|
|
32062
32024
|
type: "boolean",
|
|
32063
|
-
affectsSemanticDiagnostics: true,
|
|
32064
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32065
32025
|
strictFlag: true,
|
|
32066
32026
|
category: ts.Diagnostics.Type_Checking,
|
|
32067
32027
|
description: ts.Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
|
|
@@ -32070,8 +32030,6 @@ var ts;
|
|
|
32070
32030
|
{
|
|
32071
32031
|
name: "strictBindCallApply",
|
|
32072
32032
|
type: "boolean",
|
|
32073
|
-
affectsSemanticDiagnostics: true,
|
|
32074
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32075
32033
|
strictFlag: true,
|
|
32076
32034
|
category: ts.Diagnostics.Type_Checking,
|
|
32077
32035
|
description: ts.Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
|
|
@@ -32081,7 +32039,6 @@ var ts;
|
|
|
32081
32039
|
name: "strictPropertyInitialization",
|
|
32082
32040
|
type: "boolean",
|
|
32083
32041
|
affectsSemanticDiagnostics: true,
|
|
32084
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32085
32042
|
strictFlag: true,
|
|
32086
32043
|
category: ts.Diagnostics.Type_Checking,
|
|
32087
32044
|
description: ts.Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
|
|
@@ -32091,7 +32048,6 @@ var ts;
|
|
|
32091
32048
|
name: "noImplicitThis",
|
|
32092
32049
|
type: "boolean",
|
|
32093
32050
|
affectsSemanticDiagnostics: true,
|
|
32094
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32095
32051
|
strictFlag: true,
|
|
32096
32052
|
category: ts.Diagnostics.Type_Checking,
|
|
32097
32053
|
description: ts.Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
|
|
@@ -32101,7 +32057,6 @@ var ts;
|
|
|
32101
32057
|
name: "useUnknownInCatchVariables",
|
|
32102
32058
|
type: "boolean",
|
|
32103
32059
|
affectsSemanticDiagnostics: true,
|
|
32104
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32105
32060
|
strictFlag: true,
|
|
32106
32061
|
category: ts.Diagnostics.Type_Checking,
|
|
32107
32062
|
description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
@@ -32111,8 +32066,6 @@ var ts;
|
|
|
32111
32066
|
name: "alwaysStrict",
|
|
32112
32067
|
type: "boolean",
|
|
32113
32068
|
affectsSourceFile: true,
|
|
32114
|
-
affectsEmit: true,
|
|
32115
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32116
32069
|
strictFlag: true,
|
|
32117
32070
|
category: ts.Diagnostics.Type_Checking,
|
|
32118
32071
|
description: ts.Diagnostics.Ensure_use_strict_is_always_emitted,
|
|
@@ -32122,7 +32075,6 @@ var ts;
|
|
|
32122
32075
|
name: "noUnusedLocals",
|
|
32123
32076
|
type: "boolean",
|
|
32124
32077
|
affectsSemanticDiagnostics: true,
|
|
32125
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32126
32078
|
category: ts.Diagnostics.Type_Checking,
|
|
32127
32079
|
description: ts.Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
|
|
32128
32080
|
defaultValueDescription: false,
|
|
@@ -32131,7 +32083,6 @@ var ts;
|
|
|
32131
32083
|
name: "noUnusedParameters",
|
|
32132
32084
|
type: "boolean",
|
|
32133
32085
|
affectsSemanticDiagnostics: true,
|
|
32134
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32135
32086
|
category: ts.Diagnostics.Type_Checking,
|
|
32136
32087
|
description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
|
|
32137
32088
|
defaultValueDescription: false,
|
|
@@ -32140,7 +32091,6 @@ var ts;
|
|
|
32140
32091
|
name: "exactOptionalPropertyTypes",
|
|
32141
32092
|
type: "boolean",
|
|
32142
32093
|
affectsSemanticDiagnostics: true,
|
|
32143
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32144
32094
|
category: ts.Diagnostics.Type_Checking,
|
|
32145
32095
|
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
32146
32096
|
defaultValueDescription: false,
|
|
@@ -32149,7 +32099,6 @@ var ts;
|
|
|
32149
32099
|
name: "noImplicitReturns",
|
|
32150
32100
|
type: "boolean",
|
|
32151
32101
|
affectsSemanticDiagnostics: true,
|
|
32152
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32153
32102
|
category: ts.Diagnostics.Type_Checking,
|
|
32154
32103
|
description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
|
|
32155
32104
|
defaultValueDescription: false,
|
|
@@ -32159,7 +32108,6 @@ var ts;
|
|
|
32159
32108
|
type: "boolean",
|
|
32160
32109
|
affectsBindDiagnostics: true,
|
|
32161
32110
|
affectsSemanticDiagnostics: true,
|
|
32162
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32163
32111
|
category: ts.Diagnostics.Type_Checking,
|
|
32164
32112
|
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
32165
32113
|
defaultValueDescription: false,
|
|
@@ -32168,7 +32116,6 @@ var ts;
|
|
|
32168
32116
|
name: "noUncheckedIndexedAccess",
|
|
32169
32117
|
type: "boolean",
|
|
32170
32118
|
affectsSemanticDiagnostics: true,
|
|
32171
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32172
32119
|
category: ts.Diagnostics.Type_Checking,
|
|
32173
32120
|
description: ts.Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
|
|
32174
32121
|
defaultValueDescription: false,
|
|
@@ -32177,7 +32124,6 @@ var ts;
|
|
|
32177
32124
|
name: "noImplicitOverride",
|
|
32178
32125
|
type: "boolean",
|
|
32179
32126
|
affectsSemanticDiagnostics: true,
|
|
32180
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32181
32127
|
category: ts.Diagnostics.Type_Checking,
|
|
32182
32128
|
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
32183
32129
|
defaultValueDescription: false,
|
|
@@ -32185,8 +32131,6 @@ var ts;
|
|
|
32185
32131
|
{
|
|
32186
32132
|
name: "noPropertyAccessFromIndexSignature",
|
|
32187
32133
|
type: "boolean",
|
|
32188
|
-
affectsSemanticDiagnostics: true,
|
|
32189
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32190
32134
|
showInSimplifiedHelpView: false,
|
|
32191
32135
|
category: ts.Diagnostics.Type_Checking,
|
|
32192
32136
|
description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
|
|
@@ -32197,7 +32141,7 @@ var ts;
|
|
|
32197
32141
|
type: new ts.Map(ts.getEntries({
|
|
32198
32142
|
node: ts.ModuleResolutionKind.NodeJs,
|
|
32199
32143
|
classic: ts.ModuleResolutionKind.Classic,
|
|
32200
|
-
|
|
32144
|
+
node16: ts.ModuleResolutionKind.Node16,
|
|
32201
32145
|
nodenext: ts.ModuleResolutionKind.NodeNext,
|
|
32202
32146
|
})),
|
|
32203
32147
|
affectsModuleResolution: true,
|
|
@@ -32267,7 +32211,6 @@ var ts;
|
|
|
32267
32211
|
name: "allowSyntheticDefaultImports",
|
|
32268
32212
|
type: "boolean",
|
|
32269
32213
|
affectsSemanticDiagnostics: true,
|
|
32270
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32271
32214
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32272
32215
|
description: ts.Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
|
|
32273
32216
|
defaultValueDescription: ts.Diagnostics.module_system_or_esModuleInterop
|
|
@@ -32277,7 +32220,6 @@ var ts;
|
|
|
32277
32220
|
type: "boolean",
|
|
32278
32221
|
affectsSemanticDiagnostics: true,
|
|
32279
32222
|
affectsEmit: true,
|
|
32280
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32281
32223
|
showInSimplifiedHelpView: true,
|
|
32282
32224
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32283
32225
|
description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
|
|
@@ -32294,7 +32236,6 @@ var ts;
|
|
|
32294
32236
|
name: "allowUmdGlobalAccess",
|
|
32295
32237
|
type: "boolean",
|
|
32296
32238
|
affectsSemanticDiagnostics: true,
|
|
32297
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32298
32239
|
category: ts.Diagnostics.Modules,
|
|
32299
32240
|
description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
|
|
32300
32241
|
defaultValueDescription: false,
|
|
@@ -32315,7 +32256,6 @@ var ts;
|
|
|
32315
32256
|
name: "sourceRoot",
|
|
32316
32257
|
type: "string",
|
|
32317
32258
|
affectsEmit: true,
|
|
32318
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32319
32259
|
paramType: ts.Diagnostics.LOCATION,
|
|
32320
32260
|
category: ts.Diagnostics.Emit,
|
|
32321
32261
|
description: ts.Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code,
|
|
@@ -32324,7 +32264,6 @@ var ts;
|
|
|
32324
32264
|
name: "mapRoot",
|
|
32325
32265
|
type: "string",
|
|
32326
32266
|
affectsEmit: true,
|
|
32327
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32328
32267
|
paramType: ts.Diagnostics.LOCATION,
|
|
32329
32268
|
category: ts.Diagnostics.Emit,
|
|
32330
32269
|
description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
|
|
@@ -32333,7 +32272,6 @@ var ts;
|
|
|
32333
32272
|
name: "inlineSourceMap",
|
|
32334
32273
|
type: "boolean",
|
|
32335
32274
|
affectsEmit: true,
|
|
32336
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32337
32275
|
category: ts.Diagnostics.Emit,
|
|
32338
32276
|
description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
|
|
32339
32277
|
defaultValueDescription: false,
|
|
@@ -32342,7 +32280,6 @@ var ts;
|
|
|
32342
32280
|
name: "inlineSources",
|
|
32343
32281
|
type: "boolean",
|
|
32344
32282
|
affectsEmit: true,
|
|
32345
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32346
32283
|
category: ts.Diagnostics.Emit,
|
|
32347
32284
|
description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
|
|
32348
32285
|
defaultValueDescription: false,
|
|
@@ -32351,7 +32288,6 @@ var ts;
|
|
|
32351
32288
|
name: "experimentalDecorators",
|
|
32352
32289
|
type: "boolean",
|
|
32353
32290
|
affectsSemanticDiagnostics: true,
|
|
32354
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32355
32291
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32356
32292
|
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
32357
32293
|
defaultValueDescription: false,
|
|
@@ -32361,7 +32297,6 @@ var ts;
|
|
|
32361
32297
|
type: "boolean",
|
|
32362
32298
|
affectsSemanticDiagnostics: true,
|
|
32363
32299
|
affectsEmit: true,
|
|
32364
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32365
32300
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32366
32301
|
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
32367
32302
|
defaultValueDescription: false,
|
|
@@ -32385,7 +32320,6 @@ var ts;
|
|
|
32385
32320
|
type: "string",
|
|
32386
32321
|
affectsSemanticDiagnostics: true,
|
|
32387
32322
|
affectsEmit: true,
|
|
32388
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32389
32323
|
affectsModuleResolution: true,
|
|
32390
32324
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32391
32325
|
description: ts.Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
|
|
@@ -32403,9 +32337,6 @@ var ts;
|
|
|
32403
32337
|
name: "out",
|
|
32404
32338
|
type: "string",
|
|
32405
32339
|
affectsEmit: true,
|
|
32406
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32407
|
-
affectsDeclarationPath: true,
|
|
32408
|
-
affectsBundleEmitBuildInfo: true,
|
|
32409
32340
|
isFilePath: false,
|
|
32410
32341
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32411
32342
|
paramType: ts.Diagnostics.FILE,
|
|
@@ -32416,7 +32347,6 @@ var ts;
|
|
|
32416
32347
|
name: "reactNamespace",
|
|
32417
32348
|
type: "string",
|
|
32418
32349
|
affectsEmit: true,
|
|
32419
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32420
32350
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32421
32351
|
description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,
|
|
32422
32352
|
defaultValueDescription: "`React`",
|
|
@@ -32424,7 +32354,6 @@ var ts;
|
|
|
32424
32354
|
{
|
|
32425
32355
|
name: "skipDefaultLibCheck",
|
|
32426
32356
|
type: "boolean",
|
|
32427
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32428
32357
|
category: ts.Diagnostics.Completeness,
|
|
32429
32358
|
description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
|
|
32430
32359
|
defaultValueDescription: false,
|
|
@@ -32440,7 +32369,6 @@ var ts;
|
|
|
32440
32369
|
name: "emitBOM",
|
|
32441
32370
|
type: "boolean",
|
|
32442
32371
|
affectsEmit: true,
|
|
32443
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32444
32372
|
category: ts.Diagnostics.Emit,
|
|
32445
32373
|
description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
|
|
32446
32374
|
defaultValueDescription: false,
|
|
@@ -32452,7 +32380,6 @@ var ts;
|
|
|
32452
32380
|
lf: 1
|
|
32453
32381
|
})),
|
|
32454
32382
|
affectsEmit: true,
|
|
32455
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32456
32383
|
paramType: ts.Diagnostics.NEWLINE,
|
|
32457
32384
|
category: ts.Diagnostics.Emit,
|
|
32458
32385
|
description: ts.Diagnostics.Set_the_newline_character_for_emitting_files,
|
|
@@ -32462,7 +32389,6 @@ var ts;
|
|
|
32462
32389
|
name: "noErrorTruncation",
|
|
32463
32390
|
type: "boolean",
|
|
32464
32391
|
affectsSemanticDiagnostics: true,
|
|
32465
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32466
32392
|
category: ts.Diagnostics.Output_Formatting,
|
|
32467
32393
|
description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
|
|
32468
32394
|
defaultValueDescription: false,
|
|
@@ -32489,7 +32415,6 @@ var ts;
|
|
|
32489
32415
|
name: "stripInternal",
|
|
32490
32416
|
type: "boolean",
|
|
32491
32417
|
affectsEmit: true,
|
|
32492
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32493
32418
|
category: ts.Diagnostics.Emit,
|
|
32494
32419
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
32495
32420
|
defaultValueDescription: false,
|
|
@@ -32530,7 +32455,6 @@ var ts;
|
|
|
32530
32455
|
name: "noImplicitUseStrict",
|
|
32531
32456
|
type: "boolean",
|
|
32532
32457
|
affectsSemanticDiagnostics: true,
|
|
32533
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32534
32458
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32535
32459
|
description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
|
|
32536
32460
|
defaultValueDescription: false,
|
|
@@ -32539,7 +32463,6 @@ var ts;
|
|
|
32539
32463
|
name: "noEmitHelpers",
|
|
32540
32464
|
type: "boolean",
|
|
32541
32465
|
affectsEmit: true,
|
|
32542
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32543
32466
|
category: ts.Diagnostics.Emit,
|
|
32544
32467
|
description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
|
|
32545
32468
|
defaultValueDescription: false,
|
|
@@ -32548,7 +32471,6 @@ var ts;
|
|
|
32548
32471
|
name: "noEmitOnError",
|
|
32549
32472
|
type: "boolean",
|
|
32550
32473
|
affectsEmit: true,
|
|
32551
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32552
32474
|
category: ts.Diagnostics.Emit,
|
|
32553
32475
|
transpileOptionValue: undefined,
|
|
32554
32476
|
description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
|
|
@@ -32558,7 +32480,6 @@ var ts;
|
|
|
32558
32480
|
name: "preserveConstEnums",
|
|
32559
32481
|
type: "boolean",
|
|
32560
32482
|
affectsEmit: true,
|
|
32561
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32562
32483
|
category: ts.Diagnostics.Emit,
|
|
32563
32484
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
32564
32485
|
defaultValueDescription: false,
|
|
@@ -32567,8 +32488,6 @@ var ts;
|
|
|
32567
32488
|
name: "declarationDir",
|
|
32568
32489
|
type: "string",
|
|
32569
32490
|
affectsEmit: true,
|
|
32570
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32571
|
-
affectsDeclarationPath: true,
|
|
32572
32491
|
isFilePath: true,
|
|
32573
32492
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
32574
32493
|
category: ts.Diagnostics.Emit,
|
|
@@ -32578,7 +32497,6 @@ var ts;
|
|
|
32578
32497
|
{
|
|
32579
32498
|
name: "skipLibCheck",
|
|
32580
32499
|
type: "boolean",
|
|
32581
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32582
32500
|
category: ts.Diagnostics.Completeness,
|
|
32583
32501
|
description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
|
|
32584
32502
|
defaultValueDescription: false,
|
|
@@ -32588,7 +32506,6 @@ var ts;
|
|
|
32588
32506
|
type: "boolean",
|
|
32589
32507
|
affectsBindDiagnostics: true,
|
|
32590
32508
|
affectsSemanticDiagnostics: true,
|
|
32591
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32592
32509
|
category: ts.Diagnostics.Type_Checking,
|
|
32593
32510
|
description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
|
|
32594
32511
|
defaultValueDescription: undefined,
|
|
@@ -32598,7 +32515,6 @@ var ts;
|
|
|
32598
32515
|
type: "boolean",
|
|
32599
32516
|
affectsBindDiagnostics: true,
|
|
32600
32517
|
affectsSemanticDiagnostics: true,
|
|
32601
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32602
32518
|
category: ts.Diagnostics.Type_Checking,
|
|
32603
32519
|
description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
|
|
32604
32520
|
defaultValueDescription: undefined,
|
|
@@ -32607,7 +32523,6 @@ var ts;
|
|
|
32607
32523
|
name: "suppressExcessPropertyErrors",
|
|
32608
32524
|
type: "boolean",
|
|
32609
32525
|
affectsSemanticDiagnostics: true,
|
|
32610
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32611
32526
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32612
32527
|
description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
|
|
32613
32528
|
defaultValueDescription: false,
|
|
@@ -32616,7 +32531,6 @@ var ts;
|
|
|
32616
32531
|
name: "suppressImplicitAnyIndexErrors",
|
|
32617
32532
|
type: "boolean",
|
|
32618
32533
|
affectsSemanticDiagnostics: true,
|
|
32619
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32620
32534
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32621
32535
|
description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
|
|
32622
32536
|
defaultValueDescription: false,
|
|
@@ -32641,7 +32555,6 @@ var ts;
|
|
|
32641
32555
|
name: "noStrictGenericChecks",
|
|
32642
32556
|
type: "boolean",
|
|
32643
32557
|
affectsSemanticDiagnostics: true,
|
|
32644
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32645
32558
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32646
32559
|
description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
|
|
32647
32560
|
defaultValueDescription: false,
|
|
@@ -32651,7 +32564,6 @@ var ts;
|
|
|
32651
32564
|
type: "boolean",
|
|
32652
32565
|
affectsSemanticDiagnostics: true,
|
|
32653
32566
|
affectsEmit: true,
|
|
32654
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32655
32567
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32656
32568
|
description: ts.Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,
|
|
32657
32569
|
defaultValueDescription: ts.Diagnostics.true_for_ES2022_and_above_including_ESNext
|
|
@@ -32660,7 +32572,6 @@ var ts;
|
|
|
32660
32572
|
name: "preserveValueImports",
|
|
32661
32573
|
type: "boolean",
|
|
32662
32574
|
affectsEmit: true,
|
|
32663
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32664
32575
|
category: ts.Diagnostics.Emit,
|
|
32665
32576
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
32666
32577
|
defaultValueDescription: false,
|
|
@@ -32693,13 +32604,12 @@ var ts;
|
|
|
32693
32604
|
affectsModuleResolution: true,
|
|
32694
32605
|
description: ts.Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files,
|
|
32695
32606
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32696
|
-
defaultValueDescription: ts.Diagnostics.
|
|
32607
|
+
defaultValueDescription: ts.Diagnostics.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules,
|
|
32697
32608
|
}
|
|
32698
32609
|
];
|
|
32699
32610
|
ts.optionDeclarations = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), commandOptionsWithoutBuild, true);
|
|
32700
32611
|
ts.semanticDiagnosticsOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsSemanticDiagnostics; });
|
|
32701
32612
|
ts.affectsEmitOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsEmit; });
|
|
32702
|
-
ts.affectsDeclarationPathOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsDeclarationPath; });
|
|
32703
32613
|
ts.moduleResolutionOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsModuleResolution; });
|
|
32704
32614
|
ts.sourceFileAffectingCompilerOptions = ts.optionDeclarations.filter(function (option) {
|
|
32705
32615
|
return !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics;
|
|
@@ -33479,7 +33389,6 @@ var ts;
|
|
|
33479
33389
|
}
|
|
33480
33390
|
});
|
|
33481
33391
|
}
|
|
33482
|
-
ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
|
|
33483
33392
|
function serializeCompilerOptions(options, pathOptions) {
|
|
33484
33393
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
33485
33394
|
}
|
|
@@ -34456,7 +34365,7 @@ var ts;
|
|
|
34456
34365
|
ts.Debug.assert(ts.extensionIsTS(resolved.extension));
|
|
34457
34366
|
return { fileName: resolved.path, packageId: resolved.packageId };
|
|
34458
34367
|
}
|
|
34459
|
-
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, resultFromCache) {
|
|
34368
|
+
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, diagnostics, resultFromCache) {
|
|
34460
34369
|
var _a;
|
|
34461
34370
|
if (resultFromCache) {
|
|
34462
34371
|
(_a = resultFromCache.failedLookupLocations).push.apply(_a, failedLookupLocations);
|
|
@@ -34464,7 +34373,8 @@ var ts;
|
|
|
34464
34373
|
}
|
|
34465
34374
|
return {
|
|
34466
34375
|
resolvedModule: resolved && { resolvedFileName: resolved.path, originalPath: resolved.originalPath === true ? undefined : resolved.originalPath, extension: resolved.extension, isExternalLibraryImport: isExternalLibraryImport, packageId: resolved.packageId },
|
|
34467
|
-
failedLookupLocations: failedLookupLocations
|
|
34376
|
+
failedLookupLocations: failedLookupLocations,
|
|
34377
|
+
resolutionDiagnostics: diagnostics
|
|
34468
34378
|
};
|
|
34469
34379
|
}
|
|
34470
34380
|
function readPackageJsonField(jsonContent, fieldName, typeOfTag, state) {
|
|
@@ -34641,11 +34551,22 @@ var ts;
|
|
|
34641
34551
|
}
|
|
34642
34552
|
var failedLookupLocations = [];
|
|
34643
34553
|
var features = getDefaultNodeResolutionFeatures(options);
|
|
34644
|
-
if (resolutionMode === ts.ModuleKind.ESNext && (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.
|
|
34554
|
+
if (resolutionMode === ts.ModuleKind.ESNext && (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext)) {
|
|
34645
34555
|
features |= NodeResolutionFeatures.EsmMode;
|
|
34646
34556
|
}
|
|
34647
34557
|
var conditions = features & NodeResolutionFeatures.Exports ? features & NodeResolutionFeatures.EsmMode ? ["node", "import", "types"] : ["node", "require", "types"] : [];
|
|
34648
|
-
var
|
|
34558
|
+
var diagnostics = [];
|
|
34559
|
+
var moduleResolutionState = {
|
|
34560
|
+
compilerOptions: options,
|
|
34561
|
+
host: host,
|
|
34562
|
+
traceEnabled: traceEnabled,
|
|
34563
|
+
failedLookupLocations: failedLookupLocations,
|
|
34564
|
+
packageJsonInfoCache: cache,
|
|
34565
|
+
features: features,
|
|
34566
|
+
conditions: conditions,
|
|
34567
|
+
requestContainingDirectory: containingDirectory,
|
|
34568
|
+
reportDiagnostic: function (diag) { return void diagnostics.push(diag); },
|
|
34569
|
+
};
|
|
34649
34570
|
var resolved = primaryLookup();
|
|
34650
34571
|
var primary = true;
|
|
34651
34572
|
if (!resolved) {
|
|
@@ -34664,7 +34585,7 @@ var ts;
|
|
|
34664
34585
|
isExternalLibraryImport: pathContainsNodeModules(fileName),
|
|
34665
34586
|
};
|
|
34666
34587
|
}
|
|
34667
|
-
result = { resolvedTypeReferenceDirective: resolvedTypeReferenceDirective, failedLookupLocations: failedLookupLocations };
|
|
34588
|
+
result = { resolvedTypeReferenceDirective: resolvedTypeReferenceDirective, failedLookupLocations: failedLookupLocations, resolutionDiagnostics: diagnostics };
|
|
34668
34589
|
perFolderCache === null || perFolderCache === void 0 ? void 0 : perFolderCache.set(typeReferenceDirectiveName, resolutionMode, result);
|
|
34669
34590
|
if (traceEnabled)
|
|
34670
34591
|
traceResult(result);
|
|
@@ -34728,7 +34649,7 @@ var ts;
|
|
|
34728
34649
|
}
|
|
34729
34650
|
ts.resolveTypeReferenceDirective = resolveTypeReferenceDirective;
|
|
34730
34651
|
function getDefaultNodeResolutionFeatures(options) {
|
|
34731
|
-
return ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.
|
|
34652
|
+
return ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node16 ? NodeResolutionFeatures.Node16Default :
|
|
34732
34653
|
ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext ? NodeResolutionFeatures.NodeNextDefault :
|
|
34733
34654
|
NodeResolutionFeatures.None;
|
|
34734
34655
|
}
|
|
@@ -34741,6 +34662,8 @@ var ts;
|
|
|
34741
34662
|
packageJsonInfoCache: cache === null || cache === void 0 ? void 0 : cache.getPackageJsonInfoCache(),
|
|
34742
34663
|
conditions: ts.emptyArray,
|
|
34743
34664
|
features: NodeResolutionFeatures.None,
|
|
34665
|
+
requestContainingDirectory: containingDirectory,
|
|
34666
|
+
reportDiagnostic: ts.noop
|
|
34744
34667
|
};
|
|
34745
34668
|
return ts.forEachAncestorDirectory(containingDirectory, function (ancestorDirectory) {
|
|
34746
34669
|
if (ts.getBaseFileName(ancestorDirectory) !== "node_modules") {
|
|
@@ -35041,8 +34964,8 @@ var ts;
|
|
|
35041
34964
|
case ts.ModuleKind.CommonJS:
|
|
35042
34965
|
moduleResolution = ts.ModuleResolutionKind.NodeJs;
|
|
35043
34966
|
break;
|
|
35044
|
-
case ts.ModuleKind.
|
|
35045
|
-
moduleResolution = ts.ModuleResolutionKind.
|
|
34967
|
+
case ts.ModuleKind.Node16:
|
|
34968
|
+
moduleResolution = ts.ModuleResolutionKind.Node16;
|
|
35046
34969
|
break;
|
|
35047
34970
|
case ts.ModuleKind.NodeNext:
|
|
35048
34971
|
moduleResolution = ts.ModuleResolutionKind.NodeNext;
|
|
@@ -35062,8 +34985,8 @@ var ts;
|
|
|
35062
34985
|
}
|
|
35063
34986
|
ts.perfLogger.logStartResolveModule(moduleName);
|
|
35064
34987
|
switch (moduleResolution) {
|
|
35065
|
-
case ts.ModuleResolutionKind.
|
|
35066
|
-
result =
|
|
34988
|
+
case ts.ModuleResolutionKind.Node16:
|
|
34989
|
+
result = node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
35067
34990
|
break;
|
|
35068
34991
|
case ts.ModuleResolutionKind.NodeNext:
|
|
35069
34992
|
result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
@@ -35221,12 +35144,12 @@ var ts;
|
|
|
35221
35144
|
NodeResolutionFeatures[NodeResolutionFeatures["Exports"] = 8] = "Exports";
|
|
35222
35145
|
NodeResolutionFeatures[NodeResolutionFeatures["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
|
|
35223
35146
|
NodeResolutionFeatures[NodeResolutionFeatures["AllFeatures"] = 30] = "AllFeatures";
|
|
35224
|
-
NodeResolutionFeatures[NodeResolutionFeatures["
|
|
35147
|
+
NodeResolutionFeatures[NodeResolutionFeatures["Node16Default"] = 30] = "Node16Default";
|
|
35225
35148
|
NodeResolutionFeatures[NodeResolutionFeatures["NodeNextDefault"] = 30] = "NodeNextDefault";
|
|
35226
35149
|
NodeResolutionFeatures[NodeResolutionFeatures["EsmMode"] = 32] = "EsmMode";
|
|
35227
35150
|
})(NodeResolutionFeatures || (NodeResolutionFeatures = {}));
|
|
35228
|
-
function
|
|
35229
|
-
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.
|
|
35151
|
+
function node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35152
|
+
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Node16Default, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
35230
35153
|
}
|
|
35231
35154
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35232
35155
|
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
@@ -35269,6 +35192,7 @@ var ts;
|
|
|
35269
35192
|
if (compilerOptions.noDtsResolution) {
|
|
35270
35193
|
conditions.pop();
|
|
35271
35194
|
}
|
|
35195
|
+
var diagnostics = [];
|
|
35272
35196
|
var state = {
|
|
35273
35197
|
compilerOptions: compilerOptions,
|
|
35274
35198
|
host: host,
|
|
@@ -35277,9 +35201,11 @@ var ts;
|
|
|
35277
35201
|
packageJsonInfoCache: cache,
|
|
35278
35202
|
features: features,
|
|
35279
35203
|
conditions: conditions,
|
|
35204
|
+
requestContainingDirectory: containingDirectory,
|
|
35205
|
+
reportDiagnostic: function (diag) { return void diagnostics.push(diag); },
|
|
35280
35206
|
};
|
|
35281
35207
|
var result = ts.forEach(extensions, function (ext) { return tryResolve(ext); });
|
|
35282
|
-
return createResolvedModuleWithFailedLookupLocations((_a = result === null || result === void 0 ? void 0 : result.value) === null || _a === void 0 ? void 0 : _a.resolved, (_b = result === null || result === void 0 ? void 0 : result.value) === null || _b === void 0 ? void 0 : _b.isExternalLibraryImport, failedLookupLocations, state.resultFromCache);
|
|
35208
|
+
return createResolvedModuleWithFailedLookupLocations((_a = result === null || result === void 0 ? void 0 : result.value) === null || _a === void 0 ? void 0 : _a.resolved, (_b = result === null || result === void 0 ? void 0 : result.value) === null || _b === void 0 ? void 0 : _b.isExternalLibraryImport, failedLookupLocations, diagnostics, state.resultFromCache);
|
|
35283
35209
|
function tryResolve(extensions) {
|
|
35284
35210
|
var loader = function (extensions, candidate, onlyRecordFailures, state) { return nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, true); };
|
|
35285
35211
|
var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, state);
|
|
@@ -35421,9 +35347,9 @@ var ts;
|
|
|
35421
35347
|
}
|
|
35422
35348
|
}
|
|
35423
35349
|
function loadJSOrExactTSFileName(extensions, candidate, onlyRecordFailures, state) {
|
|
35424
|
-
if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && ts.
|
|
35350
|
+
if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && ts.fileExtensionIsOneOf(candidate, ts.supportedTSExtensionsFlat)) {
|
|
35425
35351
|
var result = tryFile(candidate, onlyRecordFailures, state);
|
|
35426
|
-
return result !== undefined ? { path: candidate, ext: ts.
|
|
35352
|
+
return result !== undefined ? { path: candidate, ext: ts.tryExtractTSExtension(candidate) } : undefined;
|
|
35427
35353
|
}
|
|
35428
35354
|
return loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state);
|
|
35429
35355
|
}
|
|
@@ -35540,6 +35466,8 @@ var ts;
|
|
|
35540
35466
|
packageJsonInfoCache: cache === null || cache === void 0 ? void 0 : cache.getPackageJsonInfoCache(),
|
|
35541
35467
|
conditions: ["node", "require", "types"],
|
|
35542
35468
|
features: features,
|
|
35469
|
+
requestContainingDirectory: packageJsonInfo.packageDirectory,
|
|
35470
|
+
reportDiagnostic: ts.noop
|
|
35543
35471
|
};
|
|
35544
35472
|
var requireResolution = loadNodeModuleFromDirectoryWorker(extensions, packageJsonInfo.packageDirectory, false, requireState, packageJsonInfo.packageJsonContent, packageJsonInfo.versionPaths);
|
|
35545
35473
|
entrypoints = ts.append(entrypoints, requireResolution === null || requireResolution === void 0 ? void 0 : requireResolution.path);
|
|
@@ -35619,6 +35547,8 @@ var ts;
|
|
|
35619
35547
|
packageJsonInfoCache: packageJsonInfoCache,
|
|
35620
35548
|
features: 0,
|
|
35621
35549
|
conditions: [],
|
|
35550
|
+
requestContainingDirectory: undefined,
|
|
35551
|
+
reportDiagnostic: ts.noop
|
|
35622
35552
|
};
|
|
35623
35553
|
var parts = ts.getPathComponents(fileName);
|
|
35624
35554
|
parts.pop();
|
|
@@ -35893,7 +35823,6 @@ var ts;
|
|
|
35893
35823
|
function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports) {
|
|
35894
35824
|
return loadModuleFromTargetImportOrExport;
|
|
35895
35825
|
function loadModuleFromTargetImportOrExport(target, subpath, pattern) {
|
|
35896
|
-
var _a, _b;
|
|
35897
35826
|
if (typeof target === "string") {
|
|
35898
35827
|
if (!pattern && subpath.length > 0 && !ts.endsWith(target, "/")) {
|
|
35899
35828
|
if (state.traceEnabled) {
|
|
@@ -35928,13 +35857,16 @@ var ts;
|
|
|
35928
35857
|
}
|
|
35929
35858
|
return toSearchResult(undefined);
|
|
35930
35859
|
}
|
|
35931
|
-
var finalPath =
|
|
35860
|
+
var finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath);
|
|
35861
|
+
var inputLink = tryLoadInputFileForPath(finalPath, subpath, ts.combinePaths(scope.packageDirectory, "package.json"), isImports);
|
|
35862
|
+
if (inputLink)
|
|
35863
|
+
return inputLink;
|
|
35932
35864
|
return toSearchResult(withPackageId(scope, loadJSOrExactTSFileName(extensions, finalPath, false, state)));
|
|
35933
35865
|
}
|
|
35934
35866
|
else if (typeof target === "object" && target !== null) {
|
|
35935
35867
|
if (!Array.isArray(target)) {
|
|
35936
|
-
for (var _i = 0,
|
|
35937
|
-
var key =
|
|
35868
|
+
for (var _i = 0, _a = ts.getOwnKeys(target); _i < _a.length; _i++) {
|
|
35869
|
+
var key = _a[_i];
|
|
35938
35870
|
if (key === "default" || state.conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(state.conditions, key)) {
|
|
35939
35871
|
var subTarget = target[key];
|
|
35940
35872
|
var result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern);
|
|
@@ -35952,8 +35884,8 @@ var ts;
|
|
|
35952
35884
|
}
|
|
35953
35885
|
return toSearchResult(undefined);
|
|
35954
35886
|
}
|
|
35955
|
-
for (var
|
|
35956
|
-
var elem = target_2[
|
|
35887
|
+
for (var _b = 0, target_2 = target; _b < target_2.length; _b++) {
|
|
35888
|
+
var elem = target_2[_b];
|
|
35957
35889
|
var result = loadModuleFromTargetImportOrExport(elem, subpath, pattern);
|
|
35958
35890
|
if (result) {
|
|
35959
35891
|
return result;
|
|
@@ -35971,6 +35903,94 @@ var ts;
|
|
|
35971
35903
|
trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
35972
35904
|
}
|
|
35973
35905
|
return toSearchResult(undefined);
|
|
35906
|
+
function toAbsolutePath(path) {
|
|
35907
|
+
var _a, _b;
|
|
35908
|
+
if (path === undefined)
|
|
35909
|
+
return path;
|
|
35910
|
+
return ts.hostGetCanonicalFileName({ useCaseSensitiveFileNames: useCaseSensitiveFileNames })(ts.getNormalizedAbsolutePath(path, (_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a)));
|
|
35911
|
+
}
|
|
35912
|
+
function combineDirectoryPath(root, dir) {
|
|
35913
|
+
return ts.ensureTrailingDirectorySeparator(ts.combinePaths(root, dir));
|
|
35914
|
+
}
|
|
35915
|
+
function useCaseSensitiveFileNames() {
|
|
35916
|
+
return !state.host.useCaseSensitiveFileNames ? true :
|
|
35917
|
+
typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames :
|
|
35918
|
+
state.host.useCaseSensitiveFileNames();
|
|
35919
|
+
}
|
|
35920
|
+
function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports) {
|
|
35921
|
+
var _a, _b, _c, _d;
|
|
35922
|
+
if ((extensions === Extensions.TypeScript || extensions === Extensions.JavaScript || extensions === Extensions.Json)
|
|
35923
|
+
&& (state.compilerOptions.declarationDir || state.compilerOptions.outDir)
|
|
35924
|
+
&& finalPath.indexOf("/node_modules/") === -1
|
|
35925
|
+
&& (state.compilerOptions.configFile ? ts.startsWith(toAbsolutePath(state.compilerOptions.configFile.fileName), scope.packageDirectory) : true)) {
|
|
35926
|
+
var getCanonicalFileName = ts.hostGetCanonicalFileName({ useCaseSensitiveFileNames: useCaseSensitiveFileNames });
|
|
35927
|
+
var commonSourceDirGuesses = [];
|
|
35928
|
+
if (state.compilerOptions.rootDir || (state.compilerOptions.composite && state.compilerOptions.configFilePath)) {
|
|
35929
|
+
var commonDir = toAbsolutePath(ts.getCommonSourceDirectory(state.compilerOptions, function () { return []; }, ((_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a)) || "", getCanonicalFileName));
|
|
35930
|
+
commonSourceDirGuesses.push(commonDir);
|
|
35931
|
+
}
|
|
35932
|
+
else if (state.requestContainingDirectory) {
|
|
35933
|
+
var requestingFile_1 = toAbsolutePath(ts.combinePaths(state.requestContainingDirectory, "index.ts"));
|
|
35934
|
+
var commonDir = toAbsolutePath(ts.getCommonSourceDirectory(state.compilerOptions, function () { return [requestingFile_1, toAbsolutePath(packagePath)]; }, ((_d = (_c = state.host).getCurrentDirectory) === null || _d === void 0 ? void 0 : _d.call(_c)) || "", getCanonicalFileName));
|
|
35935
|
+
commonSourceDirGuesses.push(commonDir);
|
|
35936
|
+
var fragment = ts.ensureTrailingDirectorySeparator(commonDir);
|
|
35937
|
+
while (fragment && fragment.length > 1) {
|
|
35938
|
+
var parts = ts.getPathComponents(fragment);
|
|
35939
|
+
parts.pop();
|
|
35940
|
+
var commonDir_1 = ts.getPathFromPathComponents(parts);
|
|
35941
|
+
commonSourceDirGuesses.unshift(commonDir_1);
|
|
35942
|
+
fragment = ts.ensureTrailingDirectorySeparator(commonDir_1);
|
|
35943
|
+
}
|
|
35944
|
+
}
|
|
35945
|
+
if (commonSourceDirGuesses.length > 1) {
|
|
35946
|
+
state.reportDiagnostic(ts.createCompilerDiagnostic(isImports
|
|
35947
|
+
? ts.Diagnostics.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate
|
|
35948
|
+
: ts.Diagnostics.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate, entry === "" ? "." : entry, packagePath));
|
|
35949
|
+
}
|
|
35950
|
+
for (var _i = 0, commonSourceDirGuesses_1 = commonSourceDirGuesses; _i < commonSourceDirGuesses_1.length; _i++) {
|
|
35951
|
+
var commonSourceDirGuess = commonSourceDirGuesses_1[_i];
|
|
35952
|
+
var candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess);
|
|
35953
|
+
for (var _e = 0, candidateDirectories_1 = candidateDirectories; _e < candidateDirectories_1.length; _e++) {
|
|
35954
|
+
var candidateDir = candidateDirectories_1[_e];
|
|
35955
|
+
if (ts.startsWith(finalPath, candidateDir)) {
|
|
35956
|
+
var pathFragment = finalPath.slice(candidateDir.length + 1);
|
|
35957
|
+
var possibleInputBase = ts.combinePaths(commonSourceDirGuess, pathFragment);
|
|
35958
|
+
var jsAndDtsExtensions = [".mjs", ".cjs", ".js", ".json", ".d.mts", ".d.cts", ".d.ts"];
|
|
35959
|
+
for (var _f = 0, jsAndDtsExtensions_1 = jsAndDtsExtensions; _f < jsAndDtsExtensions_1.length; _f++) {
|
|
35960
|
+
var ext = jsAndDtsExtensions_1[_f];
|
|
35961
|
+
if (ts.fileExtensionIs(possibleInputBase, ext)) {
|
|
35962
|
+
var inputExts = ts.getPossibleOriginalInputExtensionForExtension(possibleInputBase);
|
|
35963
|
+
for (var _g = 0, inputExts_1 = inputExts; _g < inputExts_1.length; _g++) {
|
|
35964
|
+
var possibleExt = inputExts_1[_g];
|
|
35965
|
+
var possibleInputWithInputExtension = ts.changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames());
|
|
35966
|
+
if ((extensions === Extensions.TypeScript && ts.hasJSFileExtension(possibleInputWithInputExtension)) ||
|
|
35967
|
+
(extensions === Extensions.JavaScript && ts.hasTSFileExtension(possibleInputWithInputExtension))) {
|
|
35968
|
+
continue;
|
|
35969
|
+
}
|
|
35970
|
+
if (state.host.fileExists(possibleInputWithInputExtension)) {
|
|
35971
|
+
return toSearchResult(withPackageId(scope, loadJSOrExactTSFileName(extensions, possibleInputWithInputExtension, false, state)));
|
|
35972
|
+
}
|
|
35973
|
+
}
|
|
35974
|
+
}
|
|
35975
|
+
}
|
|
35976
|
+
}
|
|
35977
|
+
}
|
|
35978
|
+
}
|
|
35979
|
+
}
|
|
35980
|
+
return undefined;
|
|
35981
|
+
function getOutputDirectoriesForBaseDirectory(commonSourceDirGuess) {
|
|
35982
|
+
var _a, _b;
|
|
35983
|
+
var currentDir = state.compilerOptions.configFile ? ((_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a)) || "" : commonSourceDirGuess;
|
|
35984
|
+
var candidateDirectories = [];
|
|
35985
|
+
if (state.compilerOptions.declarationDir) {
|
|
35986
|
+
candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.declarationDir)));
|
|
35987
|
+
}
|
|
35988
|
+
if (state.compilerOptions.outDir && state.compilerOptions.outDir !== state.compilerOptions.declarationDir) {
|
|
35989
|
+
candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.outDir)));
|
|
35990
|
+
}
|
|
35991
|
+
return candidateDirectories;
|
|
35992
|
+
}
|
|
35993
|
+
}
|
|
35974
35994
|
}
|
|
35975
35995
|
}
|
|
35976
35996
|
function isApplicableVersionedTypesKey(conditions, key) {
|
|
@@ -36145,10 +36165,11 @@ var ts;
|
|
|
36145
36165
|
function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
|
|
36146
36166
|
var traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
36147
36167
|
var failedLookupLocations = [];
|
|
36148
|
-
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.None, conditions: [] };
|
|
36149
36168
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
36169
|
+
var diagnostics = [];
|
|
36170
|
+
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.None, conditions: [], requestContainingDirectory: containingDirectory, reportDiagnostic: function (diag) { return void diagnostics.push(diag); } };
|
|
36150
36171
|
var resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
|
|
36151
|
-
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, false, failedLookupLocations, state.resultFromCache);
|
|
36172
|
+
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, false, failedLookupLocations, diagnostics, state.resultFromCache);
|
|
36152
36173
|
function tryResolve(extensions) {
|
|
36153
36174
|
var resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, state);
|
|
36154
36175
|
if (resolvedUsingSettings) {
|
|
@@ -36184,9 +36205,10 @@ var ts;
|
|
|
36184
36205
|
trace(host, ts.Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache);
|
|
36185
36206
|
}
|
|
36186
36207
|
var failedLookupLocations = [];
|
|
36187
|
-
var
|
|
36208
|
+
var diagnostics = [];
|
|
36209
|
+
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: packageJsonInfoCache, features: NodeResolutionFeatures.None, conditions: [], requestContainingDirectory: undefined, reportDiagnostic: function (diag) { return void diagnostics.push(diag); } };
|
|
36188
36210
|
var resolved = loadModuleFromImmediateNodeModulesDirectory(Extensions.DtsOnly, moduleName, globalCache, state, false, undefined, undefined);
|
|
36189
|
-
return createResolvedModuleWithFailedLookupLocations(resolved, true, failedLookupLocations, state.resultFromCache);
|
|
36211
|
+
return createResolvedModuleWithFailedLookupLocations(resolved, true, failedLookupLocations, diagnostics, state.resultFromCache);
|
|
36190
36212
|
}
|
|
36191
36213
|
ts.loadModuleFromGlobalCache = loadModuleFromGlobalCache;
|
|
36192
36214
|
function toSearchResult(value) {
|
|
@@ -41797,16 +41819,13 @@ var ts;
|
|
|
41797
41819
|
if (resolvedModule.isExternalLibraryImport && !ts.resolutionExtensionIsTSOrJson(resolvedModule.extension)) {
|
|
41798
41820
|
errorOnImplicitAnyModule(false, errorNode, resolvedModule, moduleReference);
|
|
41799
41821
|
}
|
|
41800
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.
|
|
41822
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
41801
41823
|
var isSyncImport = (currentSourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS && !ts.findAncestor(location, ts.isImportCall)) || !!ts.findAncestor(location, ts.isImportEqualsDeclaration);
|
|
41802
41824
|
var overrideClauseHost = ts.findAncestor(location, function (l) { return ts.isImportTypeNode(l) || ts.isExportDeclaration(l) || ts.isImportDeclaration(l); });
|
|
41803
41825
|
var overrideClause = overrideClauseHost && ts.isImportTypeNode(overrideClauseHost) ? (_g = overrideClauseHost.assertions) === null || _g === void 0 ? void 0 : _g.assertClause : overrideClauseHost === null || overrideClauseHost === void 0 ? void 0 : overrideClauseHost.assertClause;
|
|
41804
41826
|
if (isSyncImport && sourceFile.impliedNodeFormat === ts.ModuleKind.ESNext && !ts.getResolutionModeOverrideForClause(overrideClause)) {
|
|
41805
41827
|
error(errorNode, ts.Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead, moduleReference);
|
|
41806
41828
|
}
|
|
41807
|
-
if (mode === ts.ModuleKind.ESNext && compilerOptions.resolveJsonModule && resolvedModule.extension === ".json") {
|
|
41808
|
-
error(errorNode, ts.Diagnostics.JSON_imports_are_experimental_in_ES_module_mode_imports);
|
|
41809
|
-
}
|
|
41810
41829
|
}
|
|
41811
41830
|
return getMergedSymbol(sourceFile.symbol);
|
|
41812
41831
|
}
|
|
@@ -41850,7 +41869,7 @@ var ts;
|
|
|
41850
41869
|
var tsExtension = ts.tryExtractTSExtension(moduleReference);
|
|
41851
41870
|
var isExtensionlessRelativePathImport = ts.pathIsRelative(moduleReference) && !ts.hasExtension(moduleReference);
|
|
41852
41871
|
var moduleResolutionKind = ts.getEmitModuleResolutionKind(compilerOptions);
|
|
41853
|
-
var
|
|
41872
|
+
var resolutionIsNode16OrNext = moduleResolutionKind === ts.ModuleResolutionKind.Node16 ||
|
|
41854
41873
|
moduleResolutionKind === ts.ModuleResolutionKind.NodeNext;
|
|
41855
41874
|
if (tsExtension) {
|
|
41856
41875
|
var diag = ts.Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead;
|
|
@@ -41867,17 +41886,17 @@ var ts;
|
|
|
41867
41886
|
ts.hasJsonModuleEmitEnabled(compilerOptions)) {
|
|
41868
41887
|
error(errorNode, ts.Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
|
|
41869
41888
|
}
|
|
41870
|
-
else if (mode === ts.ModuleKind.ESNext &&
|
|
41889
|
+
else if (mode === ts.ModuleKind.ESNext && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) {
|
|
41871
41890
|
var absoluteRef_1 = ts.getNormalizedAbsolutePath(moduleReference, ts.getDirectoryPath(currentSourceFile.path));
|
|
41872
41891
|
var suggestedExt = (_h = suggestedExtensions.find(function (_a) {
|
|
41873
41892
|
var actualExt = _a[0], _importExt = _a[1];
|
|
41874
41893
|
return host.fileExists(absoluteRef_1 + actualExt);
|
|
41875
41894
|
})) === null || _h === void 0 ? void 0 : _h[1];
|
|
41876
41895
|
if (suggestedExt) {
|
|
41877
|
-
error(errorNode, ts.Diagnostics.
|
|
41896
|
+
error(errorNode, ts.Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt);
|
|
41878
41897
|
}
|
|
41879
41898
|
else {
|
|
41880
|
-
error(errorNode, ts.Diagnostics.
|
|
41899
|
+
error(errorNode, ts.Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path);
|
|
41881
41900
|
}
|
|
41882
41901
|
}
|
|
41883
41902
|
else {
|
|
@@ -43974,7 +43993,7 @@ var ts;
|
|
|
43974
43993
|
var targetFile = ts.getSourceFileOfModule(chain[0]);
|
|
43975
43994
|
var specifier = void 0;
|
|
43976
43995
|
var assertion = void 0;
|
|
43977
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.
|
|
43996
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
43978
43997
|
if ((targetFile === null || targetFile === void 0 ? void 0 : targetFile.impliedNodeFormat) === ts.ModuleKind.ESNext && targetFile.impliedNodeFormat !== (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat)) {
|
|
43979
43998
|
specifier = getSpecifierForModuleSymbol(chain[0], context, ts.ModuleKind.ESNext);
|
|
43980
43999
|
assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
|
|
@@ -43987,7 +44006,7 @@ var ts;
|
|
|
43987
44006
|
}
|
|
43988
44007
|
if (!(context.flags & 67108864) && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Classic && specifier.indexOf("/node_modules/") >= 0) {
|
|
43989
44008
|
var oldSpecifier = specifier;
|
|
43990
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.
|
|
44009
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
43991
44010
|
var swappedMode = (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat) === ts.ModuleKind.ESNext ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
|
|
43992
44011
|
specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode);
|
|
43993
44012
|
if (specifier.indexOf("/node_modules/") >= 0) {
|
|
@@ -48031,7 +48050,8 @@ var ts;
|
|
|
48031
48050
|
if (symbol === globalThisSymbol) {
|
|
48032
48051
|
var varsOnly_1 = new ts.Map();
|
|
48033
48052
|
members.forEach(function (p) {
|
|
48034
|
-
|
|
48053
|
+
var _a;
|
|
48054
|
+
if (!(p.flags & 418) && !(p.flags & 512 && ((_a = p.declarations) === null || _a === void 0 ? void 0 : _a.length) && ts.every(p.declarations, ts.isAmbientModule))) {
|
|
48035
48055
|
varsOnly_1.set(p.escapedName, p);
|
|
48036
48056
|
}
|
|
48037
48057
|
});
|
|
@@ -53965,7 +53985,6 @@ var ts;
|
|
|
53965
53985
|
return 0;
|
|
53966
53986
|
}
|
|
53967
53987
|
function reportErrorResults(originalSource, originalTarget, source, target, headMessage) {
|
|
53968
|
-
var _a, _b;
|
|
53969
53988
|
var sourceHasBase = !!getSingleBaseForNonAugmentingSubtype(originalSource);
|
|
53970
53989
|
var targetHasBase = !!getSingleBaseForNonAugmentingSubtype(originalTarget);
|
|
53971
53990
|
source = (originalSource.aliasSymbol || sourceHasBase) ? originalSource : source;
|
|
@@ -54004,9 +54023,6 @@ var ts;
|
|
|
54004
54023
|
return;
|
|
54005
54024
|
}
|
|
54006
54025
|
reportRelationError(headMessage, source, target);
|
|
54007
|
-
if (strictNullChecks && source.flags & 8650752 && ((_b = (_a = source.symbol) === null || _a === void 0 ? void 0 : _a.declarations) === null || _b === void 0 ? void 0 : _b[0]) && !getConstraintOfType(source) && isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864))) {
|
|
54008
|
-
associateRelatedInfo(ts.createDiagnosticForNode(source.symbol.declarations[0], ts.Diagnostics.This_type_parameter_probably_needs_an_extends_object_constraint));
|
|
54009
|
-
}
|
|
54010
54026
|
}
|
|
54011
54027
|
function traceUnionsOrIntersectionsTooLarge(source, target) {
|
|
54012
54028
|
if (!ts.tracing) {
|
|
@@ -54636,17 +54652,17 @@ var ts;
|
|
|
54636
54652
|
if (sourceFlags & 8650752) {
|
|
54637
54653
|
if (!(sourceFlags & 8388608 && targetFlags & 8388608)) {
|
|
54638
54654
|
var constraint = getConstraintOfType(source);
|
|
54639
|
-
if (!
|
|
54655
|
+
if (!constraint || (sourceFlags & 262144 && constraint.flags & 1)) {
|
|
54640
54656
|
if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864), 3)) {
|
|
54641
54657
|
resetErrorInfo(saveErrorInfo);
|
|
54642
54658
|
return result;
|
|
54643
54659
|
}
|
|
54644
54660
|
}
|
|
54645
|
-
else if (
|
|
54661
|
+
else if (result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState)) {
|
|
54646
54662
|
resetErrorInfo(saveErrorInfo);
|
|
54647
54663
|
return result;
|
|
54648
54664
|
}
|
|
54649
|
-
else if (
|
|
54665
|
+
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1, reportErrors && !(targetFlags & sourceFlags & 262144), undefined, intersectionState)) {
|
|
54650
54666
|
resetErrorInfo(saveErrorInfo);
|
|
54651
54667
|
return result;
|
|
54652
54668
|
}
|
|
@@ -59541,7 +59557,7 @@ var ts;
|
|
|
59541
59557
|
if (ts.isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
|
|
59542
59558
|
var parent = declaration.parent.parent;
|
|
59543
59559
|
if (parent.kind === 254 && ts.getCombinedNodeFlags(declaration) & 2 || parent.kind === 164) {
|
|
59544
|
-
var links = getNodeLinks(
|
|
59560
|
+
var links = getNodeLinks(parent);
|
|
59545
59561
|
if (!(links.flags & 268435456)) {
|
|
59546
59562
|
links.flags |= 268435456;
|
|
59547
59563
|
var parentType = getTypeForBindingElementParent(parent, 0);
|
|
@@ -64510,13 +64526,13 @@ var ts;
|
|
|
64510
64526
|
}
|
|
64511
64527
|
}
|
|
64512
64528
|
function checkImportMetaProperty(node) {
|
|
64513
|
-
if (moduleKind === ts.ModuleKind.
|
|
64529
|
+
if (moduleKind === ts.ModuleKind.Node16 || moduleKind === ts.ModuleKind.NodeNext) {
|
|
64514
64530
|
if (ts.getSourceFileOfNode(node).impliedNodeFormat !== ts.ModuleKind.ESNext) {
|
|
64515
64531
|
error(node, ts.Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output);
|
|
64516
64532
|
}
|
|
64517
64533
|
}
|
|
64518
64534
|
else if (moduleKind < ts.ModuleKind.ES2020 && moduleKind !== ts.ModuleKind.System) {
|
|
64519
|
-
error(node, ts.Diagnostics.
|
|
64535
|
+
error(node, ts.Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext);
|
|
64520
64536
|
}
|
|
64521
64537
|
var file = ts.getSourceFileOfNode(node);
|
|
64522
64538
|
ts.Debug.assert(!!(file.flags & 4194304), "Containing file is missing import meta node flag.");
|
|
@@ -65348,15 +65364,28 @@ var ts;
|
|
|
65348
65364
|
if (!hasParseDiagnostics(sourceFile)) {
|
|
65349
65365
|
var span = void 0;
|
|
65350
65366
|
if (!ts.isEffectiveExternalModule(sourceFile, compilerOptions)) {
|
|
65351
|
-
|
|
65352
|
-
span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos);
|
|
65367
|
+
span !== null && span !== void 0 ? span : (span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos));
|
|
65353
65368
|
var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module);
|
|
65354
65369
|
diagnostics.add(diagnostic);
|
|
65355
65370
|
}
|
|
65356
|
-
|
|
65357
|
-
|
|
65358
|
-
|
|
65359
|
-
|
|
65371
|
+
switch (moduleKind) {
|
|
65372
|
+
case ts.ModuleKind.Node16:
|
|
65373
|
+
case ts.ModuleKind.NodeNext:
|
|
65374
|
+
if (sourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS) {
|
|
65375
|
+
span !== null && span !== void 0 ? span : (span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos));
|
|
65376
|
+
diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level));
|
|
65377
|
+
break;
|
|
65378
|
+
}
|
|
65379
|
+
case ts.ModuleKind.ES2022:
|
|
65380
|
+
case ts.ModuleKind.ESNext:
|
|
65381
|
+
case ts.ModuleKind.System:
|
|
65382
|
+
if (languageVersion >= 4) {
|
|
65383
|
+
break;
|
|
65384
|
+
}
|
|
65385
|
+
default:
|
|
65386
|
+
span !== null && span !== void 0 ? span : (span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos));
|
|
65387
|
+
diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher));
|
|
65388
|
+
break;
|
|
65360
65389
|
}
|
|
65361
65390
|
}
|
|
65362
65391
|
}
|
|
@@ -67557,8 +67586,8 @@ var ts;
|
|
|
67557
67586
|
if (node.assertions) {
|
|
67558
67587
|
var override = ts.getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode);
|
|
67559
67588
|
if (override) {
|
|
67560
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.
|
|
67561
|
-
grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.
|
|
67589
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
67590
|
+
grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
|
|
67562
67591
|
}
|
|
67563
67592
|
}
|
|
67564
67593
|
}
|
|
@@ -68727,7 +68756,7 @@ var ts;
|
|
|
68727
68756
|
});
|
|
68728
68757
|
}
|
|
68729
68758
|
function checkCollisionWithRequireExportsInGeneratedCode(node, name) {
|
|
68730
|
-
if (moduleKind >= ts.ModuleKind.ES2015 && !(moduleKind >= ts.ModuleKind.
|
|
68759
|
+
if (moduleKind >= ts.ModuleKind.ES2015 && !(moduleKind >= ts.ModuleKind.Node16 && ts.getSourceFileOfNode(node).impliedNodeFormat === ts.ModuleKind.CommonJS)) {
|
|
68731
68760
|
return;
|
|
68732
68761
|
}
|
|
68733
68762
|
if (!name || !needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) {
|
|
@@ -71177,8 +71206,8 @@ var ts;
|
|
|
71177
71206
|
var validForTypeAssertions = ts.isExclusivelyTypeOnlyImportOrExport(declaration);
|
|
71178
71207
|
var override = ts.getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : undefined);
|
|
71179
71208
|
if (validForTypeAssertions && override) {
|
|
71180
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.
|
|
71181
|
-
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.
|
|
71209
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
71210
|
+
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
|
|
71182
71211
|
}
|
|
71183
71212
|
return;
|
|
71184
71213
|
}
|
|
@@ -72383,7 +72412,7 @@ var ts;
|
|
|
72383
72412
|
}
|
|
72384
72413
|
if (ts.isDeclaration(node)) {
|
|
72385
72414
|
var symbol = getSymbolOfNode(node);
|
|
72386
|
-
return getTypeOfSymbol(symbol);
|
|
72415
|
+
return symbol ? getTypeOfSymbol(symbol) : errorType;
|
|
72387
72416
|
}
|
|
72388
72417
|
if (isDeclarationNameOrImportPropertyName(node)) {
|
|
72389
72418
|
var symbol = getSymbolAtLocation(node);
|
|
@@ -74070,8 +74099,22 @@ var ts;
|
|
|
74070
74099
|
if (!ts.isEffectiveExternalModule(sourceFile, compilerOptions)) {
|
|
74071
74100
|
diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module));
|
|
74072
74101
|
}
|
|
74073
|
-
|
|
74074
|
-
|
|
74102
|
+
switch (moduleKind) {
|
|
74103
|
+
case ts.ModuleKind.Node16:
|
|
74104
|
+
case ts.ModuleKind.NodeNext:
|
|
74105
|
+
if (sourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS) {
|
|
74106
|
+
diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level));
|
|
74107
|
+
break;
|
|
74108
|
+
}
|
|
74109
|
+
case ts.ModuleKind.ES2022:
|
|
74110
|
+
case ts.ModuleKind.ESNext:
|
|
74111
|
+
case ts.ModuleKind.System:
|
|
74112
|
+
if (languageVersion >= 4) {
|
|
74113
|
+
break;
|
|
74114
|
+
}
|
|
74115
|
+
default:
|
|
74116
|
+
diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher));
|
|
74117
|
+
break;
|
|
74075
74118
|
}
|
|
74076
74119
|
}
|
|
74077
74120
|
}
|
|
@@ -74703,7 +74746,7 @@ var ts;
|
|
|
74703
74746
|
}
|
|
74704
74747
|
function checkGrammarImportCallExpression(node) {
|
|
74705
74748
|
if (moduleKind === ts.ModuleKind.ES2015) {
|
|
74706
|
-
return grammarErrorOnNode(node, ts.Diagnostics.
|
|
74749
|
+
return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext);
|
|
74707
74750
|
}
|
|
74708
74751
|
if (node.typeArguments) {
|
|
74709
74752
|
return grammarErrorOnNode(node, ts.Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);
|
|
@@ -74713,7 +74756,7 @@ var ts;
|
|
|
74713
74756
|
checkGrammarForDisallowedTrailingComma(nodeArguments);
|
|
74714
74757
|
if (nodeArguments.length > 1) {
|
|
74715
74758
|
var assertionArgument = nodeArguments[1];
|
|
74716
|
-
return grammarErrorOnNode(assertionArgument, ts.Diagnostics.
|
|
74759
|
+
return grammarErrorOnNode(assertionArgument, ts.Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext);
|
|
74717
74760
|
}
|
|
74718
74761
|
}
|
|
74719
74762
|
if (nodeArguments.length === 0 || nodeArguments.length > 2) {
|
|
@@ -89487,7 +89530,7 @@ var ts;
|
|
|
89487
89530
|
return ts.transformECMAScriptModule;
|
|
89488
89531
|
case ts.ModuleKind.System:
|
|
89489
89532
|
return ts.transformSystemModule;
|
|
89490
|
-
case ts.ModuleKind.
|
|
89533
|
+
case ts.ModuleKind.Node16:
|
|
89491
89534
|
case ts.ModuleKind.NodeNext:
|
|
89492
89535
|
return ts.transformNodeModule;
|
|
89493
89536
|
default:
|
|
@@ -90216,8 +90259,7 @@ var ts;
|
|
|
90216
90259
|
return;
|
|
90217
90260
|
}
|
|
90218
90261
|
var version = ts.version;
|
|
90219
|
-
|
|
90220
|
-
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, undefined, { buildInfo: buildInfo });
|
|
90262
|
+
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText({ bundle: bundle, program: program, version: version }), false);
|
|
90221
90263
|
}
|
|
90222
90264
|
function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) {
|
|
90223
90265
|
if (!sourceFileOrBundle || emitOnlyDtsFiles || !jsFilePath) {
|
|
@@ -90358,17 +90400,12 @@ var ts;
|
|
|
90358
90400
|
if (sourceMapFilePath) {
|
|
90359
90401
|
var sourceMap = sourceMapGenerator.toString();
|
|
90360
90402
|
ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap, false, sourceFiles);
|
|
90361
|
-
if (printer.bundleFileInfo)
|
|
90362
|
-
printer.bundleFileInfo.mapHash = ts.BuilderState.computeSignature(sourceMap, ts.maybeBind(host, host.createHash));
|
|
90363
90403
|
}
|
|
90364
90404
|
}
|
|
90365
90405
|
else {
|
|
90366
90406
|
writer.writeLine();
|
|
90367
90407
|
}
|
|
90368
|
-
|
|
90369
|
-
ts.writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
|
|
90370
|
-
if (printer.bundleFileInfo)
|
|
90371
|
-
printer.bundleFileInfo.hash = ts.BuilderState.computeSignature(text, ts.maybeBind(host, host.createHash));
|
|
90408
|
+
ts.writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
|
|
90372
90409
|
writer.clear();
|
|
90373
90410
|
}
|
|
90374
90411
|
function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
|
|
@@ -90493,50 +90530,30 @@ var ts;
|
|
|
90493
90530
|
});
|
|
90494
90531
|
}
|
|
90495
90532
|
function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) {
|
|
90496
|
-
var createHash = ts.maybeBind(host, host.createHash);
|
|
90497
90533
|
var _a = getOutputPathsForBundle(config.options, false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath;
|
|
90498
|
-
var
|
|
90499
|
-
if (
|
|
90500
|
-
var hostBuildInfo = host.getBuildInfo(buildInfoPath, config.options.configFilePath);
|
|
90501
|
-
if (!hostBuildInfo)
|
|
90502
|
-
return buildInfoPath;
|
|
90503
|
-
buildInfo = hostBuildInfo;
|
|
90504
|
-
}
|
|
90505
|
-
else {
|
|
90506
|
-
var buildInfoText = host.readFile(buildInfoPath);
|
|
90507
|
-
if (!buildInfoText)
|
|
90508
|
-
return buildInfoPath;
|
|
90509
|
-
buildInfo = getBuildInfo(buildInfoText);
|
|
90510
|
-
}
|
|
90511
|
-
if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationFilePath && !buildInfo.bundle.dts))
|
|
90534
|
+
var buildInfoText = host.readFile(ts.Debug.checkDefined(buildInfoPath));
|
|
90535
|
+
if (!buildInfoText)
|
|
90512
90536
|
return buildInfoPath;
|
|
90513
90537
|
var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath));
|
|
90514
90538
|
if (!jsFileText)
|
|
90515
90539
|
return jsFilePath;
|
|
90516
|
-
if (ts.BuilderState.computeSignature(jsFileText, createHash) !== buildInfo.bundle.js.hash)
|
|
90517
|
-
return jsFilePath;
|
|
90518
90540
|
var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath);
|
|
90519
90541
|
if ((sourceMapFilePath && !sourceMapText) || config.options.inlineSourceMap)
|
|
90520
90542
|
return sourceMapFilePath || "inline sourcemap decoding";
|
|
90521
|
-
if (sourceMapFilePath && ts.BuilderState.computeSignature(sourceMapText, createHash) !== buildInfo.bundle.js.mapHash)
|
|
90522
|
-
return sourceMapFilePath;
|
|
90523
90543
|
var declarationText = declarationFilePath && host.readFile(declarationFilePath);
|
|
90524
90544
|
if (declarationFilePath && !declarationText)
|
|
90525
90545
|
return declarationFilePath;
|
|
90526
|
-
if (declarationFilePath && ts.BuilderState.computeSignature(declarationText, createHash) !== buildInfo.bundle.dts.hash)
|
|
90527
|
-
return declarationFilePath;
|
|
90528
90546
|
var declarationMapText = declarationMapPath && host.readFile(declarationMapPath);
|
|
90529
90547
|
if ((declarationMapPath && !declarationMapText) || config.options.inlineSourceMap)
|
|
90530
90548
|
return declarationMapPath || "inline sourcemap decoding";
|
|
90531
|
-
|
|
90532
|
-
|
|
90549
|
+
var buildInfo = getBuildInfo(buildInfoText);
|
|
90550
|
+
if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationText && !buildInfo.bundle.dts))
|
|
90551
|
+
return buildInfoPath;
|
|
90533
90552
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
90534
90553
|
var ownPrependInput = ts.createInputFiles(jsFileText, declarationText, sourceMapFilePath, sourceMapText, declarationMapPath, declarationMapText, jsFilePath, declarationFilePath, buildInfoPath, buildInfo, true);
|
|
90535
90554
|
var outputFiles = [];
|
|
90536
90555
|
var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); });
|
|
90537
90556
|
var sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle, buildInfoDirectory, host);
|
|
90538
|
-
var changedDtsText;
|
|
90539
|
-
var changedDtsData;
|
|
90540
90557
|
var emitHost = {
|
|
90541
90558
|
getPrependNodes: ts.memoize(function () { return __spreadArray(__spreadArray([], prependNodes, true), [ownPrependInput], false); }),
|
|
90542
90559
|
getCanonicalFileName: host.getCanonicalFileName,
|
|
@@ -90552,7 +90569,7 @@ var ts;
|
|
|
90552
90569
|
getResolvedProjectReferenceToRedirect: ts.returnUndefined,
|
|
90553
90570
|
getProjectReferenceRedirect: ts.returnUndefined,
|
|
90554
90571
|
isSourceOfProjectReferenceRedirect: ts.returnFalse,
|
|
90555
|
-
writeFile: function (name, text, writeByteOrderMark
|
|
90572
|
+
writeFile: function (name, text, writeByteOrderMark) {
|
|
90556
90573
|
switch (name) {
|
|
90557
90574
|
case jsFilePath:
|
|
90558
90575
|
if (jsFileText === text)
|
|
@@ -90563,25 +90580,19 @@ var ts;
|
|
|
90563
90580
|
return;
|
|
90564
90581
|
break;
|
|
90565
90582
|
case buildInfoPath:
|
|
90566
|
-
var newBuildInfo =
|
|
90583
|
+
var newBuildInfo = getBuildInfo(text);
|
|
90567
90584
|
newBuildInfo.program = buildInfo.program;
|
|
90568
|
-
if (newBuildInfo.program && changedDtsText !== undefined && config.options.composite) {
|
|
90569
|
-
newBuildInfo.program.outSignature = ts.computeSignature(changedDtsText, changedDtsData, createHash);
|
|
90570
|
-
newBuildInfo.program.dtsChangeTime = ts.getCurrentTime(host).getTime();
|
|
90571
|
-
}
|
|
90572
90585
|
var _a = buildInfo.bundle, js = _a.js, dts = _a.dts, sourceFiles = _a.sourceFiles;
|
|
90573
90586
|
newBuildInfo.bundle.js.sources = js.sources;
|
|
90574
90587
|
if (dts) {
|
|
90575
90588
|
newBuildInfo.bundle.dts.sources = dts.sources;
|
|
90576
90589
|
}
|
|
90577
90590
|
newBuildInfo.bundle.sourceFiles = sourceFiles;
|
|
90578
|
-
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark
|
|
90591
|
+
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark });
|
|
90579
90592
|
return;
|
|
90580
90593
|
case declarationFilePath:
|
|
90581
90594
|
if (declarationText === text)
|
|
90582
90595
|
return;
|
|
90583
|
-
changedDtsText = text;
|
|
90584
|
-
changedDtsData = data;
|
|
90585
90596
|
break;
|
|
90586
90597
|
case declarationMapPath:
|
|
90587
90598
|
if (declarationMapText === text)
|
|
@@ -90600,7 +90611,6 @@ var ts;
|
|
|
90600
90611
|
getSourceFileFromReference: ts.returnUndefined,
|
|
90601
90612
|
redirectTargetsMap: ts.createMultiMap(),
|
|
90602
90613
|
getFileIncludeReasons: ts.notImplemented,
|
|
90603
|
-
createHash: createHash,
|
|
90604
90614
|
};
|
|
90605
90615
|
emitFiles(ts.notImplementedResolver, emitHost, undefined, ts.getTransformers(config.options, customTransformers));
|
|
90606
90616
|
return outputFiles;
|
|
@@ -95225,6 +95235,7 @@ var ts;
|
|
|
95225
95235
|
if (system === void 0) { system = ts.sys; }
|
|
95226
95236
|
var existingDirectories = new ts.Map();
|
|
95227
95237
|
var getCanonicalFileName = ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
95238
|
+
var computeHash = ts.maybeBind(system, system.createHash) || ts.generateDjb2Hash;
|
|
95228
95239
|
function getSourceFile(fileName, languageVersionOrOptions, onError) {
|
|
95229
95240
|
var text;
|
|
95230
95241
|
try {
|
|
@@ -95254,7 +95265,7 @@ var ts;
|
|
|
95254
95265
|
function writeFile(fileName, data, writeByteOrderMark, onError) {
|
|
95255
95266
|
try {
|
|
95256
95267
|
ts.performance.mark("beforeIOWrite");
|
|
95257
|
-
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return
|
|
95268
|
+
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return writeFileWorker(path, data, writeByteOrderMark); }, function (path) { return (compilerHost.createDirectory || system.createDirectory)(path); }, function (path) { return directoryExists(path); });
|
|
95258
95269
|
ts.performance.mark("afterIOWrite");
|
|
95259
95270
|
ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite");
|
|
95260
95271
|
}
|
|
@@ -95264,6 +95275,34 @@ var ts;
|
|
|
95264
95275
|
}
|
|
95265
95276
|
}
|
|
95266
95277
|
}
|
|
95278
|
+
var outputFingerprints;
|
|
95279
|
+
function writeFileWorker(fileName, data, writeByteOrderMark) {
|
|
95280
|
+
if (!ts.isWatchSet(options) || !system.getModifiedTime) {
|
|
95281
|
+
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95282
|
+
return;
|
|
95283
|
+
}
|
|
95284
|
+
if (!outputFingerprints) {
|
|
95285
|
+
outputFingerprints = new ts.Map();
|
|
95286
|
+
}
|
|
95287
|
+
var hash = computeHash(data);
|
|
95288
|
+
var mtimeBefore = system.getModifiedTime(fileName);
|
|
95289
|
+
if (mtimeBefore) {
|
|
95290
|
+
var fingerprint = outputFingerprints.get(fileName);
|
|
95291
|
+
if (fingerprint &&
|
|
95292
|
+
fingerprint.byteOrderMark === writeByteOrderMark &&
|
|
95293
|
+
fingerprint.hash === hash &&
|
|
95294
|
+
fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
|
|
95295
|
+
return;
|
|
95296
|
+
}
|
|
95297
|
+
}
|
|
95298
|
+
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95299
|
+
var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime;
|
|
95300
|
+
outputFingerprints.set(fileName, {
|
|
95301
|
+
hash: hash,
|
|
95302
|
+
byteOrderMark: writeByteOrderMark,
|
|
95303
|
+
mtime: mtimeAfter
|
|
95304
|
+
});
|
|
95305
|
+
}
|
|
95267
95306
|
function getDefaultLibLocation() {
|
|
95268
95307
|
return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath()));
|
|
95269
95308
|
}
|
|
@@ -95814,7 +95853,7 @@ var ts;
|
|
|
95814
95853
|
ts.getConfigFileParsingDiagnostics = getConfigFileParsingDiagnostics;
|
|
95815
95854
|
function getImpliedNodeFormatForFile(fileName, packageJsonInfoCache, host, options) {
|
|
95816
95855
|
switch (ts.getEmitModuleResolutionKind(options)) {
|
|
95817
|
-
case ts.ModuleResolutionKind.
|
|
95856
|
+
case ts.ModuleResolutionKind.Node16:
|
|
95818
95857
|
case ts.ModuleResolutionKind.NodeNext:
|
|
95819
95858
|
return ts.fileExtensionIsOneOf(fileName, [".d.mts", ".mts", ".mjs"]) ? ts.ModuleKind.ESNext :
|
|
95820
95859
|
ts.fileExtensionIsOneOf(fileName, [".d.cts", ".cts", ".cjs"]) ? ts.ModuleKind.CommonJS :
|
|
@@ -95865,7 +95904,6 @@ var ts;
|
|
|
95865
95904
|
ts.Diagnostics.A_rest_parameter_cannot_have_an_initializer.code,
|
|
95866
95905
|
ts.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list.code,
|
|
95867
95906
|
ts.Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code,
|
|
95868
|
-
ts.Diagnostics.A_return_statement_can_only_be_used_within_a_function_body.code,
|
|
95869
95907
|
ts.Diagnostics.A_return_statement_cannot_be_used_inside_a_class_static_block.code,
|
|
95870
95908
|
ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter.code,
|
|
95871
95909
|
ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter.code,
|
|
@@ -96204,6 +96242,34 @@ var ts;
|
|
|
96204
96242
|
ts.performance.measure("Program", "beforeProgram", "afterProgram");
|
|
96205
96243
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
96206
96244
|
return program;
|
|
96245
|
+
function addResolutionDiagnostics(list) {
|
|
96246
|
+
if (!list)
|
|
96247
|
+
return;
|
|
96248
|
+
for (var _i = 0, list_3 = list; _i < list_3.length; _i++) {
|
|
96249
|
+
var elem = list_3[_i];
|
|
96250
|
+
programDiagnostics.add(elem);
|
|
96251
|
+
}
|
|
96252
|
+
}
|
|
96253
|
+
function pullDiagnosticsFromCache(names, containingFile) {
|
|
96254
|
+
var _a;
|
|
96255
|
+
if (!moduleResolutionCache)
|
|
96256
|
+
return;
|
|
96257
|
+
var containingFileName = ts.getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory);
|
|
96258
|
+
var containingFileMode = !ts.isString(containingFile) ? containingFile.impliedNodeFormat : undefined;
|
|
96259
|
+
var containingDir = ts.getDirectoryPath(containingFileName);
|
|
96260
|
+
var redirectedReference = getRedirectReferenceForResolution(containingFile);
|
|
96261
|
+
var i = 0;
|
|
96262
|
+
for (var _i = 0, names_4 = names; _i < names_4.length; _i++) {
|
|
96263
|
+
var n = names_4[_i];
|
|
96264
|
+
var mode = typeof n === "string" ? getModeForResolutionAtIndex(containingFile, i) : getModeForFileReference(n, containingFileMode);
|
|
96265
|
+
var name = typeof n === "string" ? n : n.fileName;
|
|
96266
|
+
i++;
|
|
96267
|
+
if (ts.isExternalModuleNameRelative(name))
|
|
96268
|
+
continue;
|
|
96269
|
+
var diags = (_a = moduleResolutionCache.getOrCreateCacheForModuleName(name, mode, redirectedReference).get(containingDir)) === null || _a === void 0 ? void 0 : _a.resolutionDiagnostics;
|
|
96270
|
+
addResolutionDiagnostics(diags);
|
|
96271
|
+
}
|
|
96272
|
+
}
|
|
96207
96273
|
function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames) {
|
|
96208
96274
|
if (!moduleNames.length)
|
|
96209
96275
|
return ts.emptyArray;
|
|
@@ -96215,6 +96281,7 @@ var ts;
|
|
|
96215
96281
|
ts.performance.mark("afterResolveModule");
|
|
96216
96282
|
ts.performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule");
|
|
96217
96283
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
96284
|
+
pullDiagnosticsFromCache(moduleNames, containingFile);
|
|
96218
96285
|
return result;
|
|
96219
96286
|
}
|
|
96220
96287
|
function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile) {
|
|
@@ -96605,7 +96672,6 @@ var ts;
|
|
|
96605
96672
|
getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); },
|
|
96606
96673
|
redirectTargetsMap: redirectTargetsMap,
|
|
96607
96674
|
getFileIncludeReasons: program.getFileIncludeReasons,
|
|
96608
|
-
createHash: ts.maybeBind(host, host.createHash),
|
|
96609
96675
|
};
|
|
96610
96676
|
}
|
|
96611
96677
|
function writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
@@ -97504,8 +97570,8 @@ var ts;
|
|
|
97504
97570
|
var fileName = ts.toFileNameLowerCase(ref.fileName);
|
|
97505
97571
|
ts.setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective);
|
|
97506
97572
|
var mode = ref.resolutionMode || file.impliedNodeFormat;
|
|
97507
|
-
if (mode && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.
|
|
97508
|
-
programDiagnostics.add(ts.createDiagnosticForRange(file, ref, ts.Diagnostics.
|
|
97573
|
+
if (mode && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeNext) {
|
|
97574
|
+
programDiagnostics.add(ts.createDiagnosticForRange(file, ref, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext));
|
|
97509
97575
|
}
|
|
97510
97576
|
processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: ts.FileIncludeKind.TypeReferenceDirective, file: file.path, index: index, });
|
|
97511
97577
|
}
|
|
@@ -97838,7 +97904,7 @@ var ts;
|
|
|
97838
97904
|
}
|
|
97839
97905
|
if (options.resolveJsonModule) {
|
|
97840
97906
|
if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs &&
|
|
97841
|
-
ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.
|
|
97907
|
+
ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Node16 &&
|
|
97842
97908
|
ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeNext) {
|
|
97843
97909
|
createDiagnosticForOptionName(ts.Diagnostics.Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy, "resolveJsonModule");
|
|
97844
97910
|
}
|
|
@@ -98512,9 +98578,13 @@ var ts;
|
|
|
98512
98578
|
function createManyToManyPathMap() {
|
|
98513
98579
|
function create(forward, reverse, deleted) {
|
|
98514
98580
|
var map = {
|
|
98581
|
+
clone: function () { return create(new ts.Map(forward), new ts.Map(reverse), deleted && new ts.Set(deleted)); },
|
|
98582
|
+
forEach: function (fn) { return forward.forEach(fn); },
|
|
98515
98583
|
getKeys: function (v) { return reverse.get(v); },
|
|
98516
98584
|
getValues: function (k) { return forward.get(k); },
|
|
98585
|
+
hasKey: function (k) { return forward.has(k); },
|
|
98517
98586
|
keys: function () { return forward.keys(); },
|
|
98587
|
+
deletedKeys: function () { return deleted; },
|
|
98518
98588
|
deleteKey: function (k) {
|
|
98519
98589
|
(deleted || (deleted = new ts.Set())).add(k);
|
|
98520
98590
|
var set = forward.get(k);
|
|
@@ -98541,6 +98611,11 @@ var ts;
|
|
|
98541
98611
|
});
|
|
98542
98612
|
return map;
|
|
98543
98613
|
},
|
|
98614
|
+
clear: function () {
|
|
98615
|
+
forward.clear();
|
|
98616
|
+
reverse.clear();
|
|
98617
|
+
deleted === null || deleted === void 0 ? void 0 : deleted.clear();
|
|
98618
|
+
}
|
|
98544
98619
|
};
|
|
98545
98620
|
return map;
|
|
98546
98621
|
}
|
|
@@ -98644,45 +98719,35 @@ var ts;
|
|
|
98644
98719
|
}
|
|
98645
98720
|
BuilderState.canReuseOldState = canReuseOldState;
|
|
98646
98721
|
function create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
98647
|
-
var _a, _b, _c;
|
|
98648
98722
|
var fileInfos = new ts.Map();
|
|
98649
98723
|
var referencedMap = newProgram.getCompilerOptions().module !== ts.ModuleKind.None ? createManyToManyPathMap() : undefined;
|
|
98650
98724
|
var exportedModulesMap = referencedMap ? createManyToManyPathMap() : undefined;
|
|
98725
|
+
var hasCalledUpdateShapeSignature = new ts.Set();
|
|
98651
98726
|
var useOldState = canReuseOldState(referencedMap, oldState);
|
|
98652
98727
|
newProgram.getTypeChecker();
|
|
98653
|
-
for (var _i = 0,
|
|
98654
|
-
var sourceFile =
|
|
98728
|
+
for (var _i = 0, _a = newProgram.getSourceFiles(); _i < _a.length; _i++) {
|
|
98729
|
+
var sourceFile = _a[_i];
|
|
98655
98730
|
var version_2 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set");
|
|
98656
|
-
var
|
|
98657
|
-
var signature = oldUncommitedSignature === undefined ?
|
|
98658
|
-
useOldState ? (_b = oldState.fileInfos.get(sourceFile.resolvedPath)) === null || _b === void 0 ? void 0 : _b.signature : undefined :
|
|
98659
|
-
oldUncommitedSignature || undefined;
|
|
98731
|
+
var oldInfo = useOldState ? oldState.fileInfos.get(sourceFile.resolvedPath) : undefined;
|
|
98660
98732
|
if (referencedMap) {
|
|
98661
98733
|
var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName);
|
|
98662
98734
|
if (newReferences) {
|
|
98663
98735
|
referencedMap.set(sourceFile.resolvedPath, newReferences);
|
|
98664
98736
|
}
|
|
98665
98737
|
if (useOldState) {
|
|
98666
|
-
var
|
|
98667
|
-
var exportedModules = oldUncommitedExportedModules === undefined ?
|
|
98668
|
-
oldState.exportedModulesMap.getValues(sourceFile.resolvedPath) :
|
|
98669
|
-
oldUncommitedExportedModules || undefined;
|
|
98738
|
+
var exportedModules = oldState.exportedModulesMap.getValues(sourceFile.resolvedPath);
|
|
98670
98739
|
if (exportedModules) {
|
|
98671
98740
|
exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
|
98672
98741
|
}
|
|
98673
98742
|
}
|
|
98674
98743
|
}
|
|
98675
|
-
fileInfos.set(sourceFile.resolvedPath, {
|
|
98676
|
-
version: version_2,
|
|
98677
|
-
signature: signature,
|
|
98678
|
-
affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined,
|
|
98679
|
-
impliedFormat: sourceFile.impliedNodeFormat
|
|
98680
|
-
});
|
|
98744
|
+
fileInfos.set(sourceFile.resolvedPath, { version: version_2, signature: oldInfo && oldInfo.signature, affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined, impliedFormat: sourceFile.impliedNodeFormat });
|
|
98681
98745
|
}
|
|
98682
98746
|
return {
|
|
98683
98747
|
fileInfos: fileInfos,
|
|
98684
98748
|
referencedMap: referencedMap,
|
|
98685
98749
|
exportedModulesMap: exportedModulesMap,
|
|
98750
|
+
hasCalledUpdateShapeSignature: hasCalledUpdateShapeSignature,
|
|
98686
98751
|
useFileVersionAsSignature: !disableUseFileVersionAsSignature && !useOldState
|
|
98687
98752
|
};
|
|
98688
98753
|
}
|
|
@@ -98692,36 +98757,52 @@ var ts;
|
|
|
98692
98757
|
state.allFileNames = undefined;
|
|
98693
98758
|
}
|
|
98694
98759
|
BuilderState.releaseCache = releaseCache;
|
|
98695
|
-
function
|
|
98760
|
+
function clone(state) {
|
|
98696
98761
|
var _a, _b;
|
|
98697
|
-
|
|
98698
|
-
|
|
98699
|
-
|
|
98700
|
-
|
|
98762
|
+
return {
|
|
98763
|
+
fileInfos: new ts.Map(state.fileInfos),
|
|
98764
|
+
referencedMap: (_a = state.referencedMap) === null || _a === void 0 ? void 0 : _a.clone(),
|
|
98765
|
+
exportedModulesMap: (_b = state.exportedModulesMap) === null || _b === void 0 ? void 0 : _b.clone(),
|
|
98766
|
+
hasCalledUpdateShapeSignature: new ts.Set(state.hasCalledUpdateShapeSignature),
|
|
98767
|
+
useFileVersionAsSignature: state.useFileVersionAsSignature,
|
|
98768
|
+
};
|
|
98701
98769
|
}
|
|
98702
|
-
BuilderState.
|
|
98703
|
-
function
|
|
98770
|
+
BuilderState.clone = clone;
|
|
98771
|
+
function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, computeHash, cacheToUpdateSignature, exportedModulesMapCache) {
|
|
98772
|
+
var signatureCache = cacheToUpdateSignature || new ts.Map();
|
|
98704
98773
|
var sourceFile = programOfThisState.getSourceFileByPath(path);
|
|
98705
98774
|
if (!sourceFile) {
|
|
98706
98775
|
return ts.emptyArray;
|
|
98707
98776
|
}
|
|
98708
|
-
if (!updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash)) {
|
|
98777
|
+
if (!updateShapeSignature(state, programOfThisState, sourceFile, signatureCache, cancellationToken, computeHash, exportedModulesMapCache)) {
|
|
98709
98778
|
return [sourceFile];
|
|
98710
98779
|
}
|
|
98711
|
-
|
|
98780
|
+
var result = (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, signatureCache, cancellationToken, computeHash, exportedModulesMapCache);
|
|
98781
|
+
if (!cacheToUpdateSignature) {
|
|
98782
|
+
updateSignaturesFromCache(state, signatureCache);
|
|
98783
|
+
}
|
|
98784
|
+
return result;
|
|
98785
|
+
}
|
|
98786
|
+
BuilderState.getFilesAffectedBy = getFilesAffectedBy;
|
|
98787
|
+
function updateSignaturesFromCache(state, signatureCache) {
|
|
98788
|
+
signatureCache.forEach(function (signature, path) { return updateSignatureOfFile(state, signature, path); });
|
|
98712
98789
|
}
|
|
98713
|
-
BuilderState.
|
|
98790
|
+
BuilderState.updateSignaturesFromCache = updateSignaturesFromCache;
|
|
98714
98791
|
function updateSignatureOfFile(state, signature, path) {
|
|
98715
98792
|
state.fileInfos.get(path).signature = signature;
|
|
98716
|
-
|
|
98793
|
+
state.hasCalledUpdateShapeSignature.add(path);
|
|
98717
98794
|
}
|
|
98718
98795
|
BuilderState.updateSignatureOfFile = updateSignatureOfFile;
|
|
98719
|
-
function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash, useFileVersionAsSignature) {
|
|
98720
|
-
var _a;
|
|
98796
|
+
function updateShapeSignature(state, programOfThisState, sourceFile, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache, useFileVersionAsSignature) {
|
|
98721
98797
|
if (useFileVersionAsSignature === void 0) { useFileVersionAsSignature = state.useFileVersionAsSignature; }
|
|
98722
|
-
|
|
98798
|
+
ts.Debug.assert(!!sourceFile);
|
|
98799
|
+
ts.Debug.assert(!exportedModulesMapCache || !!state.exportedModulesMap, "Compute visible to outside map only if visibleToOutsideReferencedMap present in the state");
|
|
98800
|
+
if (state.hasCalledUpdateShapeSignature.has(sourceFile.resolvedPath) || cacheToUpdateSignature.has(sourceFile.resolvedPath)) {
|
|
98723
98801
|
return false;
|
|
98802
|
+
}
|
|
98724
98803
|
var info = state.fileInfos.get(sourceFile.resolvedPath);
|
|
98804
|
+
if (!info)
|
|
98805
|
+
return ts.Debug.fail();
|
|
98725
98806
|
var prevSignature = info.signature;
|
|
98726
98807
|
var latestSignature;
|
|
98727
98808
|
if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) {
|
|
@@ -98729,50 +98810,40 @@ var ts;
|
|
|
98729
98810
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
98730
98811
|
if (firstDts_1) {
|
|
98731
98812
|
ts.Debug.assert(ts.isDeclarationFileName(firstDts_1.name), "File extension for signature expected to be dts", function () { return "Found: " + ts.getAnyExtensionFromPath(firstDts_1.name) + " for " + firstDts_1.name + ":: All output files: " + JSON.stringify(emitOutput_1.outputFiles.map(function (f) { return f.name; })); });
|
|
98732
|
-
latestSignature =
|
|
98733
|
-
if (latestSignature !== prevSignature) {
|
|
98734
|
-
updateExportedModules(
|
|
98813
|
+
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
98814
|
+
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
98815
|
+
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
98735
98816
|
}
|
|
98736
98817
|
}
|
|
98737
98818
|
}
|
|
98738
98819
|
if (latestSignature === undefined) {
|
|
98739
98820
|
latestSignature = sourceFile.version;
|
|
98740
|
-
if (
|
|
98741
|
-
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
98821
|
+
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
98742
98822
|
var references = state.referencedMap ? state.referencedMap.getValues(sourceFile.resolvedPath) : undefined;
|
|
98743
98823
|
if (references) {
|
|
98744
|
-
|
|
98824
|
+
exportedModulesMapCache.set(sourceFile.resolvedPath, references);
|
|
98745
98825
|
}
|
|
98746
98826
|
else {
|
|
98747
|
-
|
|
98827
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
98748
98828
|
}
|
|
98749
98829
|
}
|
|
98750
98830
|
}
|
|
98751
|
-
|
|
98752
|
-
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = new ts.Set())).add(sourceFile.resolvedPath);
|
|
98753
|
-
info.signature = latestSignature;
|
|
98831
|
+
cacheToUpdateSignature.set(sourceFile.resolvedPath, latestSignature);
|
|
98754
98832
|
return latestSignature !== prevSignature;
|
|
98755
98833
|
}
|
|
98756
98834
|
BuilderState.updateShapeSignature = updateShapeSignature;
|
|
98757
|
-
function
|
|
98758
|
-
return (computeHash || ts.generateDjb2Hash)(text);
|
|
98759
|
-
}
|
|
98760
|
-
BuilderState.computeSignature = computeSignature;
|
|
98761
|
-
function updateExportedModules(state, sourceFile, exportedModulesFromDeclarationEmit) {
|
|
98762
|
-
if (!state.exportedModulesMap)
|
|
98763
|
-
return;
|
|
98764
|
-
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
98835
|
+
function updateExportedModules(sourceFile, exportedModulesFromDeclarationEmit, exportedModulesMapCache) {
|
|
98765
98836
|
if (!exportedModulesFromDeclarationEmit) {
|
|
98766
|
-
|
|
98837
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
98767
98838
|
return;
|
|
98768
98839
|
}
|
|
98769
98840
|
var exportedModules;
|
|
98770
98841
|
exportedModulesFromDeclarationEmit.forEach(function (symbol) { return addExportedModule(getReferencedFilesFromImportedModuleSymbol(symbol)); });
|
|
98771
98842
|
if (exportedModules) {
|
|
98772
|
-
|
|
98843
|
+
exportedModulesMapCache.set(sourceFile.resolvedPath, exportedModules);
|
|
98773
98844
|
}
|
|
98774
98845
|
else {
|
|
98775
|
-
|
|
98846
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
98776
98847
|
}
|
|
98777
98848
|
function addExportedModule(exportedModulePaths) {
|
|
98778
98849
|
if (exportedModulePaths === null || exportedModulePaths === void 0 ? void 0 : exportedModulePaths.length) {
|
|
@@ -98784,6 +98855,15 @@ var ts;
|
|
|
98784
98855
|
}
|
|
98785
98856
|
}
|
|
98786
98857
|
BuilderState.updateExportedModules = updateExportedModules;
|
|
98858
|
+
function updateExportedFilesMapFromCache(state, exportedModulesMapCache) {
|
|
98859
|
+
var _a;
|
|
98860
|
+
if (exportedModulesMapCache) {
|
|
98861
|
+
ts.Debug.assert(!!state.exportedModulesMap);
|
|
98862
|
+
(_a = exportedModulesMapCache.deletedKeys()) === null || _a === void 0 ? void 0 : _a.forEach(function (path) { return state.exportedModulesMap.deleteKey(path); });
|
|
98863
|
+
exportedModulesMapCache.forEach(function (exportedModules, path) { return state.exportedModulesMap.set(path, exportedModules); });
|
|
98864
|
+
}
|
|
98865
|
+
}
|
|
98866
|
+
BuilderState.updateExportedFilesMapFromCache = updateExportedFilesMapFromCache;
|
|
98787
98867
|
function getAllDependencies(state, programOfThisState, sourceFile) {
|
|
98788
98868
|
var compilerOptions = programOfThisState.getCompilerOptions();
|
|
98789
98869
|
if (ts.outFile(compilerOptions)) {
|
|
@@ -98867,7 +98947,7 @@ var ts;
|
|
|
98867
98947
|
}
|
|
98868
98948
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
98869
98949
|
}
|
|
98870
|
-
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cancellationToken, computeHash) {
|
|
98950
|
+
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache) {
|
|
98871
98951
|
if (isFileAffectingGlobalScope(sourceFileWithUpdatedShape)) {
|
|
98872
98952
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
98873
98953
|
}
|
|
@@ -98883,7 +98963,7 @@ var ts;
|
|
|
98883
98963
|
if (!seenFileNamesMap.has(currentPath)) {
|
|
98884
98964
|
var currentSourceFile = programOfThisState.getSourceFileByPath(currentPath);
|
|
98885
98965
|
seenFileNamesMap.set(currentPath, currentSourceFile);
|
|
98886
|
-
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cancellationToken, computeHash)) {
|
|
98966
|
+
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache)) {
|
|
98887
98967
|
queue.push.apply(queue, getReferencedByPaths(state, currentSourceFile.resolvedPath));
|
|
98888
98968
|
}
|
|
98889
98969
|
}
|
|
@@ -98898,31 +98978,29 @@ var ts;
|
|
|
98898
98978
|
return map1 === map2 || map1 !== undefined && map2 !== undefined && map1.size === map2.size && !ts.forEachKey(map1, function (key) { return !map2.has(key); });
|
|
98899
98979
|
}
|
|
98900
98980
|
function createBuilderProgramState(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
98901
|
-
var _a, _b;
|
|
98902
98981
|
var state = ts.BuilderState.create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature);
|
|
98903
98982
|
state.program = newProgram;
|
|
98904
98983
|
var compilerOptions = newProgram.getCompilerOptions();
|
|
98905
98984
|
state.compilerOptions = compilerOptions;
|
|
98906
|
-
|
|
98907
|
-
if (!outFilePath) {
|
|
98985
|
+
if (!ts.outFile(compilerOptions)) {
|
|
98908
98986
|
state.semanticDiagnosticsPerFile = new ts.Map();
|
|
98909
98987
|
}
|
|
98910
|
-
else if (compilerOptions.composite && (oldState === null || oldState === void 0 ? void 0 : oldState.outSignature) && outFilePath === ts.outFile(oldState === null || oldState === void 0 ? void 0 : oldState.compilerOptions)) {
|
|
98911
|
-
state.outSignature = oldState === null || oldState === void 0 ? void 0 : oldState.outSignature;
|
|
98912
|
-
}
|
|
98913
98988
|
state.changedFilesSet = new ts.Set();
|
|
98914
|
-
state.dtsChangeTime = compilerOptions.composite ? oldState === null || oldState === void 0 ? void 0 : oldState.dtsChangeTime : undefined;
|
|
98915
98989
|
var useOldState = ts.BuilderState.canReuseOldState(state.referencedMap, oldState);
|
|
98916
98990
|
var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
|
|
98917
98991
|
var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
|
|
98918
98992
|
!ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
|
|
98919
|
-
var canCopyEmitSignatures = compilerOptions.composite &&
|
|
98920
|
-
(oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
|
|
98921
|
-
!outFilePath &&
|
|
98922
|
-
!ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
|
|
98923
98993
|
if (useOldState) {
|
|
98924
|
-
(
|
|
98925
|
-
|
|
98994
|
+
if (!oldState.currentChangedFilePath) {
|
|
98995
|
+
var affectedSignatures = oldState.currentAffectedFilesSignatures;
|
|
98996
|
+
ts.Debug.assert(!oldState.affectedFiles && (!affectedSignatures || !affectedSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated");
|
|
98997
|
+
}
|
|
98998
|
+
var changedFilesSet = oldState.changedFilesSet;
|
|
98999
|
+
if (canCopySemanticDiagnostics) {
|
|
99000
|
+
ts.Debug.assert(!changedFilesSet || !ts.forEachKey(changedFilesSet, function (path) { return oldState.semanticDiagnosticsPerFile.has(path); }), "Semantic diagnostics shouldnt be available for changed files");
|
|
99001
|
+
}
|
|
99002
|
+
changedFilesSet === null || changedFilesSet === void 0 ? void 0 : changedFilesSet.forEach(function (value) { return state.changedFilesSet.add(value); });
|
|
99003
|
+
if (!ts.outFile(compilerOptions) && oldState.affectedFilesPendingEmit) {
|
|
98926
99004
|
state.affectedFilesPendingEmit = oldState.affectedFilesPendingEmit.slice();
|
|
98927
99005
|
state.affectedFilesPendingEmitKind = oldState.affectedFilesPendingEmitKind && new ts.Map(oldState.affectedFilesPendingEmitKind);
|
|
98928
99006
|
state.affectedFilesPendingEmitIndex = oldState.affectedFilesPendingEmitIndex;
|
|
@@ -98939,7 +99017,6 @@ var ts;
|
|
|
98939
99017
|
if (!useOldState ||
|
|
98940
99018
|
!(oldInfo = oldState.fileInfos.get(sourceFilePath)) ||
|
|
98941
99019
|
oldInfo.version !== info.version ||
|
|
98942
|
-
oldInfo.impliedFormat !== info.impliedFormat ||
|
|
98943
99020
|
!hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) ||
|
|
98944
99021
|
newReferences && ts.forEachKey(newReferences, function (path) { return !state.fileInfos.has(path) && oldState.fileInfos.has(path); })) {
|
|
98945
99022
|
state.changedFilesSet.add(sourceFilePath);
|
|
@@ -98959,22 +99036,24 @@ var ts;
|
|
|
98959
99036
|
state.semanticDiagnosticsFromOldState.add(sourceFilePath);
|
|
98960
99037
|
}
|
|
98961
99038
|
}
|
|
98962
|
-
if (canCopyEmitSignatures) {
|
|
98963
|
-
var oldEmitSignature = oldState.emitSignatures.get(sourceFilePath);
|
|
98964
|
-
if (oldEmitSignature)
|
|
98965
|
-
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(sourceFilePath, oldEmitSignature);
|
|
98966
|
-
}
|
|
98967
99039
|
});
|
|
98968
99040
|
if (useOldState && ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) { return info.affectsGlobalScope && !state.fileInfos.has(sourceFilePath); })) {
|
|
98969
99041
|
ts.BuilderState.getAllFilesExcludingDefaultLibraryFile(state, newProgram, undefined)
|
|
98970
99042
|
.forEach(function (file) { return state.changedFilesSet.add(file.resolvedPath); });
|
|
98971
99043
|
}
|
|
98972
|
-
else if (oldCompilerOptions && !
|
|
99044
|
+
else if (oldCompilerOptions && !ts.outFile(compilerOptions) && ts.compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions)) {
|
|
98973
99045
|
newProgram.getSourceFiles().forEach(function (f) { return addToAffectedFilesPendingEmit(state, f.resolvedPath, 1); });
|
|
98974
99046
|
ts.Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
|
|
98975
99047
|
state.seenAffectedFiles = state.seenAffectedFiles || new ts.Set();
|
|
98976
99048
|
}
|
|
98977
|
-
|
|
99049
|
+
if (useOldState) {
|
|
99050
|
+
ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) {
|
|
99051
|
+
if (state.fileInfos.has(sourceFilePath) && state.fileInfos.get(sourceFilePath).impliedFormat !== info.impliedFormat) {
|
|
99052
|
+
state.changedFilesSet.add(sourceFilePath);
|
|
99053
|
+
}
|
|
99054
|
+
});
|
|
99055
|
+
}
|
|
99056
|
+
state.buildInfoEmitPending = !!state.changedFilesSet.size;
|
|
98978
99057
|
return state;
|
|
98979
99058
|
}
|
|
98980
99059
|
function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) {
|
|
@@ -99007,40 +99086,33 @@ var ts;
|
|
|
99007
99086
|
ts.BuilderState.releaseCache(state);
|
|
99008
99087
|
state.program = undefined;
|
|
99009
99088
|
}
|
|
99010
|
-
function
|
|
99011
|
-
var
|
|
99012
|
-
ts.
|
|
99013
|
-
|
|
99014
|
-
|
|
99015
|
-
|
|
99016
|
-
|
|
99017
|
-
|
|
99018
|
-
|
|
99019
|
-
|
|
99020
|
-
|
|
99021
|
-
|
|
99022
|
-
|
|
99023
|
-
|
|
99024
|
-
|
|
99025
|
-
|
|
99026
|
-
|
|
99027
|
-
|
|
99028
|
-
|
|
99029
|
-
|
|
99030
|
-
|
|
99031
|
-
state.programEmitComplete = backupEmitState.programEmitComplete;
|
|
99032
|
-
state.emitSignatures = backupEmitState.emitSignatures;
|
|
99033
|
-
state.outSignature = backupEmitState.outSignature;
|
|
99034
|
-
state.dtsChangeTime = backupEmitState.dtsChangeTime;
|
|
99035
|
-
state.hasChangedEmitSignature = backupEmitState.hasChangedEmitSignature;
|
|
99036
|
-
if (backupEmitState.changedFilesSet)
|
|
99037
|
-
state.changedFilesSet = backupEmitState.changedFilesSet;
|
|
99089
|
+
function cloneBuilderProgramState(state) {
|
|
99090
|
+
var _a;
|
|
99091
|
+
var newState = ts.BuilderState.clone(state);
|
|
99092
|
+
newState.semanticDiagnosticsPerFile = state.semanticDiagnosticsPerFile && new ts.Map(state.semanticDiagnosticsPerFile);
|
|
99093
|
+
newState.changedFilesSet = new ts.Set(state.changedFilesSet);
|
|
99094
|
+
newState.affectedFiles = state.affectedFiles;
|
|
99095
|
+
newState.affectedFilesIndex = state.affectedFilesIndex;
|
|
99096
|
+
newState.currentChangedFilePath = state.currentChangedFilePath;
|
|
99097
|
+
newState.currentAffectedFilesSignatures = state.currentAffectedFilesSignatures && new ts.Map(state.currentAffectedFilesSignatures);
|
|
99098
|
+
newState.currentAffectedFilesExportedModulesMap = (_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clone();
|
|
99099
|
+
newState.seenAffectedFiles = state.seenAffectedFiles && new ts.Set(state.seenAffectedFiles);
|
|
99100
|
+
newState.cleanedDiagnosticsOfLibFiles = state.cleanedDiagnosticsOfLibFiles;
|
|
99101
|
+
newState.semanticDiagnosticsFromOldState = state.semanticDiagnosticsFromOldState && new ts.Set(state.semanticDiagnosticsFromOldState);
|
|
99102
|
+
newState.program = state.program;
|
|
99103
|
+
newState.compilerOptions = state.compilerOptions;
|
|
99104
|
+
newState.affectedFilesPendingEmit = state.affectedFilesPendingEmit && state.affectedFilesPendingEmit.slice();
|
|
99105
|
+
newState.affectedFilesPendingEmitKind = state.affectedFilesPendingEmitKind && new ts.Map(state.affectedFilesPendingEmitKind);
|
|
99106
|
+
newState.affectedFilesPendingEmitIndex = state.affectedFilesPendingEmitIndex;
|
|
99107
|
+
newState.seenEmittedFiles = state.seenEmittedFiles && new ts.Map(state.seenEmittedFiles);
|
|
99108
|
+
newState.programEmitComplete = state.programEmitComplete;
|
|
99109
|
+
return newState;
|
|
99038
99110
|
}
|
|
99039
99111
|
function assertSourceFileOkWithoutNextAffectedCall(state, sourceFile) {
|
|
99040
99112
|
ts.Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath));
|
|
99041
99113
|
}
|
|
99042
99114
|
function getNextAffectedFile(state, cancellationToken, computeHash, host) {
|
|
99043
|
-
var _a
|
|
99115
|
+
var _a;
|
|
99044
99116
|
while (true) {
|
|
99045
99117
|
var affectedFiles = state.affectedFiles;
|
|
99046
99118
|
if (affectedFiles) {
|
|
@@ -99057,8 +99129,10 @@ var ts;
|
|
|
99057
99129
|
}
|
|
99058
99130
|
state.changedFilesSet.delete(state.currentChangedFilePath);
|
|
99059
99131
|
state.currentChangedFilePath = undefined;
|
|
99060
|
-
(
|
|
99061
|
-
|
|
99132
|
+
ts.BuilderState.updateSignaturesFromCache(state, state.currentAffectedFilesSignatures);
|
|
99133
|
+
state.currentAffectedFilesSignatures.clear();
|
|
99134
|
+
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
99135
|
+
(_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clear();
|
|
99062
99136
|
state.affectedFiles = undefined;
|
|
99063
99137
|
}
|
|
99064
99138
|
var nextKey = state.changedFilesSet.keys().next();
|
|
@@ -99071,7 +99145,12 @@ var ts;
|
|
|
99071
99145
|
ts.Debug.assert(!state.semanticDiagnosticsPerFile);
|
|
99072
99146
|
return program;
|
|
99073
99147
|
}
|
|
99074
|
-
|
|
99148
|
+
if (!state.currentAffectedFilesSignatures)
|
|
99149
|
+
state.currentAffectedFilesSignatures = new ts.Map();
|
|
99150
|
+
if (state.exportedModulesMap) {
|
|
99151
|
+
state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap());
|
|
99152
|
+
}
|
|
99153
|
+
state.affectedFiles = ts.BuilderState.getFilesAffectedBy(state, program, nextKey.value, cancellationToken, computeHash, state.currentAffectedFilesSignatures, state.currentAffectedFilesExportedModulesMap);
|
|
99075
99154
|
state.currentChangedFilePath = nextKey.value;
|
|
99076
99155
|
state.affectedFilesIndex = 0;
|
|
99077
99156
|
if (!state.seenAffectedFiles)
|
|
@@ -99115,12 +99194,14 @@ var ts;
|
|
|
99115
99194
|
}
|
|
99116
99195
|
}
|
|
99117
99196
|
function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99197
|
+
var _a;
|
|
99118
99198
|
removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
|
|
99119
99199
|
if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
|
|
99120
99200
|
removeDiagnosticsOfLibraryFiles(state);
|
|
99121
|
-
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, cancellationToken, computeHash);
|
|
99201
|
+
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap);
|
|
99122
99202
|
return;
|
|
99123
99203
|
}
|
|
99204
|
+
ts.Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.has(affectedFile.resolvedPath)), "Signature not updated for affected file: " + affectedFile.fileName);
|
|
99124
99205
|
if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies)
|
|
99125
99206
|
return;
|
|
99126
99207
|
handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
|
|
@@ -99131,7 +99212,7 @@ var ts;
|
|
|
99131
99212
|
var program = ts.Debug.checkDefined(state.program);
|
|
99132
99213
|
var sourceFile = program.getSourceFileByPath(path);
|
|
99133
99214
|
if (sourceFile) {
|
|
99134
|
-
ts.BuilderState.updateShapeSignature(state, program, sourceFile, cancellationToken, computeHash, !host.disableUseFileVersionAsSignature);
|
|
99215
|
+
ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap, !host.disableUseFileVersionAsSignature);
|
|
99135
99216
|
if (ts.getEmitDeclarations(state.compilerOptions)) {
|
|
99136
99217
|
addToAffectedFilesPendingEmit(state, path, 0);
|
|
99137
99218
|
}
|
|
@@ -99147,10 +99228,24 @@ var ts;
|
|
|
99147
99228
|
return !state.semanticDiagnosticsFromOldState.size;
|
|
99148
99229
|
}
|
|
99149
99230
|
function isChangedSignature(state, path) {
|
|
99150
|
-
var
|
|
99151
|
-
var
|
|
99231
|
+
var newSignature = ts.Debug.checkDefined(state.currentAffectedFilesSignatures).get(path);
|
|
99232
|
+
var oldSignature = ts.Debug.checkDefined(state.fileInfos.get(path)).signature;
|
|
99152
99233
|
return newSignature !== oldSignature;
|
|
99153
99234
|
}
|
|
99235
|
+
function forEachKeyOfExportedModulesMap(state, filePath, fn) {
|
|
99236
|
+
var keys = state.currentAffectedFilesExportedModulesMap.getKeys(filePath);
|
|
99237
|
+
var result = keys && ts.forEachKey(keys, fn);
|
|
99238
|
+
if (result)
|
|
99239
|
+
return result;
|
|
99240
|
+
keys = state.exportedModulesMap.getKeys(filePath);
|
|
99241
|
+
return keys && ts.forEachKey(keys, function (exportedFromPath) {
|
|
99242
|
+
var _a;
|
|
99243
|
+
return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
|
|
99244
|
+
!((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) ?
|
|
99245
|
+
fn(exportedFromPath) :
|
|
99246
|
+
undefined;
|
|
99247
|
+
});
|
|
99248
|
+
}
|
|
99154
99249
|
function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host) {
|
|
99155
99250
|
var _a;
|
|
99156
99251
|
if (!((_a = state.fileInfos.get(filePath)) === null || _a === void 0 ? void 0 : _a.affectsGlobalScope))
|
|
@@ -99161,7 +99256,6 @@ var ts;
|
|
|
99161
99256
|
return true;
|
|
99162
99257
|
}
|
|
99163
99258
|
function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99164
|
-
var _a;
|
|
99165
99259
|
if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath))
|
|
99166
99260
|
return;
|
|
99167
99261
|
if (!isChangedSignature(state, affectedFile.resolvedPath))
|
|
@@ -99184,8 +99278,9 @@ var ts;
|
|
|
99184
99278
|
}
|
|
99185
99279
|
}
|
|
99186
99280
|
}
|
|
99281
|
+
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
99187
99282
|
var seenFileAndExportsOfFile = new ts.Set();
|
|
99188
|
-
(
|
|
99283
|
+
forEachKeyOfExportedModulesMap(state, affectedFile.resolvedPath, function (exportedFromPath) {
|
|
99189
99284
|
if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, computeHash, host))
|
|
99190
99285
|
return true;
|
|
99191
99286
|
var references = state.referencedMap.getKeys(exportedFromPath);
|
|
@@ -99195,16 +99290,17 @@ var ts;
|
|
|
99195
99290
|
});
|
|
99196
99291
|
}
|
|
99197
99292
|
function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, computeHash, host) {
|
|
99198
|
-
var _a
|
|
99293
|
+
var _a;
|
|
99199
99294
|
if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath))
|
|
99200
99295
|
return undefined;
|
|
99201
99296
|
if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host))
|
|
99202
99297
|
return true;
|
|
99203
99298
|
handleDtsMayChangeOf(state, filePath, cancellationToken, computeHash, host);
|
|
99204
|
-
|
|
99299
|
+
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
99300
|
+
forEachKeyOfExportedModulesMap(state, filePath, function (exportedFromPath) {
|
|
99205
99301
|
return handleDtsMayChangeOfFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, cancellationToken, computeHash, host);
|
|
99206
99302
|
});
|
|
99207
|
-
(
|
|
99303
|
+
(_a = state.referencedMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (referencingFilePath) {
|
|
99208
99304
|
return !seenFileAndExportsOfFile.has(referencingFilePath) &&
|
|
99209
99305
|
handleDtsMayChangeOf(state, referencingFilePath, cancellationToken, computeHash, host);
|
|
99210
99306
|
});
|
|
@@ -99220,12 +99316,12 @@ var ts;
|
|
|
99220
99316
|
}
|
|
99221
99317
|
else {
|
|
99222
99318
|
state.seenAffectedFiles.add(affected.resolvedPath);
|
|
99223
|
-
state.buildInfoEmitPending = true;
|
|
99224
99319
|
if (emitKind !== undefined) {
|
|
99225
99320
|
(state.seenEmittedFiles || (state.seenEmittedFiles = new ts.Map())).set(affected.resolvedPath, emitKind);
|
|
99226
99321
|
}
|
|
99227
99322
|
if (isPendingEmit) {
|
|
99228
99323
|
state.affectedFilesPendingEmitIndex++;
|
|
99324
|
+
state.buildInfoEmitPending = true;
|
|
99229
99325
|
}
|
|
99230
99326
|
else {
|
|
99231
99327
|
state.affectedFilesIndex++;
|
|
@@ -99257,65 +99353,29 @@ var ts;
|
|
|
99257
99353
|
}
|
|
99258
99354
|
return ts.filterSemanticDiagnostics(diagnostics, state.compilerOptions);
|
|
99259
99355
|
}
|
|
99260
|
-
function
|
|
99261
|
-
|
|
99262
|
-
|
|
99263
|
-
ts.isProgramBundleEmitBuildInfo = isProgramBundleEmitBuildInfo;
|
|
99264
|
-
function getProgramBuildInfo(state, getCanonicalFileName, host) {
|
|
99265
|
-
var outFilePath = ts.outFile(state.compilerOptions);
|
|
99266
|
-
if (outFilePath && !state.compilerOptions.composite)
|
|
99267
|
-
return;
|
|
99356
|
+
function getProgramBuildInfo(state, getCanonicalFileName) {
|
|
99357
|
+
if (ts.outFile(state.compilerOptions))
|
|
99358
|
+
return undefined;
|
|
99268
99359
|
var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory();
|
|
99269
99360
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
|
|
99270
|
-
state.dtsChangeTime = state.hasChangedEmitSignature ? ts.getCurrentTime(host).getTime() : state.dtsChangeTime;
|
|
99271
|
-
if (outFilePath) {
|
|
99272
|
-
var fileNames_1 = [];
|
|
99273
|
-
var fileInfos_1 = [];
|
|
99274
|
-
state.program.getRootFileNames().forEach(function (f) {
|
|
99275
|
-
var sourceFile = state.program.getSourceFile(f);
|
|
99276
|
-
if (!sourceFile)
|
|
99277
|
-
return;
|
|
99278
|
-
fileNames_1.push(relativeToBuildInfo(sourceFile.resolvedPath));
|
|
99279
|
-
fileInfos_1.push(sourceFile.version);
|
|
99280
|
-
});
|
|
99281
|
-
var result_15 = {
|
|
99282
|
-
fileNames: fileNames_1,
|
|
99283
|
-
fileInfos: fileInfos_1,
|
|
99284
|
-
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsBundleEmitBuildInfo"),
|
|
99285
|
-
outSignature: state.outSignature,
|
|
99286
|
-
dtsChangeTime: state.dtsChangeTime,
|
|
99287
|
-
};
|
|
99288
|
-
return result_15;
|
|
99289
|
-
}
|
|
99290
99361
|
var fileNames = [];
|
|
99291
99362
|
var fileNameToFileId = new ts.Map();
|
|
99292
99363
|
var fileIdsList;
|
|
99293
99364
|
var fileNamesToFileIdListId;
|
|
99294
|
-
var emitSignatures;
|
|
99295
99365
|
var fileInfos = ts.arrayFrom(state.fileInfos.entries(), function (_a) {
|
|
99296
|
-
var _b, _c;
|
|
99297
99366
|
var key = _a[0], value = _a[1];
|
|
99298
99367
|
var fileId = toFileId(key);
|
|
99299
99368
|
ts.Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
|
|
99300
|
-
var
|
|
99301
|
-
var actualSignature =
|
|
99302
|
-
if (state.compilerOptions.composite) {
|
|
99303
|
-
var file = state.program.getSourceFileByPath(key);
|
|
99304
|
-
if (!ts.isJsonSourceFile(file) && ts.sourceFileMayBeEmitted(file, state.program)) {
|
|
99305
|
-
var emitSignature = (_c = state.emitSignatures) === null || _c === void 0 ? void 0 : _c.get(key);
|
|
99306
|
-
if (emitSignature !== actualSignature) {
|
|
99307
|
-
(emitSignatures || (emitSignatures = [])).push(emitSignature === undefined ? fileId : [fileId, emitSignature]);
|
|
99308
|
-
}
|
|
99309
|
-
}
|
|
99310
|
-
}
|
|
99369
|
+
var signature = state.currentAffectedFilesSignatures && state.currentAffectedFilesSignatures.get(key);
|
|
99370
|
+
var actualSignature = signature !== null && signature !== void 0 ? signature : value.signature;
|
|
99311
99371
|
return value.version === actualSignature ?
|
|
99312
99372
|
value.affectsGlobalScope || value.impliedFormat ?
|
|
99313
99373
|
{ version: value.version, signature: undefined, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99314
99374
|
value.version :
|
|
99315
99375
|
actualSignature !== undefined ?
|
|
99316
|
-
|
|
99376
|
+
signature === undefined ?
|
|
99317
99377
|
value :
|
|
99318
|
-
{ version: value.version, signature:
|
|
99378
|
+
{ version: value.version, signature: signature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99319
99379
|
{ version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat };
|
|
99320
99380
|
});
|
|
99321
99381
|
var referencedMap;
|
|
@@ -99329,12 +99389,16 @@ var ts;
|
|
|
99329
99389
|
if (state.exportedModulesMap) {
|
|
99330
99390
|
exportedModulesMap = ts.mapDefined(ts.arrayFrom(state.exportedModulesMap.keys()).sort(ts.compareStringsCaseSensitive), function (key) {
|
|
99331
99391
|
var _a;
|
|
99332
|
-
|
|
99333
|
-
|
|
99334
|
-
|
|
99335
|
-
|
|
99336
|
-
|
|
99337
|
-
|
|
99392
|
+
if (state.currentAffectedFilesExportedModulesMap) {
|
|
99393
|
+
if ((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(key)) {
|
|
99394
|
+
return undefined;
|
|
99395
|
+
}
|
|
99396
|
+
var newValue = state.currentAffectedFilesExportedModulesMap.getValues(key);
|
|
99397
|
+
if (newValue) {
|
|
99398
|
+
return [toFileId(key), toFileIdListId(newValue)];
|
|
99399
|
+
}
|
|
99400
|
+
}
|
|
99401
|
+
return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
|
|
99338
99402
|
});
|
|
99339
99403
|
}
|
|
99340
99404
|
var semanticDiagnosticsPerFile;
|
|
@@ -99345,7 +99409,9 @@ var ts;
|
|
|
99345
99409
|
(semanticDiagnosticsPerFile || (semanticDiagnosticsPerFile = [])).push(value.length ?
|
|
99346
99410
|
[
|
|
99347
99411
|
toFileId(key),
|
|
99348
|
-
|
|
99412
|
+
state.hasReusableDiagnostic ?
|
|
99413
|
+
value :
|
|
99414
|
+
convertToReusableDiagnostics(value, relativeToBuildInfo)
|
|
99349
99415
|
] :
|
|
99350
99416
|
toFileId(key));
|
|
99351
99417
|
}
|
|
@@ -99360,27 +99426,16 @@ var ts;
|
|
|
99360
99426
|
}
|
|
99361
99427
|
}
|
|
99362
99428
|
}
|
|
99363
|
-
|
|
99364
|
-
if (state.changedFilesSet.size) {
|
|
99365
|
-
for (var _d = 0, _e = ts.arrayFrom(state.changedFilesSet.keys()).sort(ts.compareStringsCaseSensitive); _d < _e.length; _d++) {
|
|
99366
|
-
var path = _e[_d];
|
|
99367
|
-
(changeFileSet || (changeFileSet = [])).push(toFileId(path));
|
|
99368
|
-
}
|
|
99369
|
-
}
|
|
99370
|
-
var result = {
|
|
99429
|
+
return {
|
|
99371
99430
|
fileNames: fileNames,
|
|
99372
99431
|
fileInfos: fileInfos,
|
|
99373
|
-
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions,
|
|
99432
|
+
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, relativeToBuildInfoEnsuringAbsolutePath),
|
|
99374
99433
|
fileIdsList: fileIdsList,
|
|
99375
99434
|
referencedMap: referencedMap,
|
|
99376
99435
|
exportedModulesMap: exportedModulesMap,
|
|
99377
99436
|
semanticDiagnosticsPerFile: semanticDiagnosticsPerFile,
|
|
99378
99437
|
affectedFilesPendingEmit: affectedFilesPendingEmit,
|
|
99379
|
-
changeFileSet: changeFileSet,
|
|
99380
|
-
emitSignatures: emitSignatures,
|
|
99381
|
-
dtsChangeTime: state.dtsChangeTime,
|
|
99382
99438
|
};
|
|
99383
|
-
return result;
|
|
99384
99439
|
function relativeToBuildInfoEnsuringAbsolutePath(path) {
|
|
99385
99440
|
return relativeToBuildInfo(ts.getNormalizedAbsolutePath(path, currentDirectory));
|
|
99386
99441
|
}
|
|
@@ -99405,18 +99460,21 @@ var ts;
|
|
|
99405
99460
|
}
|
|
99406
99461
|
return fileIdListId;
|
|
99407
99462
|
}
|
|
99408
|
-
|
|
99409
|
-
|
|
99410
|
-
|
|
99411
|
-
|
|
99412
|
-
|
|
99413
|
-
|
|
99414
|
-
|
|
99415
|
-
|
|
99416
|
-
|
|
99463
|
+
}
|
|
99464
|
+
function convertToProgramBuildInfoCompilerOptions(options, relativeToBuildInfo) {
|
|
99465
|
+
var result;
|
|
99466
|
+
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
|
|
99467
|
+
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
|
|
99468
|
+
var name = _a[_i];
|
|
99469
|
+
var optionKey = name.toLowerCase();
|
|
99470
|
+
var optionInfo = optionsNameMap.get(optionKey);
|
|
99471
|
+
if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
|
|
99472
|
+
optionKey === "strict" ||
|
|
99473
|
+
optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
|
|
99474
|
+
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
|
|
99417
99475
|
}
|
|
99418
|
-
return result;
|
|
99419
99476
|
}
|
|
99477
|
+
return result;
|
|
99420
99478
|
}
|
|
99421
99479
|
function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) {
|
|
99422
99480
|
if (option) {
|
|
@@ -99490,10 +99548,6 @@ var ts;
|
|
|
99490
99548
|
return { host: host, newProgram: newProgram, oldProgram: oldProgram, configFileParsingDiagnostics: configFileParsingDiagnostics || ts.emptyArray };
|
|
99491
99549
|
}
|
|
99492
99550
|
ts.getBuilderCreationParameters = getBuilderCreationParameters;
|
|
99493
|
-
function computeSignature(text, data, computeHash) {
|
|
99494
|
-
return ts.BuilderState.computeSignature((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text, computeHash);
|
|
99495
|
-
}
|
|
99496
|
-
ts.computeSignature = computeSignature;
|
|
99497
99551
|
function createBuilderProgram(kind, _a) {
|
|
99498
99552
|
var newProgram = _a.newProgram, host = _a.host, oldProgram = _a.oldProgram, configFileParsingDiagnostics = _a.configFileParsingDiagnostics;
|
|
99499
99553
|
var oldState = oldProgram && oldProgram.getState();
|
|
@@ -99505,28 +99559,28 @@ var ts;
|
|
|
99505
99559
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99506
99560
|
var computeHash = ts.maybeBind(host, host.createHash);
|
|
99507
99561
|
var state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
|
|
99508
|
-
var
|
|
99509
|
-
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName
|
|
99562
|
+
var backupState;
|
|
99563
|
+
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName); };
|
|
99510
99564
|
newProgram = undefined;
|
|
99511
99565
|
oldProgram = undefined;
|
|
99512
99566
|
oldState = undefined;
|
|
99513
99567
|
var getState = function () { return state; };
|
|
99514
99568
|
var builderProgram = createRedirectedBuilderProgram(getState, configFileParsingDiagnostics);
|
|
99515
99569
|
builderProgram.getState = getState;
|
|
99516
|
-
builderProgram.
|
|
99517
|
-
ts.Debug.assert(
|
|
99518
|
-
|
|
99570
|
+
builderProgram.backupState = function () {
|
|
99571
|
+
ts.Debug.assert(backupState === undefined);
|
|
99572
|
+
backupState = cloneBuilderProgramState(state);
|
|
99519
99573
|
};
|
|
99520
|
-
builderProgram.
|
|
99521
|
-
|
|
99522
|
-
|
|
99574
|
+
builderProgram.restoreState = function () {
|
|
99575
|
+
state = ts.Debug.checkDefined(backupState);
|
|
99576
|
+
backupState = undefined;
|
|
99523
99577
|
};
|
|
99524
99578
|
builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); };
|
|
99525
99579
|
builderProgram.getSemanticDiagnostics = getSemanticDiagnostics;
|
|
99526
99580
|
builderProgram.emit = emit;
|
|
99527
99581
|
builderProgram.releaseProgram = function () {
|
|
99528
99582
|
releaseCache(state);
|
|
99529
|
-
|
|
99583
|
+
backupState = undefined;
|
|
99530
99584
|
};
|
|
99531
99585
|
if (kind === BuilderProgramKind.SemanticDiagnosticsBuilderProgram) {
|
|
99532
99586
|
builderProgram.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile;
|
|
@@ -99572,57 +99626,35 @@ var ts;
|
|
|
99572
99626
|
affected = program;
|
|
99573
99627
|
}
|
|
99574
99628
|
}
|
|
99575
|
-
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
99576
|
-
|
|
99629
|
+
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, affected !== state.program && ts.getEmitDeclarations(state.compilerOptions) && !customTransformers ?
|
|
99630
|
+
getWriteFileUpdatingSignatureCallback(writeFile) :
|
|
99577
99631
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0, customTransformers), affected, emitKind, isPendingEmitFile);
|
|
99578
99632
|
}
|
|
99579
|
-
function
|
|
99633
|
+
function getWriteFileUpdatingSignatureCallback(writeFile) {
|
|
99580
99634
|
return function (fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
99581
|
-
var _a
|
|
99635
|
+
var _a;
|
|
99582
99636
|
if (ts.isDeclarationFileName(fileName)) {
|
|
99583
|
-
|
|
99584
|
-
|
|
99585
|
-
|
|
99586
|
-
|
|
99587
|
-
|
|
99588
|
-
|
|
99589
|
-
|
|
99590
|
-
|
|
99591
|
-
|
|
99592
|
-
|
|
99593
|
-
|
|
99594
|
-
|
|
99595
|
-
|
|
99596
|
-
if (state.affectedFiles) {
|
|
99597
|
-
var existing = (_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath);
|
|
99598
|
-
if (existing === undefined)
|
|
99599
|
-
(state.oldSignatures || (state.oldSignatures = new ts.Map())).set(file.resolvedPath, info.signature || false);
|
|
99600
|
-
info.signature = newSignature;
|
|
99601
|
-
}
|
|
99602
|
-
else {
|
|
99603
|
-
info.signature = newSignature;
|
|
99604
|
-
(_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
|
|
99605
|
-
}
|
|
99606
|
-
}
|
|
99637
|
+
ts.Debug.assert((sourceFiles === null || sourceFiles === void 0 ? void 0 : sourceFiles.length) === 1);
|
|
99638
|
+
var file = sourceFiles[0];
|
|
99639
|
+
var info = state.fileInfos.get(file.resolvedPath);
|
|
99640
|
+
var signature = ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath)) || info.signature;
|
|
99641
|
+
if (signature === file.version) {
|
|
99642
|
+
var newSignature = (computeHash || ts.generateDjb2Hash)((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text);
|
|
99643
|
+
if (newSignature !== file.version) {
|
|
99644
|
+
if (host.storeFilesChangingSignatureDuringEmit)
|
|
99645
|
+
(state.filesChangingSignature || (state.filesChangingSignature = new ts.Set())).add(file.resolvedPath);
|
|
99646
|
+
if (state.exportedModulesMap)
|
|
99647
|
+
ts.BuilderState.updateExportedModules(file, file.exportedModulesFromDeclarationEmit, state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap()));
|
|
99648
|
+
if (state.affectedFiles && state.affectedFilesIndex < state.affectedFiles.length) {
|
|
99649
|
+
state.currentAffectedFilesSignatures.set(file.resolvedPath, newSignature);
|
|
99607
99650
|
}
|
|
99608
|
-
|
|
99609
|
-
|
|
99610
|
-
|
|
99611
|
-
|
|
99612
|
-
newSignature || (newSignature = computeSignature(text, data, computeHash));
|
|
99613
|
-
if (newSignature !== oldSignature) {
|
|
99614
|
-
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(filePath, newSignature);
|
|
99615
|
-
state.hasChangedEmitSignature = true;
|
|
99651
|
+
else {
|
|
99652
|
+
info.signature = newSignature;
|
|
99653
|
+
if (state.exportedModulesMap)
|
|
99654
|
+
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
99616
99655
|
}
|
|
99617
99656
|
}
|
|
99618
99657
|
}
|
|
99619
|
-
else if (state.compilerOptions.composite) {
|
|
99620
|
-
var newSignature = computeSignature(text, data, computeHash);
|
|
99621
|
-
if (newSignature !== state.outSignature) {
|
|
99622
|
-
state.outSignature = newSignature;
|
|
99623
|
-
state.hasChangedEmitSignature = true;
|
|
99624
|
-
}
|
|
99625
|
-
}
|
|
99626
99658
|
}
|
|
99627
99659
|
if (writeFile)
|
|
99628
99660
|
writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
@@ -99671,8 +99703,8 @@ var ts;
|
|
|
99671
99703
|
}
|
|
99672
99704
|
}
|
|
99673
99705
|
}
|
|
99674
|
-
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
99675
|
-
|
|
99706
|
+
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, !ts.outFile(state.compilerOptions) && ts.getEmitDeclarations(state.compilerOptions) && !customTransformers ?
|
|
99707
|
+
getWriteFileUpdatingSignatureCallback(writeFile) :
|
|
99676
99708
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers);
|
|
99677
99709
|
}
|
|
99678
99710
|
function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
|
|
@@ -99735,58 +99767,29 @@ var ts;
|
|
|
99735
99767
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
99736
99768
|
}
|
|
99737
99769
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
99738
|
-
function
|
|
99739
|
-
var _a
|
|
99770
|
+
function createBuildProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
|
|
99771
|
+
var _a;
|
|
99740
99772
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
99741
99773
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99742
|
-
var
|
|
99743
|
-
var
|
|
99744
|
-
var
|
|
99745
|
-
|
|
99746
|
-
|
|
99747
|
-
|
|
99748
|
-
|
|
99749
|
-
|
|
99750
|
-
|
|
99751
|
-
};
|
|
99752
|
-
|
|
99753
|
-
|
|
99754
|
-
|
|
99755
|
-
|
|
99756
|
-
|
|
99757
|
-
var emitSignatures_1 = ((_c = program.options) === null || _c === void 0 ? void 0 : _c.composite) && !ts.outFile(program.options) ? new ts.Map() : undefined;
|
|
99758
|
-
program.fileInfos.forEach(function (fileInfo, index) {
|
|
99759
|
-
var path = toFilePath(index + 1);
|
|
99760
|
-
var stateFileInfo = toBuilderStateFileInfo(fileInfo);
|
|
99761
|
-
fileInfos_2.set(path, stateFileInfo);
|
|
99762
|
-
if (emitSignatures_1 && stateFileInfo.signature)
|
|
99763
|
-
emitSignatures_1.set(path, stateFileInfo.signature);
|
|
99764
|
-
});
|
|
99765
|
-
(_d = program.emitSignatures) === null || _d === void 0 ? void 0 : _d.forEach(function (value) {
|
|
99766
|
-
if (ts.isNumber(value))
|
|
99767
|
-
emitSignatures_1.delete(toFilePath(value));
|
|
99768
|
-
else
|
|
99769
|
-
emitSignatures_1.set(toFilePath(value[0]), value[1]);
|
|
99770
|
-
});
|
|
99771
|
-
state = {
|
|
99772
|
-
fileInfos: fileInfos_2,
|
|
99773
|
-
compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
99774
|
-
referencedMap: toManyToManyPathMap(program.referencedMap),
|
|
99775
|
-
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
99776
|
-
semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
|
|
99777
|
-
hasReusableDiagnostic: true,
|
|
99778
|
-
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
99779
|
-
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
|
|
99780
|
-
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
99781
|
-
changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
|
|
99782
|
-
dtsChangeTime: program.dtsChangeTime,
|
|
99783
|
-
emitSignatures: (emitSignatures_1 === null || emitSignatures_1 === void 0 ? void 0 : emitSignatures_1.size) ? emitSignatures_1 : undefined,
|
|
99784
|
-
};
|
|
99785
|
-
}
|
|
99774
|
+
var filePaths = program.fileNames.map(toPath);
|
|
99775
|
+
var filePathsSetList = (_a = program.fileIdsList) === null || _a === void 0 ? void 0 : _a.map(function (fileIds) { return new ts.Set(fileIds.map(toFilePath)); });
|
|
99776
|
+
var fileInfos = new ts.Map();
|
|
99777
|
+
program.fileInfos.forEach(function (fileInfo, index) { return fileInfos.set(toFilePath(index + 1), toBuilderStateFileInfo(fileInfo)); });
|
|
99778
|
+
var state = {
|
|
99779
|
+
fileInfos: fileInfos,
|
|
99780
|
+
compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
99781
|
+
referencedMap: toManyToManyPathMap(program.referencedMap),
|
|
99782
|
+
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
99783
|
+
semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
|
|
99784
|
+
hasReusableDiagnostic: true,
|
|
99785
|
+
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
99786
|
+
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
|
|
99787
|
+
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
99788
|
+
};
|
|
99786
99789
|
return {
|
|
99787
99790
|
getState: function () { return state; },
|
|
99788
|
-
|
|
99789
|
-
|
|
99791
|
+
backupState: ts.noop,
|
|
99792
|
+
restoreState: ts.noop,
|
|
99790
99793
|
getProgram: ts.notImplemented,
|
|
99791
99794
|
getProgramOrUndefined: ts.returnUndefined,
|
|
99792
99795
|
releaseProgram: ts.noop,
|
|
@@ -99831,24 +99834,12 @@ var ts;
|
|
|
99831
99834
|
return map;
|
|
99832
99835
|
}
|
|
99833
99836
|
}
|
|
99834
|
-
ts.
|
|
99835
|
-
function getBuildInfoFileVersionMap(program, buildInfoPath, host) {
|
|
99836
|
-
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
99837
|
-
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99838
|
-
var fileInfos = new ts.Map();
|
|
99839
|
-
program.fileInfos.forEach(function (fileInfo, index) {
|
|
99840
|
-
var path = ts.toPath(program.fileNames[index], buildInfoDirectory, getCanonicalFileName);
|
|
99841
|
-
var version = ts.isString(fileInfo) ? fileInfo : fileInfo.version;
|
|
99842
|
-
fileInfos.set(path, version);
|
|
99843
|
-
});
|
|
99844
|
-
return fileInfos;
|
|
99845
|
-
}
|
|
99846
|
-
ts.getBuildInfoFileVersionMap = getBuildInfoFileVersionMap;
|
|
99837
|
+
ts.createBuildProgramUsingProgramBuildInfo = createBuildProgramUsingProgramBuildInfo;
|
|
99847
99838
|
function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
|
|
99848
99839
|
return {
|
|
99849
99840
|
getState: ts.notImplemented,
|
|
99850
|
-
|
|
99851
|
-
|
|
99841
|
+
backupState: ts.noop,
|
|
99842
|
+
restoreState: ts.noop,
|
|
99852
99843
|
getProgram: getProgram,
|
|
99853
99844
|
getProgramOrUndefined: function () { return getState().program; },
|
|
99854
99845
|
releaseProgram: function () { return getState().program = undefined; },
|
|
@@ -100093,8 +100084,8 @@ var ts;
|
|
|
100093
100084
|
!!redirectedReference;
|
|
100094
100085
|
var seenNamesInFile = ts.createModeAwareCache();
|
|
100095
100086
|
var i = 0;
|
|
100096
|
-
for (var _i = 0,
|
|
100097
|
-
var entry =
|
|
100087
|
+
for (var _i = 0, names_5 = names; _i < names_5.length; _i++) {
|
|
100088
|
+
var entry = names_5[_i];
|
|
100098
100089
|
var name = ts.isString(entry) ? entry : entry.fileName.toLowerCase();
|
|
100099
100090
|
var mode = !ts.isString(entry) ? ts.getModeForFileReference(entry, containingSourceFileMode) :
|
|
100100
100091
|
containingSourceFile ? ts.getModeForResolutionAtIndex(containingSourceFile, i) : undefined;
|
|
@@ -100586,7 +100577,7 @@ var ts;
|
|
|
100586
100577
|
}
|
|
100587
100578
|
function isFormatRequiringExtensions(compilerOptions, importingSourceFileName, host) {
|
|
100588
100579
|
var _a;
|
|
100589
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.
|
|
100580
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16
|
|
100590
100581
|
&& ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
100591
100582
|
return false;
|
|
100592
100583
|
}
|
|
@@ -100799,9 +100790,9 @@ var ts;
|
|
|
100799
100790
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
100800
100791
|
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
100801
100792
|
if (!preferSymlinks) {
|
|
100802
|
-
var
|
|
100803
|
-
if (
|
|
100804
|
-
return
|
|
100793
|
+
var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
100794
|
+
if (result_15)
|
|
100795
|
+
return result_15;
|
|
100805
100796
|
}
|
|
100806
100797
|
var symlinkedDirectories = (_a = host.getSymlinkCache) === null || _a === void 0 ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
|
|
100807
100798
|
var fullImportedFileName = ts.getNormalizedAbsolutePath(importedFileName, cwd);
|
|
@@ -100820,10 +100811,10 @@ var ts;
|
|
|
100820
100811
|
for (var _i = 0, symlinkDirectories_1 = symlinkDirectories; _i < symlinkDirectories_1.length; _i++) {
|
|
100821
100812
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
100822
100813
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
100823
|
-
var
|
|
100814
|
+
var result_16 = cb(option, target === referenceRedirect);
|
|
100824
100815
|
shouldFilterIgnoredPaths = true;
|
|
100825
|
-
if (
|
|
100826
|
-
return
|
|
100816
|
+
if (result_16)
|
|
100817
|
+
return result_16;
|
|
100827
100818
|
}
|
|
100828
100819
|
});
|
|
100829
100820
|
});
|
|
@@ -101082,7 +101073,7 @@ var ts;
|
|
|
101082
101073
|
var cachedPackageJson = (_b = (_a = host.getPackageJsonInfoCache) === null || _a === void 0 ? void 0 : _a.call(host)) === null || _b === void 0 ? void 0 : _b.getPackageJsonInfo(packageJsonPath);
|
|
101083
101074
|
if (typeof cachedPackageJson === "object" || cachedPackageJson === undefined && host.fileExists(packageJsonPath)) {
|
|
101084
101075
|
var packageJsonContent = (cachedPackageJson === null || cachedPackageJson === void 0 ? void 0 : cachedPackageJson.packageJsonContent) || JSON.parse(host.readFile(packageJsonPath));
|
|
101085
|
-
if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.
|
|
101076
|
+
if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
|
|
101086
101077
|
var conditions = ["node", overrideMode || importingSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext ? "import" : "require", "types"];
|
|
101087
101078
|
var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string"
|
|
101088
101079
|
? tryGetModuleNameFromExports(options, path, packageRootPath, ts.getPackageNameFromTypesPackageName(packageJsonContent.name), packageJsonContent.exports, conditions)
|
|
@@ -101638,7 +101629,6 @@ var ts;
|
|
|
101638
101629
|
readDirectory: ts.maybeBind(host, host.readDirectory),
|
|
101639
101630
|
disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
|
|
101640
101631
|
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
|
|
101641
|
-
now: ts.maybeBind(host, host.now),
|
|
101642
101632
|
};
|
|
101643
101633
|
function writeFile(fileName, text, writeByteOrderMark, onError) {
|
|
101644
101634
|
try {
|
|
@@ -101693,7 +101683,6 @@ var ts;
|
|
|
101693
101683
|
createProgram: createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram,
|
|
101694
101684
|
disableUseFileVersionAsSignature: system.disableUseFileVersionAsSignature,
|
|
101695
101685
|
storeFilesChangingSignatureDuringEmit: system.storeFilesChangingSignatureDuringEmit,
|
|
101696
|
-
now: ts.maybeBind(system, system.now),
|
|
101697
101686
|
};
|
|
101698
101687
|
}
|
|
101699
101688
|
ts.createProgramHost = createProgramHost;
|
|
@@ -101749,26 +101738,20 @@ var ts;
|
|
|
101749
101738
|
var ts;
|
|
101750
101739
|
(function (ts) {
|
|
101751
101740
|
function readBuilderProgram(compilerOptions, host) {
|
|
101741
|
+
if (ts.outFile(compilerOptions))
|
|
101742
|
+
return undefined;
|
|
101752
101743
|
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
|
|
101753
101744
|
if (!buildInfoPath)
|
|
101754
101745
|
return undefined;
|
|
101755
|
-
var
|
|
101756
|
-
if (
|
|
101757
|
-
|
|
101758
|
-
|
|
101759
|
-
return undefined;
|
|
101760
|
-
}
|
|
101761
|
-
else {
|
|
101762
|
-
var content = host.readFile(buildInfoPath);
|
|
101763
|
-
if (!content)
|
|
101764
|
-
return undefined;
|
|
101765
|
-
buildInfo = ts.getBuildInfo(content);
|
|
101766
|
-
}
|
|
101746
|
+
var content = host.readFile(buildInfoPath);
|
|
101747
|
+
if (!content)
|
|
101748
|
+
return undefined;
|
|
101749
|
+
var buildInfo = ts.getBuildInfo(content);
|
|
101767
101750
|
if (buildInfo.version !== ts.version)
|
|
101768
101751
|
return undefined;
|
|
101769
101752
|
if (!buildInfo.program)
|
|
101770
101753
|
return undefined;
|
|
101771
|
-
return ts.
|
|
101754
|
+
return ts.createBuildProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host);
|
|
101772
101755
|
}
|
|
101773
101756
|
ts.readBuilderProgram = readBuilderProgram;
|
|
101774
101757
|
function createIncrementalCompilerHost(options, system) {
|
|
@@ -101777,7 +101760,6 @@ var ts;
|
|
|
101777
101760
|
host.createHash = ts.maybeBind(system, system.createHash);
|
|
101778
101761
|
host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
|
|
101779
101762
|
host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
|
|
101780
|
-
host.now = ts.maybeBind(system, system.now);
|
|
101781
101763
|
ts.setGetSourceFileAsHashVersioned(host, system);
|
|
101782
101764
|
ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName); });
|
|
101783
101765
|
return host;
|
|
@@ -102440,14 +102422,11 @@ var ts;
|
|
|
102440
102422
|
UpToDateStatusType[UpToDateStatusType["OutputMissing"] = 4] = "OutputMissing";
|
|
102441
102423
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithSelf"] = 5] = "OutOfDateWithSelf";
|
|
102442
102424
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithUpstream"] = 6] = "OutOfDateWithUpstream";
|
|
102443
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102444
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102445
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102446
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102447
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102448
|
-
UpToDateStatusType[UpToDateStatusType["UpToDateWithInputFileText"] = 12] = "UpToDateWithInputFileText";
|
|
102449
|
-
UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 13] = "ContainerOnly";
|
|
102450
|
-
UpToDateStatusType[UpToDateStatusType["ForceBuild"] = 14] = "ForceBuild";
|
|
102425
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamOutOfDate"] = 7] = "UpstreamOutOfDate";
|
|
102426
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamBlocked"] = 8] = "UpstreamBlocked";
|
|
102427
|
+
UpToDateStatusType[UpToDateStatusType["ComputingUpstream"] = 9] = "ComputingUpstream";
|
|
102428
|
+
UpToDateStatusType[UpToDateStatusType["TsVersionOutputOfDate"] = 10] = "TsVersionOutputOfDate";
|
|
102429
|
+
UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 11] = "ContainerOnly";
|
|
102451
102430
|
})(UpToDateStatusType = ts.UpToDateStatusType || (ts.UpToDateStatusType = {}));
|
|
102452
102431
|
function resolveConfigFileProjectName(project) {
|
|
102453
102432
|
if (ts.fileExtensionIs(project, ".json")) {
|
|
@@ -102485,10 +102464,9 @@ var ts;
|
|
|
102485
102464
|
function getOrCreateValueMapFromConfigFileMap(configFileMap, resolved) {
|
|
102486
102465
|
return getOrCreateValueFromConfigFileMap(configFileMap, resolved, function () { return new ts.Map(); });
|
|
102487
102466
|
}
|
|
102488
|
-
function
|
|
102489
|
-
return
|
|
102467
|
+
function newer(date1, date2) {
|
|
102468
|
+
return date2 > date1 ? date2 : date1;
|
|
102490
102469
|
}
|
|
102491
|
-
ts.getCurrentTime = getCurrentTime;
|
|
102492
102470
|
function isCircularBuildOrder(buildOrder) {
|
|
102493
102471
|
return !!buildOrder && !!buildOrder.buildOrder;
|
|
102494
102472
|
}
|
|
@@ -102572,7 +102550,6 @@ var ts;
|
|
|
102572
102550
|
return ts.loadWithTypeDirectiveCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader_4);
|
|
102573
102551
|
};
|
|
102574
102552
|
}
|
|
102575
|
-
compilerHost.getBuildInfo = function (fileName, configFilePath) { return getBuildInfo(state, fileName, toResolvedConfigFilePath(state, configFilePath), undefined); };
|
|
102576
102553
|
var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog;
|
|
102577
102554
|
var state = {
|
|
102578
102555
|
host: host,
|
|
@@ -102588,9 +102565,8 @@ var ts;
|
|
|
102588
102565
|
resolvedConfigFilePaths: new ts.Map(),
|
|
102589
102566
|
configFileCache: new ts.Map(),
|
|
102590
102567
|
projectStatus: new ts.Map(),
|
|
102568
|
+
buildInfoChecked: new ts.Map(),
|
|
102591
102569
|
extendedConfigCache: new ts.Map(),
|
|
102592
|
-
buildInfoCache: new ts.Map(),
|
|
102593
|
-
outputTimeStamps: new ts.Map(),
|
|
102594
102570
|
builderPrograms: new ts.Map(),
|
|
102595
102571
|
diagnostics: new ts.Map(),
|
|
102596
102572
|
projectPendingBuild: new ts.Map(),
|
|
@@ -102612,7 +102588,6 @@ var ts;
|
|
|
102612
102588
|
allWatchedConfigFiles: new ts.Map(),
|
|
102613
102589
|
allWatchedExtendedConfigFiles: new ts.Map(),
|
|
102614
102590
|
allWatchedPackageJsonFiles: new ts.Map(),
|
|
102615
|
-
filesWatched: new ts.Map(),
|
|
102616
102591
|
lastCachedPackageJsonLookups: new ts.Map(),
|
|
102617
102592
|
timerToBuildInvalidatedProject: undefined,
|
|
102618
102593
|
reportFileChangeDetected: false,
|
|
@@ -102714,12 +102689,11 @@ var ts;
|
|
|
102714
102689
|
var noopOnDelete = { onDeleteValue: ts.noop };
|
|
102715
102690
|
ts.mutateMapSkippingNewValues(state.configFileCache, currentProjects, noopOnDelete);
|
|
102716
102691
|
ts.mutateMapSkippingNewValues(state.projectStatus, currentProjects, noopOnDelete);
|
|
102692
|
+
ts.mutateMapSkippingNewValues(state.buildInfoChecked, currentProjects, noopOnDelete);
|
|
102717
102693
|
ts.mutateMapSkippingNewValues(state.builderPrograms, currentProjects, noopOnDelete);
|
|
102718
102694
|
ts.mutateMapSkippingNewValues(state.diagnostics, currentProjects, noopOnDelete);
|
|
102719
102695
|
ts.mutateMapSkippingNewValues(state.projectPendingBuild, currentProjects, noopOnDelete);
|
|
102720
102696
|
ts.mutateMapSkippingNewValues(state.projectErrorsReported, currentProjects, noopOnDelete);
|
|
102721
|
-
ts.mutateMapSkippingNewValues(state.buildInfoCache, currentProjects, noopOnDelete);
|
|
102722
|
-
ts.mutateMapSkippingNewValues(state.outputTimeStamps, currentProjects, noopOnDelete);
|
|
102723
102697
|
if (state.watch) {
|
|
102724
102698
|
ts.mutateMapSkippingNewValues(state.allWatchedConfigFiles, currentProjects, { onDeleteValue: ts.closeFileWatcher });
|
|
102725
102699
|
state.allWatchedExtendedConfigFiles.forEach(function (watcher) {
|
|
@@ -103005,16 +102979,16 @@ var ts;
|
|
|
103005
102979
|
}
|
|
103006
102980
|
function emit(writeFileCallback, cancellationToken, customTransformers) {
|
|
103007
102981
|
var _a;
|
|
103008
|
-
var _b, _c
|
|
102982
|
+
var _b, _c;
|
|
103009
102983
|
ts.Debug.assertIsDefined(program);
|
|
103010
102984
|
ts.Debug.assert(step === BuildStep.Emit);
|
|
103011
|
-
program.
|
|
102985
|
+
program.backupState();
|
|
103012
102986
|
var declDiagnostics;
|
|
103013
102987
|
var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
|
|
103014
102988
|
var outputFiles = [];
|
|
103015
|
-
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark
|
|
102989
|
+
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken, false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
|
|
103016
102990
|
if (declDiagnostics) {
|
|
103017
|
-
program.
|
|
102991
|
+
program.restoreState();
|
|
103018
102992
|
(_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
|
|
103019
102993
|
return {
|
|
103020
102994
|
emitSkipped: true,
|
|
@@ -103023,43 +102997,35 @@ var ts;
|
|
|
103023
102997
|
}
|
|
103024
102998
|
var host = state.host, compilerHost = state.compilerHost;
|
|
103025
102999
|
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
103026
|
-
var
|
|
103000
|
+
var newestDeclarationFileContentChangedTime = minimumDate;
|
|
103001
|
+
var anyDtsChanged = false;
|
|
103027
103002
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
103028
103003
|
var emittedOutputs = new ts.Map();
|
|
103029
|
-
var options = program.getCompilerOptions();
|
|
103030
|
-
var isIncremental = ts.isIncrementalCompilation(options);
|
|
103031
|
-
var outputTimeStampMap;
|
|
103032
|
-
var now;
|
|
103033
103004
|
outputFiles.forEach(function (_a) {
|
|
103034
|
-
var
|
|
103035
|
-
var
|
|
103036
|
-
|
|
103037
|
-
|
|
103038
|
-
|
|
103039
|
-
|
|
103040
|
-
|
|
103005
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
|
|
103006
|
+
var priorChangeTime;
|
|
103007
|
+
if (!anyDtsChanged && ts.isDeclarationFileName(name)) {
|
|
103008
|
+
if (host.fileExists(name) && state.readFileWithCache(name) === text) {
|
|
103009
|
+
priorChangeTime = host.getModifiedTime(name);
|
|
103010
|
+
}
|
|
103011
|
+
else {
|
|
103041
103012
|
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
103013
|
+
anyDtsChanged = true;
|
|
103042
103014
|
}
|
|
103043
103015
|
}
|
|
103016
|
+
emittedOutputs.set(toPath(state, name), name);
|
|
103044
103017
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
103045
|
-
if (
|
|
103046
|
-
|
|
103018
|
+
if (priorChangeTime !== undefined) {
|
|
103019
|
+
newestDeclarationFileContentChangedTime = newer(priorChangeTime, newestDeclarationFileContentChangedTime);
|
|
103047
103020
|
}
|
|
103048
103021
|
});
|
|
103049
|
-
finishEmit(emitterDiagnostics, emittedOutputs, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
103022
|
+
finishEmit(emitterDiagnostics, emittedOutputs, newestDeclarationFileContentChangedTime, anyDtsChanged, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
103050
103023
|
return emitResult;
|
|
103051
103024
|
}
|
|
103052
103025
|
function emitBuildInfo(writeFileCallback, cancellationToken) {
|
|
103053
103026
|
ts.Debug.assertIsDefined(program);
|
|
103054
103027
|
ts.Debug.assert(step === BuildStep.EmitBuildInfo);
|
|
103055
|
-
var emitResult = program.emitBuildInfo(
|
|
103056
|
-
if (data === null || data === void 0 ? void 0 : data.buildInfo)
|
|
103057
|
-
setBuildInfo(state, data.buildInfo, projectPath, program.getCompilerOptions());
|
|
103058
|
-
if (writeFileCallback)
|
|
103059
|
-
writeFileCallback(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
103060
|
-
else
|
|
103061
|
-
state.compilerHost.writeFile(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
103062
|
-
}, cancellationToken);
|
|
103028
|
+
var emitResult = program.emitBuildInfo(writeFileCallback, cancellationToken);
|
|
103063
103029
|
if (emitResult.diagnostics.length) {
|
|
103064
103030
|
reportErrors(state, emitResult.diagnostics);
|
|
103065
103031
|
state.diagnostics.set(projectPath, __spreadArray(__spreadArray([], state.diagnostics.get(projectPath), true), emitResult.diagnostics, true));
|
|
@@ -103072,7 +103038,7 @@ var ts;
|
|
|
103072
103038
|
step = BuildStep.QueueReferencingProjects;
|
|
103073
103039
|
return emitResult;
|
|
103074
103040
|
}
|
|
103075
|
-
function finishEmit(emitterDiagnostics, emittedOutputs, oldestOutputFileName, resultFlags) {
|
|
103041
|
+
function finishEmit(emitterDiagnostics, emittedOutputs, priorNewestUpdateTime, newestDeclarationFileContentChangedTimeIsMaximumDate, oldestOutputFileName, resultFlags) {
|
|
103076
103042
|
var _a;
|
|
103077
103043
|
var emitDiagnostics = emitterDiagnostics.getDiagnostics();
|
|
103078
103044
|
if (emitDiagnostics.length) {
|
|
@@ -103082,11 +103048,13 @@ var ts;
|
|
|
103082
103048
|
if (state.write) {
|
|
103083
103049
|
emittedOutputs.forEach(function (name) { return listEmittedFile(state, config, name); });
|
|
103084
103050
|
}
|
|
103085
|
-
updateOutputTimestampsWorker(state, config,
|
|
103051
|
+
var newestDeclarationFileContentChangedTime = updateOutputTimestampsWorker(state, config, priorNewestUpdateTime, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);
|
|
103086
103052
|
state.diagnostics.delete(projectPath);
|
|
103087
103053
|
state.projectStatus.set(projectPath, {
|
|
103088
103054
|
type: ts.UpToDateStatusType.UpToDate,
|
|
103089
|
-
newestDeclarationFileContentChangedTime:
|
|
103055
|
+
newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTimeIsMaximumDate ?
|
|
103056
|
+
maximumDate :
|
|
103057
|
+
newestDeclarationFileContentChangedTime,
|
|
103090
103058
|
oldestOutputFileName: oldestOutputFileName
|
|
103091
103059
|
});
|
|
103092
103060
|
afterProgramDone(state, program, config);
|
|
@@ -103119,21 +103087,12 @@ var ts;
|
|
|
103119
103087
|
ts.Debug.assert(!!outputFiles.length);
|
|
103120
103088
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
103121
103089
|
var emittedOutputs = new ts.Map();
|
|
103122
|
-
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
103123
|
-
var existingBuildInfo = state.buildInfoCache.get(projectPath).buildInfo;
|
|
103124
103090
|
outputFiles.forEach(function (_a) {
|
|
103125
|
-
var
|
|
103126
|
-
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
|
|
103091
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
|
|
103127
103092
|
emittedOutputs.set(toPath(state, name), name);
|
|
103128
|
-
if (buildInfo) {
|
|
103129
|
-
setBuildInfo(state, buildInfo, projectPath, config.options);
|
|
103130
|
-
if (((_b = buildInfo.program) === null || _b === void 0 ? void 0 : _b.dtsChangeTime) !== ((_c = existingBuildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime)) {
|
|
103131
|
-
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
103132
|
-
}
|
|
103133
|
-
}
|
|
103134
103093
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
103135
103094
|
});
|
|
103136
|
-
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, outputFiles[0].name,
|
|
103095
|
+
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, minimumDate, false, outputFiles[0].name, BuildResultFlags.DeclarationOutputUnchanged);
|
|
103137
103096
|
return { emitSkipped: false, diagnostics: emitDiagnostics };
|
|
103138
103097
|
}
|
|
103139
103098
|
function executeSteps(till, cancellationToken, writeFile, customTransformers) {
|
|
@@ -103233,7 +103192,7 @@ var ts;
|
|
|
103233
103192
|
}
|
|
103234
103193
|
continue;
|
|
103235
103194
|
}
|
|
103236
|
-
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes
|
|
103195
|
+
if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) {
|
|
103237
103196
|
reportAndStoreErrors(state, projectPath, ts.getConfigFileParsingDiagnostics(config));
|
|
103238
103197
|
return createUpdateOutputFileStampsProject(state, project, projectPath, config, buildOrder);
|
|
103239
103198
|
}
|
|
@@ -103289,7 +103248,7 @@ var ts;
|
|
|
103289
103248
|
state.projectCompilerOptions = state.baseCompilerOptions;
|
|
103290
103249
|
}
|
|
103291
103250
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
103292
|
-
var canEmitBuildInfo = program && !ts.outFile(program.getCompilerOptions());
|
|
103251
|
+
var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
|
|
103293
103252
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
103294
103253
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" });
|
|
103295
103254
|
if (canEmitBuildInfo)
|
|
@@ -103297,94 +103256,8 @@ var ts;
|
|
|
103297
103256
|
afterProgramDone(state, program, config);
|
|
103298
103257
|
return { buildResult: buildResult, step: BuildStep.QueueReferencingProjects };
|
|
103299
103258
|
}
|
|
103300
|
-
function isFileWatcherWithModifiedTime(value) {
|
|
103301
|
-
return !!value.watcher;
|
|
103302
|
-
}
|
|
103303
|
-
function getModifiedTime(state, fileName) {
|
|
103304
|
-
var path = toPath(state, fileName);
|
|
103305
|
-
var existing = state.filesWatched.get(path);
|
|
103306
|
-
if (state.watch && !!existing) {
|
|
103307
|
-
if (!isFileWatcherWithModifiedTime(existing))
|
|
103308
|
-
return existing;
|
|
103309
|
-
if (existing.modifiedTime)
|
|
103310
|
-
return existing.modifiedTime;
|
|
103311
|
-
}
|
|
103312
|
-
var result = ts.getModifiedTime(state.host, fileName);
|
|
103313
|
-
if (state.watch) {
|
|
103314
|
-
if (existing)
|
|
103315
|
-
existing.modifiedTime = result;
|
|
103316
|
-
else
|
|
103317
|
-
state.filesWatched.set(path, result);
|
|
103318
|
-
}
|
|
103319
|
-
return result;
|
|
103320
|
-
}
|
|
103321
|
-
function watchFile(state, file, callback, pollingInterval, options, watchType, project) {
|
|
103322
|
-
var path = toPath(state, file);
|
|
103323
|
-
var existing = state.filesWatched.get(path);
|
|
103324
|
-
if (existing && isFileWatcherWithModifiedTime(existing)) {
|
|
103325
|
-
existing.callbacks.push(callback);
|
|
103326
|
-
}
|
|
103327
|
-
else {
|
|
103328
|
-
var watcher = state.watchFile(file, function (fileName, eventKind, modifiedTime) {
|
|
103329
|
-
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
103330
|
-
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
103331
|
-
existing.modifiedTime = modifiedTime;
|
|
103332
|
-
existing.callbacks.forEach(function (cb) { return cb(fileName, eventKind, modifiedTime); });
|
|
103333
|
-
}, pollingInterval, options, watchType, project);
|
|
103334
|
-
state.filesWatched.set(path, { callbacks: [callback], watcher: watcher, modifiedTime: existing });
|
|
103335
|
-
}
|
|
103336
|
-
return {
|
|
103337
|
-
close: function () {
|
|
103338
|
-
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
103339
|
-
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
103340
|
-
if (existing.callbacks.length === 1) {
|
|
103341
|
-
state.filesWatched.delete(path);
|
|
103342
|
-
ts.closeFileWatcherOf(existing);
|
|
103343
|
-
}
|
|
103344
|
-
else {
|
|
103345
|
-
ts.unorderedRemoveItem(existing.callbacks, callback);
|
|
103346
|
-
}
|
|
103347
|
-
}
|
|
103348
|
-
};
|
|
103349
|
-
}
|
|
103350
|
-
function getOutputTimeStampMap(state, resolvedConfigFilePath) {
|
|
103351
|
-
if (!state.watch)
|
|
103352
|
-
return undefined;
|
|
103353
|
-
var result = state.outputTimeStamps.get(resolvedConfigFilePath);
|
|
103354
|
-
if (!result)
|
|
103355
|
-
state.outputTimeStamps.set(resolvedConfigFilePath, result = new ts.Map());
|
|
103356
|
-
return result;
|
|
103357
|
-
}
|
|
103358
|
-
function setBuildInfo(state, buildInfo, resolvedConfigPath, options) {
|
|
103359
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
103360
|
-
var existing = getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath);
|
|
103361
|
-
if (existing) {
|
|
103362
|
-
existing.buildInfo = buildInfo;
|
|
103363
|
-
existing.modifiedTime = getCurrentTime(state.host);
|
|
103364
|
-
}
|
|
103365
|
-
else {
|
|
103366
|
-
state.buildInfoCache.set(resolvedConfigPath, { path: toPath(state, buildInfoPath), buildInfo: buildInfo, modifiedTime: getCurrentTime(state.host) });
|
|
103367
|
-
}
|
|
103368
|
-
}
|
|
103369
|
-
function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
|
|
103370
|
-
var path = toPath(state, buildInfoPath);
|
|
103371
|
-
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
103372
|
-
return (existing === null || existing === void 0 ? void 0 : existing.path) === path ? existing : undefined;
|
|
103373
|
-
}
|
|
103374
|
-
function getBuildInfo(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
|
|
103375
|
-
var path = toPath(state, buildInfoPath);
|
|
103376
|
-
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
103377
|
-
if (existing !== undefined && existing.path === path) {
|
|
103378
|
-
return existing.buildInfo || undefined;
|
|
103379
|
-
}
|
|
103380
|
-
var value = state.readFileWithCache(buildInfoPath);
|
|
103381
|
-
var buildInfo = value ? ts.getBuildInfo(value) : undefined;
|
|
103382
|
-
ts.Debug.assert(modifiedTime || !buildInfo);
|
|
103383
|
-
state.buildInfoCache.set(resolvedConfigPath, { path: path, buildInfo: buildInfo || false, modifiedTime: modifiedTime || ts.missingFileModifiedTime });
|
|
103384
|
-
return buildInfo;
|
|
103385
|
-
}
|
|
103386
103259
|
function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
|
|
103387
|
-
var tsconfigTime = getModifiedTime(state, configFile);
|
|
103260
|
+
var tsconfigTime = ts.getModifiedTime(state.host, configFile);
|
|
103388
103261
|
if (oldestOutputFileTime < tsconfigTime) {
|
|
103389
103262
|
return {
|
|
103390
103263
|
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
@@ -103394,22 +103267,76 @@ var ts;
|
|
|
103394
103267
|
}
|
|
103395
103268
|
}
|
|
103396
103269
|
function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
103397
|
-
var
|
|
103270
|
+
var force = !!state.options.force;
|
|
103271
|
+
var newestInputFileName = undefined;
|
|
103272
|
+
var newestInputFileTime = minimumDate;
|
|
103273
|
+
var host = state.host;
|
|
103274
|
+
for (var _i = 0, _a = project.fileNames; _i < _a.length; _i++) {
|
|
103275
|
+
var inputFile = _a[_i];
|
|
103276
|
+
if (!host.fileExists(inputFile)) {
|
|
103277
|
+
return {
|
|
103278
|
+
type: ts.UpToDateStatusType.Unbuildable,
|
|
103279
|
+
reason: inputFile + " does not exist"
|
|
103280
|
+
};
|
|
103281
|
+
}
|
|
103282
|
+
if (!force) {
|
|
103283
|
+
var inputTime = ts.getModifiedTime(host, inputFile);
|
|
103284
|
+
if (inputTime > newestInputFileTime) {
|
|
103285
|
+
newestInputFileName = inputFile;
|
|
103286
|
+
newestInputFileTime = inputTime;
|
|
103287
|
+
}
|
|
103288
|
+
}
|
|
103289
|
+
}
|
|
103398
103290
|
if (!project.fileNames.length && !ts.canJsonReportNoInputFiles(project.raw)) {
|
|
103399
103291
|
return {
|
|
103400
103292
|
type: ts.UpToDateStatusType.ContainerOnly
|
|
103401
103293
|
};
|
|
103402
103294
|
}
|
|
103403
|
-
var
|
|
103404
|
-
var
|
|
103295
|
+
var outputs = ts.getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
|
|
103296
|
+
var oldestOutputFileName = "(none)";
|
|
103297
|
+
var oldestOutputFileTime = maximumDate;
|
|
103298
|
+
var newestOutputFileName = "(none)";
|
|
103299
|
+
var newestOutputFileTime = minimumDate;
|
|
103300
|
+
var missingOutputFileName;
|
|
103301
|
+
var newestDeclarationFileContentChangedTime = minimumDate;
|
|
103302
|
+
var isOutOfDateWithInputs = false;
|
|
103303
|
+
if (!force) {
|
|
103304
|
+
for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) {
|
|
103305
|
+
var output = outputs_1[_b];
|
|
103306
|
+
if (!host.fileExists(output)) {
|
|
103307
|
+
missingOutputFileName = output;
|
|
103308
|
+
break;
|
|
103309
|
+
}
|
|
103310
|
+
var outputTime = ts.getModifiedTime(host, output);
|
|
103311
|
+
if (outputTime < oldestOutputFileTime) {
|
|
103312
|
+
oldestOutputFileTime = outputTime;
|
|
103313
|
+
oldestOutputFileName = output;
|
|
103314
|
+
}
|
|
103315
|
+
if (outputTime < newestInputFileTime) {
|
|
103316
|
+
isOutOfDateWithInputs = true;
|
|
103317
|
+
break;
|
|
103318
|
+
}
|
|
103319
|
+
if (outputTime > newestOutputFileTime) {
|
|
103320
|
+
newestOutputFileTime = outputTime;
|
|
103321
|
+
newestOutputFileName = output;
|
|
103322
|
+
}
|
|
103323
|
+
if (ts.isDeclarationFileName(output)) {
|
|
103324
|
+
var outputModifiedTime = ts.getModifiedTime(host, output);
|
|
103325
|
+
newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime);
|
|
103326
|
+
}
|
|
103327
|
+
}
|
|
103328
|
+
}
|
|
103329
|
+
var pseudoUpToDate = false;
|
|
103330
|
+
var usesPrepend = false;
|
|
103331
|
+
var upstreamChangedProject;
|
|
103405
103332
|
if (project.projectReferences) {
|
|
103406
103333
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.ComputingUpstream });
|
|
103407
|
-
for (var
|
|
103408
|
-
var ref = _d[
|
|
103334
|
+
for (var _c = 0, _d = project.projectReferences; _c < _d.length; _c++) {
|
|
103335
|
+
var ref = _d[_c];
|
|
103336
|
+
usesPrepend = usesPrepend || !!(ref.prepend);
|
|
103409
103337
|
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
103410
103338
|
var resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
|
|
103411
|
-
var
|
|
103412
|
-
var refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
|
|
103339
|
+
var refStatus = getUpToDateStatus(state, parseConfigFile(state, resolvedRef, resolvedRefPath), resolvedRefPath);
|
|
103413
103340
|
if (refStatus.type === ts.UpToDateStatusType.ComputingUpstream ||
|
|
103414
103341
|
refStatus.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
103415
103342
|
continue;
|
|
@@ -103428,169 +103355,65 @@ var ts;
|
|
|
103428
103355
|
upstreamProjectName: ref.path
|
|
103429
103356
|
};
|
|
103430
103357
|
}
|
|
103431
|
-
if (!force)
|
|
103432
|
-
|
|
103433
|
-
|
|
103434
|
-
|
|
103435
|
-
|
|
103436
|
-
|
|
103437
|
-
|
|
103438
|
-
|
|
103439
|
-
|
|
103440
|
-
|
|
103441
|
-
var buildInfoTime;
|
|
103442
|
-
var buildInfoProgram;
|
|
103443
|
-
var buildInfoVersionMap;
|
|
103444
|
-
var newestDeclarationFileContentChangedTime;
|
|
103445
|
-
if (buildInfoPath) {
|
|
103446
|
-
var buildInfoCacheEntry_1 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
|
|
103447
|
-
buildInfoTime = (buildInfoCacheEntry_1 === null || buildInfoCacheEntry_1 === void 0 ? void 0 : buildInfoCacheEntry_1.modifiedTime) || ts.getModifiedTime(host, buildInfoPath);
|
|
103448
|
-
if (buildInfoTime === ts.missingFileModifiedTime) {
|
|
103449
|
-
if (!buildInfoCacheEntry_1) {
|
|
103450
|
-
state.buildInfoCache.set(resolvedPath, {
|
|
103451
|
-
path: toPath(state, buildInfoPath),
|
|
103452
|
-
buildInfo: false,
|
|
103453
|
-
modifiedTime: buildInfoTime
|
|
103454
|
-
});
|
|
103455
|
-
}
|
|
103456
|
-
return {
|
|
103457
|
-
type: ts.UpToDateStatusType.OutputMissing,
|
|
103458
|
-
missingOutputFileName: buildInfoPath
|
|
103459
|
-
};
|
|
103460
|
-
}
|
|
103461
|
-
var buildInfo = ts.Debug.checkDefined(getBuildInfo(state, buildInfoPath, resolvedPath, buildInfoTime));
|
|
103462
|
-
if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
103463
|
-
return {
|
|
103464
|
-
type: ts.UpToDateStatusType.TsVersionOutputOfDate,
|
|
103465
|
-
version: buildInfo.version
|
|
103466
|
-
};
|
|
103467
|
-
}
|
|
103468
|
-
if (buildInfo.program) {
|
|
103469
|
-
if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
|
|
103470
|
-
(!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
|
|
103358
|
+
if (!force && !missingOutputFileName) {
|
|
103359
|
+
if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) {
|
|
103360
|
+
continue;
|
|
103361
|
+
}
|
|
103362
|
+
if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
|
|
103363
|
+
pseudoUpToDate = true;
|
|
103364
|
+
upstreamChangedProject = ref.path;
|
|
103365
|
+
continue;
|
|
103366
|
+
}
|
|
103367
|
+
ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
|
|
103471
103368
|
return {
|
|
103472
|
-
type: ts.UpToDateStatusType.
|
|
103473
|
-
|
|
103369
|
+
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
103370
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
103371
|
+
newerProjectName: ref.path
|
|
103474
103372
|
};
|
|
103475
103373
|
}
|
|
103476
|
-
buildInfoProgram = buildInfo.program;
|
|
103477
103374
|
}
|
|
103478
|
-
oldestOutputFileTime = buildInfoTime;
|
|
103479
|
-
oldestOutputFileName = buildInfoPath;
|
|
103480
|
-
newestDeclarationFileContentChangedTime = ((_c = buildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
|
|
103481
103375
|
}
|
|
103482
|
-
|
|
103483
|
-
|
|
103484
|
-
|
|
103485
|
-
|
|
103486
|
-
|
|
103487
|
-
var inputTime = getModifiedTime(state, inputFile);
|
|
103488
|
-
if (inputTime === ts.missingFileModifiedTime) {
|
|
103489
|
-
return {
|
|
103490
|
-
type: ts.UpToDateStatusType.Unbuildable,
|
|
103491
|
-
reason: inputFile + " does not exist"
|
|
103492
|
-
};
|
|
103493
|
-
}
|
|
103494
|
-
if (buildInfoTime && buildInfoTime < inputTime) {
|
|
103495
|
-
var version_3 = void 0;
|
|
103496
|
-
var currentVersion = void 0;
|
|
103497
|
-
if (buildInfoProgram) {
|
|
103498
|
-
if (!buildInfoVersionMap)
|
|
103499
|
-
buildInfoVersionMap = ts.getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host);
|
|
103500
|
-
version_3 = buildInfoVersionMap.get(toPath(state, inputFile));
|
|
103501
|
-
var text = version_3 ? state.readFileWithCache(inputFile) : undefined;
|
|
103502
|
-
currentVersion = text && (host.createHash || ts.generateDjb2Hash)(text);
|
|
103503
|
-
if (version_3 && version_3 === currentVersion)
|
|
103504
|
-
pseudoInputUptodate = true;
|
|
103505
|
-
}
|
|
103506
|
-
if (!version_3 || version_3 !== currentVersion) {
|
|
103507
|
-
return {
|
|
103508
|
-
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103509
|
-
outOfDateOutputFileName: buildInfoPath,
|
|
103510
|
-
newerInputFileName: inputFile
|
|
103511
|
-
};
|
|
103512
|
-
}
|
|
103513
|
-
}
|
|
103514
|
-
if (inputTime > newestInputFileTime) {
|
|
103515
|
-
newestInputFileName = inputFile;
|
|
103516
|
-
newestInputFileTime = inputTime;
|
|
103517
|
-
}
|
|
103376
|
+
if (missingOutputFileName !== undefined) {
|
|
103377
|
+
return {
|
|
103378
|
+
type: ts.UpToDateStatusType.OutputMissing,
|
|
103379
|
+
missingOutputFileName: missingOutputFileName
|
|
103380
|
+
};
|
|
103518
103381
|
}
|
|
103519
|
-
if (
|
|
103520
|
-
|
|
103521
|
-
|
|
103522
|
-
|
|
103523
|
-
|
|
103524
|
-
|
|
103525
|
-
var outputTime = outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.get(path);
|
|
103526
|
-
if (!outputTime) {
|
|
103527
|
-
outputTime = ts.getModifiedTime(state.host, output);
|
|
103528
|
-
outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.set(path, outputTime);
|
|
103529
|
-
}
|
|
103530
|
-
if (outputTime === ts.missingFileModifiedTime) {
|
|
103531
|
-
return {
|
|
103532
|
-
type: ts.UpToDateStatusType.OutputMissing,
|
|
103533
|
-
missingOutputFileName: output
|
|
103534
|
-
};
|
|
103535
|
-
}
|
|
103536
|
-
if (outputTime < oldestOutputFileTime) {
|
|
103537
|
-
oldestOutputFileTime = outputTime;
|
|
103538
|
-
oldestOutputFileName = output;
|
|
103539
|
-
}
|
|
103540
|
-
if (outputTime < newestInputFileTime) {
|
|
103541
|
-
return {
|
|
103542
|
-
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103543
|
-
outOfDateOutputFileName: oldestOutputFileName,
|
|
103544
|
-
newerInputFileName: newestInputFileName
|
|
103545
|
-
};
|
|
103546
|
-
}
|
|
103547
|
-
}
|
|
103382
|
+
if (isOutOfDateWithInputs) {
|
|
103383
|
+
return {
|
|
103384
|
+
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103385
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
103386
|
+
newerInputFileName: newestInputFileName
|
|
103387
|
+
};
|
|
103548
103388
|
}
|
|
103549
|
-
|
|
103550
|
-
|
|
103551
|
-
|
|
103552
|
-
|
|
103553
|
-
|
|
103554
|
-
|
|
103555
|
-
|
|
103556
|
-
|
|
103557
|
-
var
|
|
103558
|
-
|
|
103559
|
-
|
|
103560
|
-
|
|
103561
|
-
|
|
103562
|
-
|
|
103389
|
+
else {
|
|
103390
|
+
var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
|
|
103391
|
+
if (configStatus)
|
|
103392
|
+
return configStatus;
|
|
103393
|
+
var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
|
|
103394
|
+
if (extendedConfigStatus)
|
|
103395
|
+
return extendedConfigStatus;
|
|
103396
|
+
var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
|
|
103397
|
+
var path = _a[0];
|
|
103398
|
+
return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
|
|
103399
|
+
});
|
|
103400
|
+
if (dependentPackageFileStatus)
|
|
103401
|
+
return dependentPackageFileStatus;
|
|
103402
|
+
}
|
|
103403
|
+
if (!force && !state.buildInfoChecked.has(resolvedPath)) {
|
|
103404
|
+
state.buildInfoChecked.set(resolvedPath, true);
|
|
103405
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
|
|
103406
|
+
if (buildInfoPath) {
|
|
103407
|
+
var value = state.readFileWithCache(buildInfoPath);
|
|
103408
|
+
var buildInfo = value && ts.getBuildInfo(value);
|
|
103409
|
+
if (buildInfo && (buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
103563
103410
|
return {
|
|
103564
|
-
type: ts.UpToDateStatusType.
|
|
103565
|
-
|
|
103566
|
-
newerProjectName: ref.path
|
|
103411
|
+
type: ts.UpToDateStatusType.TsVersionOutputOfDate,
|
|
103412
|
+
version: buildInfo.version
|
|
103567
103413
|
};
|
|
103568
103414
|
}
|
|
103569
|
-
if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
|
|
103570
|
-
pseudoUpToDate = true;
|
|
103571
|
-
upstreamChangedProject = ref.path;
|
|
103572
|
-
continue;
|
|
103573
|
-
}
|
|
103574
|
-
ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
|
|
103575
|
-
return {
|
|
103576
|
-
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
103577
|
-
outOfDateOutputFileName: oldestOutputFileName,
|
|
103578
|
-
newerProjectName: ref.path
|
|
103579
|
-
};
|
|
103580
103415
|
}
|
|
103581
103416
|
}
|
|
103582
|
-
var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
|
|
103583
|
-
if (configStatus)
|
|
103584
|
-
return configStatus;
|
|
103585
|
-
var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
|
|
103586
|
-
if (extendedConfigStatus)
|
|
103587
|
-
return extendedConfigStatus;
|
|
103588
|
-
var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
|
|
103589
|
-
var path = _a[0];
|
|
103590
|
-
return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
|
|
103591
|
-
});
|
|
103592
|
-
if (dependentPackageFileStatus)
|
|
103593
|
-
return dependentPackageFileStatus;
|
|
103594
103417
|
if (usesPrepend && pseudoUpToDate) {
|
|
103595
103418
|
return {
|
|
103596
103419
|
type: ts.UpToDateStatusType.OutOfDateWithPrepend,
|
|
@@ -103599,36 +103422,15 @@ var ts;
|
|
|
103599
103422
|
};
|
|
103600
103423
|
}
|
|
103601
103424
|
return {
|
|
103602
|
-
type: pseudoUpToDate ?
|
|
103603
|
-
ts.UpToDateStatusType.UpToDateWithUpstreamTypes :
|
|
103604
|
-
pseudoInputUptodate ?
|
|
103605
|
-
ts.UpToDateStatusType.UpToDateWithInputFileText :
|
|
103606
|
-
ts.UpToDateStatusType.UpToDate,
|
|
103425
|
+
type: pseudoUpToDate ? ts.UpToDateStatusType.UpToDateWithUpstreamTypes : ts.UpToDateStatusType.UpToDate,
|
|
103607
103426
|
newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime,
|
|
103608
103427
|
newestInputFileTime: newestInputFileTime,
|
|
103428
|
+
newestOutputFileTime: newestOutputFileTime,
|
|
103609
103429
|
newestInputFileName: newestInputFileName,
|
|
103430
|
+
newestOutputFileName: newestOutputFileName,
|
|
103610
103431
|
oldestOutputFileName: oldestOutputFileName
|
|
103611
103432
|
};
|
|
103612
103433
|
}
|
|
103613
|
-
function hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig, resolvedRefPath) {
|
|
103614
|
-
if (seenRefs.has(resolvedRefPath))
|
|
103615
|
-
return false;
|
|
103616
|
-
seenRefs.add(resolvedRefPath);
|
|
103617
|
-
var refBuildInfo = state.buildInfoCache.get(resolvedRefPath);
|
|
103618
|
-
if (refBuildInfo.path === buildInfoCacheEntry.path)
|
|
103619
|
-
return true;
|
|
103620
|
-
if (resolvedConfig.projectReferences) {
|
|
103621
|
-
for (var _i = 0, _a = resolvedConfig.projectReferences; _i < _a.length; _i++) {
|
|
103622
|
-
var ref = _a[_i];
|
|
103623
|
-
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
103624
|
-
var resolvedRefPath_1 = toResolvedConfigFilePath(state, resolvedRef);
|
|
103625
|
-
var resolvedConfig_1 = parseConfigFile(state, resolvedRef, resolvedRefPath_1);
|
|
103626
|
-
if (hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig_1, resolvedRefPath_1))
|
|
103627
|
-
return true;
|
|
103628
|
-
}
|
|
103629
|
-
}
|
|
103630
|
-
return false;
|
|
103631
|
-
}
|
|
103632
103434
|
function getUpToDateStatus(state, project, resolvedPath) {
|
|
103633
103435
|
if (project === undefined) {
|
|
103634
103436
|
return { type: ts.UpToDateStatusType.Unbuildable, reason: "File deleted mid-build" };
|
|
@@ -103641,64 +103443,39 @@ var ts;
|
|
|
103641
103443
|
state.projectStatus.set(resolvedPath, actual);
|
|
103642
103444
|
return actual;
|
|
103643
103445
|
}
|
|
103644
|
-
function updateOutputTimestampsWorker(state, proj,
|
|
103446
|
+
function updateOutputTimestampsWorker(state, proj, priorNewestUpdateTime, verboseMessage, skipOutputs) {
|
|
103645
103447
|
if (proj.options.noEmit)
|
|
103646
|
-
return;
|
|
103647
|
-
var now;
|
|
103648
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(proj.options);
|
|
103649
|
-
if (buildInfoPath) {
|
|
103650
|
-
if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(toPath(state, buildInfoPath)))) {
|
|
103651
|
-
if (!!state.options.verbose)
|
|
103652
|
-
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
103653
|
-
state.host.setModifiedTime(buildInfoPath, now = getCurrentTime(state.host));
|
|
103654
|
-
getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
|
|
103655
|
-
}
|
|
103656
|
-
state.outputTimeStamps.delete(projectPath);
|
|
103657
|
-
return;
|
|
103658
|
-
}
|
|
103448
|
+
return priorNewestUpdateTime;
|
|
103659
103449
|
var host = state.host;
|
|
103660
103450
|
var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());
|
|
103661
|
-
var outputTimeStampMap = getOutputTimeStampMap(state, projectPath);
|
|
103662
|
-
var modifiedOutputs = outputTimeStampMap ? new ts.Set() : undefined;
|
|
103663
103451
|
if (!skipOutputs || outputs.length !== skipOutputs.size) {
|
|
103664
103452
|
var reportVerbose = !!state.options.verbose;
|
|
103453
|
+
var now = host.now ? host.now() : new Date();
|
|
103665
103454
|
for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) {
|
|
103666
103455
|
var file = outputs_2[_i];
|
|
103667
|
-
|
|
103668
|
-
if (skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(path))
|
|
103456
|
+
if (skipOutputs && skipOutputs.has(toPath(state, file))) {
|
|
103669
103457
|
continue;
|
|
103458
|
+
}
|
|
103670
103459
|
if (reportVerbose) {
|
|
103671
103460
|
reportVerbose = false;
|
|
103672
103461
|
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
103673
103462
|
}
|
|
103674
|
-
|
|
103675
|
-
|
|
103676
|
-
outputTimeStampMap.set(path, now);
|
|
103677
|
-
modifiedOutputs.add(path);
|
|
103463
|
+
if (ts.isDeclarationFileName(file)) {
|
|
103464
|
+
priorNewestUpdateTime = newer(priorNewestUpdateTime, ts.getModifiedTime(host, file));
|
|
103678
103465
|
}
|
|
103466
|
+
host.setModifiedTime(file, now);
|
|
103679
103467
|
}
|
|
103680
103468
|
}
|
|
103681
|
-
|
|
103682
|
-
if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(key)) && !modifiedOutputs.has(key))
|
|
103683
|
-
outputTimeStampMap.delete(key);
|
|
103684
|
-
});
|
|
103685
|
-
}
|
|
103686
|
-
function getDtsChangeTime(state, options, resolvedConfigPath) {
|
|
103687
|
-
var _a;
|
|
103688
|
-
if (!options.composite)
|
|
103689
|
-
return undefined;
|
|
103690
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
103691
|
-
var buildInfo = getBuildInfo(state, buildInfoPath, resolvedConfigPath, undefined);
|
|
103692
|
-
return ((_a = buildInfo === null || buildInfo === void 0 ? void 0 : buildInfo.program) === null || _a === void 0 ? void 0 : _a.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
|
|
103469
|
+
return priorNewestUpdateTime;
|
|
103693
103470
|
}
|
|
103694
103471
|
function updateOutputTimestamps(state, proj, resolvedPath) {
|
|
103695
103472
|
if (state.options.dry) {
|
|
103696
103473
|
return reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, proj.options.configFilePath);
|
|
103697
103474
|
}
|
|
103698
|
-
updateOutputTimestampsWorker(state, proj,
|
|
103475
|
+
var priorNewestUpdateTime = updateOutputTimestampsWorker(state, proj, minimumDate, ts.Diagnostics.Updating_output_timestamps_of_project_0);
|
|
103699
103476
|
state.projectStatus.set(resolvedPath, {
|
|
103700
103477
|
type: ts.UpToDateStatusType.UpToDate,
|
|
103701
|
-
newestDeclarationFileContentChangedTime:
|
|
103478
|
+
newestDeclarationFileContentChangedTime: priorNewestUpdateTime,
|
|
103702
103479
|
oldestOutputFileName: ts.getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames())
|
|
103703
103480
|
});
|
|
103704
103481
|
}
|
|
@@ -103737,7 +103514,6 @@ var ts;
|
|
|
103737
103514
|
}
|
|
103738
103515
|
break;
|
|
103739
103516
|
}
|
|
103740
|
-
case ts.UpToDateStatusType.UpToDateWithInputFileText:
|
|
103741
103517
|
case ts.UpToDateStatusType.UpToDateWithUpstreamTypes:
|
|
103742
103518
|
case ts.UpToDateStatusType.OutOfDateWithPrepend:
|
|
103743
103519
|
if (!(buildResult & BuildResultFlags.DeclarationOutputUnchanged)) {
|
|
@@ -103881,10 +103657,12 @@ var ts;
|
|
|
103881
103657
|
function watchConfigFile(state, resolved, resolvedPath, parsed) {
|
|
103882
103658
|
if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
|
|
103883
103659
|
return;
|
|
103884
|
-
state.allWatchedConfigFiles.set(resolvedPath, watchFile(
|
|
103660
|
+
state.allWatchedConfigFiles.set(resolvedPath, state.watchFile(resolved, function () {
|
|
103661
|
+
invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full);
|
|
103662
|
+
}, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.ConfigFile, resolved));
|
|
103885
103663
|
}
|
|
103886
103664
|
function watchExtendedConfigFiles(state, resolvedPath, parsed) {
|
|
103887
|
-
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return watchFile(
|
|
103665
|
+
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return state.watchFile(extendedConfigFileName, function () {
|
|
103888
103666
|
var _a;
|
|
103889
103667
|
return (_a = state.allWatchedExtendedConfigFiles.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (projectConfigFilePath) {
|
|
103890
103668
|
return invalidateProjectAndScheduleBuilds(state, projectConfigFilePath, ts.ConfigFileProgramReloadLevel.Full);
|
|
@@ -103916,7 +103694,7 @@ var ts;
|
|
|
103916
103694
|
if (!state.watch)
|
|
103917
103695
|
return;
|
|
103918
103696
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath), ts.arrayToMap(parsed.fileNames, function (fileName) { return toPath(state, fileName); }), {
|
|
103919
|
-
createNewValue: function (_path, input) { return watchFile(
|
|
103697
|
+
createNewValue: function (_path, input) { return state.watchFile(input, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.Low, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.SourceFile, resolved); },
|
|
103920
103698
|
onDeleteValue: ts.closeFileWatcher,
|
|
103921
103699
|
});
|
|
103922
103700
|
}
|
|
@@ -103924,7 +103702,7 @@ var ts;
|
|
|
103924
103702
|
if (!state.watch || !state.lastCachedPackageJsonLookups)
|
|
103925
103703
|
return;
|
|
103926
103704
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath), new ts.Map(state.lastCachedPackageJsonLookups.get(resolvedPath)), {
|
|
103927
|
-
createNewValue: function (path, _input) { return watchFile(
|
|
103705
|
+
createNewValue: function (path, _input) { return state.watchFile(path, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.PackageJson, resolved); },
|
|
103928
103706
|
onDeleteValue: ts.closeFileWatcher,
|
|
103929
103707
|
});
|
|
103930
103708
|
}
|
|
@@ -104048,26 +103826,25 @@ var ts;
|
|
|
104048
103826
|
}
|
|
104049
103827
|
}
|
|
104050
103828
|
function reportUpToDateStatus(state, configFileName, status) {
|
|
103829
|
+
if (state.options.force && (status.type === ts.UpToDateStatusType.UpToDate || status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes)) {
|
|
103830
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
103831
|
+
}
|
|
104051
103832
|
switch (status.type) {
|
|
104052
103833
|
case ts.UpToDateStatusType.OutOfDateWithSelf:
|
|
104053
|
-
return reportStatus(state, ts.Diagnostics.
|
|
103834
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerInputFileName));
|
|
104054
103835
|
case ts.UpToDateStatusType.OutOfDateWithUpstream:
|
|
104055
|
-
return reportStatus(state, ts.Diagnostics.
|
|
103836
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerProjectName));
|
|
104056
103837
|
case ts.UpToDateStatusType.OutputMissing:
|
|
104057
103838
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, relName(state, configFileName), relName(state, status.missingOutputFileName));
|
|
104058
|
-
case ts.UpToDateStatusType.OutOfDateBuildInfo:
|
|
104059
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_are_not_emitted, relName(state, configFileName), relName(state, status.buildInfoFile));
|
|
104060
103839
|
case ts.UpToDateStatusType.UpToDate:
|
|
104061
103840
|
if (status.newestInputFileTime !== undefined) {
|
|
104062
|
-
return reportStatus(state, ts.Diagnostics.
|
|
103841
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, relName(state, configFileName), relName(state, status.newestInputFileName || ""), relName(state, status.oldestOutputFileName || ""));
|
|
104063
103842
|
}
|
|
104064
103843
|
break;
|
|
104065
103844
|
case ts.UpToDateStatusType.OutOfDateWithPrepend:
|
|
104066
103845
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed, relName(state, configFileName), relName(state, status.newerProjectName));
|
|
104067
103846
|
case ts.UpToDateStatusType.UpToDateWithUpstreamTypes:
|
|
104068
103847
|
return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, relName(state, configFileName));
|
|
104069
|
-
case ts.UpToDateStatusType.UpToDateWithInputFileText:
|
|
104070
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_but_needs_update_to_timestamps_of_output_files_that_are_older_than_input_files, relName(state, configFileName));
|
|
104071
103848
|
case ts.UpToDateStatusType.UpstreamOutOfDate:
|
|
104072
103849
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date, relName(state, configFileName), relName(state, status.upstreamProjectName));
|
|
104073
103850
|
case ts.UpToDateStatusType.UpstreamBlocked:
|
|
@@ -104078,8 +103855,6 @@ var ts;
|
|
|
104078
103855
|
return reportStatus(state, ts.Diagnostics.Failed_to_parse_file_0_Colon_1, relName(state, configFileName), status.reason);
|
|
104079
103856
|
case ts.UpToDateStatusType.TsVersionOutputOfDate:
|
|
104080
103857
|
return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2, relName(state, configFileName), status.version, ts.version);
|
|
104081
|
-
case ts.UpToDateStatusType.ForceBuild:
|
|
104082
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
104083
103858
|
case ts.UpToDateStatusType.ContainerOnly:
|
|
104084
103859
|
case ts.UpToDateStatusType.ComputingUpstream:
|
|
104085
103860
|
break;
|