@typescript-deploys/pr-build 4.7.0-pr-48784-4 → 4.7.0-pr-48997-6
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/protocol.d.ts +1 -0
- 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 +908 -1055
- package/lib/tsserver.js +1224 -1239
- package/lib/tsserverlibrary.d.ts +20 -8
- package/lib/tsserverlibrary.js +1224 -1239
- package/lib/typescript.d.ts +19 -8
- package/lib/typescript.js +1202 -1220
- package/lib/typescriptServices.d.ts +19 -8
- package/lib/typescriptServices.js +1202 -1220
- package/lib/typingsInstaller.js +1051 -1153
- 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,76 @@ 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
|
+
if (inodeWatching) {
|
|
4246
|
+
updateWatcher(!fileSystemEntryExists(fileOrDirectory, entryKind) ? watchMissingFileSystemEntry : watchPresentFileSystemEntry);
|
|
4247
|
+
}
|
|
4248
|
+
else if (!fileSystemEntryExists(fileOrDirectory, entryKind)) {
|
|
4249
|
+
updateWatcher(watchMissingFileSystemEntry);
|
|
4250
|
+
}
|
|
4251
|
+
}
|
|
4252
|
+
}
|
|
4253
|
+
function watchPresentFileSystemEntryWithFsWatchFile() {
|
|
4254
|
+
return watchFile(fileOrDirectory, createFileWatcherCallback(callback), fallbackPollingInterval, fallbackOptions);
|
|
4255
|
+
}
|
|
4256
|
+
function watchMissingFileSystemEntry() {
|
|
4257
|
+
return watchFile(fileOrDirectory, function (_fileName, eventKind) {
|
|
4258
|
+
if (eventKind === FileWatcherEventKind.Created && fileSystemEntryExists(fileOrDirectory, entryKind)) {
|
|
4259
|
+
callback("rename", "");
|
|
4260
|
+
updateWatcher(watchPresentFileSystemEntry);
|
|
4261
|
+
}
|
|
4262
|
+
}, fallbackPollingInterval, fallbackOptions);
|
|
4263
|
+
}
|
|
4264
|
+
}
|
|
4195
4265
|
}
|
|
4196
4266
|
ts.createSystemWatchFunctions = createSystemWatchFunctions;
|
|
4197
4267
|
function patchWriteFileEnsuringDirectory(sys) {
|
|
@@ -4233,7 +4303,6 @@ var ts;
|
|
|
4233
4303
|
}
|
|
4234
4304
|
var activeSession;
|
|
4235
4305
|
var profilePath = "./profile.cpuprofile";
|
|
4236
|
-
var hitSystemWatcherLimit = false;
|
|
4237
4306
|
var Buffer = require("buffer").Buffer;
|
|
4238
4307
|
var nodeVersion = getNodeMajorVersion();
|
|
4239
4308
|
var isNode4OrLater = nodeVersion >= 4;
|
|
@@ -4248,17 +4317,19 @@ var ts;
|
|
|
4248
4317
|
getModifiedTime: getModifiedTime,
|
|
4249
4318
|
setTimeout: setTimeout,
|
|
4250
4319
|
clearTimeout: clearTimeout,
|
|
4251
|
-
|
|
4320
|
+
fsWatchWorker: fsWatchWorker,
|
|
4252
4321
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
|
|
4253
4322
|
getCurrentDirectory: getCurrentDirectory,
|
|
4323
|
+
fileSystemEntryExists: fileSystemEntryExists,
|
|
4254
4324
|
fsSupportsRecursiveFsWatch: fsSupportsRecursiveFsWatch,
|
|
4255
|
-
directoryExists: directoryExists,
|
|
4256
4325
|
getAccessibleSortedChildDirectories: function (path) { return getAccessibleFileSystemEntries(path).directories; },
|
|
4257
4326
|
realpath: realpath,
|
|
4258
4327
|
tscWatchFile: process.env.TSC_WATCHFILE,
|
|
4259
4328
|
useNonPollingWatchers: process.env.TSC_NONPOLLING_WATCHER,
|
|
4260
4329
|
tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,
|
|
4261
4330
|
defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
4331
|
+
inodeWatching: isLinuxOrMacOs,
|
|
4332
|
+
sysLog: sysLog,
|
|
4262
4333
|
}), watchFile = _c.watchFile, watchDirectory = _c.watchDirectory;
|
|
4263
4334
|
var nodeSystem = {
|
|
4264
4335
|
args: process.argv.slice(2),
|
|
@@ -4478,83 +4549,12 @@ var ts;
|
|
|
4478
4549
|
else {
|
|
4479
4550
|
eventKind = FileWatcherEventKind.Changed;
|
|
4480
4551
|
}
|
|
4481
|
-
callback(fileName, eventKind
|
|
4552
|
+
callback(fileName, eventKind);
|
|
4482
4553
|
}
|
|
4483
4554
|
}
|
|
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
|
-
}
|
|
4555
|
+
function fsWatchWorker(fileOrDirectory, recursive, callback) {
|
|
4556
|
+
return _fs.watch(fileOrDirectory, fsSupportsRecursiveFsWatch ?
|
|
4557
|
+
{ persistent: true, recursive: !!recursive } : { persistent: true }, callback);
|
|
4558
4558
|
}
|
|
4559
4559
|
function readFileWorker(fileName, _encoding) {
|
|
4560
4560
|
var buffer;
|
|
@@ -4690,17 +4690,12 @@ var ts;
|
|
|
4690
4690
|
}
|
|
4691
4691
|
function getModifiedTime(path) {
|
|
4692
4692
|
var _a;
|
|
4693
|
-
var originalStackTraceLimit = Error.stackTraceLimit;
|
|
4694
|
-
Error.stackTraceLimit = 0;
|
|
4695
4693
|
try {
|
|
4696
4694
|
return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
|
|
4697
4695
|
}
|
|
4698
4696
|
catch (e) {
|
|
4699
4697
|
return undefined;
|
|
4700
4698
|
}
|
|
4701
|
-
finally {
|
|
4702
|
-
Error.stackTraceLimit = originalStackTraceLimit;
|
|
4703
|
-
}
|
|
4704
4699
|
}
|
|
4705
4700
|
function setModifiedTime(path, time) {
|
|
4706
4701
|
try {
|
|
@@ -5451,6 +5446,7 @@ var ts;
|
|
|
5451
5446
|
_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
5447
|
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
5448
|
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."),
|
|
5449
|
+
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
5450
|
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
5451
|
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
5452
|
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,10 +5458,10 @@ var ts;
|
|
|
5462
5458
|
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
5459
|
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
5460
|
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
|
-
|
|
5461
|
+
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'."),
|
|
5462
|
+
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
5463
|
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
|
-
|
|
5464
|
+
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
5465
|
String_literal_with_double_quotes_expected: diag(1327, ts.DiagnosticCategory.Error, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."),
|
|
5470
5466
|
Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal: diag(1328, ts.DiagnosticCategory.Error, "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328", "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),
|
|
5471
5467
|
_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0: diag(1329, ts.DiagnosticCategory.Error, "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329", "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"),
|
|
@@ -5480,7 +5476,7 @@ var ts;
|
|
|
5480
5476
|
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
5477
|
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
5478
|
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
|
-
|
|
5479
|
+
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
5480
|
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
5481
|
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
5482
|
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 +5507,7 @@ var ts;
|
|
|
5511
5507
|
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
5508
|
_0_was_imported_here: diag(1376, ts.DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."),
|
|
5513
5509
|
_0_was_exported_here: diag(1377, ts.DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."),
|
|
5514
|
-
|
|
5510
|
+
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
5511
|
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
5512
|
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
5513
|
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 +5559,7 @@ var ts;
|
|
|
5563
5559
|
File_redirects_to_file_0: diag(1429, ts.DiagnosticCategory.Message, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"),
|
|
5564
5560
|
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
5561
|
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
|
-
|
|
5562
|
+
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
5563
|
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
5564
|
Unexpected_keyword_or_identifier: diag(1434, ts.DiagnosticCategory.Error, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."),
|
|
5569
5565
|
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 +5577,7 @@ var ts;
|
|
|
5581
5577
|
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
5578
|
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
5579
|
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
|
-
|
|
5580
|
+
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
5581
|
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
5582
|
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
5583
|
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 +5588,7 @@ var ts;
|
|
|
5592
5588
|
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
5589
|
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
5590
|
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
|
-
|
|
5591
|
+
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
5592
|
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
5593
|
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
5594
|
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 +5597,8 @@ var ts;
|
|
|
5601
5597
|
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
5598
|
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
5599
|
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
|
-
|
|
5600
|
+
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."),
|
|
5601
|
+
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
5602
|
Duplicate_identifier_0: diag(2300, ts.DiagnosticCategory.Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."),
|
|
5606
5603
|
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
5604
|
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."),
|
|
@@ -5852,7 +5849,6 @@ var ts;
|
|
|
5852
5849
|
A_rest_element_cannot_have_a_property_name: diag(2566, ts.DiagnosticCategory.Error, "A_rest_element_cannot_have_a_property_name_2566", "A rest element cannot have a property name."),
|
|
5853
5850
|
Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations: diag(2567, ts.DiagnosticCategory.Error, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."),
|
|
5854
5851
|
Property_0_may_not_exist_on_type_1_Did_you_mean_2: diag(2568, ts.DiagnosticCategory.Error, "Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568", "Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),
|
|
5855
|
-
Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators: diag(2569, ts.DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569", "Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators."),
|
|
5856
5852
|
Could_not_find_name_0_Did_you_mean_1: diag(2570, ts.DiagnosticCategory.Error, "Could_not_find_name_0_Did_you_mean_1_2570", "Could not find name '{0}'. Did you mean '{1}'?"),
|
|
5857
5853
|
Object_is_of_type_unknown: diag(2571, ts.DiagnosticCategory.Error, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."),
|
|
5858
5854
|
A_rest_element_type_must_be_an_array_type: diag(2574, ts.DiagnosticCategory.Error, "A_rest_element_type_must_be_an_array_type_2574", "A rest element type must be an array type."),
|
|
@@ -6080,8 +6076,8 @@ var ts;
|
|
|
6080
6076
|
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'."),
|
|
6081
6077
|
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."),
|
|
6082
6078
|
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}'?"),
|
|
6083
|
-
|
|
6084
|
-
|
|
6079
|
+
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."),
|
|
6080
|
+
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}'?"),
|
|
6085
6081
|
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."),
|
|
6086
6082
|
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."),
|
|
6087
6083
|
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."),
|
|
@@ -6494,8 +6490,8 @@ var ts;
|
|
|
6494
6490
|
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"),
|
|
6495
6491
|
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"),
|
|
6496
6492
|
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."),
|
|
6497
|
-
|
|
6498
|
-
|
|
6493
|
+
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}'"),
|
|
6494
|
+
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}'"),
|
|
6499
6495
|
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"),
|
|
6500
6496
|
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"),
|
|
6501
6497
|
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"),
|
|
@@ -6539,7 +6535,6 @@ var ts;
|
|
|
6539
6535
|
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}'."),
|
|
6540
6536
|
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}'."),
|
|
6541
6537
|
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."),
|
|
6542
|
-
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"),
|
|
6543
6538
|
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
6539
|
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
6540
|
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 +6743,6 @@ var ts;
|
|
|
6748
6743
|
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
6744
|
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
6745
|
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
6746
|
You_cannot_rename_this_element: diag(8000, ts.DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."),
|
|
6753
6747
|
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
6748
|
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 +11340,7 @@ var ts;
|
|
|
11346
11340
|
}
|
|
11347
11341
|
ts.getNonAugmentationDeclaration = getNonAugmentationDeclaration;
|
|
11348
11342
|
function isCommonJSContainingModuleKind(kind) {
|
|
11349
|
-
return kind === ts.ModuleKind.CommonJS || kind === ts.ModuleKind.
|
|
11343
|
+
return kind === ts.ModuleKind.CommonJS || kind === ts.ModuleKind.Node16 || kind === ts.ModuleKind.NodeNext;
|
|
11350
11344
|
}
|
|
11351
11345
|
function isEffectiveExternalModule(node, compilerOptions) {
|
|
11352
11346
|
return ts.isExternalModule(node) || compilerOptions.isolatedModules || (isCommonJSContainingModuleKind(getEmitModuleKind(compilerOptions)) && !!node.commonJsModuleIndicator);
|
|
@@ -14288,6 +14282,13 @@ var ts;
|
|
|
14288
14282
|
".d.ts";
|
|
14289
14283
|
}
|
|
14290
14284
|
ts.getDeclarationEmitExtensionForPath = getDeclarationEmitExtensionForPath;
|
|
14285
|
+
function getPossibleOriginalInputExtensionForExtension(path) {
|
|
14286
|
+
return ts.fileExtensionIsOneOf(path, [".d.mts", ".mjs", ".mts"]) ? [".mts", ".mjs"] :
|
|
14287
|
+
ts.fileExtensionIsOneOf(path, [".d.cts", ".cjs", ".cts"]) ? [".cts", ".cjs"] :
|
|
14288
|
+
ts.fileExtensionIsOneOf(path, [".json.d.ts"]) ? [".json"] :
|
|
14289
|
+
[".tsx", ".ts", ".jsx", ".js"];
|
|
14290
|
+
}
|
|
14291
|
+
ts.getPossibleOriginalInputExtensionForExtension = getPossibleOriginalInputExtensionForExtension;
|
|
14291
14292
|
function outFile(options) {
|
|
14292
14293
|
return options.outFile || options.out;
|
|
14293
14294
|
}
|
|
@@ -15859,7 +15860,7 @@ var ts;
|
|
|
15859
15860
|
checks.push(isFileModuleFromUsingJSXTag);
|
|
15860
15861
|
}
|
|
15861
15862
|
var moduleKind = getEmitModuleKind(options);
|
|
15862
|
-
if (moduleKind === ts.ModuleKind.
|
|
15863
|
+
if (moduleKind === ts.ModuleKind.Node16 || moduleKind === ts.ModuleKind.NodeNext) {
|
|
15863
15864
|
checks.push(isFileForcedToBeModuleByFormat);
|
|
15864
15865
|
}
|
|
15865
15866
|
var combined_1 = ts.or.apply(void 0, checks);
|
|
@@ -15870,7 +15871,7 @@ var ts;
|
|
|
15870
15871
|
ts.getSetExternalModuleIndicator = getSetExternalModuleIndicator;
|
|
15871
15872
|
function getEmitScriptTarget(compilerOptions) {
|
|
15872
15873
|
return compilerOptions.target ||
|
|
15873
|
-
(compilerOptions.module === ts.ModuleKind.
|
|
15874
|
+
(compilerOptions.module === ts.ModuleKind.Node16 && 9) ||
|
|
15874
15875
|
(compilerOptions.module === ts.ModuleKind.NodeNext && 99) ||
|
|
15875
15876
|
0;
|
|
15876
15877
|
}
|
|
@@ -15888,8 +15889,8 @@ var ts;
|
|
|
15888
15889
|
case ts.ModuleKind.CommonJS:
|
|
15889
15890
|
moduleResolution = ts.ModuleResolutionKind.NodeJs;
|
|
15890
15891
|
break;
|
|
15891
|
-
case ts.ModuleKind.
|
|
15892
|
-
moduleResolution = ts.ModuleResolutionKind.
|
|
15892
|
+
case ts.ModuleKind.Node16:
|
|
15893
|
+
moduleResolution = ts.ModuleResolutionKind.Node16;
|
|
15893
15894
|
break;
|
|
15894
15895
|
case ts.ModuleKind.NodeNext:
|
|
15895
15896
|
moduleResolution = ts.ModuleResolutionKind.NodeNext;
|
|
@@ -15914,7 +15915,7 @@ var ts;
|
|
|
15914
15915
|
case ts.ModuleKind.ES2020:
|
|
15915
15916
|
case ts.ModuleKind.ES2022:
|
|
15916
15917
|
case ts.ModuleKind.ESNext:
|
|
15917
|
-
case ts.ModuleKind.
|
|
15918
|
+
case ts.ModuleKind.Node16:
|
|
15918
15919
|
case ts.ModuleKind.NodeNext:
|
|
15919
15920
|
return true;
|
|
15920
15921
|
default:
|
|
@@ -15939,7 +15940,7 @@ var ts;
|
|
|
15939
15940
|
return compilerOptions.esModuleInterop;
|
|
15940
15941
|
}
|
|
15941
15942
|
switch (getEmitModuleKind(compilerOptions)) {
|
|
15942
|
-
case ts.ModuleKind.
|
|
15943
|
+
case ts.ModuleKind.Node16:
|
|
15943
15944
|
case ts.ModuleKind.NodeNext:
|
|
15944
15945
|
return true;
|
|
15945
15946
|
}
|
|
@@ -15986,10 +15987,6 @@ var ts;
|
|
|
15986
15987
|
return optionsHaveChanges(oldOptions, newOptions, ts.affectsEmitOptionDeclarations);
|
|
15987
15988
|
}
|
|
15988
15989
|
ts.compilerOptionsAffectEmit = compilerOptionsAffectEmit;
|
|
15989
|
-
function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {
|
|
15990
|
-
return optionsHaveChanges(oldOptions, newOptions, ts.affectsDeclarationPathOptionDeclarations);
|
|
15991
|
-
}
|
|
15992
|
-
ts.compilerOptionsAffectDeclarationPath = compilerOptionsAffectDeclarationPath;
|
|
15993
15990
|
function getCompilerOptionValue(options, option) {
|
|
15994
15991
|
return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
|
|
15995
15992
|
}
|
|
@@ -21078,7 +21075,7 @@ var ts;
|
|
|
21078
21075
|
return node;
|
|
21079
21076
|
}
|
|
21080
21077
|
function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) {
|
|
21081
|
-
var node = baseFactory.createBaseSourceFileNode(305);
|
|
21078
|
+
var node = (source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory.createBaseSourceFileNode(305));
|
|
21082
21079
|
for (var p in source) {
|
|
21083
21080
|
if (p === "emitNode" || ts.hasProperty(node, p) || !ts.hasProperty(source, p))
|
|
21084
21081
|
continue;
|
|
@@ -25190,7 +25187,7 @@ var ts;
|
|
|
25190
25187
|
function parseIsolatedEntityName(content, languageVersion) {
|
|
25191
25188
|
initializeState("", content, languageVersion, undefined, 1);
|
|
25192
25189
|
nextToken();
|
|
25193
|
-
var entityName = parseEntityName(true
|
|
25190
|
+
var entityName = parseEntityName(true);
|
|
25194
25191
|
var isInvalid = token() === 1 && !parseDiagnostics.length;
|
|
25195
25192
|
clearState();
|
|
25196
25193
|
return isInvalid ? entityName : undefined;
|
|
@@ -26471,6 +26468,7 @@ var ts;
|
|
|
26471
26468
|
var startPos = scanner.getStartPos();
|
|
26472
26469
|
var result = parseListElement(kind, parseElement);
|
|
26473
26470
|
if (!result) {
|
|
26471
|
+
parsingContext = saveParsingContext;
|
|
26474
26472
|
return undefined;
|
|
26475
26473
|
}
|
|
26476
26474
|
list.push(result);
|
|
@@ -26520,7 +26518,7 @@ var ts;
|
|
|
26520
26518
|
}
|
|
26521
26519
|
return createMissingList();
|
|
26522
26520
|
}
|
|
26523
|
-
function parseEntityName(allowReservedWords,
|
|
26521
|
+
function parseEntityName(allowReservedWords, diagnosticMessage) {
|
|
26524
26522
|
var pos = getNodePos();
|
|
26525
26523
|
var entity = allowReservedWords ? parseIdentifierName(diagnosticMessage) : parseIdentifier(diagnosticMessage);
|
|
26526
26524
|
var dotPos = getNodePos();
|
|
@@ -26530,7 +26528,7 @@ var ts;
|
|
|
26530
26528
|
break;
|
|
26531
26529
|
}
|
|
26532
26530
|
dotPos = getNodePos();
|
|
26533
|
-
entity = finishNode(factory.createQualifiedName(entity, parseRightSideOfDot(allowReservedWords,
|
|
26531
|
+
entity = finishNode(factory.createQualifiedName(entity, parseRightSideOfDot(allowReservedWords, false)), pos);
|
|
26534
26532
|
}
|
|
26535
26533
|
return entity;
|
|
26536
26534
|
}
|
|
@@ -26633,7 +26631,7 @@ var ts;
|
|
|
26633
26631
|
return finishNode(node, pos);
|
|
26634
26632
|
}
|
|
26635
26633
|
function parseEntityNameOfTypeReference() {
|
|
26636
|
-
return parseEntityName(true,
|
|
26634
|
+
return parseEntityName(true, ts.Diagnostics.Type_expected);
|
|
26637
26635
|
}
|
|
26638
26636
|
function parseTypeArgumentsOfTypeReference() {
|
|
26639
26637
|
if (!scanner.hasPrecedingLineBreak() && reScanLessThanToken() === 29) {
|
|
@@ -26747,7 +26745,7 @@ var ts;
|
|
|
26747
26745
|
function parseTypeQuery() {
|
|
26748
26746
|
var pos = getNodePos();
|
|
26749
26747
|
parseExpected(112);
|
|
26750
|
-
var entityName = parseEntityName(true
|
|
26748
|
+
var entityName = parseEntityName(true);
|
|
26751
26749
|
var typeArguments = !scanner.hasPrecedingLineBreak() ? tryParseTypeArguments() : undefined;
|
|
26752
26750
|
return finishNode(factory.createTypeQueryNode(entityName, typeArguments), pos);
|
|
26753
26751
|
}
|
|
@@ -27582,10 +27580,10 @@ var ts;
|
|
|
27582
27580
|
setDecoratorContext(false);
|
|
27583
27581
|
}
|
|
27584
27582
|
var pos = getNodePos();
|
|
27585
|
-
var expr = parseAssignmentExpressionOrHigher(
|
|
27583
|
+
var expr = parseAssignmentExpressionOrHigher();
|
|
27586
27584
|
var operatorToken;
|
|
27587
27585
|
while ((operatorToken = parseOptionalToken(27))) {
|
|
27588
|
-
expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher(
|
|
27586
|
+
expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher(), pos);
|
|
27589
27587
|
}
|
|
27590
27588
|
if (saveDecoratorContext) {
|
|
27591
27589
|
setDecoratorContext(true);
|
|
@@ -27593,23 +27591,23 @@ var ts;
|
|
|
27593
27591
|
return expr;
|
|
27594
27592
|
}
|
|
27595
27593
|
function parseInitializer() {
|
|
27596
|
-
return parseOptional(63) ? parseAssignmentExpressionOrHigher(
|
|
27594
|
+
return parseOptional(63) ? parseAssignmentExpressionOrHigher() : undefined;
|
|
27597
27595
|
}
|
|
27598
|
-
function parseAssignmentExpressionOrHigher(
|
|
27596
|
+
function parseAssignmentExpressionOrHigher() {
|
|
27599
27597
|
if (isYieldExpression()) {
|
|
27600
27598
|
return parseYieldExpression();
|
|
27601
27599
|
}
|
|
27602
|
-
var arrowExpression = tryParseParenthesizedArrowFunctionExpression(
|
|
27600
|
+
var arrowExpression = tryParseParenthesizedArrowFunctionExpression() || tryParseAsyncSimpleArrowFunctionExpression();
|
|
27603
27601
|
if (arrowExpression) {
|
|
27604
27602
|
return arrowExpression;
|
|
27605
27603
|
}
|
|
27606
27604
|
var pos = getNodePos();
|
|
27607
27605
|
var expr = parseBinaryExpressionOrHigher(0);
|
|
27608
27606
|
if (expr.kind === 79 && token() === 38) {
|
|
27609
|
-
return parseSimpleArrowFunctionExpression(pos, expr,
|
|
27607
|
+
return parseSimpleArrowFunctionExpression(pos, expr, undefined);
|
|
27610
27608
|
}
|
|
27611
27609
|
if (ts.isLeftHandSideExpression(expr) && ts.isAssignmentOperator(reScanGreaterToken())) {
|
|
27612
|
-
return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher(
|
|
27610
|
+
return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher(), pos);
|
|
27613
27611
|
}
|
|
27614
27612
|
return parseConditionalExpressionRest(expr, pos);
|
|
27615
27613
|
}
|
|
@@ -27631,30 +27629,30 @@ var ts;
|
|
|
27631
27629
|
nextToken();
|
|
27632
27630
|
if (!scanner.hasPrecedingLineBreak() &&
|
|
27633
27631
|
(token() === 41 || isStartOfExpression())) {
|
|
27634
|
-
return finishNode(factory.createYieldExpression(parseOptionalToken(41), parseAssignmentExpressionOrHigher(
|
|
27632
|
+
return finishNode(factory.createYieldExpression(parseOptionalToken(41), parseAssignmentExpressionOrHigher()), pos);
|
|
27635
27633
|
}
|
|
27636
27634
|
else {
|
|
27637
27635
|
return finishNode(factory.createYieldExpression(undefined, undefined), pos);
|
|
27638
27636
|
}
|
|
27639
27637
|
}
|
|
27640
|
-
function parseSimpleArrowFunctionExpression(pos, identifier,
|
|
27638
|
+
function parseSimpleArrowFunctionExpression(pos, identifier, asyncModifier) {
|
|
27641
27639
|
ts.Debug.assert(token() === 38, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
|
|
27642
27640
|
var parameter = factory.createParameterDeclaration(undefined, undefined, undefined, identifier, undefined, undefined, undefined);
|
|
27643
27641
|
finishNode(parameter, identifier.pos);
|
|
27644
27642
|
var parameters = createNodeArray([parameter], parameter.pos, parameter.end);
|
|
27645
27643
|
var equalsGreaterThanToken = parseExpectedToken(38);
|
|
27646
|
-
var body = parseArrowFunctionExpressionBody(!!asyncModifier
|
|
27644
|
+
var body = parseArrowFunctionExpressionBody(!!asyncModifier);
|
|
27647
27645
|
var node = factory.createArrowFunction(asyncModifier, undefined, parameters, undefined, equalsGreaterThanToken, body);
|
|
27648
27646
|
return addJSDocComment(finishNode(node, pos));
|
|
27649
27647
|
}
|
|
27650
|
-
function tryParseParenthesizedArrowFunctionExpression(
|
|
27648
|
+
function tryParseParenthesizedArrowFunctionExpression() {
|
|
27651
27649
|
var triState = isParenthesizedArrowFunctionExpression();
|
|
27652
27650
|
if (triState === 0) {
|
|
27653
27651
|
return undefined;
|
|
27654
27652
|
}
|
|
27655
27653
|
return triState === 1 ?
|
|
27656
|
-
parseParenthesizedArrowFunctionExpression(true
|
|
27657
|
-
tryParse(
|
|
27654
|
+
parseParenthesizedArrowFunctionExpression(true) :
|
|
27655
|
+
tryParse(parsePossibleParenthesizedArrowFunctionExpression);
|
|
27658
27656
|
}
|
|
27659
27657
|
function isParenthesizedArrowFunctionExpression() {
|
|
27660
27658
|
if (token() === 20 || token() === 29 || token() === 131) {
|
|
@@ -27748,24 +27746,24 @@ var ts;
|
|
|
27748
27746
|
return 2;
|
|
27749
27747
|
}
|
|
27750
27748
|
}
|
|
27751
|
-
function parsePossibleParenthesizedArrowFunctionExpression(
|
|
27749
|
+
function parsePossibleParenthesizedArrowFunctionExpression() {
|
|
27752
27750
|
var tokenPos = scanner.getTokenPos();
|
|
27753
27751
|
if (notParenthesizedArrow === null || notParenthesizedArrow === void 0 ? void 0 : notParenthesizedArrow.has(tokenPos)) {
|
|
27754
27752
|
return undefined;
|
|
27755
27753
|
}
|
|
27756
|
-
var result = parseParenthesizedArrowFunctionExpression(false
|
|
27754
|
+
var result = parseParenthesizedArrowFunctionExpression(false);
|
|
27757
27755
|
if (!result) {
|
|
27758
27756
|
(notParenthesizedArrow || (notParenthesizedArrow = new ts.Set())).add(tokenPos);
|
|
27759
27757
|
}
|
|
27760
27758
|
return result;
|
|
27761
27759
|
}
|
|
27762
|
-
function tryParseAsyncSimpleArrowFunctionExpression(
|
|
27760
|
+
function tryParseAsyncSimpleArrowFunctionExpression() {
|
|
27763
27761
|
if (token() === 131) {
|
|
27764
27762
|
if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1) {
|
|
27765
27763
|
var pos = getNodePos();
|
|
27766
27764
|
var asyncModifier = parseModifiersForArrowFunction();
|
|
27767
27765
|
var expr = parseBinaryExpressionOrHigher(0);
|
|
27768
|
-
return parseSimpleArrowFunctionExpression(pos, expr,
|
|
27766
|
+
return parseSimpleArrowFunctionExpression(pos, expr, asyncModifier);
|
|
27769
27767
|
}
|
|
27770
27768
|
}
|
|
27771
27769
|
return undefined;
|
|
@@ -27783,7 +27781,7 @@ var ts;
|
|
|
27783
27781
|
}
|
|
27784
27782
|
return 0;
|
|
27785
27783
|
}
|
|
27786
|
-
function parseParenthesizedArrowFunctionExpression(allowAmbiguity
|
|
27784
|
+
function parseParenthesizedArrowFunctionExpression(allowAmbiguity) {
|
|
27787
27785
|
var pos = getNodePos();
|
|
27788
27786
|
var hasJSDoc = hasPrecedingJSDocComment();
|
|
27789
27787
|
var modifiers = parseModifiersForArrowFunction();
|
|
@@ -27811,9 +27809,6 @@ var ts;
|
|
|
27811
27809
|
return undefined;
|
|
27812
27810
|
}
|
|
27813
27811
|
}
|
|
27814
|
-
if (disallowReturnTypeInArrowFunction && token() === 58) {
|
|
27815
|
-
return undefined;
|
|
27816
|
-
}
|
|
27817
27812
|
var type = parseReturnType(58, false);
|
|
27818
27813
|
if (type && !allowAmbiguity && typeHasArrowFunctionBlockingParseError(type)) {
|
|
27819
27814
|
return undefined;
|
|
@@ -27829,12 +27824,12 @@ var ts;
|
|
|
27829
27824
|
var lastToken = token();
|
|
27830
27825
|
var equalsGreaterThanToken = parseExpectedToken(38);
|
|
27831
27826
|
var body = (lastToken === 38 || lastToken === 18)
|
|
27832
|
-
? parseArrowFunctionExpressionBody(ts.some(modifiers, ts.isAsyncModifier)
|
|
27827
|
+
? parseArrowFunctionExpressionBody(ts.some(modifiers, ts.isAsyncModifier))
|
|
27833
27828
|
: parseIdentifier();
|
|
27834
27829
|
var node = factory.createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body);
|
|
27835
27830
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
27836
27831
|
}
|
|
27837
|
-
function parseArrowFunctionExpressionBody(isAsync
|
|
27832
|
+
function parseArrowFunctionExpressionBody(isAsync) {
|
|
27838
27833
|
if (token() === 18) {
|
|
27839
27834
|
return parseFunctionBlock(isAsync ? 2 : 0);
|
|
27840
27835
|
}
|
|
@@ -27848,8 +27843,8 @@ var ts;
|
|
|
27848
27843
|
var savedTopLevel = topLevel;
|
|
27849
27844
|
topLevel = false;
|
|
27850
27845
|
var node = isAsync
|
|
27851
|
-
? doInAwaitContext(
|
|
27852
|
-
: doOutsideOfAwaitContext(
|
|
27846
|
+
? doInAwaitContext(parseAssignmentExpressionOrHigher)
|
|
27847
|
+
: doOutsideOfAwaitContext(parseAssignmentExpressionOrHigher);
|
|
27853
27848
|
topLevel = savedTopLevel;
|
|
27854
27849
|
return node;
|
|
27855
27850
|
}
|
|
@@ -27859,8 +27854,8 @@ var ts;
|
|
|
27859
27854
|
return leftOperand;
|
|
27860
27855
|
}
|
|
27861
27856
|
var colonToken;
|
|
27862
|
-
return finishNode(factory.createConditionalExpression(leftOperand, questionToken, doOutsideOfContext(disallowInAndDecoratorContext,
|
|
27863
|
-
? parseAssignmentExpressionOrHigher(
|
|
27857
|
+
return finishNode(factory.createConditionalExpression(leftOperand, questionToken, doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher), colonToken = parseExpectedToken(58), ts.nodeIsPresent(colonToken)
|
|
27858
|
+
? parseAssignmentExpressionOrHigher()
|
|
27864
27859
|
: createMissingNode(79, false, ts.Diagnostics._0_expected, ts.tokenToString(58))), pos);
|
|
27865
27860
|
}
|
|
27866
27861
|
function parseBinaryExpressionOrHigher(precedence) {
|
|
@@ -28511,13 +28506,13 @@ var ts;
|
|
|
28511
28506
|
function parseSpreadElement() {
|
|
28512
28507
|
var pos = getNodePos();
|
|
28513
28508
|
parseExpected(25);
|
|
28514
|
-
var expression = parseAssignmentExpressionOrHigher(
|
|
28509
|
+
var expression = parseAssignmentExpressionOrHigher();
|
|
28515
28510
|
return finishNode(factory.createSpreadElement(expression), pos);
|
|
28516
28511
|
}
|
|
28517
28512
|
function parseArgumentOrArrayLiteralElement() {
|
|
28518
28513
|
return token() === 25 ? parseSpreadElement() :
|
|
28519
28514
|
token() === 27 ? finishNode(factory.createOmittedExpression(), getNodePos()) :
|
|
28520
|
-
parseAssignmentExpressionOrHigher(
|
|
28515
|
+
parseAssignmentExpressionOrHigher();
|
|
28521
28516
|
}
|
|
28522
28517
|
function parseArgumentExpression() {
|
|
28523
28518
|
return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement);
|
|
@@ -28535,7 +28530,7 @@ var ts;
|
|
|
28535
28530
|
var pos = getNodePos();
|
|
28536
28531
|
var hasJSDoc = hasPrecedingJSDocComment();
|
|
28537
28532
|
if (parseOptionalToken(25)) {
|
|
28538
|
-
var expression = parseAssignmentExpressionOrHigher(
|
|
28533
|
+
var expression = parseAssignmentExpressionOrHigher();
|
|
28539
28534
|
return withJSDoc(finishNode(factory.createSpreadAssignment(expression), pos), hasJSDoc);
|
|
28540
28535
|
}
|
|
28541
28536
|
var decorators = parseDecorators();
|
|
@@ -28558,13 +28553,13 @@ var ts;
|
|
|
28558
28553
|
var isShorthandPropertyAssignment = tokenIsIdentifier && (token() !== 58);
|
|
28559
28554
|
if (isShorthandPropertyAssignment) {
|
|
28560
28555
|
var equalsToken = parseOptionalToken(63);
|
|
28561
|
-
var objectAssignmentInitializer = equalsToken ? allowInAnd(
|
|
28556
|
+
var objectAssignmentInitializer = equalsToken ? allowInAnd(parseAssignmentExpressionOrHigher) : undefined;
|
|
28562
28557
|
node = factory.createShorthandPropertyAssignment(name, objectAssignmentInitializer);
|
|
28563
28558
|
node.equalsToken = equalsToken;
|
|
28564
28559
|
}
|
|
28565
28560
|
else {
|
|
28566
28561
|
parseExpected(58);
|
|
28567
|
-
var initializer = allowInAnd(
|
|
28562
|
+
var initializer = allowInAnd(parseAssignmentExpressionOrHigher);
|
|
28568
28563
|
node = factory.createPropertyAssignment(name, initializer);
|
|
28569
28564
|
}
|
|
28570
28565
|
node.decorators = decorators;
|
|
@@ -28724,7 +28719,7 @@ var ts;
|
|
|
28724
28719
|
}
|
|
28725
28720
|
var node;
|
|
28726
28721
|
if (awaitToken ? parseExpected(160) : parseOptional(160)) {
|
|
28727
|
-
var expression = allowInAnd(
|
|
28722
|
+
var expression = allowInAnd(parseAssignmentExpressionOrHigher);
|
|
28728
28723
|
parseExpected(21);
|
|
28729
28724
|
node = factory.createForOfStatement(awaitToken, initializer, expression, parseStatement());
|
|
28730
28725
|
}
|
|
@@ -29762,7 +29757,7 @@ var ts;
|
|
|
29762
29757
|
var pos = getNodePos();
|
|
29763
29758
|
var name = ts.tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(10);
|
|
29764
29759
|
parseExpected(58);
|
|
29765
|
-
var value = parseAssignmentExpressionOrHigher(
|
|
29760
|
+
var value = parseAssignmentExpressionOrHigher();
|
|
29766
29761
|
return finishNode(factory.createAssertEntry(name, value), pos);
|
|
29767
29762
|
}
|
|
29768
29763
|
function parseAssertClause(skipAssertKeyword) {
|
|
@@ -29812,7 +29807,7 @@ var ts;
|
|
|
29812
29807
|
function parseModuleReference() {
|
|
29813
29808
|
return isExternalModuleReference()
|
|
29814
29809
|
? parseExternalModuleReference()
|
|
29815
|
-
: parseEntityName(false
|
|
29810
|
+
: parseEntityName(false);
|
|
29816
29811
|
}
|
|
29817
29812
|
function parseExternalModuleReference() {
|
|
29818
29813
|
var pos = getNodePos();
|
|
@@ -29956,7 +29951,7 @@ var ts;
|
|
|
29956
29951
|
else {
|
|
29957
29952
|
parseExpected(88);
|
|
29958
29953
|
}
|
|
29959
|
-
var expression = parseAssignmentExpressionOrHigher(
|
|
29954
|
+
var expression = parseAssignmentExpressionOrHigher();
|
|
29960
29955
|
parseSemicolon();
|
|
29961
29956
|
setAwaitContext(savedAwaitContext);
|
|
29962
29957
|
var node = factory.createExportAssignment(decorators, modifiers, isExportEquals, expression);
|
|
@@ -29994,7 +29989,7 @@ var ts;
|
|
|
29994
29989
|
var pos = getNodePos();
|
|
29995
29990
|
var hasBrace = parseOptional(18);
|
|
29996
29991
|
var p2 = getNodePos();
|
|
29997
|
-
var entityName = parseEntityName(false
|
|
29992
|
+
var entityName = parseEntityName(false);
|
|
29998
29993
|
while (token() === 80) {
|
|
29999
29994
|
reScanHashToken();
|
|
30000
29995
|
nextTokenJSDoc();
|
|
@@ -30396,7 +30391,7 @@ var ts;
|
|
|
30396
30391
|
skipWhitespace();
|
|
30397
30392
|
var p2 = getNodePos();
|
|
30398
30393
|
var name = ts.tokenIsIdentifierOrKeyword(token())
|
|
30399
|
-
? parseEntityName(true
|
|
30394
|
+
? parseEntityName(true)
|
|
30400
30395
|
: undefined;
|
|
30401
30396
|
if (name) {
|
|
30402
30397
|
while (token() === 80) {
|
|
@@ -31484,6 +31479,7 @@ var ts;
|
|
|
31484
31479
|
["es2021.intl", "lib.es2021.intl.d.ts"],
|
|
31485
31480
|
["es2022.array", "lib.es2022.array.d.ts"],
|
|
31486
31481
|
["es2022.error", "lib.es2022.error.d.ts"],
|
|
31482
|
+
["es2022.intl", "lib.es2022.intl.d.ts"],
|
|
31487
31483
|
["es2022.object", "lib.es2022.object.d.ts"],
|
|
31488
31484
|
["es2022.string", "lib.es2022.string.d.ts"],
|
|
31489
31485
|
["esnext.array", "lib.es2022.array.d.ts"],
|
|
@@ -31684,7 +31680,6 @@ var ts;
|
|
|
31684
31680
|
type: "boolean",
|
|
31685
31681
|
affectsSemanticDiagnostics: true,
|
|
31686
31682
|
affectsEmit: true,
|
|
31687
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31688
31683
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
31689
31684
|
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
31685
|
defaultValueDescription: false,
|
|
@@ -31718,39 +31713,12 @@ var ts;
|
|
|
31718
31713
|
affectsSourceFile: true,
|
|
31719
31714
|
affectsModuleResolution: true,
|
|
31720
31715
|
affectsEmit: true,
|
|
31721
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31722
31716
|
paramType: ts.Diagnostics.VERSION,
|
|
31723
31717
|
showInSimplifiedHelpView: true,
|
|
31724
31718
|
category: ts.Diagnostics.Language_and_Environment,
|
|
31725
31719
|
description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
31726
31720
|
defaultValueDescription: 0,
|
|
31727
31721
|
};
|
|
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
31722
|
var commandOptionsWithoutBuild = [
|
|
31755
31723
|
{
|
|
31756
31724
|
name: "all",
|
|
@@ -31811,13 +31779,36 @@ var ts;
|
|
|
31811
31779
|
category: ts.Diagnostics.Command_line_Options,
|
|
31812
31780
|
affectsSemanticDiagnostics: true,
|
|
31813
31781
|
affectsEmit: true,
|
|
31814
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31815
31782
|
isCommandLineOnly: true,
|
|
31816
31783
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
31817
31784
|
defaultValueDescription: false,
|
|
31818
31785
|
},
|
|
31819
31786
|
ts.targetOptionDeclaration,
|
|
31820
|
-
|
|
31787
|
+
{
|
|
31788
|
+
name: "module",
|
|
31789
|
+
shortName: "m",
|
|
31790
|
+
type: new ts.Map(ts.getEntries({
|
|
31791
|
+
none: ts.ModuleKind.None,
|
|
31792
|
+
commonjs: ts.ModuleKind.CommonJS,
|
|
31793
|
+
amd: ts.ModuleKind.AMD,
|
|
31794
|
+
system: ts.ModuleKind.System,
|
|
31795
|
+
umd: ts.ModuleKind.UMD,
|
|
31796
|
+
es6: ts.ModuleKind.ES2015,
|
|
31797
|
+
es2015: ts.ModuleKind.ES2015,
|
|
31798
|
+
es2020: ts.ModuleKind.ES2020,
|
|
31799
|
+
es2022: ts.ModuleKind.ES2022,
|
|
31800
|
+
esnext: ts.ModuleKind.ESNext,
|
|
31801
|
+
node16: ts.ModuleKind.Node16,
|
|
31802
|
+
nodenext: ts.ModuleKind.NodeNext,
|
|
31803
|
+
})),
|
|
31804
|
+
affectsModuleResolution: true,
|
|
31805
|
+
affectsEmit: true,
|
|
31806
|
+
paramType: ts.Diagnostics.KIND,
|
|
31807
|
+
showInSimplifiedHelpView: true,
|
|
31808
|
+
category: ts.Diagnostics.Modules,
|
|
31809
|
+
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
31810
|
+
defaultValueDescription: undefined,
|
|
31811
|
+
},
|
|
31821
31812
|
{
|
|
31822
31813
|
name: "lib",
|
|
31823
31814
|
type: "list",
|
|
@@ -31854,7 +31845,6 @@ var ts;
|
|
|
31854
31845
|
type: jsxOptionMap,
|
|
31855
31846
|
affectsSourceFile: true,
|
|
31856
31847
|
affectsEmit: true,
|
|
31857
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31858
31848
|
affectsModuleResolution: true,
|
|
31859
31849
|
paramType: ts.Diagnostics.KIND,
|
|
31860
31850
|
showInSimplifiedHelpView: true,
|
|
@@ -31867,7 +31857,6 @@ var ts;
|
|
|
31867
31857
|
shortName: "d",
|
|
31868
31858
|
type: "boolean",
|
|
31869
31859
|
affectsEmit: true,
|
|
31870
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31871
31860
|
showInSimplifiedHelpView: true,
|
|
31872
31861
|
category: ts.Diagnostics.Emit,
|
|
31873
31862
|
transpileOptionValue: undefined,
|
|
@@ -31878,7 +31867,6 @@ var ts;
|
|
|
31878
31867
|
name: "declarationMap",
|
|
31879
31868
|
type: "boolean",
|
|
31880
31869
|
affectsEmit: true,
|
|
31881
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31882
31870
|
showInSimplifiedHelpView: true,
|
|
31883
31871
|
category: ts.Diagnostics.Emit,
|
|
31884
31872
|
transpileOptionValue: undefined,
|
|
@@ -31889,7 +31877,6 @@ var ts;
|
|
|
31889
31877
|
name: "emitDeclarationOnly",
|
|
31890
31878
|
type: "boolean",
|
|
31891
31879
|
affectsEmit: true,
|
|
31892
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31893
31880
|
showInSimplifiedHelpView: true,
|
|
31894
31881
|
category: ts.Diagnostics.Emit,
|
|
31895
31882
|
description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
|
|
@@ -31900,7 +31887,6 @@ var ts;
|
|
|
31900
31887
|
name: "sourceMap",
|
|
31901
31888
|
type: "boolean",
|
|
31902
31889
|
affectsEmit: true,
|
|
31903
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31904
31890
|
showInSimplifiedHelpView: true,
|
|
31905
31891
|
category: ts.Diagnostics.Emit,
|
|
31906
31892
|
defaultValueDescription: false,
|
|
@@ -31910,9 +31896,6 @@ var ts;
|
|
|
31910
31896
|
name: "outFile",
|
|
31911
31897
|
type: "string",
|
|
31912
31898
|
affectsEmit: true,
|
|
31913
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31914
|
-
affectsDeclarationPath: true,
|
|
31915
|
-
affectsBundleEmitBuildInfo: true,
|
|
31916
31899
|
isFilePath: true,
|
|
31917
31900
|
paramType: ts.Diagnostics.FILE,
|
|
31918
31901
|
showInSimplifiedHelpView: true,
|
|
@@ -31924,8 +31907,6 @@ var ts;
|
|
|
31924
31907
|
name: "outDir",
|
|
31925
31908
|
type: "string",
|
|
31926
31909
|
affectsEmit: true,
|
|
31927
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31928
|
-
affectsDeclarationPath: true,
|
|
31929
31910
|
isFilePath: true,
|
|
31930
31911
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
31931
31912
|
showInSimplifiedHelpView: true,
|
|
@@ -31936,8 +31917,6 @@ var ts;
|
|
|
31936
31917
|
name: "rootDir",
|
|
31937
31918
|
type: "string",
|
|
31938
31919
|
affectsEmit: true,
|
|
31939
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31940
|
-
affectsDeclarationPath: true,
|
|
31941
31920
|
isFilePath: true,
|
|
31942
31921
|
paramType: ts.Diagnostics.LOCATION,
|
|
31943
31922
|
category: ts.Diagnostics.Modules,
|
|
@@ -31948,8 +31927,6 @@ var ts;
|
|
|
31948
31927
|
name: "composite",
|
|
31949
31928
|
type: "boolean",
|
|
31950
31929
|
affectsEmit: true,
|
|
31951
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31952
|
-
affectsBundleEmitBuildInfo: true,
|
|
31953
31930
|
isTSConfigOnly: true,
|
|
31954
31931
|
category: ts.Diagnostics.Projects,
|
|
31955
31932
|
transpileOptionValue: undefined,
|
|
@@ -31960,8 +31937,6 @@ var ts;
|
|
|
31960
31937
|
name: "tsBuildInfoFile",
|
|
31961
31938
|
type: "string",
|
|
31962
31939
|
affectsEmit: true,
|
|
31963
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31964
|
-
affectsBundleEmitBuildInfo: true,
|
|
31965
31940
|
isFilePath: true,
|
|
31966
31941
|
paramType: ts.Diagnostics.FILE,
|
|
31967
31942
|
category: ts.Diagnostics.Projects,
|
|
@@ -31973,7 +31948,6 @@ var ts;
|
|
|
31973
31948
|
name: "removeComments",
|
|
31974
31949
|
type: "boolean",
|
|
31975
31950
|
affectsEmit: true,
|
|
31976
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31977
31951
|
showInSimplifiedHelpView: true,
|
|
31978
31952
|
category: ts.Diagnostics.Emit,
|
|
31979
31953
|
defaultValueDescription: false,
|
|
@@ -31992,7 +31966,6 @@ var ts;
|
|
|
31992
31966
|
name: "importHelpers",
|
|
31993
31967
|
type: "boolean",
|
|
31994
31968
|
affectsEmit: true,
|
|
31995
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
31996
31969
|
category: ts.Diagnostics.Emit,
|
|
31997
31970
|
description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
31998
31971
|
defaultValueDescription: false,
|
|
@@ -32006,7 +31979,6 @@ var ts;
|
|
|
32006
31979
|
})),
|
|
32007
31980
|
affectsEmit: true,
|
|
32008
31981
|
affectsSemanticDiagnostics: true,
|
|
32009
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32010
31982
|
category: ts.Diagnostics.Emit,
|
|
32011
31983
|
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
|
|
32012
31984
|
defaultValueDescription: 0,
|
|
@@ -32015,7 +31987,6 @@ var ts;
|
|
|
32015
31987
|
name: "downlevelIteration",
|
|
32016
31988
|
type: "boolean",
|
|
32017
31989
|
affectsEmit: true,
|
|
32018
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32019
31990
|
category: ts.Diagnostics.Emit,
|
|
32020
31991
|
description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
|
|
32021
31992
|
defaultValueDescription: false,
|
|
@@ -32031,7 +32002,6 @@ var ts;
|
|
|
32031
32002
|
{
|
|
32032
32003
|
name: "strict",
|
|
32033
32004
|
type: "boolean",
|
|
32034
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32035
32005
|
showInSimplifiedHelpView: true,
|
|
32036
32006
|
category: ts.Diagnostics.Type_Checking,
|
|
32037
32007
|
description: ts.Diagnostics.Enable_all_strict_type_checking_options,
|
|
@@ -32041,7 +32011,6 @@ var ts;
|
|
|
32041
32011
|
name: "noImplicitAny",
|
|
32042
32012
|
type: "boolean",
|
|
32043
32013
|
affectsSemanticDiagnostics: true,
|
|
32044
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32045
32014
|
strictFlag: true,
|
|
32046
32015
|
category: ts.Diagnostics.Type_Checking,
|
|
32047
32016
|
description: ts.Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
|
|
@@ -32051,7 +32020,6 @@ var ts;
|
|
|
32051
32020
|
name: "strictNullChecks",
|
|
32052
32021
|
type: "boolean",
|
|
32053
32022
|
affectsSemanticDiagnostics: true,
|
|
32054
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32055
32023
|
strictFlag: true,
|
|
32056
32024
|
category: ts.Diagnostics.Type_Checking,
|
|
32057
32025
|
description: ts.Diagnostics.When_type_checking_take_into_account_null_and_undefined,
|
|
@@ -32060,8 +32028,6 @@ var ts;
|
|
|
32060
32028
|
{
|
|
32061
32029
|
name: "strictFunctionTypes",
|
|
32062
32030
|
type: "boolean",
|
|
32063
|
-
affectsSemanticDiagnostics: true,
|
|
32064
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32065
32031
|
strictFlag: true,
|
|
32066
32032
|
category: ts.Diagnostics.Type_Checking,
|
|
32067
32033
|
description: ts.Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
|
|
@@ -32070,8 +32036,6 @@ var ts;
|
|
|
32070
32036
|
{
|
|
32071
32037
|
name: "strictBindCallApply",
|
|
32072
32038
|
type: "boolean",
|
|
32073
|
-
affectsSemanticDiagnostics: true,
|
|
32074
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32075
32039
|
strictFlag: true,
|
|
32076
32040
|
category: ts.Diagnostics.Type_Checking,
|
|
32077
32041
|
description: ts.Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
|
|
@@ -32081,7 +32045,6 @@ var ts;
|
|
|
32081
32045
|
name: "strictPropertyInitialization",
|
|
32082
32046
|
type: "boolean",
|
|
32083
32047
|
affectsSemanticDiagnostics: true,
|
|
32084
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32085
32048
|
strictFlag: true,
|
|
32086
32049
|
category: ts.Diagnostics.Type_Checking,
|
|
32087
32050
|
description: ts.Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
|
|
@@ -32091,7 +32054,6 @@ var ts;
|
|
|
32091
32054
|
name: "noImplicitThis",
|
|
32092
32055
|
type: "boolean",
|
|
32093
32056
|
affectsSemanticDiagnostics: true,
|
|
32094
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32095
32057
|
strictFlag: true,
|
|
32096
32058
|
category: ts.Diagnostics.Type_Checking,
|
|
32097
32059
|
description: ts.Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
|
|
@@ -32101,7 +32063,6 @@ var ts;
|
|
|
32101
32063
|
name: "useUnknownInCatchVariables",
|
|
32102
32064
|
type: "boolean",
|
|
32103
32065
|
affectsSemanticDiagnostics: true,
|
|
32104
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32105
32066
|
strictFlag: true,
|
|
32106
32067
|
category: ts.Diagnostics.Type_Checking,
|
|
32107
32068
|
description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
@@ -32111,8 +32072,6 @@ var ts;
|
|
|
32111
32072
|
name: "alwaysStrict",
|
|
32112
32073
|
type: "boolean",
|
|
32113
32074
|
affectsSourceFile: true,
|
|
32114
|
-
affectsEmit: true,
|
|
32115
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32116
32075
|
strictFlag: true,
|
|
32117
32076
|
category: ts.Diagnostics.Type_Checking,
|
|
32118
32077
|
description: ts.Diagnostics.Ensure_use_strict_is_always_emitted,
|
|
@@ -32122,7 +32081,6 @@ var ts;
|
|
|
32122
32081
|
name: "noUnusedLocals",
|
|
32123
32082
|
type: "boolean",
|
|
32124
32083
|
affectsSemanticDiagnostics: true,
|
|
32125
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32126
32084
|
category: ts.Diagnostics.Type_Checking,
|
|
32127
32085
|
description: ts.Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
|
|
32128
32086
|
defaultValueDescription: false,
|
|
@@ -32131,7 +32089,6 @@ var ts;
|
|
|
32131
32089
|
name: "noUnusedParameters",
|
|
32132
32090
|
type: "boolean",
|
|
32133
32091
|
affectsSemanticDiagnostics: true,
|
|
32134
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32135
32092
|
category: ts.Diagnostics.Type_Checking,
|
|
32136
32093
|
description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
|
|
32137
32094
|
defaultValueDescription: false,
|
|
@@ -32140,7 +32097,6 @@ var ts;
|
|
|
32140
32097
|
name: "exactOptionalPropertyTypes",
|
|
32141
32098
|
type: "boolean",
|
|
32142
32099
|
affectsSemanticDiagnostics: true,
|
|
32143
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32144
32100
|
category: ts.Diagnostics.Type_Checking,
|
|
32145
32101
|
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
32146
32102
|
defaultValueDescription: false,
|
|
@@ -32149,7 +32105,6 @@ var ts;
|
|
|
32149
32105
|
name: "noImplicitReturns",
|
|
32150
32106
|
type: "boolean",
|
|
32151
32107
|
affectsSemanticDiagnostics: true,
|
|
32152
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32153
32108
|
category: ts.Diagnostics.Type_Checking,
|
|
32154
32109
|
description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
|
|
32155
32110
|
defaultValueDescription: false,
|
|
@@ -32159,7 +32114,6 @@ var ts;
|
|
|
32159
32114
|
type: "boolean",
|
|
32160
32115
|
affectsBindDiagnostics: true,
|
|
32161
32116
|
affectsSemanticDiagnostics: true,
|
|
32162
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32163
32117
|
category: ts.Diagnostics.Type_Checking,
|
|
32164
32118
|
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
32165
32119
|
defaultValueDescription: false,
|
|
@@ -32168,7 +32122,6 @@ var ts;
|
|
|
32168
32122
|
name: "noUncheckedIndexedAccess",
|
|
32169
32123
|
type: "boolean",
|
|
32170
32124
|
affectsSemanticDiagnostics: true,
|
|
32171
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32172
32125
|
category: ts.Diagnostics.Type_Checking,
|
|
32173
32126
|
description: ts.Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
|
|
32174
32127
|
defaultValueDescription: false,
|
|
@@ -32177,7 +32130,6 @@ var ts;
|
|
|
32177
32130
|
name: "noImplicitOverride",
|
|
32178
32131
|
type: "boolean",
|
|
32179
32132
|
affectsSemanticDiagnostics: true,
|
|
32180
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32181
32133
|
category: ts.Diagnostics.Type_Checking,
|
|
32182
32134
|
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
32183
32135
|
defaultValueDescription: false,
|
|
@@ -32185,8 +32137,6 @@ var ts;
|
|
|
32185
32137
|
{
|
|
32186
32138
|
name: "noPropertyAccessFromIndexSignature",
|
|
32187
32139
|
type: "boolean",
|
|
32188
|
-
affectsSemanticDiagnostics: true,
|
|
32189
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32190
32140
|
showInSimplifiedHelpView: false,
|
|
32191
32141
|
category: ts.Diagnostics.Type_Checking,
|
|
32192
32142
|
description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
|
|
@@ -32197,7 +32147,7 @@ var ts;
|
|
|
32197
32147
|
type: new ts.Map(ts.getEntries({
|
|
32198
32148
|
node: ts.ModuleResolutionKind.NodeJs,
|
|
32199
32149
|
classic: ts.ModuleResolutionKind.Classic,
|
|
32200
|
-
|
|
32150
|
+
node16: ts.ModuleResolutionKind.Node16,
|
|
32201
32151
|
nodenext: ts.ModuleResolutionKind.NodeNext,
|
|
32202
32152
|
})),
|
|
32203
32153
|
affectsModuleResolution: true,
|
|
@@ -32267,7 +32217,6 @@ var ts;
|
|
|
32267
32217
|
name: "allowSyntheticDefaultImports",
|
|
32268
32218
|
type: "boolean",
|
|
32269
32219
|
affectsSemanticDiagnostics: true,
|
|
32270
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32271
32220
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32272
32221
|
description: ts.Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
|
|
32273
32222
|
defaultValueDescription: ts.Diagnostics.module_system_or_esModuleInterop
|
|
@@ -32277,7 +32226,6 @@ var ts;
|
|
|
32277
32226
|
type: "boolean",
|
|
32278
32227
|
affectsSemanticDiagnostics: true,
|
|
32279
32228
|
affectsEmit: true,
|
|
32280
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32281
32229
|
showInSimplifiedHelpView: true,
|
|
32282
32230
|
category: ts.Diagnostics.Interop_Constraints,
|
|
32283
32231
|
description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
|
|
@@ -32294,7 +32242,6 @@ var ts;
|
|
|
32294
32242
|
name: "allowUmdGlobalAccess",
|
|
32295
32243
|
type: "boolean",
|
|
32296
32244
|
affectsSemanticDiagnostics: true,
|
|
32297
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32298
32245
|
category: ts.Diagnostics.Modules,
|
|
32299
32246
|
description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
|
|
32300
32247
|
defaultValueDescription: false,
|
|
@@ -32315,7 +32262,6 @@ var ts;
|
|
|
32315
32262
|
name: "sourceRoot",
|
|
32316
32263
|
type: "string",
|
|
32317
32264
|
affectsEmit: true,
|
|
32318
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32319
32265
|
paramType: ts.Diagnostics.LOCATION,
|
|
32320
32266
|
category: ts.Diagnostics.Emit,
|
|
32321
32267
|
description: ts.Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code,
|
|
@@ -32324,7 +32270,6 @@ var ts;
|
|
|
32324
32270
|
name: "mapRoot",
|
|
32325
32271
|
type: "string",
|
|
32326
32272
|
affectsEmit: true,
|
|
32327
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32328
32273
|
paramType: ts.Diagnostics.LOCATION,
|
|
32329
32274
|
category: ts.Diagnostics.Emit,
|
|
32330
32275
|
description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
|
|
@@ -32333,7 +32278,6 @@ var ts;
|
|
|
32333
32278
|
name: "inlineSourceMap",
|
|
32334
32279
|
type: "boolean",
|
|
32335
32280
|
affectsEmit: true,
|
|
32336
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32337
32281
|
category: ts.Diagnostics.Emit,
|
|
32338
32282
|
description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
|
|
32339
32283
|
defaultValueDescription: false,
|
|
@@ -32342,7 +32286,6 @@ var ts;
|
|
|
32342
32286
|
name: "inlineSources",
|
|
32343
32287
|
type: "boolean",
|
|
32344
32288
|
affectsEmit: true,
|
|
32345
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32346
32289
|
category: ts.Diagnostics.Emit,
|
|
32347
32290
|
description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
|
|
32348
32291
|
defaultValueDescription: false,
|
|
@@ -32351,7 +32294,6 @@ var ts;
|
|
|
32351
32294
|
name: "experimentalDecorators",
|
|
32352
32295
|
type: "boolean",
|
|
32353
32296
|
affectsSemanticDiagnostics: true,
|
|
32354
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32355
32297
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32356
32298
|
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
32357
32299
|
defaultValueDescription: false,
|
|
@@ -32361,7 +32303,6 @@ var ts;
|
|
|
32361
32303
|
type: "boolean",
|
|
32362
32304
|
affectsSemanticDiagnostics: true,
|
|
32363
32305
|
affectsEmit: true,
|
|
32364
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32365
32306
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32366
32307
|
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
32367
32308
|
defaultValueDescription: false,
|
|
@@ -32385,7 +32326,6 @@ var ts;
|
|
|
32385
32326
|
type: "string",
|
|
32386
32327
|
affectsSemanticDiagnostics: true,
|
|
32387
32328
|
affectsEmit: true,
|
|
32388
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32389
32329
|
affectsModuleResolution: true,
|
|
32390
32330
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32391
32331
|
description: ts.Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
|
|
@@ -32403,9 +32343,6 @@ var ts;
|
|
|
32403
32343
|
name: "out",
|
|
32404
32344
|
type: "string",
|
|
32405
32345
|
affectsEmit: true,
|
|
32406
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32407
|
-
affectsDeclarationPath: true,
|
|
32408
|
-
affectsBundleEmitBuildInfo: true,
|
|
32409
32346
|
isFilePath: false,
|
|
32410
32347
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32411
32348
|
paramType: ts.Diagnostics.FILE,
|
|
@@ -32416,7 +32353,6 @@ var ts;
|
|
|
32416
32353
|
name: "reactNamespace",
|
|
32417
32354
|
type: "string",
|
|
32418
32355
|
affectsEmit: true,
|
|
32419
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32420
32356
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32421
32357
|
description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,
|
|
32422
32358
|
defaultValueDescription: "`React`",
|
|
@@ -32424,7 +32360,6 @@ var ts;
|
|
|
32424
32360
|
{
|
|
32425
32361
|
name: "skipDefaultLibCheck",
|
|
32426
32362
|
type: "boolean",
|
|
32427
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32428
32363
|
category: ts.Diagnostics.Completeness,
|
|
32429
32364
|
description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
|
|
32430
32365
|
defaultValueDescription: false,
|
|
@@ -32440,7 +32375,6 @@ var ts;
|
|
|
32440
32375
|
name: "emitBOM",
|
|
32441
32376
|
type: "boolean",
|
|
32442
32377
|
affectsEmit: true,
|
|
32443
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32444
32378
|
category: ts.Diagnostics.Emit,
|
|
32445
32379
|
description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
|
|
32446
32380
|
defaultValueDescription: false,
|
|
@@ -32452,7 +32386,6 @@ var ts;
|
|
|
32452
32386
|
lf: 1
|
|
32453
32387
|
})),
|
|
32454
32388
|
affectsEmit: true,
|
|
32455
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32456
32389
|
paramType: ts.Diagnostics.NEWLINE,
|
|
32457
32390
|
category: ts.Diagnostics.Emit,
|
|
32458
32391
|
description: ts.Diagnostics.Set_the_newline_character_for_emitting_files,
|
|
@@ -32462,7 +32395,6 @@ var ts;
|
|
|
32462
32395
|
name: "noErrorTruncation",
|
|
32463
32396
|
type: "boolean",
|
|
32464
32397
|
affectsSemanticDiagnostics: true,
|
|
32465
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32466
32398
|
category: ts.Diagnostics.Output_Formatting,
|
|
32467
32399
|
description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
|
|
32468
32400
|
defaultValueDescription: false,
|
|
@@ -32489,7 +32421,6 @@ var ts;
|
|
|
32489
32421
|
name: "stripInternal",
|
|
32490
32422
|
type: "boolean",
|
|
32491
32423
|
affectsEmit: true,
|
|
32492
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32493
32424
|
category: ts.Diagnostics.Emit,
|
|
32494
32425
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
32495
32426
|
defaultValueDescription: false,
|
|
@@ -32530,7 +32461,6 @@ var ts;
|
|
|
32530
32461
|
name: "noImplicitUseStrict",
|
|
32531
32462
|
type: "boolean",
|
|
32532
32463
|
affectsSemanticDiagnostics: true,
|
|
32533
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32534
32464
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32535
32465
|
description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
|
|
32536
32466
|
defaultValueDescription: false,
|
|
@@ -32539,7 +32469,6 @@ var ts;
|
|
|
32539
32469
|
name: "noEmitHelpers",
|
|
32540
32470
|
type: "boolean",
|
|
32541
32471
|
affectsEmit: true,
|
|
32542
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32543
32472
|
category: ts.Diagnostics.Emit,
|
|
32544
32473
|
description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
|
|
32545
32474
|
defaultValueDescription: false,
|
|
@@ -32548,7 +32477,6 @@ var ts;
|
|
|
32548
32477
|
name: "noEmitOnError",
|
|
32549
32478
|
type: "boolean",
|
|
32550
32479
|
affectsEmit: true,
|
|
32551
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32552
32480
|
category: ts.Diagnostics.Emit,
|
|
32553
32481
|
transpileOptionValue: undefined,
|
|
32554
32482
|
description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
|
|
@@ -32558,7 +32486,6 @@ var ts;
|
|
|
32558
32486
|
name: "preserveConstEnums",
|
|
32559
32487
|
type: "boolean",
|
|
32560
32488
|
affectsEmit: true,
|
|
32561
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32562
32489
|
category: ts.Diagnostics.Emit,
|
|
32563
32490
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
32564
32491
|
defaultValueDescription: false,
|
|
@@ -32567,8 +32494,6 @@ var ts;
|
|
|
32567
32494
|
name: "declarationDir",
|
|
32568
32495
|
type: "string",
|
|
32569
32496
|
affectsEmit: true,
|
|
32570
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32571
|
-
affectsDeclarationPath: true,
|
|
32572
32497
|
isFilePath: true,
|
|
32573
32498
|
paramType: ts.Diagnostics.DIRECTORY,
|
|
32574
32499
|
category: ts.Diagnostics.Emit,
|
|
@@ -32578,7 +32503,6 @@ var ts;
|
|
|
32578
32503
|
{
|
|
32579
32504
|
name: "skipLibCheck",
|
|
32580
32505
|
type: "boolean",
|
|
32581
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32582
32506
|
category: ts.Diagnostics.Completeness,
|
|
32583
32507
|
description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
|
|
32584
32508
|
defaultValueDescription: false,
|
|
@@ -32588,7 +32512,6 @@ var ts;
|
|
|
32588
32512
|
type: "boolean",
|
|
32589
32513
|
affectsBindDiagnostics: true,
|
|
32590
32514
|
affectsSemanticDiagnostics: true,
|
|
32591
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32592
32515
|
category: ts.Diagnostics.Type_Checking,
|
|
32593
32516
|
description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
|
|
32594
32517
|
defaultValueDescription: undefined,
|
|
@@ -32598,7 +32521,6 @@ var ts;
|
|
|
32598
32521
|
type: "boolean",
|
|
32599
32522
|
affectsBindDiagnostics: true,
|
|
32600
32523
|
affectsSemanticDiagnostics: true,
|
|
32601
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32602
32524
|
category: ts.Diagnostics.Type_Checking,
|
|
32603
32525
|
description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
|
|
32604
32526
|
defaultValueDescription: undefined,
|
|
@@ -32607,7 +32529,6 @@ var ts;
|
|
|
32607
32529
|
name: "suppressExcessPropertyErrors",
|
|
32608
32530
|
type: "boolean",
|
|
32609
32531
|
affectsSemanticDiagnostics: true,
|
|
32610
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32611
32532
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32612
32533
|
description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
|
|
32613
32534
|
defaultValueDescription: false,
|
|
@@ -32616,7 +32537,6 @@ var ts;
|
|
|
32616
32537
|
name: "suppressImplicitAnyIndexErrors",
|
|
32617
32538
|
type: "boolean",
|
|
32618
32539
|
affectsSemanticDiagnostics: true,
|
|
32619
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32620
32540
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32621
32541
|
description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
|
|
32622
32542
|
defaultValueDescription: false,
|
|
@@ -32641,7 +32561,6 @@ var ts;
|
|
|
32641
32561
|
name: "noStrictGenericChecks",
|
|
32642
32562
|
type: "boolean",
|
|
32643
32563
|
affectsSemanticDiagnostics: true,
|
|
32644
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32645
32564
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
32646
32565
|
description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
|
|
32647
32566
|
defaultValueDescription: false,
|
|
@@ -32651,7 +32570,6 @@ var ts;
|
|
|
32651
32570
|
type: "boolean",
|
|
32652
32571
|
affectsSemanticDiagnostics: true,
|
|
32653
32572
|
affectsEmit: true,
|
|
32654
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32655
32573
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32656
32574
|
description: ts.Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,
|
|
32657
32575
|
defaultValueDescription: ts.Diagnostics.true_for_ES2022_and_above_including_ESNext
|
|
@@ -32660,7 +32578,6 @@ var ts;
|
|
|
32660
32578
|
name: "preserveValueImports",
|
|
32661
32579
|
type: "boolean",
|
|
32662
32580
|
affectsEmit: true,
|
|
32663
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32664
32581
|
category: ts.Diagnostics.Emit,
|
|
32665
32582
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
32666
32583
|
defaultValueDescription: false,
|
|
@@ -32693,13 +32610,12 @@ var ts;
|
|
|
32693
32610
|
affectsModuleResolution: true,
|
|
32694
32611
|
description: ts.Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files,
|
|
32695
32612
|
category: ts.Diagnostics.Language_and_Environment,
|
|
32696
|
-
defaultValueDescription: ts.Diagnostics.
|
|
32613
|
+
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
32614
|
}
|
|
32698
32615
|
];
|
|
32699
32616
|
ts.optionDeclarations = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), commandOptionsWithoutBuild, true);
|
|
32700
32617
|
ts.semanticDiagnosticsOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsSemanticDiagnostics; });
|
|
32701
32618
|
ts.affectsEmitOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsEmit; });
|
|
32702
|
-
ts.affectsDeclarationPathOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsDeclarationPath; });
|
|
32703
32619
|
ts.moduleResolutionOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsModuleResolution; });
|
|
32704
32620
|
ts.sourceFileAffectingCompilerOptions = ts.optionDeclarations.filter(function (option) {
|
|
32705
32621
|
return !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics;
|
|
@@ -33479,7 +33395,6 @@ var ts;
|
|
|
33479
33395
|
}
|
|
33480
33396
|
});
|
|
33481
33397
|
}
|
|
33482
|
-
ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
|
|
33483
33398
|
function serializeCompilerOptions(options, pathOptions) {
|
|
33484
33399
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
33485
33400
|
}
|
|
@@ -34456,7 +34371,7 @@ var ts;
|
|
|
34456
34371
|
ts.Debug.assert(ts.extensionIsTS(resolved.extension));
|
|
34457
34372
|
return { fileName: resolved.path, packageId: resolved.packageId };
|
|
34458
34373
|
}
|
|
34459
|
-
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, resultFromCache) {
|
|
34374
|
+
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, diagnostics, resultFromCache) {
|
|
34460
34375
|
var _a;
|
|
34461
34376
|
if (resultFromCache) {
|
|
34462
34377
|
(_a = resultFromCache.failedLookupLocations).push.apply(_a, failedLookupLocations);
|
|
@@ -34464,7 +34379,8 @@ var ts;
|
|
|
34464
34379
|
}
|
|
34465
34380
|
return {
|
|
34466
34381
|
resolvedModule: resolved && { resolvedFileName: resolved.path, originalPath: resolved.originalPath === true ? undefined : resolved.originalPath, extension: resolved.extension, isExternalLibraryImport: isExternalLibraryImport, packageId: resolved.packageId },
|
|
34467
|
-
failedLookupLocations: failedLookupLocations
|
|
34382
|
+
failedLookupLocations: failedLookupLocations,
|
|
34383
|
+
resolutionDiagnostics: diagnostics
|
|
34468
34384
|
};
|
|
34469
34385
|
}
|
|
34470
34386
|
function readPackageJsonField(jsonContent, fieldName, typeOfTag, state) {
|
|
@@ -34641,11 +34557,22 @@ var ts;
|
|
|
34641
34557
|
}
|
|
34642
34558
|
var failedLookupLocations = [];
|
|
34643
34559
|
var features = getDefaultNodeResolutionFeatures(options);
|
|
34644
|
-
if (resolutionMode === ts.ModuleKind.ESNext && (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.
|
|
34560
|
+
if (resolutionMode === ts.ModuleKind.ESNext && (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext)) {
|
|
34645
34561
|
features |= NodeResolutionFeatures.EsmMode;
|
|
34646
34562
|
}
|
|
34647
34563
|
var conditions = features & NodeResolutionFeatures.Exports ? features & NodeResolutionFeatures.EsmMode ? ["node", "import", "types"] : ["node", "require", "types"] : [];
|
|
34648
|
-
var
|
|
34564
|
+
var diagnostics = [];
|
|
34565
|
+
var moduleResolutionState = {
|
|
34566
|
+
compilerOptions: options,
|
|
34567
|
+
host: host,
|
|
34568
|
+
traceEnabled: traceEnabled,
|
|
34569
|
+
failedLookupLocations: failedLookupLocations,
|
|
34570
|
+
packageJsonInfoCache: cache,
|
|
34571
|
+
features: features,
|
|
34572
|
+
conditions: conditions,
|
|
34573
|
+
requestContainingDirectory: containingDirectory,
|
|
34574
|
+
reportDiagnostic: function (diag) { return void diagnostics.push(diag); },
|
|
34575
|
+
};
|
|
34649
34576
|
var resolved = primaryLookup();
|
|
34650
34577
|
var primary = true;
|
|
34651
34578
|
if (!resolved) {
|
|
@@ -34664,7 +34591,7 @@ var ts;
|
|
|
34664
34591
|
isExternalLibraryImport: pathContainsNodeModules(fileName),
|
|
34665
34592
|
};
|
|
34666
34593
|
}
|
|
34667
|
-
result = { resolvedTypeReferenceDirective: resolvedTypeReferenceDirective, failedLookupLocations: failedLookupLocations };
|
|
34594
|
+
result = { resolvedTypeReferenceDirective: resolvedTypeReferenceDirective, failedLookupLocations: failedLookupLocations, resolutionDiagnostics: diagnostics };
|
|
34668
34595
|
perFolderCache === null || perFolderCache === void 0 ? void 0 : perFolderCache.set(typeReferenceDirectiveName, resolutionMode, result);
|
|
34669
34596
|
if (traceEnabled)
|
|
34670
34597
|
traceResult(result);
|
|
@@ -34728,7 +34655,7 @@ var ts;
|
|
|
34728
34655
|
}
|
|
34729
34656
|
ts.resolveTypeReferenceDirective = resolveTypeReferenceDirective;
|
|
34730
34657
|
function getDefaultNodeResolutionFeatures(options) {
|
|
34731
|
-
return ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.
|
|
34658
|
+
return ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node16 ? NodeResolutionFeatures.Node16Default :
|
|
34732
34659
|
ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext ? NodeResolutionFeatures.NodeNextDefault :
|
|
34733
34660
|
NodeResolutionFeatures.None;
|
|
34734
34661
|
}
|
|
@@ -34741,6 +34668,8 @@ var ts;
|
|
|
34741
34668
|
packageJsonInfoCache: cache === null || cache === void 0 ? void 0 : cache.getPackageJsonInfoCache(),
|
|
34742
34669
|
conditions: ts.emptyArray,
|
|
34743
34670
|
features: NodeResolutionFeatures.None,
|
|
34671
|
+
requestContainingDirectory: containingDirectory,
|
|
34672
|
+
reportDiagnostic: ts.noop
|
|
34744
34673
|
};
|
|
34745
34674
|
return ts.forEachAncestorDirectory(containingDirectory, function (ancestorDirectory) {
|
|
34746
34675
|
if (ts.getBaseFileName(ancestorDirectory) !== "node_modules") {
|
|
@@ -35041,8 +34970,8 @@ var ts;
|
|
|
35041
34970
|
case ts.ModuleKind.CommonJS:
|
|
35042
34971
|
moduleResolution = ts.ModuleResolutionKind.NodeJs;
|
|
35043
34972
|
break;
|
|
35044
|
-
case ts.ModuleKind.
|
|
35045
|
-
moduleResolution = ts.ModuleResolutionKind.
|
|
34973
|
+
case ts.ModuleKind.Node16:
|
|
34974
|
+
moduleResolution = ts.ModuleResolutionKind.Node16;
|
|
35046
34975
|
break;
|
|
35047
34976
|
case ts.ModuleKind.NodeNext:
|
|
35048
34977
|
moduleResolution = ts.ModuleResolutionKind.NodeNext;
|
|
@@ -35062,8 +34991,8 @@ var ts;
|
|
|
35062
34991
|
}
|
|
35063
34992
|
ts.perfLogger.logStartResolveModule(moduleName);
|
|
35064
34993
|
switch (moduleResolution) {
|
|
35065
|
-
case ts.ModuleResolutionKind.
|
|
35066
|
-
result =
|
|
34994
|
+
case ts.ModuleResolutionKind.Node16:
|
|
34995
|
+
result = node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
35067
34996
|
break;
|
|
35068
34997
|
case ts.ModuleResolutionKind.NodeNext:
|
|
35069
34998
|
result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
@@ -35221,12 +35150,12 @@ var ts;
|
|
|
35221
35150
|
NodeResolutionFeatures[NodeResolutionFeatures["Exports"] = 8] = "Exports";
|
|
35222
35151
|
NodeResolutionFeatures[NodeResolutionFeatures["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
|
|
35223
35152
|
NodeResolutionFeatures[NodeResolutionFeatures["AllFeatures"] = 30] = "AllFeatures";
|
|
35224
|
-
NodeResolutionFeatures[NodeResolutionFeatures["
|
|
35153
|
+
NodeResolutionFeatures[NodeResolutionFeatures["Node16Default"] = 30] = "Node16Default";
|
|
35225
35154
|
NodeResolutionFeatures[NodeResolutionFeatures["NodeNextDefault"] = 30] = "NodeNextDefault";
|
|
35226
35155
|
NodeResolutionFeatures[NodeResolutionFeatures["EsmMode"] = 32] = "EsmMode";
|
|
35227
35156
|
})(NodeResolutionFeatures || (NodeResolutionFeatures = {}));
|
|
35228
|
-
function
|
|
35229
|
-
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.
|
|
35157
|
+
function node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35158
|
+
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Node16Default, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
35230
35159
|
}
|
|
35231
35160
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35232
35161
|
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
@@ -35269,6 +35198,7 @@ var ts;
|
|
|
35269
35198
|
if (compilerOptions.noDtsResolution) {
|
|
35270
35199
|
conditions.pop();
|
|
35271
35200
|
}
|
|
35201
|
+
var diagnostics = [];
|
|
35272
35202
|
var state = {
|
|
35273
35203
|
compilerOptions: compilerOptions,
|
|
35274
35204
|
host: host,
|
|
@@ -35277,9 +35207,11 @@ var ts;
|
|
|
35277
35207
|
packageJsonInfoCache: cache,
|
|
35278
35208
|
features: features,
|
|
35279
35209
|
conditions: conditions,
|
|
35210
|
+
requestContainingDirectory: containingDirectory,
|
|
35211
|
+
reportDiagnostic: function (diag) { return void diagnostics.push(diag); },
|
|
35280
35212
|
};
|
|
35281
35213
|
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);
|
|
35214
|
+
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
35215
|
function tryResolve(extensions) {
|
|
35284
35216
|
var loader = function (extensions, candidate, onlyRecordFailures, state) { return nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, true); };
|
|
35285
35217
|
var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, state);
|
|
@@ -35421,9 +35353,9 @@ var ts;
|
|
|
35421
35353
|
}
|
|
35422
35354
|
}
|
|
35423
35355
|
function loadJSOrExactTSFileName(extensions, candidate, onlyRecordFailures, state) {
|
|
35424
|
-
if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && ts.
|
|
35356
|
+
if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && ts.fileExtensionIsOneOf(candidate, ts.supportedTSExtensionsFlat)) {
|
|
35425
35357
|
var result = tryFile(candidate, onlyRecordFailures, state);
|
|
35426
|
-
return result !== undefined ? { path: candidate, ext: ts.
|
|
35358
|
+
return result !== undefined ? { path: candidate, ext: ts.tryExtractTSExtension(candidate) } : undefined;
|
|
35427
35359
|
}
|
|
35428
35360
|
return loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state);
|
|
35429
35361
|
}
|
|
@@ -35540,6 +35472,8 @@ var ts;
|
|
|
35540
35472
|
packageJsonInfoCache: cache === null || cache === void 0 ? void 0 : cache.getPackageJsonInfoCache(),
|
|
35541
35473
|
conditions: ["node", "require", "types"],
|
|
35542
35474
|
features: features,
|
|
35475
|
+
requestContainingDirectory: packageJsonInfo.packageDirectory,
|
|
35476
|
+
reportDiagnostic: ts.noop
|
|
35543
35477
|
};
|
|
35544
35478
|
var requireResolution = loadNodeModuleFromDirectoryWorker(extensions, packageJsonInfo.packageDirectory, false, requireState, packageJsonInfo.packageJsonContent, packageJsonInfo.versionPaths);
|
|
35545
35479
|
entrypoints = ts.append(entrypoints, requireResolution === null || requireResolution === void 0 ? void 0 : requireResolution.path);
|
|
@@ -35619,6 +35553,8 @@ var ts;
|
|
|
35619
35553
|
packageJsonInfoCache: packageJsonInfoCache,
|
|
35620
35554
|
features: 0,
|
|
35621
35555
|
conditions: [],
|
|
35556
|
+
requestContainingDirectory: undefined,
|
|
35557
|
+
reportDiagnostic: ts.noop
|
|
35622
35558
|
};
|
|
35623
35559
|
var parts = ts.getPathComponents(fileName);
|
|
35624
35560
|
parts.pop();
|
|
@@ -35893,7 +35829,6 @@ var ts;
|
|
|
35893
35829
|
function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports) {
|
|
35894
35830
|
return loadModuleFromTargetImportOrExport;
|
|
35895
35831
|
function loadModuleFromTargetImportOrExport(target, subpath, pattern) {
|
|
35896
|
-
var _a, _b;
|
|
35897
35832
|
if (typeof target === "string") {
|
|
35898
35833
|
if (!pattern && subpath.length > 0 && !ts.endsWith(target, "/")) {
|
|
35899
35834
|
if (state.traceEnabled) {
|
|
@@ -35928,13 +35863,16 @@ var ts;
|
|
|
35928
35863
|
}
|
|
35929
35864
|
return toSearchResult(undefined);
|
|
35930
35865
|
}
|
|
35931
|
-
var finalPath =
|
|
35866
|
+
var finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath);
|
|
35867
|
+
var inputLink = tryLoadInputFileForPath(finalPath, subpath, ts.combinePaths(scope.packageDirectory, "package.json"), isImports);
|
|
35868
|
+
if (inputLink)
|
|
35869
|
+
return inputLink;
|
|
35932
35870
|
return toSearchResult(withPackageId(scope, loadJSOrExactTSFileName(extensions, finalPath, false, state)));
|
|
35933
35871
|
}
|
|
35934
35872
|
else if (typeof target === "object" && target !== null) {
|
|
35935
35873
|
if (!Array.isArray(target)) {
|
|
35936
|
-
for (var _i = 0,
|
|
35937
|
-
var key =
|
|
35874
|
+
for (var _i = 0, _a = ts.getOwnKeys(target); _i < _a.length; _i++) {
|
|
35875
|
+
var key = _a[_i];
|
|
35938
35876
|
if (key === "default" || state.conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(state.conditions, key)) {
|
|
35939
35877
|
var subTarget = target[key];
|
|
35940
35878
|
var result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern);
|
|
@@ -35952,8 +35890,8 @@ var ts;
|
|
|
35952
35890
|
}
|
|
35953
35891
|
return toSearchResult(undefined);
|
|
35954
35892
|
}
|
|
35955
|
-
for (var
|
|
35956
|
-
var elem = target_2[
|
|
35893
|
+
for (var _b = 0, target_2 = target; _b < target_2.length; _b++) {
|
|
35894
|
+
var elem = target_2[_b];
|
|
35957
35895
|
var result = loadModuleFromTargetImportOrExport(elem, subpath, pattern);
|
|
35958
35896
|
if (result) {
|
|
35959
35897
|
return result;
|
|
@@ -35971,6 +35909,94 @@ var ts;
|
|
|
35971
35909
|
trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
35972
35910
|
}
|
|
35973
35911
|
return toSearchResult(undefined);
|
|
35912
|
+
function toAbsolutePath(path) {
|
|
35913
|
+
var _a, _b;
|
|
35914
|
+
if (path === undefined)
|
|
35915
|
+
return path;
|
|
35916
|
+
return ts.hostGetCanonicalFileName({ useCaseSensitiveFileNames: useCaseSensitiveFileNames })(ts.getNormalizedAbsolutePath(path, (_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a)));
|
|
35917
|
+
}
|
|
35918
|
+
function combineDirectoryPath(root, dir) {
|
|
35919
|
+
return ts.ensureTrailingDirectorySeparator(ts.combinePaths(root, dir));
|
|
35920
|
+
}
|
|
35921
|
+
function useCaseSensitiveFileNames() {
|
|
35922
|
+
return !state.host.useCaseSensitiveFileNames ? true :
|
|
35923
|
+
typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames :
|
|
35924
|
+
state.host.useCaseSensitiveFileNames();
|
|
35925
|
+
}
|
|
35926
|
+
function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports) {
|
|
35927
|
+
var _a, _b, _c, _d;
|
|
35928
|
+
if ((extensions === Extensions.TypeScript || extensions === Extensions.JavaScript || extensions === Extensions.Json)
|
|
35929
|
+
&& (state.compilerOptions.declarationDir || state.compilerOptions.outDir)
|
|
35930
|
+
&& finalPath.indexOf("/node_modules/") === -1
|
|
35931
|
+
&& (state.compilerOptions.configFile ? ts.startsWith(toAbsolutePath(state.compilerOptions.configFile.fileName), scope.packageDirectory) : true)) {
|
|
35932
|
+
var getCanonicalFileName = ts.hostGetCanonicalFileName({ useCaseSensitiveFileNames: useCaseSensitiveFileNames });
|
|
35933
|
+
var commonSourceDirGuesses = [];
|
|
35934
|
+
if (state.compilerOptions.rootDir || (state.compilerOptions.composite && state.compilerOptions.configFilePath)) {
|
|
35935
|
+
var commonDir = toAbsolutePath(ts.getCommonSourceDirectory(state.compilerOptions, function () { return []; }, ((_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a)) || "", getCanonicalFileName));
|
|
35936
|
+
commonSourceDirGuesses.push(commonDir);
|
|
35937
|
+
}
|
|
35938
|
+
else if (state.requestContainingDirectory) {
|
|
35939
|
+
var requestingFile_1 = toAbsolutePath(ts.combinePaths(state.requestContainingDirectory, "index.ts"));
|
|
35940
|
+
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));
|
|
35941
|
+
commonSourceDirGuesses.push(commonDir);
|
|
35942
|
+
var fragment = ts.ensureTrailingDirectorySeparator(commonDir);
|
|
35943
|
+
while (fragment && fragment.length > 1) {
|
|
35944
|
+
var parts = ts.getPathComponents(fragment);
|
|
35945
|
+
parts.pop();
|
|
35946
|
+
var commonDir_1 = ts.getPathFromPathComponents(parts);
|
|
35947
|
+
commonSourceDirGuesses.unshift(commonDir_1);
|
|
35948
|
+
fragment = ts.ensureTrailingDirectorySeparator(commonDir_1);
|
|
35949
|
+
}
|
|
35950
|
+
}
|
|
35951
|
+
if (commonSourceDirGuesses.length > 1) {
|
|
35952
|
+
state.reportDiagnostic(ts.createCompilerDiagnostic(isImports
|
|
35953
|
+
? 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
|
|
35954
|
+
: 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));
|
|
35955
|
+
}
|
|
35956
|
+
for (var _i = 0, commonSourceDirGuesses_1 = commonSourceDirGuesses; _i < commonSourceDirGuesses_1.length; _i++) {
|
|
35957
|
+
var commonSourceDirGuess = commonSourceDirGuesses_1[_i];
|
|
35958
|
+
var candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess);
|
|
35959
|
+
for (var _e = 0, candidateDirectories_1 = candidateDirectories; _e < candidateDirectories_1.length; _e++) {
|
|
35960
|
+
var candidateDir = candidateDirectories_1[_e];
|
|
35961
|
+
if (ts.startsWith(finalPath, candidateDir)) {
|
|
35962
|
+
var pathFragment = finalPath.slice(candidateDir.length + 1);
|
|
35963
|
+
var possibleInputBase = ts.combinePaths(commonSourceDirGuess, pathFragment);
|
|
35964
|
+
var jsAndDtsExtensions = [".mjs", ".cjs", ".js", ".json", ".d.mts", ".d.cts", ".d.ts"];
|
|
35965
|
+
for (var _f = 0, jsAndDtsExtensions_1 = jsAndDtsExtensions; _f < jsAndDtsExtensions_1.length; _f++) {
|
|
35966
|
+
var ext = jsAndDtsExtensions_1[_f];
|
|
35967
|
+
if (ts.fileExtensionIs(possibleInputBase, ext)) {
|
|
35968
|
+
var inputExts = ts.getPossibleOriginalInputExtensionForExtension(possibleInputBase);
|
|
35969
|
+
for (var _g = 0, inputExts_1 = inputExts; _g < inputExts_1.length; _g++) {
|
|
35970
|
+
var possibleExt = inputExts_1[_g];
|
|
35971
|
+
var possibleInputWithInputExtension = ts.changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames());
|
|
35972
|
+
if ((extensions === Extensions.TypeScript && ts.hasJSFileExtension(possibleInputWithInputExtension)) ||
|
|
35973
|
+
(extensions === Extensions.JavaScript && ts.hasTSFileExtension(possibleInputWithInputExtension))) {
|
|
35974
|
+
continue;
|
|
35975
|
+
}
|
|
35976
|
+
if (state.host.fileExists(possibleInputWithInputExtension)) {
|
|
35977
|
+
return toSearchResult(withPackageId(scope, loadJSOrExactTSFileName(extensions, possibleInputWithInputExtension, false, state)));
|
|
35978
|
+
}
|
|
35979
|
+
}
|
|
35980
|
+
}
|
|
35981
|
+
}
|
|
35982
|
+
}
|
|
35983
|
+
}
|
|
35984
|
+
}
|
|
35985
|
+
}
|
|
35986
|
+
return undefined;
|
|
35987
|
+
function getOutputDirectoriesForBaseDirectory(commonSourceDirGuess) {
|
|
35988
|
+
var _a, _b;
|
|
35989
|
+
var currentDir = state.compilerOptions.configFile ? ((_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a)) || "" : commonSourceDirGuess;
|
|
35990
|
+
var candidateDirectories = [];
|
|
35991
|
+
if (state.compilerOptions.declarationDir) {
|
|
35992
|
+
candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.declarationDir)));
|
|
35993
|
+
}
|
|
35994
|
+
if (state.compilerOptions.outDir && state.compilerOptions.outDir !== state.compilerOptions.declarationDir) {
|
|
35995
|
+
candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.outDir)));
|
|
35996
|
+
}
|
|
35997
|
+
return candidateDirectories;
|
|
35998
|
+
}
|
|
35999
|
+
}
|
|
35974
36000
|
}
|
|
35975
36001
|
}
|
|
35976
36002
|
function isApplicableVersionedTypesKey(conditions, key) {
|
|
@@ -36145,10 +36171,11 @@ var ts;
|
|
|
36145
36171
|
function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
|
|
36146
36172
|
var traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
36147
36173
|
var failedLookupLocations = [];
|
|
36148
|
-
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.None, conditions: [] };
|
|
36149
36174
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
36175
|
+
var diagnostics = [];
|
|
36176
|
+
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
36177
|
var resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
|
|
36151
|
-
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, false, failedLookupLocations, state.resultFromCache);
|
|
36178
|
+
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, false, failedLookupLocations, diagnostics, state.resultFromCache);
|
|
36152
36179
|
function tryResolve(extensions) {
|
|
36153
36180
|
var resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, state);
|
|
36154
36181
|
if (resolvedUsingSettings) {
|
|
@@ -36184,9 +36211,10 @@ var ts;
|
|
|
36184
36211
|
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
36212
|
}
|
|
36186
36213
|
var failedLookupLocations = [];
|
|
36187
|
-
var
|
|
36214
|
+
var diagnostics = [];
|
|
36215
|
+
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
36216
|
var resolved = loadModuleFromImmediateNodeModulesDirectory(Extensions.DtsOnly, moduleName, globalCache, state, false, undefined, undefined);
|
|
36189
|
-
return createResolvedModuleWithFailedLookupLocations(resolved, true, failedLookupLocations, state.resultFromCache);
|
|
36217
|
+
return createResolvedModuleWithFailedLookupLocations(resolved, true, failedLookupLocations, diagnostics, state.resultFromCache);
|
|
36190
36218
|
}
|
|
36191
36219
|
ts.loadModuleFromGlobalCache = loadModuleFromGlobalCache;
|
|
36192
36220
|
function toSearchResult(value) {
|
|
@@ -41797,16 +41825,13 @@ var ts;
|
|
|
41797
41825
|
if (resolvedModule.isExternalLibraryImport && !ts.resolutionExtensionIsTSOrJson(resolvedModule.extension)) {
|
|
41798
41826
|
errorOnImplicitAnyModule(false, errorNode, resolvedModule, moduleReference);
|
|
41799
41827
|
}
|
|
41800
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.
|
|
41828
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
41801
41829
|
var isSyncImport = (currentSourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS && !ts.findAncestor(location, ts.isImportCall)) || !!ts.findAncestor(location, ts.isImportEqualsDeclaration);
|
|
41802
41830
|
var overrideClauseHost = ts.findAncestor(location, function (l) { return ts.isImportTypeNode(l) || ts.isExportDeclaration(l) || ts.isImportDeclaration(l); });
|
|
41803
41831
|
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
41832
|
if (isSyncImport && sourceFile.impliedNodeFormat === ts.ModuleKind.ESNext && !ts.getResolutionModeOverrideForClause(overrideClause)) {
|
|
41805
41833
|
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
41834
|
}
|
|
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
41835
|
}
|
|
41811
41836
|
return getMergedSymbol(sourceFile.symbol);
|
|
41812
41837
|
}
|
|
@@ -41850,7 +41875,7 @@ var ts;
|
|
|
41850
41875
|
var tsExtension = ts.tryExtractTSExtension(moduleReference);
|
|
41851
41876
|
var isExtensionlessRelativePathImport = ts.pathIsRelative(moduleReference) && !ts.hasExtension(moduleReference);
|
|
41852
41877
|
var moduleResolutionKind = ts.getEmitModuleResolutionKind(compilerOptions);
|
|
41853
|
-
var
|
|
41878
|
+
var resolutionIsNode16OrNext = moduleResolutionKind === ts.ModuleResolutionKind.Node16 ||
|
|
41854
41879
|
moduleResolutionKind === ts.ModuleResolutionKind.NodeNext;
|
|
41855
41880
|
if (tsExtension) {
|
|
41856
41881
|
var diag = ts.Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead;
|
|
@@ -41867,17 +41892,17 @@ var ts;
|
|
|
41867
41892
|
ts.hasJsonModuleEmitEnabled(compilerOptions)) {
|
|
41868
41893
|
error(errorNode, ts.Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
|
|
41869
41894
|
}
|
|
41870
|
-
else if (mode === ts.ModuleKind.ESNext &&
|
|
41895
|
+
else if (mode === ts.ModuleKind.ESNext && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) {
|
|
41871
41896
|
var absoluteRef_1 = ts.getNormalizedAbsolutePath(moduleReference, ts.getDirectoryPath(currentSourceFile.path));
|
|
41872
41897
|
var suggestedExt = (_h = suggestedExtensions.find(function (_a) {
|
|
41873
41898
|
var actualExt = _a[0], _importExt = _a[1];
|
|
41874
41899
|
return host.fileExists(absoluteRef_1 + actualExt);
|
|
41875
41900
|
})) === null || _h === void 0 ? void 0 : _h[1];
|
|
41876
41901
|
if (suggestedExt) {
|
|
41877
|
-
error(errorNode, ts.Diagnostics.
|
|
41902
|
+
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
41903
|
}
|
|
41879
41904
|
else {
|
|
41880
|
-
error(errorNode, ts.Diagnostics.
|
|
41905
|
+
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
41906
|
}
|
|
41882
41907
|
}
|
|
41883
41908
|
else {
|
|
@@ -43974,7 +43999,7 @@ var ts;
|
|
|
43974
43999
|
var targetFile = ts.getSourceFileOfModule(chain[0]);
|
|
43975
44000
|
var specifier = void 0;
|
|
43976
44001
|
var assertion = void 0;
|
|
43977
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.
|
|
44002
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
43978
44003
|
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
44004
|
specifier = getSpecifierForModuleSymbol(chain[0], context, ts.ModuleKind.ESNext);
|
|
43980
44005
|
assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
|
|
@@ -43987,7 +44012,7 @@ var ts;
|
|
|
43987
44012
|
}
|
|
43988
44013
|
if (!(context.flags & 67108864) && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Classic && specifier.indexOf("/node_modules/") >= 0) {
|
|
43989
44014
|
var oldSpecifier = specifier;
|
|
43990
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.
|
|
44015
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
43991
44016
|
var swappedMode = (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat) === ts.ModuleKind.ESNext ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
|
|
43992
44017
|
specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode);
|
|
43993
44018
|
if (specifier.indexOf("/node_modules/") >= 0) {
|
|
@@ -48031,7 +48056,8 @@ var ts;
|
|
|
48031
48056
|
if (symbol === globalThisSymbol) {
|
|
48032
48057
|
var varsOnly_1 = new ts.Map();
|
|
48033
48058
|
members.forEach(function (p) {
|
|
48034
|
-
|
|
48059
|
+
var _a;
|
|
48060
|
+
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
48061
|
varsOnly_1.set(p.escapedName, p);
|
|
48036
48062
|
}
|
|
48037
48063
|
});
|
|
@@ -53965,7 +53991,6 @@ var ts;
|
|
|
53965
53991
|
return 0;
|
|
53966
53992
|
}
|
|
53967
53993
|
function reportErrorResults(originalSource, originalTarget, source, target, headMessage) {
|
|
53968
|
-
var _a, _b;
|
|
53969
53994
|
var sourceHasBase = !!getSingleBaseForNonAugmentingSubtype(originalSource);
|
|
53970
53995
|
var targetHasBase = !!getSingleBaseForNonAugmentingSubtype(originalTarget);
|
|
53971
53996
|
source = (originalSource.aliasSymbol || sourceHasBase) ? originalSource : source;
|
|
@@ -54004,9 +54029,6 @@ var ts;
|
|
|
54004
54029
|
return;
|
|
54005
54030
|
}
|
|
54006
54031
|
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
54032
|
}
|
|
54011
54033
|
function traceUnionsOrIntersectionsTooLarge(source, target) {
|
|
54012
54034
|
if (!ts.tracing) {
|
|
@@ -54636,17 +54658,17 @@ var ts;
|
|
|
54636
54658
|
if (sourceFlags & 8650752) {
|
|
54637
54659
|
if (!(sourceFlags & 8388608 && targetFlags & 8388608)) {
|
|
54638
54660
|
var constraint = getConstraintOfType(source);
|
|
54639
|
-
if (!
|
|
54661
|
+
if (!constraint || (sourceFlags & 262144 && constraint.flags & 1)) {
|
|
54640
54662
|
if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864), 3)) {
|
|
54641
54663
|
resetErrorInfo(saveErrorInfo);
|
|
54642
54664
|
return result;
|
|
54643
54665
|
}
|
|
54644
54666
|
}
|
|
54645
|
-
else if (
|
|
54667
|
+
else if (result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState)) {
|
|
54646
54668
|
resetErrorInfo(saveErrorInfo);
|
|
54647
54669
|
return result;
|
|
54648
54670
|
}
|
|
54649
|
-
else if (
|
|
54671
|
+
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1, reportErrors && !(targetFlags & sourceFlags & 262144), undefined, intersectionState)) {
|
|
54650
54672
|
resetErrorInfo(saveErrorInfo);
|
|
54651
54673
|
return result;
|
|
54652
54674
|
}
|
|
@@ -59541,7 +59563,7 @@ var ts;
|
|
|
59541
59563
|
if (ts.isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
|
|
59542
59564
|
var parent = declaration.parent.parent;
|
|
59543
59565
|
if (parent.kind === 254 && ts.getCombinedNodeFlags(declaration) & 2 || parent.kind === 164) {
|
|
59544
|
-
var links = getNodeLinks(
|
|
59566
|
+
var links = getNodeLinks(parent);
|
|
59545
59567
|
if (!(links.flags & 268435456)) {
|
|
59546
59568
|
links.flags |= 268435456;
|
|
59547
59569
|
var parentType = getTypeForBindingElementParent(parent, 0);
|
|
@@ -64510,13 +64532,13 @@ var ts;
|
|
|
64510
64532
|
}
|
|
64511
64533
|
}
|
|
64512
64534
|
function checkImportMetaProperty(node) {
|
|
64513
|
-
if (moduleKind === ts.ModuleKind.
|
|
64535
|
+
if (moduleKind === ts.ModuleKind.Node16 || moduleKind === ts.ModuleKind.NodeNext) {
|
|
64514
64536
|
if (ts.getSourceFileOfNode(node).impliedNodeFormat !== ts.ModuleKind.ESNext) {
|
|
64515
64537
|
error(node, ts.Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output);
|
|
64516
64538
|
}
|
|
64517
64539
|
}
|
|
64518
64540
|
else if (moduleKind < ts.ModuleKind.ES2020 && moduleKind !== ts.ModuleKind.System) {
|
|
64519
|
-
error(node, ts.Diagnostics.
|
|
64541
|
+
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
64542
|
}
|
|
64521
64543
|
var file = ts.getSourceFileOfNode(node);
|
|
64522
64544
|
ts.Debug.assert(!!(file.flags & 4194304), "Containing file is missing import meta node flag.");
|
|
@@ -65348,15 +65370,28 @@ var ts;
|
|
|
65348
65370
|
if (!hasParseDiagnostics(sourceFile)) {
|
|
65349
65371
|
var span = void 0;
|
|
65350
65372
|
if (!ts.isEffectiveExternalModule(sourceFile, compilerOptions)) {
|
|
65351
|
-
|
|
65352
|
-
span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos);
|
|
65373
|
+
span !== null && span !== void 0 ? span : (span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos));
|
|
65353
65374
|
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
65375
|
diagnostics.add(diagnostic);
|
|
65355
65376
|
}
|
|
65356
|
-
|
|
65357
|
-
|
|
65358
|
-
|
|
65359
|
-
|
|
65377
|
+
switch (moduleKind) {
|
|
65378
|
+
case ts.ModuleKind.Node16:
|
|
65379
|
+
case ts.ModuleKind.NodeNext:
|
|
65380
|
+
if (sourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS) {
|
|
65381
|
+
span !== null && span !== void 0 ? span : (span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos));
|
|
65382
|
+
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));
|
|
65383
|
+
break;
|
|
65384
|
+
}
|
|
65385
|
+
case ts.ModuleKind.ES2022:
|
|
65386
|
+
case ts.ModuleKind.ESNext:
|
|
65387
|
+
case ts.ModuleKind.System:
|
|
65388
|
+
if (languageVersion >= 4) {
|
|
65389
|
+
break;
|
|
65390
|
+
}
|
|
65391
|
+
default:
|
|
65392
|
+
span !== null && span !== void 0 ? span : (span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos));
|
|
65393
|
+
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));
|
|
65394
|
+
break;
|
|
65360
65395
|
}
|
|
65361
65396
|
}
|
|
65362
65397
|
}
|
|
@@ -67557,8 +67592,8 @@ var ts;
|
|
|
67557
67592
|
if (node.assertions) {
|
|
67558
67593
|
var override = ts.getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode);
|
|
67559
67594
|
if (override) {
|
|
67560
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.
|
|
67561
|
-
grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.
|
|
67595
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
67596
|
+
grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
|
|
67562
67597
|
}
|
|
67563
67598
|
}
|
|
67564
67599
|
}
|
|
@@ -68727,7 +68762,7 @@ var ts;
|
|
|
68727
68762
|
});
|
|
68728
68763
|
}
|
|
68729
68764
|
function checkCollisionWithRequireExportsInGeneratedCode(node, name) {
|
|
68730
|
-
if (moduleKind >= ts.ModuleKind.ES2015 && !(moduleKind >= ts.ModuleKind.
|
|
68765
|
+
if (moduleKind >= ts.ModuleKind.ES2015 && !(moduleKind >= ts.ModuleKind.Node16 && ts.getSourceFileOfNode(node).impliedNodeFormat === ts.ModuleKind.CommonJS)) {
|
|
68731
68766
|
return;
|
|
68732
68767
|
}
|
|
68733
68768
|
if (!name || !needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) {
|
|
@@ -69331,7 +69366,7 @@ var ts;
|
|
|
69331
69366
|
}
|
|
69332
69367
|
var yieldType = getIterationTypeOfIterable(use, 0, inputType, undefined);
|
|
69333
69368
|
if (yieldType) {
|
|
69334
|
-
return [ts.Diagnostics.
|
|
69369
|
+
return [ts.Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, false];
|
|
69335
69370
|
}
|
|
69336
69371
|
if (isES2015OrLaterIterable((_a = inputType.symbol) === null || _a === void 0 ? void 0 : _a.escapedName)) {
|
|
69337
69372
|
return [ts.Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, true];
|
|
@@ -71177,8 +71212,8 @@ var ts;
|
|
|
71177
71212
|
var validForTypeAssertions = ts.isExclusivelyTypeOnlyImportOrExport(declaration);
|
|
71178
71213
|
var override = ts.getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : undefined);
|
|
71179
71214
|
if (validForTypeAssertions && override) {
|
|
71180
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.
|
|
71181
|
-
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.
|
|
71215
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
71216
|
+
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
|
|
71182
71217
|
}
|
|
71183
71218
|
return;
|
|
71184
71219
|
}
|
|
@@ -72161,7 +72196,7 @@ var ts;
|
|
|
72161
72196
|
var symbol = getIntrinsicTagSymbol(name.parent);
|
|
72162
72197
|
return symbol === unknownSymbol ? undefined : symbol;
|
|
72163
72198
|
}
|
|
72164
|
-
var result = resolveEntityName(name, meaning, false,
|
|
72199
|
+
var result = resolveEntityName(name, meaning, false, true, ts.getHostSignatureFromJSDoc(name));
|
|
72165
72200
|
if (!result && isJSDoc_1) {
|
|
72166
72201
|
var container = ts.findAncestor(name, ts.or(ts.isClassLike, ts.isInterfaceDeclaration));
|
|
72167
72202
|
if (container) {
|
|
@@ -72383,7 +72418,7 @@ var ts;
|
|
|
72383
72418
|
}
|
|
72384
72419
|
if (ts.isDeclaration(node)) {
|
|
72385
72420
|
var symbol = getSymbolOfNode(node);
|
|
72386
|
-
return getTypeOfSymbol(symbol);
|
|
72421
|
+
return symbol ? getTypeOfSymbol(symbol) : errorType;
|
|
72387
72422
|
}
|
|
72388
72423
|
if (isDeclarationNameOrImportPropertyName(node)) {
|
|
72389
72424
|
var symbol = getSymbolAtLocation(node);
|
|
@@ -73843,6 +73878,9 @@ var ts;
|
|
|
73843
73878
|
return ts.some(types, checkGrammarExpressionWithTypeArguments);
|
|
73844
73879
|
}
|
|
73845
73880
|
function checkGrammarExpressionWithTypeArguments(node) {
|
|
73881
|
+
if (ts.isExpressionWithTypeArguments(node) && ts.isImportKeyword(node.expression) && node.typeArguments) {
|
|
73882
|
+
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);
|
|
73883
|
+
}
|
|
73846
73884
|
return checkGrammarTypeArguments(node, node.typeArguments);
|
|
73847
73885
|
}
|
|
73848
73886
|
function checkGrammarClassDeclarationHeritageClauses(node) {
|
|
@@ -74067,8 +74105,22 @@ var ts;
|
|
|
74067
74105
|
if (!ts.isEffectiveExternalModule(sourceFile, compilerOptions)) {
|
|
74068
74106
|
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));
|
|
74069
74107
|
}
|
|
74070
|
-
|
|
74071
|
-
|
|
74108
|
+
switch (moduleKind) {
|
|
74109
|
+
case ts.ModuleKind.Node16:
|
|
74110
|
+
case ts.ModuleKind.NodeNext:
|
|
74111
|
+
if (sourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS) {
|
|
74112
|
+
diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level));
|
|
74113
|
+
break;
|
|
74114
|
+
}
|
|
74115
|
+
case ts.ModuleKind.ES2022:
|
|
74116
|
+
case ts.ModuleKind.ESNext:
|
|
74117
|
+
case ts.ModuleKind.System:
|
|
74118
|
+
if (languageVersion >= 4) {
|
|
74119
|
+
break;
|
|
74120
|
+
}
|
|
74121
|
+
default:
|
|
74122
|
+
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));
|
|
74123
|
+
break;
|
|
74072
74124
|
}
|
|
74073
74125
|
}
|
|
74074
74126
|
}
|
|
@@ -74700,17 +74752,17 @@ var ts;
|
|
|
74700
74752
|
}
|
|
74701
74753
|
function checkGrammarImportCallExpression(node) {
|
|
74702
74754
|
if (moduleKind === ts.ModuleKind.ES2015) {
|
|
74703
|
-
return grammarErrorOnNode(node, ts.Diagnostics.
|
|
74755
|
+
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);
|
|
74704
74756
|
}
|
|
74705
74757
|
if (node.typeArguments) {
|
|
74706
|
-
return grammarErrorOnNode(node, ts.Diagnostics.
|
|
74758
|
+
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);
|
|
74707
74759
|
}
|
|
74708
74760
|
var nodeArguments = node.arguments;
|
|
74709
74761
|
if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext) {
|
|
74710
74762
|
checkGrammarForDisallowedTrailingComma(nodeArguments);
|
|
74711
74763
|
if (nodeArguments.length > 1) {
|
|
74712
74764
|
var assertionArgument = nodeArguments[1];
|
|
74713
|
-
return grammarErrorOnNode(assertionArgument, ts.Diagnostics.
|
|
74765
|
+
return grammarErrorOnNode(assertionArgument, ts.Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext);
|
|
74714
74766
|
}
|
|
74715
74767
|
}
|
|
74716
74768
|
if (nodeArguments.length === 0 || nodeArguments.length > 2) {
|
|
@@ -89057,6 +89109,8 @@ var ts;
|
|
|
89057
89109
|
var varDecl = factory.createVariableDeclaration(newId, undefined, resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker), undefined);
|
|
89058
89110
|
errorFallbackNode = undefined;
|
|
89059
89111
|
var statement = factory.createVariableStatement(needsDeclare ? [factory.createModifier(135)] : [], factory.createVariableDeclarationList([varDecl], 2));
|
|
89112
|
+
preserveJsDoc(statement, input);
|
|
89113
|
+
ts.removeAllComments(input);
|
|
89060
89114
|
return [statement, factory.updateExportAssignment(input, input.decorators, input.modifiers, newId)];
|
|
89061
89115
|
}
|
|
89062
89116
|
}
|
|
@@ -89482,7 +89536,7 @@ var ts;
|
|
|
89482
89536
|
return ts.transformECMAScriptModule;
|
|
89483
89537
|
case ts.ModuleKind.System:
|
|
89484
89538
|
return ts.transformSystemModule;
|
|
89485
|
-
case ts.ModuleKind.
|
|
89539
|
+
case ts.ModuleKind.Node16:
|
|
89486
89540
|
case ts.ModuleKind.NodeNext:
|
|
89487
89541
|
return ts.transformNodeModule;
|
|
89488
89542
|
default:
|
|
@@ -90211,8 +90265,7 @@ var ts;
|
|
|
90211
90265
|
return;
|
|
90212
90266
|
}
|
|
90213
90267
|
var version = ts.version;
|
|
90214
|
-
|
|
90215
|
-
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, undefined, { buildInfo: buildInfo });
|
|
90268
|
+
ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText({ bundle: bundle, program: program, version: version }), false);
|
|
90216
90269
|
}
|
|
90217
90270
|
function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) {
|
|
90218
90271
|
if (!sourceFileOrBundle || emitOnlyDtsFiles || !jsFilePath) {
|
|
@@ -90353,17 +90406,12 @@ var ts;
|
|
|
90353
90406
|
if (sourceMapFilePath) {
|
|
90354
90407
|
var sourceMap = sourceMapGenerator.toString();
|
|
90355
90408
|
ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap, false, sourceFiles);
|
|
90356
|
-
if (printer.bundleFileInfo)
|
|
90357
|
-
printer.bundleFileInfo.mapHash = ts.BuilderState.computeSignature(sourceMap, ts.maybeBind(host, host.createHash));
|
|
90358
90409
|
}
|
|
90359
90410
|
}
|
|
90360
90411
|
else {
|
|
90361
90412
|
writer.writeLine();
|
|
90362
90413
|
}
|
|
90363
|
-
|
|
90364
|
-
ts.writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
|
|
90365
|
-
if (printer.bundleFileInfo)
|
|
90366
|
-
printer.bundleFileInfo.hash = ts.BuilderState.computeSignature(text, ts.maybeBind(host, host.createHash));
|
|
90414
|
+
ts.writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
|
|
90367
90415
|
writer.clear();
|
|
90368
90416
|
}
|
|
90369
90417
|
function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
|
|
@@ -90488,50 +90536,30 @@ var ts;
|
|
|
90488
90536
|
});
|
|
90489
90537
|
}
|
|
90490
90538
|
function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) {
|
|
90491
|
-
var createHash = ts.maybeBind(host, host.createHash);
|
|
90492
90539
|
var _a = getOutputPathsForBundle(config.options, false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath;
|
|
90493
|
-
var
|
|
90494
|
-
if (
|
|
90495
|
-
var hostBuildInfo = host.getBuildInfo(buildInfoPath, config.options.configFilePath);
|
|
90496
|
-
if (!hostBuildInfo)
|
|
90497
|
-
return buildInfoPath;
|
|
90498
|
-
buildInfo = hostBuildInfo;
|
|
90499
|
-
}
|
|
90500
|
-
else {
|
|
90501
|
-
var buildInfoText = host.readFile(buildInfoPath);
|
|
90502
|
-
if (!buildInfoText)
|
|
90503
|
-
return buildInfoPath;
|
|
90504
|
-
buildInfo = getBuildInfo(buildInfoText);
|
|
90505
|
-
}
|
|
90506
|
-
if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationFilePath && !buildInfo.bundle.dts))
|
|
90540
|
+
var buildInfoText = host.readFile(ts.Debug.checkDefined(buildInfoPath));
|
|
90541
|
+
if (!buildInfoText)
|
|
90507
90542
|
return buildInfoPath;
|
|
90508
90543
|
var jsFileText = host.readFile(ts.Debug.checkDefined(jsFilePath));
|
|
90509
90544
|
if (!jsFileText)
|
|
90510
90545
|
return jsFilePath;
|
|
90511
|
-
if (ts.BuilderState.computeSignature(jsFileText, createHash) !== buildInfo.bundle.js.hash)
|
|
90512
|
-
return jsFilePath;
|
|
90513
90546
|
var sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath);
|
|
90514
90547
|
if ((sourceMapFilePath && !sourceMapText) || config.options.inlineSourceMap)
|
|
90515
90548
|
return sourceMapFilePath || "inline sourcemap decoding";
|
|
90516
|
-
if (sourceMapFilePath && ts.BuilderState.computeSignature(sourceMapText, createHash) !== buildInfo.bundle.js.mapHash)
|
|
90517
|
-
return sourceMapFilePath;
|
|
90518
90549
|
var declarationText = declarationFilePath && host.readFile(declarationFilePath);
|
|
90519
90550
|
if (declarationFilePath && !declarationText)
|
|
90520
90551
|
return declarationFilePath;
|
|
90521
|
-
if (declarationFilePath && ts.BuilderState.computeSignature(declarationText, createHash) !== buildInfo.bundle.dts.hash)
|
|
90522
|
-
return declarationFilePath;
|
|
90523
90552
|
var declarationMapText = declarationMapPath && host.readFile(declarationMapPath);
|
|
90524
90553
|
if ((declarationMapPath && !declarationMapText) || config.options.inlineSourceMap)
|
|
90525
90554
|
return declarationMapPath || "inline sourcemap decoding";
|
|
90526
|
-
|
|
90527
|
-
|
|
90555
|
+
var buildInfo = getBuildInfo(buildInfoText);
|
|
90556
|
+
if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationText && !buildInfo.bundle.dts))
|
|
90557
|
+
return buildInfoPath;
|
|
90528
90558
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
90529
90559
|
var ownPrependInput = ts.createInputFiles(jsFileText, declarationText, sourceMapFilePath, sourceMapText, declarationMapPath, declarationMapText, jsFilePath, declarationFilePath, buildInfoPath, buildInfo, true);
|
|
90530
90560
|
var outputFiles = [];
|
|
90531
90561
|
var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); });
|
|
90532
90562
|
var sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle, buildInfoDirectory, host);
|
|
90533
|
-
var changedDtsText;
|
|
90534
|
-
var changedDtsData;
|
|
90535
90563
|
var emitHost = {
|
|
90536
90564
|
getPrependNodes: ts.memoize(function () { return __spreadArray(__spreadArray([], prependNodes, true), [ownPrependInput], false); }),
|
|
90537
90565
|
getCanonicalFileName: host.getCanonicalFileName,
|
|
@@ -90547,7 +90575,7 @@ var ts;
|
|
|
90547
90575
|
getResolvedProjectReferenceToRedirect: ts.returnUndefined,
|
|
90548
90576
|
getProjectReferenceRedirect: ts.returnUndefined,
|
|
90549
90577
|
isSourceOfProjectReferenceRedirect: ts.returnFalse,
|
|
90550
|
-
writeFile: function (name, text, writeByteOrderMark
|
|
90578
|
+
writeFile: function (name, text, writeByteOrderMark) {
|
|
90551
90579
|
switch (name) {
|
|
90552
90580
|
case jsFilePath:
|
|
90553
90581
|
if (jsFileText === text)
|
|
@@ -90558,25 +90586,19 @@ var ts;
|
|
|
90558
90586
|
return;
|
|
90559
90587
|
break;
|
|
90560
90588
|
case buildInfoPath:
|
|
90561
|
-
var newBuildInfo =
|
|
90589
|
+
var newBuildInfo = getBuildInfo(text);
|
|
90562
90590
|
newBuildInfo.program = buildInfo.program;
|
|
90563
|
-
if (newBuildInfo.program && changedDtsText !== undefined && config.options.composite) {
|
|
90564
|
-
newBuildInfo.program.outSignature = ts.computeSignature(changedDtsText, changedDtsData, createHash);
|
|
90565
|
-
newBuildInfo.program.dtsChangeTime = ts.getCurrentTime(host).getTime();
|
|
90566
|
-
}
|
|
90567
90591
|
var _a = buildInfo.bundle, js = _a.js, dts = _a.dts, sourceFiles = _a.sourceFiles;
|
|
90568
90592
|
newBuildInfo.bundle.js.sources = js.sources;
|
|
90569
90593
|
if (dts) {
|
|
90570
90594
|
newBuildInfo.bundle.dts.sources = dts.sources;
|
|
90571
90595
|
}
|
|
90572
90596
|
newBuildInfo.bundle.sourceFiles = sourceFiles;
|
|
90573
|
-
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark
|
|
90597
|
+
outputFiles.push({ name: name, text: getBuildInfoText(newBuildInfo), writeByteOrderMark: writeByteOrderMark });
|
|
90574
90598
|
return;
|
|
90575
90599
|
case declarationFilePath:
|
|
90576
90600
|
if (declarationText === text)
|
|
90577
90601
|
return;
|
|
90578
|
-
changedDtsText = text;
|
|
90579
|
-
changedDtsData = data;
|
|
90580
90602
|
break;
|
|
90581
90603
|
case declarationMapPath:
|
|
90582
90604
|
if (declarationMapText === text)
|
|
@@ -90595,7 +90617,6 @@ var ts;
|
|
|
90595
90617
|
getSourceFileFromReference: ts.returnUndefined,
|
|
90596
90618
|
redirectTargetsMap: ts.createMultiMap(),
|
|
90597
90619
|
getFileIncludeReasons: ts.notImplemented,
|
|
90598
|
-
createHash: createHash,
|
|
90599
90620
|
};
|
|
90600
90621
|
emitFiles(ts.notImplementedResolver, emitHost, undefined, ts.getTransformers(config.options, customTransformers));
|
|
90601
90622
|
return outputFiles;
|
|
@@ -95220,6 +95241,7 @@ var ts;
|
|
|
95220
95241
|
if (system === void 0) { system = ts.sys; }
|
|
95221
95242
|
var existingDirectories = new ts.Map();
|
|
95222
95243
|
var getCanonicalFileName = ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
95244
|
+
var computeHash = ts.maybeBind(system, system.createHash) || ts.generateDjb2Hash;
|
|
95223
95245
|
function getSourceFile(fileName, languageVersionOrOptions, onError) {
|
|
95224
95246
|
var text;
|
|
95225
95247
|
try {
|
|
@@ -95249,7 +95271,7 @@ var ts;
|
|
|
95249
95271
|
function writeFile(fileName, data, writeByteOrderMark, onError) {
|
|
95250
95272
|
try {
|
|
95251
95273
|
ts.performance.mark("beforeIOWrite");
|
|
95252
|
-
ts.writeFileEnsuringDirectories(fileName, data, writeByteOrderMark, function (path, data, writeByteOrderMark) { return
|
|
95274
|
+
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); });
|
|
95253
95275
|
ts.performance.mark("afterIOWrite");
|
|
95254
95276
|
ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite");
|
|
95255
95277
|
}
|
|
@@ -95259,6 +95281,34 @@ var ts;
|
|
|
95259
95281
|
}
|
|
95260
95282
|
}
|
|
95261
95283
|
}
|
|
95284
|
+
var outputFingerprints;
|
|
95285
|
+
function writeFileWorker(fileName, data, writeByteOrderMark) {
|
|
95286
|
+
if (!ts.isWatchSet(options) || !system.getModifiedTime) {
|
|
95287
|
+
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95288
|
+
return;
|
|
95289
|
+
}
|
|
95290
|
+
if (!outputFingerprints) {
|
|
95291
|
+
outputFingerprints = new ts.Map();
|
|
95292
|
+
}
|
|
95293
|
+
var hash = computeHash(data);
|
|
95294
|
+
var mtimeBefore = system.getModifiedTime(fileName);
|
|
95295
|
+
if (mtimeBefore) {
|
|
95296
|
+
var fingerprint = outputFingerprints.get(fileName);
|
|
95297
|
+
if (fingerprint &&
|
|
95298
|
+
fingerprint.byteOrderMark === writeByteOrderMark &&
|
|
95299
|
+
fingerprint.hash === hash &&
|
|
95300
|
+
fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
|
|
95301
|
+
return;
|
|
95302
|
+
}
|
|
95303
|
+
}
|
|
95304
|
+
system.writeFile(fileName, data, writeByteOrderMark);
|
|
95305
|
+
var mtimeAfter = system.getModifiedTime(fileName) || ts.missingFileModifiedTime;
|
|
95306
|
+
outputFingerprints.set(fileName, {
|
|
95307
|
+
hash: hash,
|
|
95308
|
+
byteOrderMark: writeByteOrderMark,
|
|
95309
|
+
mtime: mtimeAfter
|
|
95310
|
+
});
|
|
95311
|
+
}
|
|
95262
95312
|
function getDefaultLibLocation() {
|
|
95263
95313
|
return ts.getDirectoryPath(ts.normalizePath(system.getExecutingFilePath()));
|
|
95264
95314
|
}
|
|
@@ -95809,7 +95859,7 @@ var ts;
|
|
|
95809
95859
|
ts.getConfigFileParsingDiagnostics = getConfigFileParsingDiagnostics;
|
|
95810
95860
|
function getImpliedNodeFormatForFile(fileName, packageJsonInfoCache, host, options) {
|
|
95811
95861
|
switch (ts.getEmitModuleResolutionKind(options)) {
|
|
95812
|
-
case ts.ModuleResolutionKind.
|
|
95862
|
+
case ts.ModuleResolutionKind.Node16:
|
|
95813
95863
|
case ts.ModuleResolutionKind.NodeNext:
|
|
95814
95864
|
return ts.fileExtensionIsOneOf(fileName, [".d.mts", ".mts", ".mjs"]) ? ts.ModuleKind.ESNext :
|
|
95815
95865
|
ts.fileExtensionIsOneOf(fileName, [".d.cts", ".cts", ".cjs"]) ? ts.ModuleKind.CommonJS :
|
|
@@ -95860,7 +95910,6 @@ var ts;
|
|
|
95860
95910
|
ts.Diagnostics.A_rest_parameter_cannot_have_an_initializer.code,
|
|
95861
95911
|
ts.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list.code,
|
|
95862
95912
|
ts.Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code,
|
|
95863
|
-
ts.Diagnostics.A_return_statement_can_only_be_used_within_a_function_body.code,
|
|
95864
95913
|
ts.Diagnostics.A_return_statement_cannot_be_used_inside_a_class_static_block.code,
|
|
95865
95914
|
ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter.code,
|
|
95866
95915
|
ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter.code,
|
|
@@ -96199,6 +96248,34 @@ var ts;
|
|
|
96199
96248
|
ts.performance.measure("Program", "beforeProgram", "afterProgram");
|
|
96200
96249
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
96201
96250
|
return program;
|
|
96251
|
+
function addResolutionDiagnostics(list) {
|
|
96252
|
+
if (!list)
|
|
96253
|
+
return;
|
|
96254
|
+
for (var _i = 0, list_3 = list; _i < list_3.length; _i++) {
|
|
96255
|
+
var elem = list_3[_i];
|
|
96256
|
+
programDiagnostics.add(elem);
|
|
96257
|
+
}
|
|
96258
|
+
}
|
|
96259
|
+
function pullDiagnosticsFromCache(names, containingFile) {
|
|
96260
|
+
var _a;
|
|
96261
|
+
if (!moduleResolutionCache)
|
|
96262
|
+
return;
|
|
96263
|
+
var containingFileName = ts.getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory);
|
|
96264
|
+
var containingFileMode = !ts.isString(containingFile) ? containingFile.impliedNodeFormat : undefined;
|
|
96265
|
+
var containingDir = ts.getDirectoryPath(containingFileName);
|
|
96266
|
+
var redirectedReference = getRedirectReferenceForResolution(containingFile);
|
|
96267
|
+
var i = 0;
|
|
96268
|
+
for (var _i = 0, names_4 = names; _i < names_4.length; _i++) {
|
|
96269
|
+
var n = names_4[_i];
|
|
96270
|
+
var mode = typeof n === "string" ? getModeForResolutionAtIndex(containingFile, i) : getModeForFileReference(n, containingFileMode);
|
|
96271
|
+
var name = typeof n === "string" ? n : n.fileName;
|
|
96272
|
+
i++;
|
|
96273
|
+
if (ts.isExternalModuleNameRelative(name))
|
|
96274
|
+
continue;
|
|
96275
|
+
var diags = (_a = moduleResolutionCache.getOrCreateCacheForModuleName(name, mode, redirectedReference).get(containingDir)) === null || _a === void 0 ? void 0 : _a.resolutionDiagnostics;
|
|
96276
|
+
addResolutionDiagnostics(diags);
|
|
96277
|
+
}
|
|
96278
|
+
}
|
|
96202
96279
|
function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames) {
|
|
96203
96280
|
if (!moduleNames.length)
|
|
96204
96281
|
return ts.emptyArray;
|
|
@@ -96210,6 +96287,7 @@ var ts;
|
|
|
96210
96287
|
ts.performance.mark("afterResolveModule");
|
|
96211
96288
|
ts.performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule");
|
|
96212
96289
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
96290
|
+
pullDiagnosticsFromCache(moduleNames, containingFile);
|
|
96213
96291
|
return result;
|
|
96214
96292
|
}
|
|
96215
96293
|
function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile) {
|
|
@@ -96600,7 +96678,6 @@ var ts;
|
|
|
96600
96678
|
getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); },
|
|
96601
96679
|
redirectTargetsMap: redirectTargetsMap,
|
|
96602
96680
|
getFileIncludeReasons: program.getFileIncludeReasons,
|
|
96603
|
-
createHash: ts.maybeBind(host, host.createHash),
|
|
96604
96681
|
};
|
|
96605
96682
|
}
|
|
96606
96683
|
function writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
@@ -97499,8 +97576,8 @@ var ts;
|
|
|
97499
97576
|
var fileName = ts.toFileNameLowerCase(ref.fileName);
|
|
97500
97577
|
ts.setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective);
|
|
97501
97578
|
var mode = ref.resolutionMode || file.impliedNodeFormat;
|
|
97502
|
-
if (mode && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.
|
|
97503
|
-
programDiagnostics.add(ts.createDiagnosticForRange(file, ref, ts.Diagnostics.
|
|
97579
|
+
if (mode && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeNext) {
|
|
97580
|
+
programDiagnostics.add(ts.createDiagnosticForRange(file, ref, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext));
|
|
97504
97581
|
}
|
|
97505
97582
|
processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: ts.FileIncludeKind.TypeReferenceDirective, file: file.path, index: index, });
|
|
97506
97583
|
}
|
|
@@ -97833,7 +97910,7 @@ var ts;
|
|
|
97833
97910
|
}
|
|
97834
97911
|
if (options.resolveJsonModule) {
|
|
97835
97912
|
if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs &&
|
|
97836
|
-
ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.
|
|
97913
|
+
ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Node16 &&
|
|
97837
97914
|
ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeNext) {
|
|
97838
97915
|
createDiagnosticForOptionName(ts.Diagnostics.Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy, "resolveJsonModule");
|
|
97839
97916
|
}
|
|
@@ -98507,9 +98584,13 @@ var ts;
|
|
|
98507
98584
|
function createManyToManyPathMap() {
|
|
98508
98585
|
function create(forward, reverse, deleted) {
|
|
98509
98586
|
var map = {
|
|
98587
|
+
clone: function () { return create(new ts.Map(forward), new ts.Map(reverse), deleted && new ts.Set(deleted)); },
|
|
98588
|
+
forEach: function (fn) { return forward.forEach(fn); },
|
|
98510
98589
|
getKeys: function (v) { return reverse.get(v); },
|
|
98511
98590
|
getValues: function (k) { return forward.get(k); },
|
|
98591
|
+
hasKey: function (k) { return forward.has(k); },
|
|
98512
98592
|
keys: function () { return forward.keys(); },
|
|
98593
|
+
deletedKeys: function () { return deleted; },
|
|
98513
98594
|
deleteKey: function (k) {
|
|
98514
98595
|
(deleted || (deleted = new ts.Set())).add(k);
|
|
98515
98596
|
var set = forward.get(k);
|
|
@@ -98536,6 +98617,11 @@ var ts;
|
|
|
98536
98617
|
});
|
|
98537
98618
|
return map;
|
|
98538
98619
|
},
|
|
98620
|
+
clear: function () {
|
|
98621
|
+
forward.clear();
|
|
98622
|
+
reverse.clear();
|
|
98623
|
+
deleted === null || deleted === void 0 ? void 0 : deleted.clear();
|
|
98624
|
+
}
|
|
98539
98625
|
};
|
|
98540
98626
|
return map;
|
|
98541
98627
|
}
|
|
@@ -98639,45 +98725,35 @@ var ts;
|
|
|
98639
98725
|
}
|
|
98640
98726
|
BuilderState.canReuseOldState = canReuseOldState;
|
|
98641
98727
|
function create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
98642
|
-
var _a, _b, _c;
|
|
98643
98728
|
var fileInfos = new ts.Map();
|
|
98644
98729
|
var referencedMap = newProgram.getCompilerOptions().module !== ts.ModuleKind.None ? createManyToManyPathMap() : undefined;
|
|
98645
98730
|
var exportedModulesMap = referencedMap ? createManyToManyPathMap() : undefined;
|
|
98731
|
+
var hasCalledUpdateShapeSignature = new ts.Set();
|
|
98646
98732
|
var useOldState = canReuseOldState(referencedMap, oldState);
|
|
98647
98733
|
newProgram.getTypeChecker();
|
|
98648
|
-
for (var _i = 0,
|
|
98649
|
-
var sourceFile =
|
|
98734
|
+
for (var _i = 0, _a = newProgram.getSourceFiles(); _i < _a.length; _i++) {
|
|
98735
|
+
var sourceFile = _a[_i];
|
|
98650
98736
|
var version_2 = ts.Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set");
|
|
98651
|
-
var
|
|
98652
|
-
var signature = oldUncommitedSignature === undefined ?
|
|
98653
|
-
useOldState ? (_b = oldState.fileInfos.get(sourceFile.resolvedPath)) === null || _b === void 0 ? void 0 : _b.signature : undefined :
|
|
98654
|
-
oldUncommitedSignature || undefined;
|
|
98737
|
+
var oldInfo = useOldState ? oldState.fileInfos.get(sourceFile.resolvedPath) : undefined;
|
|
98655
98738
|
if (referencedMap) {
|
|
98656
98739
|
var newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName);
|
|
98657
98740
|
if (newReferences) {
|
|
98658
98741
|
referencedMap.set(sourceFile.resolvedPath, newReferences);
|
|
98659
98742
|
}
|
|
98660
98743
|
if (useOldState) {
|
|
98661
|
-
var
|
|
98662
|
-
var exportedModules = oldUncommitedExportedModules === undefined ?
|
|
98663
|
-
oldState.exportedModulesMap.getValues(sourceFile.resolvedPath) :
|
|
98664
|
-
oldUncommitedExportedModules || undefined;
|
|
98744
|
+
var exportedModules = oldState.exportedModulesMap.getValues(sourceFile.resolvedPath);
|
|
98665
98745
|
if (exportedModules) {
|
|
98666
98746
|
exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
|
98667
98747
|
}
|
|
98668
98748
|
}
|
|
98669
98749
|
}
|
|
98670
|
-
fileInfos.set(sourceFile.resolvedPath, {
|
|
98671
|
-
version: version_2,
|
|
98672
|
-
signature: signature,
|
|
98673
|
-
affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined,
|
|
98674
|
-
impliedFormat: sourceFile.impliedNodeFormat
|
|
98675
|
-
});
|
|
98750
|
+
fileInfos.set(sourceFile.resolvedPath, { version: version_2, signature: oldInfo && oldInfo.signature, affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined, impliedFormat: sourceFile.impliedNodeFormat });
|
|
98676
98751
|
}
|
|
98677
98752
|
return {
|
|
98678
98753
|
fileInfos: fileInfos,
|
|
98679
98754
|
referencedMap: referencedMap,
|
|
98680
98755
|
exportedModulesMap: exportedModulesMap,
|
|
98756
|
+
hasCalledUpdateShapeSignature: hasCalledUpdateShapeSignature,
|
|
98681
98757
|
useFileVersionAsSignature: !disableUseFileVersionAsSignature && !useOldState
|
|
98682
98758
|
};
|
|
98683
98759
|
}
|
|
@@ -98687,36 +98763,52 @@ var ts;
|
|
|
98687
98763
|
state.allFileNames = undefined;
|
|
98688
98764
|
}
|
|
98689
98765
|
BuilderState.releaseCache = releaseCache;
|
|
98690
|
-
function
|
|
98766
|
+
function clone(state) {
|
|
98691
98767
|
var _a, _b;
|
|
98692
|
-
|
|
98693
|
-
|
|
98694
|
-
|
|
98695
|
-
|
|
98768
|
+
return {
|
|
98769
|
+
fileInfos: new ts.Map(state.fileInfos),
|
|
98770
|
+
referencedMap: (_a = state.referencedMap) === null || _a === void 0 ? void 0 : _a.clone(),
|
|
98771
|
+
exportedModulesMap: (_b = state.exportedModulesMap) === null || _b === void 0 ? void 0 : _b.clone(),
|
|
98772
|
+
hasCalledUpdateShapeSignature: new ts.Set(state.hasCalledUpdateShapeSignature),
|
|
98773
|
+
useFileVersionAsSignature: state.useFileVersionAsSignature,
|
|
98774
|
+
};
|
|
98696
98775
|
}
|
|
98697
|
-
BuilderState.
|
|
98698
|
-
function
|
|
98776
|
+
BuilderState.clone = clone;
|
|
98777
|
+
function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, computeHash, cacheToUpdateSignature, exportedModulesMapCache) {
|
|
98778
|
+
var signatureCache = cacheToUpdateSignature || new ts.Map();
|
|
98699
98779
|
var sourceFile = programOfThisState.getSourceFileByPath(path);
|
|
98700
98780
|
if (!sourceFile) {
|
|
98701
98781
|
return ts.emptyArray;
|
|
98702
98782
|
}
|
|
98703
|
-
if (!updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash)) {
|
|
98783
|
+
if (!updateShapeSignature(state, programOfThisState, sourceFile, signatureCache, cancellationToken, computeHash, exportedModulesMapCache)) {
|
|
98704
98784
|
return [sourceFile];
|
|
98705
98785
|
}
|
|
98706
|
-
|
|
98786
|
+
var result = (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, signatureCache, cancellationToken, computeHash, exportedModulesMapCache);
|
|
98787
|
+
if (!cacheToUpdateSignature) {
|
|
98788
|
+
updateSignaturesFromCache(state, signatureCache);
|
|
98789
|
+
}
|
|
98790
|
+
return result;
|
|
98791
|
+
}
|
|
98792
|
+
BuilderState.getFilesAffectedBy = getFilesAffectedBy;
|
|
98793
|
+
function updateSignaturesFromCache(state, signatureCache) {
|
|
98794
|
+
signatureCache.forEach(function (signature, path) { return updateSignatureOfFile(state, signature, path); });
|
|
98707
98795
|
}
|
|
98708
|
-
BuilderState.
|
|
98796
|
+
BuilderState.updateSignaturesFromCache = updateSignaturesFromCache;
|
|
98709
98797
|
function updateSignatureOfFile(state, signature, path) {
|
|
98710
98798
|
state.fileInfos.get(path).signature = signature;
|
|
98711
|
-
|
|
98799
|
+
state.hasCalledUpdateShapeSignature.add(path);
|
|
98712
98800
|
}
|
|
98713
98801
|
BuilderState.updateSignatureOfFile = updateSignatureOfFile;
|
|
98714
|
-
function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, computeHash, useFileVersionAsSignature) {
|
|
98715
|
-
var _a;
|
|
98802
|
+
function updateShapeSignature(state, programOfThisState, sourceFile, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache, useFileVersionAsSignature) {
|
|
98716
98803
|
if (useFileVersionAsSignature === void 0) { useFileVersionAsSignature = state.useFileVersionAsSignature; }
|
|
98717
|
-
|
|
98804
|
+
ts.Debug.assert(!!sourceFile);
|
|
98805
|
+
ts.Debug.assert(!exportedModulesMapCache || !!state.exportedModulesMap, "Compute visible to outside map only if visibleToOutsideReferencedMap present in the state");
|
|
98806
|
+
if (state.hasCalledUpdateShapeSignature.has(sourceFile.resolvedPath) || cacheToUpdateSignature.has(sourceFile.resolvedPath)) {
|
|
98718
98807
|
return false;
|
|
98808
|
+
}
|
|
98719
98809
|
var info = state.fileInfos.get(sourceFile.resolvedPath);
|
|
98810
|
+
if (!info)
|
|
98811
|
+
return ts.Debug.fail();
|
|
98720
98812
|
var prevSignature = info.signature;
|
|
98721
98813
|
var latestSignature;
|
|
98722
98814
|
if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) {
|
|
@@ -98724,50 +98816,40 @@ var ts;
|
|
|
98724
98816
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
98725
98817
|
if (firstDts_1) {
|
|
98726
98818
|
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; })); });
|
|
98727
|
-
latestSignature =
|
|
98728
|
-
if (latestSignature !== prevSignature) {
|
|
98729
|
-
updateExportedModules(
|
|
98819
|
+
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
98820
|
+
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
98821
|
+
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
98730
98822
|
}
|
|
98731
98823
|
}
|
|
98732
98824
|
}
|
|
98733
98825
|
if (latestSignature === undefined) {
|
|
98734
98826
|
latestSignature = sourceFile.version;
|
|
98735
|
-
if (
|
|
98736
|
-
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
98827
|
+
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
98737
98828
|
var references = state.referencedMap ? state.referencedMap.getValues(sourceFile.resolvedPath) : undefined;
|
|
98738
98829
|
if (references) {
|
|
98739
|
-
|
|
98830
|
+
exportedModulesMapCache.set(sourceFile.resolvedPath, references);
|
|
98740
98831
|
}
|
|
98741
98832
|
else {
|
|
98742
|
-
|
|
98833
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
98743
98834
|
}
|
|
98744
98835
|
}
|
|
98745
98836
|
}
|
|
98746
|
-
|
|
98747
|
-
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = new ts.Set())).add(sourceFile.resolvedPath);
|
|
98748
|
-
info.signature = latestSignature;
|
|
98837
|
+
cacheToUpdateSignature.set(sourceFile.resolvedPath, latestSignature);
|
|
98749
98838
|
return latestSignature !== prevSignature;
|
|
98750
98839
|
}
|
|
98751
98840
|
BuilderState.updateShapeSignature = updateShapeSignature;
|
|
98752
|
-
function
|
|
98753
|
-
return (computeHash || ts.generateDjb2Hash)(text);
|
|
98754
|
-
}
|
|
98755
|
-
BuilderState.computeSignature = computeSignature;
|
|
98756
|
-
function updateExportedModules(state, sourceFile, exportedModulesFromDeclarationEmit) {
|
|
98757
|
-
if (!state.exportedModulesMap)
|
|
98758
|
-
return;
|
|
98759
|
-
(state.oldExportedModulesMap || (state.oldExportedModulesMap = new ts.Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
98841
|
+
function updateExportedModules(sourceFile, exportedModulesFromDeclarationEmit, exportedModulesMapCache) {
|
|
98760
98842
|
if (!exportedModulesFromDeclarationEmit) {
|
|
98761
|
-
|
|
98843
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
98762
98844
|
return;
|
|
98763
98845
|
}
|
|
98764
98846
|
var exportedModules;
|
|
98765
98847
|
exportedModulesFromDeclarationEmit.forEach(function (symbol) { return addExportedModule(getReferencedFilesFromImportedModuleSymbol(symbol)); });
|
|
98766
98848
|
if (exportedModules) {
|
|
98767
|
-
|
|
98849
|
+
exportedModulesMapCache.set(sourceFile.resolvedPath, exportedModules);
|
|
98768
98850
|
}
|
|
98769
98851
|
else {
|
|
98770
|
-
|
|
98852
|
+
exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
|
|
98771
98853
|
}
|
|
98772
98854
|
function addExportedModule(exportedModulePaths) {
|
|
98773
98855
|
if (exportedModulePaths === null || exportedModulePaths === void 0 ? void 0 : exportedModulePaths.length) {
|
|
@@ -98779,6 +98861,15 @@ var ts;
|
|
|
98779
98861
|
}
|
|
98780
98862
|
}
|
|
98781
98863
|
BuilderState.updateExportedModules = updateExportedModules;
|
|
98864
|
+
function updateExportedFilesMapFromCache(state, exportedModulesMapCache) {
|
|
98865
|
+
var _a;
|
|
98866
|
+
if (exportedModulesMapCache) {
|
|
98867
|
+
ts.Debug.assert(!!state.exportedModulesMap);
|
|
98868
|
+
(_a = exportedModulesMapCache.deletedKeys()) === null || _a === void 0 ? void 0 : _a.forEach(function (path) { return state.exportedModulesMap.deleteKey(path); });
|
|
98869
|
+
exportedModulesMapCache.forEach(function (exportedModules, path) { return state.exportedModulesMap.set(path, exportedModules); });
|
|
98870
|
+
}
|
|
98871
|
+
}
|
|
98872
|
+
BuilderState.updateExportedFilesMapFromCache = updateExportedFilesMapFromCache;
|
|
98782
98873
|
function getAllDependencies(state, programOfThisState, sourceFile) {
|
|
98783
98874
|
var compilerOptions = programOfThisState.getCompilerOptions();
|
|
98784
98875
|
if (ts.outFile(compilerOptions)) {
|
|
@@ -98862,7 +98953,7 @@ var ts;
|
|
|
98862
98953
|
}
|
|
98863
98954
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
98864
98955
|
}
|
|
98865
|
-
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cancellationToken, computeHash) {
|
|
98956
|
+
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache) {
|
|
98866
98957
|
if (isFileAffectingGlobalScope(sourceFileWithUpdatedShape)) {
|
|
98867
98958
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
98868
98959
|
}
|
|
@@ -98878,7 +98969,7 @@ var ts;
|
|
|
98878
98969
|
if (!seenFileNamesMap.has(currentPath)) {
|
|
98879
98970
|
var currentSourceFile = programOfThisState.getSourceFileByPath(currentPath);
|
|
98880
98971
|
seenFileNamesMap.set(currentPath, currentSourceFile);
|
|
98881
|
-
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cancellationToken, computeHash)) {
|
|
98972
|
+
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache)) {
|
|
98882
98973
|
queue.push.apply(queue, getReferencedByPaths(state, currentSourceFile.resolvedPath));
|
|
98883
98974
|
}
|
|
98884
98975
|
}
|
|
@@ -98893,31 +98984,29 @@ var ts;
|
|
|
98893
98984
|
return map1 === map2 || map1 !== undefined && map2 !== undefined && map1.size === map2.size && !ts.forEachKey(map1, function (key) { return !map2.has(key); });
|
|
98894
98985
|
}
|
|
98895
98986
|
function createBuilderProgramState(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
|
|
98896
|
-
var _a, _b;
|
|
98897
98987
|
var state = ts.BuilderState.create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature);
|
|
98898
98988
|
state.program = newProgram;
|
|
98899
98989
|
var compilerOptions = newProgram.getCompilerOptions();
|
|
98900
98990
|
state.compilerOptions = compilerOptions;
|
|
98901
|
-
|
|
98902
|
-
if (!outFilePath) {
|
|
98991
|
+
if (!ts.outFile(compilerOptions)) {
|
|
98903
98992
|
state.semanticDiagnosticsPerFile = new ts.Map();
|
|
98904
98993
|
}
|
|
98905
|
-
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)) {
|
|
98906
|
-
state.outSignature = oldState === null || oldState === void 0 ? void 0 : oldState.outSignature;
|
|
98907
|
-
}
|
|
98908
98994
|
state.changedFilesSet = new ts.Set();
|
|
98909
|
-
state.dtsChangeTime = compilerOptions.composite ? oldState === null || oldState === void 0 ? void 0 : oldState.dtsChangeTime : undefined;
|
|
98910
98995
|
var useOldState = ts.BuilderState.canReuseOldState(state.referencedMap, oldState);
|
|
98911
98996
|
var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
|
|
98912
98997
|
var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
|
|
98913
98998
|
!ts.compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions);
|
|
98914
|
-
var canCopyEmitSignatures = compilerOptions.composite &&
|
|
98915
|
-
(oldState === null || oldState === void 0 ? void 0 : oldState.emitSignatures) &&
|
|
98916
|
-
!outFilePath &&
|
|
98917
|
-
!ts.compilerOptionsAffectDeclarationPath(compilerOptions, oldCompilerOptions);
|
|
98918
98999
|
if (useOldState) {
|
|
98919
|
-
(
|
|
98920
|
-
|
|
99000
|
+
if (!oldState.currentChangedFilePath) {
|
|
99001
|
+
var affectedSignatures = oldState.currentAffectedFilesSignatures;
|
|
99002
|
+
ts.Debug.assert(!oldState.affectedFiles && (!affectedSignatures || !affectedSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated");
|
|
99003
|
+
}
|
|
99004
|
+
var changedFilesSet = oldState.changedFilesSet;
|
|
99005
|
+
if (canCopySemanticDiagnostics) {
|
|
99006
|
+
ts.Debug.assert(!changedFilesSet || !ts.forEachKey(changedFilesSet, function (path) { return oldState.semanticDiagnosticsPerFile.has(path); }), "Semantic diagnostics shouldnt be available for changed files");
|
|
99007
|
+
}
|
|
99008
|
+
changedFilesSet === null || changedFilesSet === void 0 ? void 0 : changedFilesSet.forEach(function (value) { return state.changedFilesSet.add(value); });
|
|
99009
|
+
if (!ts.outFile(compilerOptions) && oldState.affectedFilesPendingEmit) {
|
|
98921
99010
|
state.affectedFilesPendingEmit = oldState.affectedFilesPendingEmit.slice();
|
|
98922
99011
|
state.affectedFilesPendingEmitKind = oldState.affectedFilesPendingEmitKind && new ts.Map(oldState.affectedFilesPendingEmitKind);
|
|
98923
99012
|
state.affectedFilesPendingEmitIndex = oldState.affectedFilesPendingEmitIndex;
|
|
@@ -98934,7 +99023,6 @@ var ts;
|
|
|
98934
99023
|
if (!useOldState ||
|
|
98935
99024
|
!(oldInfo = oldState.fileInfos.get(sourceFilePath)) ||
|
|
98936
99025
|
oldInfo.version !== info.version ||
|
|
98937
|
-
oldInfo.impliedFormat !== info.impliedFormat ||
|
|
98938
99026
|
!hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) ||
|
|
98939
99027
|
newReferences && ts.forEachKey(newReferences, function (path) { return !state.fileInfos.has(path) && oldState.fileInfos.has(path); })) {
|
|
98940
99028
|
state.changedFilesSet.add(sourceFilePath);
|
|
@@ -98954,22 +99042,24 @@ var ts;
|
|
|
98954
99042
|
state.semanticDiagnosticsFromOldState.add(sourceFilePath);
|
|
98955
99043
|
}
|
|
98956
99044
|
}
|
|
98957
|
-
if (canCopyEmitSignatures) {
|
|
98958
|
-
var oldEmitSignature = oldState.emitSignatures.get(sourceFilePath);
|
|
98959
|
-
if (oldEmitSignature)
|
|
98960
|
-
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(sourceFilePath, oldEmitSignature);
|
|
98961
|
-
}
|
|
98962
99045
|
});
|
|
98963
99046
|
if (useOldState && ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) { return info.affectsGlobalScope && !state.fileInfos.has(sourceFilePath); })) {
|
|
98964
99047
|
ts.BuilderState.getAllFilesExcludingDefaultLibraryFile(state, newProgram, undefined)
|
|
98965
99048
|
.forEach(function (file) { return state.changedFilesSet.add(file.resolvedPath); });
|
|
98966
99049
|
}
|
|
98967
|
-
else if (oldCompilerOptions && !
|
|
99050
|
+
else if (oldCompilerOptions && !ts.outFile(compilerOptions) && ts.compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions)) {
|
|
98968
99051
|
newProgram.getSourceFiles().forEach(function (f) { return addToAffectedFilesPendingEmit(state, f.resolvedPath, 1); });
|
|
98969
99052
|
ts.Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
|
|
98970
99053
|
state.seenAffectedFiles = state.seenAffectedFiles || new ts.Set();
|
|
98971
99054
|
}
|
|
98972
|
-
|
|
99055
|
+
if (useOldState) {
|
|
99056
|
+
ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) {
|
|
99057
|
+
if (state.fileInfos.has(sourceFilePath) && state.fileInfos.get(sourceFilePath).impliedFormat !== info.impliedFormat) {
|
|
99058
|
+
state.changedFilesSet.add(sourceFilePath);
|
|
99059
|
+
}
|
|
99060
|
+
});
|
|
99061
|
+
}
|
|
99062
|
+
state.buildInfoEmitPending = !!state.changedFilesSet.size;
|
|
98973
99063
|
return state;
|
|
98974
99064
|
}
|
|
98975
99065
|
function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) {
|
|
@@ -99002,40 +99092,33 @@ var ts;
|
|
|
99002
99092
|
ts.BuilderState.releaseCache(state);
|
|
99003
99093
|
state.program = undefined;
|
|
99004
99094
|
}
|
|
99005
|
-
function
|
|
99006
|
-
var
|
|
99007
|
-
ts.
|
|
99008
|
-
|
|
99009
|
-
|
|
99010
|
-
|
|
99011
|
-
|
|
99012
|
-
|
|
99013
|
-
|
|
99014
|
-
|
|
99015
|
-
|
|
99016
|
-
|
|
99017
|
-
|
|
99018
|
-
|
|
99019
|
-
|
|
99020
|
-
|
|
99021
|
-
|
|
99022
|
-
|
|
99023
|
-
|
|
99024
|
-
|
|
99025
|
-
|
|
99026
|
-
state.programEmitComplete = backupEmitState.programEmitComplete;
|
|
99027
|
-
state.emitSignatures = backupEmitState.emitSignatures;
|
|
99028
|
-
state.outSignature = backupEmitState.outSignature;
|
|
99029
|
-
state.dtsChangeTime = backupEmitState.dtsChangeTime;
|
|
99030
|
-
state.hasChangedEmitSignature = backupEmitState.hasChangedEmitSignature;
|
|
99031
|
-
if (backupEmitState.changedFilesSet)
|
|
99032
|
-
state.changedFilesSet = backupEmitState.changedFilesSet;
|
|
99095
|
+
function cloneBuilderProgramState(state) {
|
|
99096
|
+
var _a;
|
|
99097
|
+
var newState = ts.BuilderState.clone(state);
|
|
99098
|
+
newState.semanticDiagnosticsPerFile = state.semanticDiagnosticsPerFile && new ts.Map(state.semanticDiagnosticsPerFile);
|
|
99099
|
+
newState.changedFilesSet = new ts.Set(state.changedFilesSet);
|
|
99100
|
+
newState.affectedFiles = state.affectedFiles;
|
|
99101
|
+
newState.affectedFilesIndex = state.affectedFilesIndex;
|
|
99102
|
+
newState.currentChangedFilePath = state.currentChangedFilePath;
|
|
99103
|
+
newState.currentAffectedFilesSignatures = state.currentAffectedFilesSignatures && new ts.Map(state.currentAffectedFilesSignatures);
|
|
99104
|
+
newState.currentAffectedFilesExportedModulesMap = (_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clone();
|
|
99105
|
+
newState.seenAffectedFiles = state.seenAffectedFiles && new ts.Set(state.seenAffectedFiles);
|
|
99106
|
+
newState.cleanedDiagnosticsOfLibFiles = state.cleanedDiagnosticsOfLibFiles;
|
|
99107
|
+
newState.semanticDiagnosticsFromOldState = state.semanticDiagnosticsFromOldState && new ts.Set(state.semanticDiagnosticsFromOldState);
|
|
99108
|
+
newState.program = state.program;
|
|
99109
|
+
newState.compilerOptions = state.compilerOptions;
|
|
99110
|
+
newState.affectedFilesPendingEmit = state.affectedFilesPendingEmit && state.affectedFilesPendingEmit.slice();
|
|
99111
|
+
newState.affectedFilesPendingEmitKind = state.affectedFilesPendingEmitKind && new ts.Map(state.affectedFilesPendingEmitKind);
|
|
99112
|
+
newState.affectedFilesPendingEmitIndex = state.affectedFilesPendingEmitIndex;
|
|
99113
|
+
newState.seenEmittedFiles = state.seenEmittedFiles && new ts.Map(state.seenEmittedFiles);
|
|
99114
|
+
newState.programEmitComplete = state.programEmitComplete;
|
|
99115
|
+
return newState;
|
|
99033
99116
|
}
|
|
99034
99117
|
function assertSourceFileOkWithoutNextAffectedCall(state, sourceFile) {
|
|
99035
99118
|
ts.Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath));
|
|
99036
99119
|
}
|
|
99037
99120
|
function getNextAffectedFile(state, cancellationToken, computeHash, host) {
|
|
99038
|
-
var _a
|
|
99121
|
+
var _a;
|
|
99039
99122
|
while (true) {
|
|
99040
99123
|
var affectedFiles = state.affectedFiles;
|
|
99041
99124
|
if (affectedFiles) {
|
|
@@ -99052,8 +99135,10 @@ var ts;
|
|
|
99052
99135
|
}
|
|
99053
99136
|
state.changedFilesSet.delete(state.currentChangedFilePath);
|
|
99054
99137
|
state.currentChangedFilePath = undefined;
|
|
99055
|
-
(
|
|
99056
|
-
|
|
99138
|
+
ts.BuilderState.updateSignaturesFromCache(state, state.currentAffectedFilesSignatures);
|
|
99139
|
+
state.currentAffectedFilesSignatures.clear();
|
|
99140
|
+
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
99141
|
+
(_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clear();
|
|
99057
99142
|
state.affectedFiles = undefined;
|
|
99058
99143
|
}
|
|
99059
99144
|
var nextKey = state.changedFilesSet.keys().next();
|
|
@@ -99066,7 +99151,12 @@ var ts;
|
|
|
99066
99151
|
ts.Debug.assert(!state.semanticDiagnosticsPerFile);
|
|
99067
99152
|
return program;
|
|
99068
99153
|
}
|
|
99069
|
-
|
|
99154
|
+
if (!state.currentAffectedFilesSignatures)
|
|
99155
|
+
state.currentAffectedFilesSignatures = new ts.Map();
|
|
99156
|
+
if (state.exportedModulesMap) {
|
|
99157
|
+
state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap());
|
|
99158
|
+
}
|
|
99159
|
+
state.affectedFiles = ts.BuilderState.getFilesAffectedBy(state, program, nextKey.value, cancellationToken, computeHash, state.currentAffectedFilesSignatures, state.currentAffectedFilesExportedModulesMap);
|
|
99070
99160
|
state.currentChangedFilePath = nextKey.value;
|
|
99071
99161
|
state.affectedFilesIndex = 0;
|
|
99072
99162
|
if (!state.seenAffectedFiles)
|
|
@@ -99110,12 +99200,14 @@ var ts;
|
|
|
99110
99200
|
}
|
|
99111
99201
|
}
|
|
99112
99202
|
function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99203
|
+
var _a;
|
|
99113
99204
|
removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
|
|
99114
99205
|
if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
|
|
99115
99206
|
removeDiagnosticsOfLibraryFiles(state);
|
|
99116
|
-
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, cancellationToken, computeHash);
|
|
99207
|
+
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap);
|
|
99117
99208
|
return;
|
|
99118
99209
|
}
|
|
99210
|
+
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);
|
|
99119
99211
|
if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies)
|
|
99120
99212
|
return;
|
|
99121
99213
|
handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
|
|
@@ -99126,7 +99218,7 @@ var ts;
|
|
|
99126
99218
|
var program = ts.Debug.checkDefined(state.program);
|
|
99127
99219
|
var sourceFile = program.getSourceFileByPath(path);
|
|
99128
99220
|
if (sourceFile) {
|
|
99129
|
-
ts.BuilderState.updateShapeSignature(state, program, sourceFile, cancellationToken, computeHash, !host.disableUseFileVersionAsSignature);
|
|
99221
|
+
ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap, !host.disableUseFileVersionAsSignature);
|
|
99130
99222
|
if (ts.getEmitDeclarations(state.compilerOptions)) {
|
|
99131
99223
|
addToAffectedFilesPendingEmit(state, path, 0);
|
|
99132
99224
|
}
|
|
@@ -99142,10 +99234,24 @@ var ts;
|
|
|
99142
99234
|
return !state.semanticDiagnosticsFromOldState.size;
|
|
99143
99235
|
}
|
|
99144
99236
|
function isChangedSignature(state, path) {
|
|
99145
|
-
var
|
|
99146
|
-
var
|
|
99237
|
+
var newSignature = ts.Debug.checkDefined(state.currentAffectedFilesSignatures).get(path);
|
|
99238
|
+
var oldSignature = ts.Debug.checkDefined(state.fileInfos.get(path)).signature;
|
|
99147
99239
|
return newSignature !== oldSignature;
|
|
99148
99240
|
}
|
|
99241
|
+
function forEachKeyOfExportedModulesMap(state, filePath, fn) {
|
|
99242
|
+
var keys = state.currentAffectedFilesExportedModulesMap.getKeys(filePath);
|
|
99243
|
+
var result = keys && ts.forEachKey(keys, fn);
|
|
99244
|
+
if (result)
|
|
99245
|
+
return result;
|
|
99246
|
+
keys = state.exportedModulesMap.getKeys(filePath);
|
|
99247
|
+
return keys && ts.forEachKey(keys, function (exportedFromPath) {
|
|
99248
|
+
var _a;
|
|
99249
|
+
return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
|
|
99250
|
+
!((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) ?
|
|
99251
|
+
fn(exportedFromPath) :
|
|
99252
|
+
undefined;
|
|
99253
|
+
});
|
|
99254
|
+
}
|
|
99149
99255
|
function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host) {
|
|
99150
99256
|
var _a;
|
|
99151
99257
|
if (!((_a = state.fileInfos.get(filePath)) === null || _a === void 0 ? void 0 : _a.affectsGlobalScope))
|
|
@@ -99156,7 +99262,6 @@ var ts;
|
|
|
99156
99262
|
return true;
|
|
99157
99263
|
}
|
|
99158
99264
|
function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
99159
|
-
var _a;
|
|
99160
99265
|
if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath))
|
|
99161
99266
|
return;
|
|
99162
99267
|
if (!isChangedSignature(state, affectedFile.resolvedPath))
|
|
@@ -99179,8 +99284,9 @@ var ts;
|
|
|
99179
99284
|
}
|
|
99180
99285
|
}
|
|
99181
99286
|
}
|
|
99287
|
+
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
99182
99288
|
var seenFileAndExportsOfFile = new ts.Set();
|
|
99183
|
-
(
|
|
99289
|
+
forEachKeyOfExportedModulesMap(state, affectedFile.resolvedPath, function (exportedFromPath) {
|
|
99184
99290
|
if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, computeHash, host))
|
|
99185
99291
|
return true;
|
|
99186
99292
|
var references = state.referencedMap.getKeys(exportedFromPath);
|
|
@@ -99190,16 +99296,17 @@ var ts;
|
|
|
99190
99296
|
});
|
|
99191
99297
|
}
|
|
99192
99298
|
function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, computeHash, host) {
|
|
99193
|
-
var _a
|
|
99299
|
+
var _a;
|
|
99194
99300
|
if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath))
|
|
99195
99301
|
return undefined;
|
|
99196
99302
|
if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host))
|
|
99197
99303
|
return true;
|
|
99198
99304
|
handleDtsMayChangeOf(state, filePath, cancellationToken, computeHash, host);
|
|
99199
|
-
|
|
99305
|
+
ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
|
|
99306
|
+
forEachKeyOfExportedModulesMap(state, filePath, function (exportedFromPath) {
|
|
99200
99307
|
return handleDtsMayChangeOfFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, cancellationToken, computeHash, host);
|
|
99201
99308
|
});
|
|
99202
|
-
(
|
|
99309
|
+
(_a = state.referencedMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (referencingFilePath) {
|
|
99203
99310
|
return !seenFileAndExportsOfFile.has(referencingFilePath) &&
|
|
99204
99311
|
handleDtsMayChangeOf(state, referencingFilePath, cancellationToken, computeHash, host);
|
|
99205
99312
|
});
|
|
@@ -99215,12 +99322,12 @@ var ts;
|
|
|
99215
99322
|
}
|
|
99216
99323
|
else {
|
|
99217
99324
|
state.seenAffectedFiles.add(affected.resolvedPath);
|
|
99218
|
-
state.buildInfoEmitPending = true;
|
|
99219
99325
|
if (emitKind !== undefined) {
|
|
99220
99326
|
(state.seenEmittedFiles || (state.seenEmittedFiles = new ts.Map())).set(affected.resolvedPath, emitKind);
|
|
99221
99327
|
}
|
|
99222
99328
|
if (isPendingEmit) {
|
|
99223
99329
|
state.affectedFilesPendingEmitIndex++;
|
|
99330
|
+
state.buildInfoEmitPending = true;
|
|
99224
99331
|
}
|
|
99225
99332
|
else {
|
|
99226
99333
|
state.affectedFilesIndex++;
|
|
@@ -99252,50 +99359,29 @@ var ts;
|
|
|
99252
99359
|
}
|
|
99253
99360
|
return ts.filterSemanticDiagnostics(diagnostics, state.compilerOptions);
|
|
99254
99361
|
}
|
|
99255
|
-
function getProgramBuildInfo(state, getCanonicalFileName
|
|
99256
|
-
|
|
99257
|
-
|
|
99258
|
-
return;
|
|
99362
|
+
function getProgramBuildInfo(state, getCanonicalFileName) {
|
|
99363
|
+
if (ts.outFile(state.compilerOptions))
|
|
99364
|
+
return undefined;
|
|
99259
99365
|
var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory();
|
|
99260
99366
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
|
|
99261
|
-
state.dtsChangeTime = state.hasChangedEmitSignature ? ts.getCurrentTime(host).getTime() : state.dtsChangeTime;
|
|
99262
|
-
if (outFilePath) {
|
|
99263
|
-
var result_15 = {
|
|
99264
|
-
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsBundleEmitBuildInfo"),
|
|
99265
|
-
outSignature: state.outSignature,
|
|
99266
|
-
dtsChangeTime: state.dtsChangeTime,
|
|
99267
|
-
};
|
|
99268
|
-
return result_15;
|
|
99269
|
-
}
|
|
99270
99367
|
var fileNames = [];
|
|
99271
99368
|
var fileNameToFileId = new ts.Map();
|
|
99272
99369
|
var fileIdsList;
|
|
99273
99370
|
var fileNamesToFileIdListId;
|
|
99274
|
-
var emitSignatures;
|
|
99275
99371
|
var fileInfos = ts.arrayFrom(state.fileInfos.entries(), function (_a) {
|
|
99276
|
-
var _b, _c;
|
|
99277
99372
|
var key = _a[0], value = _a[1];
|
|
99278
99373
|
var fileId = toFileId(key);
|
|
99279
99374
|
ts.Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
|
|
99280
|
-
var
|
|
99281
|
-
var actualSignature =
|
|
99282
|
-
if (state.compilerOptions.composite) {
|
|
99283
|
-
var file = state.program.getSourceFileByPath(key);
|
|
99284
|
-
if (!ts.isJsonSourceFile(file) && ts.sourceFileMayBeEmitted(file, state.program)) {
|
|
99285
|
-
var emitSignature = (_c = state.emitSignatures) === null || _c === void 0 ? void 0 : _c.get(key);
|
|
99286
|
-
if (emitSignature !== actualSignature) {
|
|
99287
|
-
(emitSignatures || (emitSignatures = [])).push(emitSignature === undefined ? fileId : [fileId, emitSignature]);
|
|
99288
|
-
}
|
|
99289
|
-
}
|
|
99290
|
-
}
|
|
99375
|
+
var signature = state.currentAffectedFilesSignatures && state.currentAffectedFilesSignatures.get(key);
|
|
99376
|
+
var actualSignature = signature !== null && signature !== void 0 ? signature : value.signature;
|
|
99291
99377
|
return value.version === actualSignature ?
|
|
99292
99378
|
value.affectsGlobalScope || value.impliedFormat ?
|
|
99293
99379
|
{ version: value.version, signature: undefined, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99294
99380
|
value.version :
|
|
99295
99381
|
actualSignature !== undefined ?
|
|
99296
|
-
|
|
99382
|
+
signature === undefined ?
|
|
99297
99383
|
value :
|
|
99298
|
-
{ version: value.version, signature:
|
|
99384
|
+
{ version: value.version, signature: signature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99299
99385
|
{ version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat };
|
|
99300
99386
|
});
|
|
99301
99387
|
var referencedMap;
|
|
@@ -99309,12 +99395,16 @@ var ts;
|
|
|
99309
99395
|
if (state.exportedModulesMap) {
|
|
99310
99396
|
exportedModulesMap = ts.mapDefined(ts.arrayFrom(state.exportedModulesMap.keys()).sort(ts.compareStringsCaseSensitive), function (key) {
|
|
99311
99397
|
var _a;
|
|
99312
|
-
|
|
99313
|
-
|
|
99314
|
-
|
|
99315
|
-
|
|
99316
|
-
|
|
99317
|
-
|
|
99398
|
+
if (state.currentAffectedFilesExportedModulesMap) {
|
|
99399
|
+
if ((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(key)) {
|
|
99400
|
+
return undefined;
|
|
99401
|
+
}
|
|
99402
|
+
var newValue = state.currentAffectedFilesExportedModulesMap.getValues(key);
|
|
99403
|
+
if (newValue) {
|
|
99404
|
+
return [toFileId(key), toFileIdListId(newValue)];
|
|
99405
|
+
}
|
|
99406
|
+
}
|
|
99407
|
+
return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
|
|
99318
99408
|
});
|
|
99319
99409
|
}
|
|
99320
99410
|
var semanticDiagnosticsPerFile;
|
|
@@ -99325,7 +99415,9 @@ var ts;
|
|
|
99325
99415
|
(semanticDiagnosticsPerFile || (semanticDiagnosticsPerFile = [])).push(value.length ?
|
|
99326
99416
|
[
|
|
99327
99417
|
toFileId(key),
|
|
99328
|
-
|
|
99418
|
+
state.hasReusableDiagnostic ?
|
|
99419
|
+
value :
|
|
99420
|
+
convertToReusableDiagnostics(value, relativeToBuildInfo)
|
|
99329
99421
|
] :
|
|
99330
99422
|
toFileId(key));
|
|
99331
99423
|
}
|
|
@@ -99340,27 +99432,16 @@ var ts;
|
|
|
99340
99432
|
}
|
|
99341
99433
|
}
|
|
99342
99434
|
}
|
|
99343
|
-
|
|
99344
|
-
if (state.changedFilesSet.size) {
|
|
99345
|
-
for (var _d = 0, _e = ts.arrayFrom(state.changedFilesSet.keys()).sort(ts.compareStringsCaseSensitive); _d < _e.length; _d++) {
|
|
99346
|
-
var path = _e[_d];
|
|
99347
|
-
(changeFileSet || (changeFileSet = [])).push(toFileId(path));
|
|
99348
|
-
}
|
|
99349
|
-
}
|
|
99350
|
-
var result = {
|
|
99435
|
+
return {
|
|
99351
99436
|
fileNames: fileNames,
|
|
99352
99437
|
fileInfos: fileInfos,
|
|
99353
|
-
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions,
|
|
99438
|
+
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, relativeToBuildInfoEnsuringAbsolutePath),
|
|
99354
99439
|
fileIdsList: fileIdsList,
|
|
99355
99440
|
referencedMap: referencedMap,
|
|
99356
99441
|
exportedModulesMap: exportedModulesMap,
|
|
99357
99442
|
semanticDiagnosticsPerFile: semanticDiagnosticsPerFile,
|
|
99358
99443
|
affectedFilesPendingEmit: affectedFilesPendingEmit,
|
|
99359
|
-
changeFileSet: changeFileSet,
|
|
99360
|
-
emitSignatures: emitSignatures,
|
|
99361
|
-
dtsChangeTime: state.dtsChangeTime,
|
|
99362
99444
|
};
|
|
99363
|
-
return result;
|
|
99364
99445
|
function relativeToBuildInfoEnsuringAbsolutePath(path) {
|
|
99365
99446
|
return relativeToBuildInfo(ts.getNormalizedAbsolutePath(path, currentDirectory));
|
|
99366
99447
|
}
|
|
@@ -99385,18 +99466,21 @@ var ts;
|
|
|
99385
99466
|
}
|
|
99386
99467
|
return fileIdListId;
|
|
99387
99468
|
}
|
|
99388
|
-
|
|
99389
|
-
|
|
99390
|
-
|
|
99391
|
-
|
|
99392
|
-
|
|
99393
|
-
|
|
99394
|
-
|
|
99395
|
-
|
|
99396
|
-
|
|
99469
|
+
}
|
|
99470
|
+
function convertToProgramBuildInfoCompilerOptions(options, relativeToBuildInfo) {
|
|
99471
|
+
var result;
|
|
99472
|
+
var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
|
|
99473
|
+
for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
|
|
99474
|
+
var name = _a[_i];
|
|
99475
|
+
var optionKey = name.toLowerCase();
|
|
99476
|
+
var optionInfo = optionsNameMap.get(optionKey);
|
|
99477
|
+
if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
|
|
99478
|
+
optionKey === "strict" ||
|
|
99479
|
+
optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
|
|
99480
|
+
(result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
|
|
99397
99481
|
}
|
|
99398
|
-
return result;
|
|
99399
99482
|
}
|
|
99483
|
+
return result;
|
|
99400
99484
|
}
|
|
99401
99485
|
function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) {
|
|
99402
99486
|
if (option) {
|
|
@@ -99470,10 +99554,6 @@ var ts;
|
|
|
99470
99554
|
return { host: host, newProgram: newProgram, oldProgram: oldProgram, configFileParsingDiagnostics: configFileParsingDiagnostics || ts.emptyArray };
|
|
99471
99555
|
}
|
|
99472
99556
|
ts.getBuilderCreationParameters = getBuilderCreationParameters;
|
|
99473
|
-
function computeSignature(text, data, computeHash) {
|
|
99474
|
-
return ts.BuilderState.computeSignature((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text, computeHash);
|
|
99475
|
-
}
|
|
99476
|
-
ts.computeSignature = computeSignature;
|
|
99477
99557
|
function createBuilderProgram(kind, _a) {
|
|
99478
99558
|
var newProgram = _a.newProgram, host = _a.host, oldProgram = _a.oldProgram, configFileParsingDiagnostics = _a.configFileParsingDiagnostics;
|
|
99479
99559
|
var oldState = oldProgram && oldProgram.getState();
|
|
@@ -99485,28 +99565,28 @@ var ts;
|
|
|
99485
99565
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99486
99566
|
var computeHash = ts.maybeBind(host, host.createHash);
|
|
99487
99567
|
var state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
|
|
99488
|
-
var
|
|
99489
|
-
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName
|
|
99568
|
+
var backupState;
|
|
99569
|
+
newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName); };
|
|
99490
99570
|
newProgram = undefined;
|
|
99491
99571
|
oldProgram = undefined;
|
|
99492
99572
|
oldState = undefined;
|
|
99493
99573
|
var getState = function () { return state; };
|
|
99494
99574
|
var builderProgram = createRedirectedBuilderProgram(getState, configFileParsingDiagnostics);
|
|
99495
99575
|
builderProgram.getState = getState;
|
|
99496
|
-
builderProgram.
|
|
99497
|
-
ts.Debug.assert(
|
|
99498
|
-
|
|
99576
|
+
builderProgram.backupState = function () {
|
|
99577
|
+
ts.Debug.assert(backupState === undefined);
|
|
99578
|
+
backupState = cloneBuilderProgramState(state);
|
|
99499
99579
|
};
|
|
99500
|
-
builderProgram.
|
|
99501
|
-
|
|
99502
|
-
|
|
99580
|
+
builderProgram.restoreState = function () {
|
|
99581
|
+
state = ts.Debug.checkDefined(backupState);
|
|
99582
|
+
backupState = undefined;
|
|
99503
99583
|
};
|
|
99504
99584
|
builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); };
|
|
99505
99585
|
builderProgram.getSemanticDiagnostics = getSemanticDiagnostics;
|
|
99506
99586
|
builderProgram.emit = emit;
|
|
99507
99587
|
builderProgram.releaseProgram = function () {
|
|
99508
99588
|
releaseCache(state);
|
|
99509
|
-
|
|
99589
|
+
backupState = undefined;
|
|
99510
99590
|
};
|
|
99511
99591
|
if (kind === BuilderProgramKind.SemanticDiagnosticsBuilderProgram) {
|
|
99512
99592
|
builderProgram.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile;
|
|
@@ -99552,57 +99632,35 @@ var ts;
|
|
|
99552
99632
|
affected = program;
|
|
99553
99633
|
}
|
|
99554
99634
|
}
|
|
99555
|
-
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
99556
|
-
|
|
99635
|
+
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, affected !== state.program && ts.getEmitDeclarations(state.compilerOptions) && !customTransformers ?
|
|
99636
|
+
getWriteFileUpdatingSignatureCallback(writeFile) :
|
|
99557
99637
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0, customTransformers), affected, emitKind, isPendingEmitFile);
|
|
99558
99638
|
}
|
|
99559
|
-
function
|
|
99639
|
+
function getWriteFileUpdatingSignatureCallback(writeFile) {
|
|
99560
99640
|
return function (fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
99561
|
-
var _a
|
|
99641
|
+
var _a;
|
|
99562
99642
|
if (ts.isDeclarationFileName(fileName)) {
|
|
99563
|
-
|
|
99564
|
-
|
|
99565
|
-
|
|
99566
|
-
|
|
99567
|
-
|
|
99568
|
-
|
|
99569
|
-
|
|
99570
|
-
|
|
99571
|
-
|
|
99572
|
-
|
|
99573
|
-
|
|
99574
|
-
|
|
99575
|
-
|
|
99576
|
-
if (state.affectedFiles) {
|
|
99577
|
-
var existing = (_a = state.oldSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath);
|
|
99578
|
-
if (existing === undefined)
|
|
99579
|
-
(state.oldSignatures || (state.oldSignatures = new ts.Map())).set(file.resolvedPath, info.signature || false);
|
|
99580
|
-
info.signature = newSignature;
|
|
99581
|
-
}
|
|
99582
|
-
else {
|
|
99583
|
-
info.signature = newSignature;
|
|
99584
|
-
(_b = state.oldExportedModulesMap) === null || _b === void 0 ? void 0 : _b.clear();
|
|
99585
|
-
}
|
|
99586
|
-
}
|
|
99643
|
+
ts.Debug.assert((sourceFiles === null || sourceFiles === void 0 ? void 0 : sourceFiles.length) === 1);
|
|
99644
|
+
var file = sourceFiles[0];
|
|
99645
|
+
var info = state.fileInfos.get(file.resolvedPath);
|
|
99646
|
+
var signature = ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath)) || info.signature;
|
|
99647
|
+
if (signature === file.version) {
|
|
99648
|
+
var newSignature = (computeHash || ts.generateDjb2Hash)((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text);
|
|
99649
|
+
if (newSignature !== file.version) {
|
|
99650
|
+
if (host.storeFilesChangingSignatureDuringEmit)
|
|
99651
|
+
(state.filesChangingSignature || (state.filesChangingSignature = new ts.Set())).add(file.resolvedPath);
|
|
99652
|
+
if (state.exportedModulesMap)
|
|
99653
|
+
ts.BuilderState.updateExportedModules(file, file.exportedModulesFromDeclarationEmit, state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap()));
|
|
99654
|
+
if (state.affectedFiles && state.affectedFilesIndex < state.affectedFiles.length) {
|
|
99655
|
+
state.currentAffectedFilesSignatures.set(file.resolvedPath, newSignature);
|
|
99587
99656
|
}
|
|
99588
|
-
|
|
99589
|
-
|
|
99590
|
-
|
|
99591
|
-
|
|
99592
|
-
newSignature || (newSignature = computeSignature(text, data, computeHash));
|
|
99593
|
-
if (newSignature !== oldSignature) {
|
|
99594
|
-
(state.emitSignatures || (state.emitSignatures = new ts.Map())).set(filePath, newSignature);
|
|
99595
|
-
state.hasChangedEmitSignature = true;
|
|
99657
|
+
else {
|
|
99658
|
+
info.signature = newSignature;
|
|
99659
|
+
if (state.exportedModulesMap)
|
|
99660
|
+
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
99596
99661
|
}
|
|
99597
99662
|
}
|
|
99598
99663
|
}
|
|
99599
|
-
else if (state.compilerOptions.composite) {
|
|
99600
|
-
var newSignature = computeSignature(text, data, computeHash);
|
|
99601
|
-
if (newSignature !== state.outSignature) {
|
|
99602
|
-
state.outSignature = newSignature;
|
|
99603
|
-
state.hasChangedEmitSignature = true;
|
|
99604
|
-
}
|
|
99605
|
-
}
|
|
99606
99664
|
}
|
|
99607
99665
|
if (writeFile)
|
|
99608
99666
|
writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
@@ -99651,8 +99709,8 @@ var ts;
|
|
|
99651
99709
|
}
|
|
99652
99710
|
}
|
|
99653
99711
|
}
|
|
99654
|
-
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, ts.getEmitDeclarations(state.compilerOptions) ?
|
|
99655
|
-
|
|
99712
|
+
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, !ts.outFile(state.compilerOptions) && ts.getEmitDeclarations(state.compilerOptions) && !customTransformers ?
|
|
99713
|
+
getWriteFileUpdatingSignatureCallback(writeFile) :
|
|
99656
99714
|
writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers);
|
|
99657
99715
|
}
|
|
99658
99716
|
function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
|
|
@@ -99715,28 +99773,14 @@ var ts;
|
|
|
99715
99773
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
99716
99774
|
}
|
|
99717
99775
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
99718
|
-
function
|
|
99719
|
-
var _a
|
|
99776
|
+
function createBuildProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
|
|
99777
|
+
var _a;
|
|
99720
99778
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
99721
99779
|
var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
99722
|
-
var
|
|
99723
|
-
var
|
|
99724
|
-
var filePathsSetList = (_b = program.fileIdsList) === null || _b === void 0 ? void 0 : _b.map(function (fileIds) { return new ts.Set(fileIds.map(toFilePath)); });
|
|
99780
|
+
var filePaths = program.fileNames.map(toPath);
|
|
99781
|
+
var filePathsSetList = (_a = program.fileIdsList) === null || _a === void 0 ? void 0 : _a.map(function (fileIds) { return new ts.Set(fileIds.map(toFilePath)); });
|
|
99725
99782
|
var fileInfos = new ts.Map();
|
|
99726
|
-
|
|
99727
|
-
(_d = program.fileInfos) === null || _d === void 0 ? void 0 : _d.forEach(function (fileInfo, index) {
|
|
99728
|
-
var path = toFilePath(index + 1);
|
|
99729
|
-
var stateFileInfo = toBuilderStateFileInfo(fileInfo);
|
|
99730
|
-
fileInfos.set(path, stateFileInfo);
|
|
99731
|
-
if (emitSignatures && stateFileInfo.signature)
|
|
99732
|
-
emitSignatures.set(path, stateFileInfo.signature);
|
|
99733
|
-
});
|
|
99734
|
-
(_e = program.emitSignatures) === null || _e === void 0 ? void 0 : _e.forEach(function (value) {
|
|
99735
|
-
if (ts.isNumber(value))
|
|
99736
|
-
emitSignatures.delete(toFilePath(value));
|
|
99737
|
-
else
|
|
99738
|
-
emitSignatures.set(toFilePath(value[0]), value[1]);
|
|
99739
|
-
});
|
|
99783
|
+
program.fileInfos.forEach(function (fileInfo, index) { return fileInfos.set(toFilePath(index + 1), toBuilderStateFileInfo(fileInfo)); });
|
|
99740
99784
|
var state = {
|
|
99741
99785
|
fileInfos: fileInfos,
|
|
99742
99786
|
compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
|
|
@@ -99747,15 +99791,11 @@ var ts;
|
|
|
99747
99791
|
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
99748
99792
|
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
|
|
99749
99793
|
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
99750
|
-
changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
|
|
99751
|
-
dtsChangeTime: program.dtsChangeTime,
|
|
99752
|
-
emitSignatures: (emitSignatures === null || emitSignatures === void 0 ? void 0 : emitSignatures.size) ? emitSignatures : undefined,
|
|
99753
|
-
outSignature: program.outSignature,
|
|
99754
99794
|
};
|
|
99755
99795
|
return {
|
|
99756
99796
|
getState: function () { return state; },
|
|
99757
|
-
|
|
99758
|
-
|
|
99797
|
+
backupState: ts.noop,
|
|
99798
|
+
restoreState: ts.noop,
|
|
99759
99799
|
getProgram: ts.notImplemented,
|
|
99760
99800
|
getProgramOrUndefined: ts.returnUndefined,
|
|
99761
99801
|
releaseProgram: ts.noop,
|
|
@@ -99800,12 +99840,12 @@ var ts;
|
|
|
99800
99840
|
return map;
|
|
99801
99841
|
}
|
|
99802
99842
|
}
|
|
99803
|
-
ts.
|
|
99843
|
+
ts.createBuildProgramUsingProgramBuildInfo = createBuildProgramUsingProgramBuildInfo;
|
|
99804
99844
|
function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
|
|
99805
99845
|
return {
|
|
99806
99846
|
getState: ts.notImplemented,
|
|
99807
|
-
|
|
99808
|
-
|
|
99847
|
+
backupState: ts.noop,
|
|
99848
|
+
restoreState: ts.noop,
|
|
99809
99849
|
getProgram: getProgram,
|
|
99810
99850
|
getProgramOrUndefined: function () { return getState().program; },
|
|
99811
99851
|
releaseProgram: function () { return getState().program = undefined; },
|
|
@@ -100050,8 +100090,8 @@ var ts;
|
|
|
100050
100090
|
!!redirectedReference;
|
|
100051
100091
|
var seenNamesInFile = ts.createModeAwareCache();
|
|
100052
100092
|
var i = 0;
|
|
100053
|
-
for (var _i = 0,
|
|
100054
|
-
var entry =
|
|
100093
|
+
for (var _i = 0, names_5 = names; _i < names_5.length; _i++) {
|
|
100094
|
+
var entry = names_5[_i];
|
|
100055
100095
|
var name = ts.isString(entry) ? entry : entry.fileName.toLowerCase();
|
|
100056
100096
|
var mode = !ts.isString(entry) ? ts.getModeForFileReference(entry, containingSourceFileMode) :
|
|
100057
100097
|
containingSourceFile ? ts.getModeForResolutionAtIndex(containingSourceFile, i) : undefined;
|
|
@@ -100543,7 +100583,7 @@ var ts;
|
|
|
100543
100583
|
}
|
|
100544
100584
|
function isFormatRequiringExtensions(compilerOptions, importingSourceFileName, host) {
|
|
100545
100585
|
var _a;
|
|
100546
|
-
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.
|
|
100586
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16
|
|
100547
100587
|
&& ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
100548
100588
|
return false;
|
|
100549
100589
|
}
|
|
@@ -100577,14 +100617,14 @@ var ts;
|
|
|
100577
100617
|
if (options === void 0) { options = {}; }
|
|
100578
100618
|
var info = getInfo(importingSourceFile.path, host);
|
|
100579
100619
|
var modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences, options);
|
|
100580
|
-
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, true, options.overrideImportMode); });
|
|
100620
|
+
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, preferences, true, options.overrideImportMode); });
|
|
100581
100621
|
}
|
|
100582
100622
|
moduleSpecifiers_1.getNodeModulesPackageName = getNodeModulesPackageName;
|
|
100583
100623
|
function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences, options) {
|
|
100584
100624
|
if (options === void 0) { options = {}; }
|
|
100585
100625
|
var info = getInfo(importingSourceFileName, host);
|
|
100586
100626
|
var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences, options);
|
|
100587
|
-
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, undefined, options.overrideImportMode); }) ||
|
|
100627
|
+
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, userPreferences, undefined, options.overrideImportMode); }) ||
|
|
100588
100628
|
getLocalModuleSpecifier(toFileName, info, compilerOptions, host, preferences);
|
|
100589
100629
|
}
|
|
100590
100630
|
function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences, options) {
|
|
@@ -100650,7 +100690,7 @@ var ts;
|
|
|
100650
100690
|
var relativeSpecifiers;
|
|
100651
100691
|
for (var _i = 0, modulePaths_1 = modulePaths; _i < modulePaths_1.length; _i++) {
|
|
100652
100692
|
var modulePath = modulePaths_1[_i];
|
|
100653
|
-
var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, undefined, options.overrideImportMode);
|
|
100693
|
+
var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, userPreferences, undefined, options.overrideImportMode);
|
|
100654
100694
|
nodeModulesSpecifiers = ts.append(nodeModulesSpecifiers, specifier);
|
|
100655
100695
|
if (specifier && modulePath.isRedirect) {
|
|
100656
100696
|
return nodeModulesSpecifiers;
|
|
@@ -100756,9 +100796,9 @@ var ts;
|
|
|
100756
100796
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
100757
100797
|
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
100758
100798
|
if (!preferSymlinks) {
|
|
100759
|
-
var
|
|
100760
|
-
if (
|
|
100761
|
-
return
|
|
100799
|
+
var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
100800
|
+
if (result_15)
|
|
100801
|
+
return result_15;
|
|
100762
100802
|
}
|
|
100763
100803
|
var symlinkedDirectories = (_a = host.getSymlinkCache) === null || _a === void 0 ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
|
|
100764
100804
|
var fullImportedFileName = ts.getNormalizedAbsolutePath(importedFileName, cwd);
|
|
@@ -100777,10 +100817,10 @@ var ts;
|
|
|
100777
100817
|
for (var _i = 0, symlinkDirectories_1 = symlinkDirectories; _i < symlinkDirectories_1.length; _i++) {
|
|
100778
100818
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
100779
100819
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
100780
|
-
var
|
|
100820
|
+
var result_16 = cb(option, target === referenceRedirect);
|
|
100781
100821
|
shouldFilterIgnoredPaths = true;
|
|
100782
|
-
if (
|
|
100783
|
-
return
|
|
100822
|
+
if (result_16)
|
|
100823
|
+
return result_16;
|
|
100784
100824
|
}
|
|
100785
100825
|
});
|
|
100786
100826
|
});
|
|
@@ -100981,7 +101021,7 @@ var ts;
|
|
|
100981
101021
|
? removeExtensionAndIndexPostFix(relativePath, ending, compilerOptions)
|
|
100982
101022
|
: ts.removeFileExtension(relativePath);
|
|
100983
101023
|
}
|
|
100984
|
-
function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, packageNameOnly, overrideMode) {
|
|
101024
|
+
function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
|
|
100985
101025
|
var path = _a.path, isRedirect = _a.isRedirect;
|
|
100986
101026
|
var getCanonicalFileName = _b.getCanonicalFileName, sourceDirectory = _b.sourceDirectory;
|
|
100987
101027
|
if (!host.fileExists || !host.readFile) {
|
|
@@ -100994,8 +101034,9 @@ var ts;
|
|
|
100994
101034
|
var moduleSpecifier = path;
|
|
100995
101035
|
var isPackageRootPath = false;
|
|
100996
101036
|
if (!packageNameOnly) {
|
|
101037
|
+
var preferences = getPreferences(host, userPreferences, options, importingSourceFile);
|
|
100997
101038
|
var packageRootIndex = parts.packageRootIndex;
|
|
100998
|
-
var
|
|
101039
|
+
var moduleFileName = void 0;
|
|
100999
101040
|
while (true) {
|
|
101000
101041
|
var _c = tryDirectoryWithPackageJson(packageRootIndex), moduleFileToTry = _c.moduleFileToTry, packageRootPath = _c.packageRootPath, blockedByExports = _c.blockedByExports, verbatimFromExports = _c.verbatimFromExports;
|
|
101001
101042
|
if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Classic) {
|
|
@@ -101011,11 +101052,11 @@ var ts;
|
|
|
101011
101052
|
isPackageRootPath = true;
|
|
101012
101053
|
break;
|
|
101013
101054
|
}
|
|
101014
|
-
if (!
|
|
101015
|
-
|
|
101055
|
+
if (!moduleFileName)
|
|
101056
|
+
moduleFileName = moduleFileToTry;
|
|
101016
101057
|
packageRootIndex = path.indexOf(ts.directorySeparator, packageRootIndex + 1);
|
|
101017
101058
|
if (packageRootIndex === -1) {
|
|
101018
|
-
moduleSpecifier =
|
|
101059
|
+
moduleSpecifier = removeExtensionAndIndexPostFix(moduleFileName, preferences.ending, options, host);
|
|
101019
101060
|
break;
|
|
101020
101061
|
}
|
|
101021
101062
|
}
|
|
@@ -101039,7 +101080,7 @@ var ts;
|
|
|
101039
101080
|
var cachedPackageJson = (_b = (_a = host.getPackageJsonInfoCache) === null || _a === void 0 ? void 0 : _a.call(host)) === null || _b === void 0 ? void 0 : _b.getPackageJsonInfo(packageJsonPath);
|
|
101040
101081
|
if (typeof cachedPackageJson === "object" || cachedPackageJson === undefined && host.fileExists(packageJsonPath)) {
|
|
101041
101082
|
var packageJsonContent = (cachedPackageJson === null || cachedPackageJson === void 0 ? void 0 : cachedPackageJson.packageJsonContent) || JSON.parse(host.readFile(packageJsonPath));
|
|
101042
|
-
if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.
|
|
101083
|
+
if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
|
|
101043
101084
|
var conditions = ["node", overrideMode || importingSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext ? "import" : "require", "types"];
|
|
101044
101085
|
var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string"
|
|
101045
101086
|
? tryGetModuleNameFromExports(options, path, packageRootPath, ts.getPackageNameFromTypesPackageName(packageJsonContent.name), packageJsonContent.exports, conditions)
|
|
@@ -101064,7 +101105,7 @@ var ts;
|
|
|
101064
101105
|
moduleFileToTry = ts.combinePaths(packageRootPath, fromPaths);
|
|
101065
101106
|
}
|
|
101066
101107
|
}
|
|
101067
|
-
var mainFileRelative = packageJsonContent.typings || packageJsonContent.types || packageJsonContent.main;
|
|
101108
|
+
var mainFileRelative = packageJsonContent.typings || packageJsonContent.types || packageJsonContent.main || "index.js";
|
|
101068
101109
|
if (ts.isString(mainFileRelative)) {
|
|
101069
101110
|
var mainExportFile = ts.toPath(mainFileRelative, packageRootPath, getCanonicalFileName);
|
|
101070
101111
|
if (ts.removeFileExtension(mainExportFile) === ts.removeFileExtension(getCanonicalFileName(moduleFileToTry))) {
|
|
@@ -101072,14 +101113,13 @@ var ts;
|
|
|
101072
101113
|
}
|
|
101073
101114
|
}
|
|
101074
101115
|
}
|
|
101075
|
-
|
|
101076
|
-
|
|
101077
|
-
|
|
101078
|
-
|
|
101079
|
-
|
|
101080
|
-
return fullModulePathWithoutExtension.substring(0, parts.fileNameIndex);
|
|
101116
|
+
else {
|
|
101117
|
+
var fileName = getCanonicalFileName(moduleFileToTry.substring(parts.packageRootIndex + 1));
|
|
101118
|
+
if (fileName === "index.d.ts" || fileName === "index.js" || fileName === "index.ts" || fileName === "index.tsx") {
|
|
101119
|
+
return { moduleFileToTry: moduleFileToTry, packageRootPath: packageRootPath };
|
|
101120
|
+
}
|
|
101081
101121
|
}
|
|
101082
|
-
return
|
|
101122
|
+
return { moduleFileToTry: moduleFileToTry };
|
|
101083
101123
|
}
|
|
101084
101124
|
}
|
|
101085
101125
|
function tryGetAnyFileFromPath(host, path) {
|
|
@@ -101100,7 +101140,7 @@ var ts;
|
|
|
101100
101140
|
return relativePath !== undefined && isPathRelativeToParent(relativePath) ? undefined : relativePath;
|
|
101101
101141
|
});
|
|
101102
101142
|
}
|
|
101103
|
-
function removeExtensionAndIndexPostFix(fileName, ending, options) {
|
|
101143
|
+
function removeExtensionAndIndexPostFix(fileName, ending, options, host) {
|
|
101104
101144
|
if (ts.fileExtensionIsOneOf(fileName, [".json", ".mjs", ".cjs"]))
|
|
101105
101145
|
return fileName;
|
|
101106
101146
|
var noExtension = ts.removeFileExtension(fileName);
|
|
@@ -101108,7 +101148,11 @@ var ts;
|
|
|
101108
101148
|
return noExtension + getJSExtensionForFile(fileName, options);
|
|
101109
101149
|
switch (ending) {
|
|
101110
101150
|
case 0:
|
|
101111
|
-
|
|
101151
|
+
var withoutIndex = ts.removeSuffix(noExtension, "/index");
|
|
101152
|
+
if (host && withoutIndex !== noExtension && tryGetAnyFileFromPath(host, withoutIndex)) {
|
|
101153
|
+
return noExtension;
|
|
101154
|
+
}
|
|
101155
|
+
return withoutIndex;
|
|
101112
101156
|
case 1:
|
|
101113
101157
|
return noExtension;
|
|
101114
101158
|
case 2:
|
|
@@ -101595,7 +101639,6 @@ var ts;
|
|
|
101595
101639
|
readDirectory: ts.maybeBind(host, host.readDirectory),
|
|
101596
101640
|
disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
|
|
101597
101641
|
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
|
|
101598
|
-
now: ts.maybeBind(host, host.now),
|
|
101599
101642
|
};
|
|
101600
101643
|
function writeFile(fileName, text, writeByteOrderMark, onError) {
|
|
101601
101644
|
try {
|
|
@@ -101650,7 +101693,6 @@ var ts;
|
|
|
101650
101693
|
createProgram: createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram,
|
|
101651
101694
|
disableUseFileVersionAsSignature: system.disableUseFileVersionAsSignature,
|
|
101652
101695
|
storeFilesChangingSignatureDuringEmit: system.storeFilesChangingSignatureDuringEmit,
|
|
101653
|
-
now: ts.maybeBind(system, system.now),
|
|
101654
101696
|
};
|
|
101655
101697
|
}
|
|
101656
101698
|
ts.createProgramHost = createProgramHost;
|
|
@@ -101706,26 +101748,20 @@ var ts;
|
|
|
101706
101748
|
var ts;
|
|
101707
101749
|
(function (ts) {
|
|
101708
101750
|
function readBuilderProgram(compilerOptions, host) {
|
|
101751
|
+
if (ts.outFile(compilerOptions))
|
|
101752
|
+
return undefined;
|
|
101709
101753
|
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions);
|
|
101710
101754
|
if (!buildInfoPath)
|
|
101711
101755
|
return undefined;
|
|
101712
|
-
var
|
|
101713
|
-
if (
|
|
101714
|
-
|
|
101715
|
-
|
|
101716
|
-
return undefined;
|
|
101717
|
-
}
|
|
101718
|
-
else {
|
|
101719
|
-
var content = host.readFile(buildInfoPath);
|
|
101720
|
-
if (!content)
|
|
101721
|
-
return undefined;
|
|
101722
|
-
buildInfo = ts.getBuildInfo(content);
|
|
101723
|
-
}
|
|
101756
|
+
var content = host.readFile(buildInfoPath);
|
|
101757
|
+
if (!content)
|
|
101758
|
+
return undefined;
|
|
101759
|
+
var buildInfo = ts.getBuildInfo(content);
|
|
101724
101760
|
if (buildInfo.version !== ts.version)
|
|
101725
101761
|
return undefined;
|
|
101726
101762
|
if (!buildInfo.program)
|
|
101727
101763
|
return undefined;
|
|
101728
|
-
return ts.
|
|
101764
|
+
return ts.createBuildProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host);
|
|
101729
101765
|
}
|
|
101730
101766
|
ts.readBuilderProgram = readBuilderProgram;
|
|
101731
101767
|
function createIncrementalCompilerHost(options, system) {
|
|
@@ -101734,7 +101770,6 @@ var ts;
|
|
|
101734
101770
|
host.createHash = ts.maybeBind(system, system.createHash);
|
|
101735
101771
|
host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
|
|
101736
101772
|
host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
|
|
101737
|
-
host.now = ts.maybeBind(system, system.now);
|
|
101738
101773
|
ts.setGetSourceFileAsHashVersioned(host, system);
|
|
101739
101774
|
ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName); });
|
|
101740
101775
|
return host;
|
|
@@ -102397,13 +102432,11 @@ var ts;
|
|
|
102397
102432
|
UpToDateStatusType[UpToDateStatusType["OutputMissing"] = 4] = "OutputMissing";
|
|
102398
102433
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithSelf"] = 5] = "OutOfDateWithSelf";
|
|
102399
102434
|
UpToDateStatusType[UpToDateStatusType["OutOfDateWithUpstream"] = 6] = "OutOfDateWithUpstream";
|
|
102400
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102401
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102402
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102403
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102404
|
-
UpToDateStatusType[UpToDateStatusType["
|
|
102405
|
-
UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 12] = "ContainerOnly";
|
|
102406
|
-
UpToDateStatusType[UpToDateStatusType["ForceBuild"] = 13] = "ForceBuild";
|
|
102435
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamOutOfDate"] = 7] = "UpstreamOutOfDate";
|
|
102436
|
+
UpToDateStatusType[UpToDateStatusType["UpstreamBlocked"] = 8] = "UpstreamBlocked";
|
|
102437
|
+
UpToDateStatusType[UpToDateStatusType["ComputingUpstream"] = 9] = "ComputingUpstream";
|
|
102438
|
+
UpToDateStatusType[UpToDateStatusType["TsVersionOutputOfDate"] = 10] = "TsVersionOutputOfDate";
|
|
102439
|
+
UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 11] = "ContainerOnly";
|
|
102407
102440
|
})(UpToDateStatusType = ts.UpToDateStatusType || (ts.UpToDateStatusType = {}));
|
|
102408
102441
|
function resolveConfigFileProjectName(project) {
|
|
102409
102442
|
if (ts.fileExtensionIs(project, ".json")) {
|
|
@@ -102441,10 +102474,9 @@ var ts;
|
|
|
102441
102474
|
function getOrCreateValueMapFromConfigFileMap(configFileMap, resolved) {
|
|
102442
102475
|
return getOrCreateValueFromConfigFileMap(configFileMap, resolved, function () { return new ts.Map(); });
|
|
102443
102476
|
}
|
|
102444
|
-
function
|
|
102445
|
-
return
|
|
102477
|
+
function newer(date1, date2) {
|
|
102478
|
+
return date2 > date1 ? date2 : date1;
|
|
102446
102479
|
}
|
|
102447
|
-
ts.getCurrentTime = getCurrentTime;
|
|
102448
102480
|
function isCircularBuildOrder(buildOrder) {
|
|
102449
102481
|
return !!buildOrder && !!buildOrder.buildOrder;
|
|
102450
102482
|
}
|
|
@@ -102528,7 +102560,6 @@ var ts;
|
|
|
102528
102560
|
return ts.loadWithTypeDirectiveCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader_4);
|
|
102529
102561
|
};
|
|
102530
102562
|
}
|
|
102531
|
-
compilerHost.getBuildInfo = function (fileName, configFilePath) { return getBuildInfo(state, fileName, toResolvedConfigFilePath(state, configFilePath), undefined); };
|
|
102532
102563
|
var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog;
|
|
102533
102564
|
var state = {
|
|
102534
102565
|
host: host,
|
|
@@ -102544,9 +102575,8 @@ var ts;
|
|
|
102544
102575
|
resolvedConfigFilePaths: new ts.Map(),
|
|
102545
102576
|
configFileCache: new ts.Map(),
|
|
102546
102577
|
projectStatus: new ts.Map(),
|
|
102578
|
+
buildInfoChecked: new ts.Map(),
|
|
102547
102579
|
extendedConfigCache: new ts.Map(),
|
|
102548
|
-
buildInfoCache: new ts.Map(),
|
|
102549
|
-
outputTimeStamps: new ts.Map(),
|
|
102550
102580
|
builderPrograms: new ts.Map(),
|
|
102551
102581
|
diagnostics: new ts.Map(),
|
|
102552
102582
|
projectPendingBuild: new ts.Map(),
|
|
@@ -102568,7 +102598,6 @@ var ts;
|
|
|
102568
102598
|
allWatchedConfigFiles: new ts.Map(),
|
|
102569
102599
|
allWatchedExtendedConfigFiles: new ts.Map(),
|
|
102570
102600
|
allWatchedPackageJsonFiles: new ts.Map(),
|
|
102571
|
-
filesWatched: new ts.Map(),
|
|
102572
102601
|
lastCachedPackageJsonLookups: new ts.Map(),
|
|
102573
102602
|
timerToBuildInvalidatedProject: undefined,
|
|
102574
102603
|
reportFileChangeDetected: false,
|
|
@@ -102670,12 +102699,11 @@ var ts;
|
|
|
102670
102699
|
var noopOnDelete = { onDeleteValue: ts.noop };
|
|
102671
102700
|
ts.mutateMapSkippingNewValues(state.configFileCache, currentProjects, noopOnDelete);
|
|
102672
102701
|
ts.mutateMapSkippingNewValues(state.projectStatus, currentProjects, noopOnDelete);
|
|
102702
|
+
ts.mutateMapSkippingNewValues(state.buildInfoChecked, currentProjects, noopOnDelete);
|
|
102673
102703
|
ts.mutateMapSkippingNewValues(state.builderPrograms, currentProjects, noopOnDelete);
|
|
102674
102704
|
ts.mutateMapSkippingNewValues(state.diagnostics, currentProjects, noopOnDelete);
|
|
102675
102705
|
ts.mutateMapSkippingNewValues(state.projectPendingBuild, currentProjects, noopOnDelete);
|
|
102676
102706
|
ts.mutateMapSkippingNewValues(state.projectErrorsReported, currentProjects, noopOnDelete);
|
|
102677
|
-
ts.mutateMapSkippingNewValues(state.buildInfoCache, currentProjects, noopOnDelete);
|
|
102678
|
-
ts.mutateMapSkippingNewValues(state.outputTimeStamps, currentProjects, noopOnDelete);
|
|
102679
102707
|
if (state.watch) {
|
|
102680
102708
|
ts.mutateMapSkippingNewValues(state.allWatchedConfigFiles, currentProjects, { onDeleteValue: ts.closeFileWatcher });
|
|
102681
102709
|
state.allWatchedExtendedConfigFiles.forEach(function (watcher) {
|
|
@@ -102961,16 +102989,16 @@ var ts;
|
|
|
102961
102989
|
}
|
|
102962
102990
|
function emit(writeFileCallback, cancellationToken, customTransformers) {
|
|
102963
102991
|
var _a;
|
|
102964
|
-
var _b, _c
|
|
102992
|
+
var _b, _c;
|
|
102965
102993
|
ts.Debug.assertIsDefined(program);
|
|
102966
102994
|
ts.Debug.assert(step === BuildStep.Emit);
|
|
102967
|
-
program.
|
|
102995
|
+
program.backupState();
|
|
102968
102996
|
var declDiagnostics;
|
|
102969
102997
|
var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
|
|
102970
102998
|
var outputFiles = [];
|
|
102971
|
-
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark
|
|
102999
|
+
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;
|
|
102972
103000
|
if (declDiagnostics) {
|
|
102973
|
-
program.
|
|
103001
|
+
program.restoreState();
|
|
102974
103002
|
(_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
|
|
102975
103003
|
return {
|
|
102976
103004
|
emitSkipped: true,
|
|
@@ -102979,43 +103007,35 @@ var ts;
|
|
|
102979
103007
|
}
|
|
102980
103008
|
var host = state.host, compilerHost = state.compilerHost;
|
|
102981
103009
|
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
102982
|
-
var
|
|
103010
|
+
var newestDeclarationFileContentChangedTime = minimumDate;
|
|
103011
|
+
var anyDtsChanged = false;
|
|
102983
103012
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
102984
103013
|
var emittedOutputs = new ts.Map();
|
|
102985
|
-
var options = program.getCompilerOptions();
|
|
102986
|
-
var isIncremental = ts.isIncrementalCompilation(options);
|
|
102987
|
-
var outputTimeStampMap;
|
|
102988
|
-
var now;
|
|
102989
103014
|
outputFiles.forEach(function (_a) {
|
|
102990
|
-
var
|
|
102991
|
-
var
|
|
102992
|
-
|
|
102993
|
-
|
|
102994
|
-
|
|
102995
|
-
|
|
102996
|
-
|
|
103015
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
|
|
103016
|
+
var priorChangeTime;
|
|
103017
|
+
if (!anyDtsChanged && ts.isDeclarationFileName(name)) {
|
|
103018
|
+
if (host.fileExists(name) && state.readFileWithCache(name) === text) {
|
|
103019
|
+
priorChangeTime = host.getModifiedTime(name);
|
|
103020
|
+
}
|
|
103021
|
+
else {
|
|
102997
103022
|
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
103023
|
+
anyDtsChanged = true;
|
|
102998
103024
|
}
|
|
102999
103025
|
}
|
|
103026
|
+
emittedOutputs.set(toPath(state, name), name);
|
|
103000
103027
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
103001
|
-
if (
|
|
103002
|
-
|
|
103028
|
+
if (priorChangeTime !== undefined) {
|
|
103029
|
+
newestDeclarationFileContentChangedTime = newer(priorChangeTime, newestDeclarationFileContentChangedTime);
|
|
103003
103030
|
}
|
|
103004
103031
|
});
|
|
103005
|
-
finishEmit(emitterDiagnostics, emittedOutputs, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
103032
|
+
finishEmit(emitterDiagnostics, emittedOutputs, newestDeclarationFileContentChangedTime, anyDtsChanged, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags);
|
|
103006
103033
|
return emitResult;
|
|
103007
103034
|
}
|
|
103008
103035
|
function emitBuildInfo(writeFileCallback, cancellationToken) {
|
|
103009
103036
|
ts.Debug.assertIsDefined(program);
|
|
103010
103037
|
ts.Debug.assert(step === BuildStep.EmitBuildInfo);
|
|
103011
|
-
var emitResult = program.emitBuildInfo(
|
|
103012
|
-
if (data === null || data === void 0 ? void 0 : data.buildInfo)
|
|
103013
|
-
setBuildInfo(state, data.buildInfo, projectPath, program.getCompilerOptions());
|
|
103014
|
-
if (writeFileCallback)
|
|
103015
|
-
writeFileCallback(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
103016
|
-
else
|
|
103017
|
-
state.compilerHost.writeFile(name, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
103018
|
-
}, cancellationToken);
|
|
103038
|
+
var emitResult = program.emitBuildInfo(writeFileCallback, cancellationToken);
|
|
103019
103039
|
if (emitResult.diagnostics.length) {
|
|
103020
103040
|
reportErrors(state, emitResult.diagnostics);
|
|
103021
103041
|
state.diagnostics.set(projectPath, __spreadArray(__spreadArray([], state.diagnostics.get(projectPath), true), emitResult.diagnostics, true));
|
|
@@ -103028,7 +103048,7 @@ var ts;
|
|
|
103028
103048
|
step = BuildStep.QueueReferencingProjects;
|
|
103029
103049
|
return emitResult;
|
|
103030
103050
|
}
|
|
103031
|
-
function finishEmit(emitterDiagnostics, emittedOutputs, oldestOutputFileName, resultFlags) {
|
|
103051
|
+
function finishEmit(emitterDiagnostics, emittedOutputs, priorNewestUpdateTime, newestDeclarationFileContentChangedTimeIsMaximumDate, oldestOutputFileName, resultFlags) {
|
|
103032
103052
|
var _a;
|
|
103033
103053
|
var emitDiagnostics = emitterDiagnostics.getDiagnostics();
|
|
103034
103054
|
if (emitDiagnostics.length) {
|
|
@@ -103038,11 +103058,13 @@ var ts;
|
|
|
103038
103058
|
if (state.write) {
|
|
103039
103059
|
emittedOutputs.forEach(function (name) { return listEmittedFile(state, config, name); });
|
|
103040
103060
|
}
|
|
103041
|
-
updateOutputTimestampsWorker(state, config,
|
|
103061
|
+
var newestDeclarationFileContentChangedTime = updateOutputTimestampsWorker(state, config, priorNewestUpdateTime, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);
|
|
103042
103062
|
state.diagnostics.delete(projectPath);
|
|
103043
103063
|
state.projectStatus.set(projectPath, {
|
|
103044
103064
|
type: ts.UpToDateStatusType.UpToDate,
|
|
103045
|
-
newestDeclarationFileContentChangedTime:
|
|
103065
|
+
newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTimeIsMaximumDate ?
|
|
103066
|
+
maximumDate :
|
|
103067
|
+
newestDeclarationFileContentChangedTime,
|
|
103046
103068
|
oldestOutputFileName: oldestOutputFileName
|
|
103047
103069
|
});
|
|
103048
103070
|
afterProgramDone(state, program, config);
|
|
@@ -103075,21 +103097,12 @@ var ts;
|
|
|
103075
103097
|
ts.Debug.assert(!!outputFiles.length);
|
|
103076
103098
|
var emitterDiagnostics = ts.createDiagnosticCollection();
|
|
103077
103099
|
var emittedOutputs = new ts.Map();
|
|
103078
|
-
var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
|
|
103079
|
-
var existingBuildInfo = state.buildInfoCache.get(projectPath).buildInfo;
|
|
103080
103100
|
outputFiles.forEach(function (_a) {
|
|
103081
|
-
var
|
|
103082
|
-
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
|
|
103101
|
+
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
|
|
103083
103102
|
emittedOutputs.set(toPath(state, name), name);
|
|
103084
|
-
if (buildInfo) {
|
|
103085
|
-
setBuildInfo(state, buildInfo, projectPath, config.options);
|
|
103086
|
-
if (((_b = buildInfo.program) === null || _b === void 0 ? void 0 : _b.dtsChangeTime) !== ((_c = existingBuildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime)) {
|
|
103087
|
-
resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
|
|
103088
|
-
}
|
|
103089
|
-
}
|
|
103090
103103
|
ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
|
|
103091
103104
|
});
|
|
103092
|
-
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, outputFiles[0].name,
|
|
103105
|
+
var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, minimumDate, false, outputFiles[0].name, BuildResultFlags.DeclarationOutputUnchanged);
|
|
103093
103106
|
return { emitSkipped: false, diagnostics: emitDiagnostics };
|
|
103094
103107
|
}
|
|
103095
103108
|
function executeSteps(till, cancellationToken, writeFile, customTransformers) {
|
|
@@ -103245,7 +103258,7 @@ var ts;
|
|
|
103245
103258
|
state.projectCompilerOptions = state.baseCompilerOptions;
|
|
103246
103259
|
}
|
|
103247
103260
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
103248
|
-
var canEmitBuildInfo = program && !ts.outFile(program.getCompilerOptions());
|
|
103261
|
+
var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
|
|
103249
103262
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
103250
103263
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" });
|
|
103251
103264
|
if (canEmitBuildInfo)
|
|
@@ -103253,94 +103266,8 @@ var ts;
|
|
|
103253
103266
|
afterProgramDone(state, program, config);
|
|
103254
103267
|
return { buildResult: buildResult, step: BuildStep.QueueReferencingProjects };
|
|
103255
103268
|
}
|
|
103256
|
-
function isFileWatcherWithModifiedTime(value) {
|
|
103257
|
-
return !!value.watcher;
|
|
103258
|
-
}
|
|
103259
|
-
function getModifiedTime(state, fileName) {
|
|
103260
|
-
var path = toPath(state, fileName);
|
|
103261
|
-
var existing = state.filesWatched.get(path);
|
|
103262
|
-
if (state.watch && !!existing) {
|
|
103263
|
-
if (!isFileWatcherWithModifiedTime(existing))
|
|
103264
|
-
return existing;
|
|
103265
|
-
if (existing.modifiedTime)
|
|
103266
|
-
return existing.modifiedTime;
|
|
103267
|
-
}
|
|
103268
|
-
var result = ts.getModifiedTime(state.host, fileName);
|
|
103269
|
-
if (state.watch) {
|
|
103270
|
-
if (existing)
|
|
103271
|
-
existing.modifiedTime = result;
|
|
103272
|
-
else
|
|
103273
|
-
state.filesWatched.set(path, result);
|
|
103274
|
-
}
|
|
103275
|
-
return result;
|
|
103276
|
-
}
|
|
103277
|
-
function watchFile(state, file, callback, pollingInterval, options, watchType, project) {
|
|
103278
|
-
var path = toPath(state, file);
|
|
103279
|
-
var existing = state.filesWatched.get(path);
|
|
103280
|
-
if (existing && isFileWatcherWithModifiedTime(existing)) {
|
|
103281
|
-
existing.callbacks.push(callback);
|
|
103282
|
-
}
|
|
103283
|
-
else {
|
|
103284
|
-
var watcher = state.watchFile(file, function (fileName, eventKind, modifiedTime) {
|
|
103285
|
-
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
103286
|
-
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
103287
|
-
existing.modifiedTime = modifiedTime;
|
|
103288
|
-
existing.callbacks.forEach(function (cb) { return cb(fileName, eventKind, modifiedTime); });
|
|
103289
|
-
}, pollingInterval, options, watchType, project);
|
|
103290
|
-
state.filesWatched.set(path, { callbacks: [callback], watcher: watcher, modifiedTime: existing });
|
|
103291
|
-
}
|
|
103292
|
-
return {
|
|
103293
|
-
close: function () {
|
|
103294
|
-
var existing = ts.Debug.checkDefined(state.filesWatched.get(path));
|
|
103295
|
-
ts.Debug.assert(isFileWatcherWithModifiedTime(existing));
|
|
103296
|
-
if (existing.callbacks.length === 1) {
|
|
103297
|
-
state.filesWatched.delete(path);
|
|
103298
|
-
ts.closeFileWatcherOf(existing);
|
|
103299
|
-
}
|
|
103300
|
-
else {
|
|
103301
|
-
ts.unorderedRemoveItem(existing.callbacks, callback);
|
|
103302
|
-
}
|
|
103303
|
-
}
|
|
103304
|
-
};
|
|
103305
|
-
}
|
|
103306
|
-
function getOutputTimeStampMap(state, resolvedConfigFilePath) {
|
|
103307
|
-
if (!state.watch)
|
|
103308
|
-
return undefined;
|
|
103309
|
-
var result = state.outputTimeStamps.get(resolvedConfigFilePath);
|
|
103310
|
-
if (!result)
|
|
103311
|
-
state.outputTimeStamps.set(resolvedConfigFilePath, result = new ts.Map());
|
|
103312
|
-
return result;
|
|
103313
|
-
}
|
|
103314
|
-
function setBuildInfo(state, buildInfo, resolvedConfigPath, options) {
|
|
103315
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
103316
|
-
var existing = getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath);
|
|
103317
|
-
if (existing) {
|
|
103318
|
-
existing.buildInfo = buildInfo;
|
|
103319
|
-
existing.modifiedTime = getCurrentTime(state.host);
|
|
103320
|
-
}
|
|
103321
|
-
else {
|
|
103322
|
-
state.buildInfoCache.set(resolvedConfigPath, { path: toPath(state, buildInfoPath), buildInfo: buildInfo, modifiedTime: getCurrentTime(state.host) });
|
|
103323
|
-
}
|
|
103324
|
-
}
|
|
103325
|
-
function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
|
|
103326
|
-
var path = toPath(state, buildInfoPath);
|
|
103327
|
-
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
103328
|
-
return (existing === null || existing === void 0 ? void 0 : existing.path) === path ? existing : undefined;
|
|
103329
|
-
}
|
|
103330
|
-
function getBuildInfo(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
|
|
103331
|
-
var path = toPath(state, buildInfoPath);
|
|
103332
|
-
var existing = state.buildInfoCache.get(resolvedConfigPath);
|
|
103333
|
-
if (existing !== undefined && existing.path === path) {
|
|
103334
|
-
return existing.buildInfo || undefined;
|
|
103335
|
-
}
|
|
103336
|
-
var value = state.readFileWithCache(buildInfoPath);
|
|
103337
|
-
var buildInfo = value ? ts.getBuildInfo(value) : undefined;
|
|
103338
|
-
ts.Debug.assert(modifiedTime || !buildInfo);
|
|
103339
|
-
state.buildInfoCache.set(resolvedConfigPath, { path: path, buildInfo: buildInfo || false, modifiedTime: modifiedTime || ts.missingFileModifiedTime });
|
|
103340
|
-
return buildInfo;
|
|
103341
|
-
}
|
|
103342
103269
|
function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
|
|
103343
|
-
var tsconfigTime = getModifiedTime(state, configFile);
|
|
103270
|
+
var tsconfigTime = ts.getModifiedTime(state.host, configFile);
|
|
103344
103271
|
if (oldestOutputFileTime < tsconfigTime) {
|
|
103345
103272
|
return {
|
|
103346
103273
|
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
@@ -103350,22 +103277,76 @@ var ts;
|
|
|
103350
103277
|
}
|
|
103351
103278
|
}
|
|
103352
103279
|
function getUpToDateStatusWorker(state, project, resolvedPath) {
|
|
103353
|
-
var
|
|
103280
|
+
var force = !!state.options.force;
|
|
103281
|
+
var newestInputFileName = undefined;
|
|
103282
|
+
var newestInputFileTime = minimumDate;
|
|
103283
|
+
var host = state.host;
|
|
103284
|
+
for (var _i = 0, _a = project.fileNames; _i < _a.length; _i++) {
|
|
103285
|
+
var inputFile = _a[_i];
|
|
103286
|
+
if (!host.fileExists(inputFile)) {
|
|
103287
|
+
return {
|
|
103288
|
+
type: ts.UpToDateStatusType.Unbuildable,
|
|
103289
|
+
reason: inputFile + " does not exist"
|
|
103290
|
+
};
|
|
103291
|
+
}
|
|
103292
|
+
if (!force) {
|
|
103293
|
+
var inputTime = ts.getModifiedTime(host, inputFile);
|
|
103294
|
+
if (inputTime > newestInputFileTime) {
|
|
103295
|
+
newestInputFileName = inputFile;
|
|
103296
|
+
newestInputFileTime = inputTime;
|
|
103297
|
+
}
|
|
103298
|
+
}
|
|
103299
|
+
}
|
|
103354
103300
|
if (!project.fileNames.length && !ts.canJsonReportNoInputFiles(project.raw)) {
|
|
103355
103301
|
return {
|
|
103356
103302
|
type: ts.UpToDateStatusType.ContainerOnly
|
|
103357
103303
|
};
|
|
103358
103304
|
}
|
|
103359
|
-
var
|
|
103360
|
-
var
|
|
103305
|
+
var outputs = ts.getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
|
|
103306
|
+
var oldestOutputFileName = "(none)";
|
|
103307
|
+
var oldestOutputFileTime = maximumDate;
|
|
103308
|
+
var newestOutputFileName = "(none)";
|
|
103309
|
+
var newestOutputFileTime = minimumDate;
|
|
103310
|
+
var missingOutputFileName;
|
|
103311
|
+
var newestDeclarationFileContentChangedTime = minimumDate;
|
|
103312
|
+
var isOutOfDateWithInputs = false;
|
|
103313
|
+
if (!force) {
|
|
103314
|
+
for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) {
|
|
103315
|
+
var output = outputs_1[_b];
|
|
103316
|
+
if (!host.fileExists(output)) {
|
|
103317
|
+
missingOutputFileName = output;
|
|
103318
|
+
break;
|
|
103319
|
+
}
|
|
103320
|
+
var outputTime = ts.getModifiedTime(host, output);
|
|
103321
|
+
if (outputTime < oldestOutputFileTime) {
|
|
103322
|
+
oldestOutputFileTime = outputTime;
|
|
103323
|
+
oldestOutputFileName = output;
|
|
103324
|
+
}
|
|
103325
|
+
if (outputTime < newestInputFileTime) {
|
|
103326
|
+
isOutOfDateWithInputs = true;
|
|
103327
|
+
break;
|
|
103328
|
+
}
|
|
103329
|
+
if (outputTime > newestOutputFileTime) {
|
|
103330
|
+
newestOutputFileTime = outputTime;
|
|
103331
|
+
newestOutputFileName = output;
|
|
103332
|
+
}
|
|
103333
|
+
if (ts.isDeclarationFileName(output)) {
|
|
103334
|
+
var outputModifiedTime = ts.getModifiedTime(host, output);
|
|
103335
|
+
newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime);
|
|
103336
|
+
}
|
|
103337
|
+
}
|
|
103338
|
+
}
|
|
103339
|
+
var pseudoUpToDate = false;
|
|
103340
|
+
var usesPrepend = false;
|
|
103341
|
+
var upstreamChangedProject;
|
|
103361
103342
|
if (project.projectReferences) {
|
|
103362
103343
|
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.ComputingUpstream });
|
|
103363
|
-
for (var
|
|
103364
|
-
var ref = _d[
|
|
103344
|
+
for (var _c = 0, _d = project.projectReferences; _c < _d.length; _c++) {
|
|
103345
|
+
var ref = _d[_c];
|
|
103346
|
+
usesPrepend = usesPrepend || !!(ref.prepend);
|
|
103365
103347
|
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
103366
103348
|
var resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
|
|
103367
|
-
var
|
|
103368
|
-
var refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
|
|
103349
|
+
var refStatus = getUpToDateStatus(state, parseConfigFile(state, resolvedRef, resolvedRefPath), resolvedRefPath);
|
|
103369
103350
|
if (refStatus.type === ts.UpToDateStatusType.ComputingUpstream ||
|
|
103370
103351
|
refStatus.type === ts.UpToDateStatusType.ContainerOnly) {
|
|
103371
103352
|
continue;
|
|
@@ -103384,152 +103365,65 @@ var ts;
|
|
|
103384
103365
|
upstreamProjectName: ref.path
|
|
103385
103366
|
};
|
|
103386
103367
|
}
|
|
103387
|
-
if (!force)
|
|
103388
|
-
|
|
103389
|
-
|
|
103390
|
-
|
|
103391
|
-
|
|
103392
|
-
|
|
103393
|
-
|
|
103394
|
-
|
|
103395
|
-
|
|
103396
|
-
|
|
103397
|
-
var buildInfoTime;
|
|
103398
|
-
var newestDeclarationFileContentChangedTime;
|
|
103399
|
-
if (buildInfoPath) {
|
|
103400
|
-
var buildInfoCacheEntry_1 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
|
|
103401
|
-
buildInfoTime = (buildInfoCacheEntry_1 === null || buildInfoCacheEntry_1 === void 0 ? void 0 : buildInfoCacheEntry_1.modifiedTime) || ts.getModifiedTime(host, buildInfoPath);
|
|
103402
|
-
if (buildInfoTime === ts.missingFileModifiedTime) {
|
|
103403
|
-
if (!buildInfoCacheEntry_1) {
|
|
103404
|
-
state.buildInfoCache.set(resolvedPath, {
|
|
103405
|
-
path: toPath(state, buildInfoPath),
|
|
103406
|
-
buildInfo: false,
|
|
103407
|
-
modifiedTime: buildInfoTime
|
|
103408
|
-
});
|
|
103409
|
-
}
|
|
103410
|
-
return {
|
|
103411
|
-
type: ts.UpToDateStatusType.OutputMissing,
|
|
103412
|
-
missingOutputFileName: buildInfoPath
|
|
103413
|
-
};
|
|
103414
|
-
}
|
|
103415
|
-
var buildInfo = ts.Debug.checkDefined(getBuildInfo(state, buildInfoPath, resolvedPath, buildInfoTime));
|
|
103416
|
-
if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
103417
|
-
return {
|
|
103418
|
-
type: ts.UpToDateStatusType.TsVersionOutputOfDate,
|
|
103419
|
-
version: buildInfo.version
|
|
103420
|
-
};
|
|
103421
|
-
}
|
|
103422
|
-
if (buildInfo.program) {
|
|
103423
|
-
if (((_a = buildInfo.program.changeFileSet) === null || _a === void 0 ? void 0 : _a.length) ||
|
|
103424
|
-
(!project.options.noEmit && ((_b = buildInfo.program.affectedFilesPendingEmit) === null || _b === void 0 ? void 0 : _b.length))) {
|
|
103368
|
+
if (!force && !missingOutputFileName) {
|
|
103369
|
+
if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) {
|
|
103370
|
+
continue;
|
|
103371
|
+
}
|
|
103372
|
+
if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
|
|
103373
|
+
pseudoUpToDate = true;
|
|
103374
|
+
upstreamChangedProject = ref.path;
|
|
103375
|
+
continue;
|
|
103376
|
+
}
|
|
103377
|
+
ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
|
|
103425
103378
|
return {
|
|
103426
|
-
type: ts.UpToDateStatusType.
|
|
103427
|
-
|
|
103379
|
+
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
103380
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
103381
|
+
newerProjectName: ref.path
|
|
103428
103382
|
};
|
|
103429
103383
|
}
|
|
103430
103384
|
}
|
|
103431
|
-
oldestOutputFileTime = buildInfoTime;
|
|
103432
|
-
oldestOutputFileName = buildInfoPath;
|
|
103433
|
-
newestDeclarationFileContentChangedTime = ((_c = buildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
|
|
103434
103385
|
}
|
|
103435
|
-
|
|
103436
|
-
|
|
103437
|
-
|
|
103438
|
-
|
|
103439
|
-
|
|
103440
|
-
if (inputTime === ts.missingFileModifiedTime) {
|
|
103441
|
-
return {
|
|
103442
|
-
type: ts.UpToDateStatusType.Unbuildable,
|
|
103443
|
-
reason: inputFile + " does not exist"
|
|
103444
|
-
};
|
|
103445
|
-
}
|
|
103446
|
-
if (buildInfoTime && buildInfoTime < inputTime) {
|
|
103447
|
-
return {
|
|
103448
|
-
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103449
|
-
outOfDateOutputFileName: buildInfoPath,
|
|
103450
|
-
newerInputFileName: inputFile
|
|
103451
|
-
};
|
|
103452
|
-
}
|
|
103453
|
-
if (inputTime > newestInputFileTime) {
|
|
103454
|
-
newestInputFileName = inputFile;
|
|
103455
|
-
newestInputFileTime = inputTime;
|
|
103456
|
-
}
|
|
103386
|
+
if (missingOutputFileName !== undefined) {
|
|
103387
|
+
return {
|
|
103388
|
+
type: ts.UpToDateStatusType.OutputMissing,
|
|
103389
|
+
missingOutputFileName: missingOutputFileName
|
|
103390
|
+
};
|
|
103457
103391
|
}
|
|
103458
|
-
if (
|
|
103459
|
-
|
|
103460
|
-
|
|
103461
|
-
|
|
103462
|
-
|
|
103463
|
-
|
|
103464
|
-
var outputTime = outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.get(path);
|
|
103465
|
-
if (!outputTime) {
|
|
103466
|
-
outputTime = ts.getModifiedTime(state.host, output);
|
|
103467
|
-
outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.set(path, outputTime);
|
|
103468
|
-
}
|
|
103469
|
-
if (outputTime === ts.missingFileModifiedTime) {
|
|
103470
|
-
return {
|
|
103471
|
-
type: ts.UpToDateStatusType.OutputMissing,
|
|
103472
|
-
missingOutputFileName: output
|
|
103473
|
-
};
|
|
103474
|
-
}
|
|
103475
|
-
if (outputTime < oldestOutputFileTime) {
|
|
103476
|
-
oldestOutputFileTime = outputTime;
|
|
103477
|
-
oldestOutputFileName = output;
|
|
103478
|
-
}
|
|
103479
|
-
if (outputTime < newestInputFileTime) {
|
|
103480
|
-
return {
|
|
103481
|
-
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103482
|
-
outOfDateOutputFileName: oldestOutputFileName,
|
|
103483
|
-
newerInputFileName: newestInputFileName
|
|
103484
|
-
};
|
|
103485
|
-
}
|
|
103486
|
-
}
|
|
103392
|
+
if (isOutOfDateWithInputs) {
|
|
103393
|
+
return {
|
|
103394
|
+
type: ts.UpToDateStatusType.OutOfDateWithSelf,
|
|
103395
|
+
outOfDateOutputFileName: oldestOutputFileName,
|
|
103396
|
+
newerInputFileName: newestInputFileName
|
|
103397
|
+
};
|
|
103487
103398
|
}
|
|
103488
|
-
|
|
103489
|
-
|
|
103490
|
-
|
|
103491
|
-
|
|
103492
|
-
|
|
103493
|
-
|
|
103494
|
-
|
|
103495
|
-
|
|
103496
|
-
var
|
|
103497
|
-
|
|
103498
|
-
|
|
103499
|
-
|
|
103500
|
-
|
|
103501
|
-
|
|
103399
|
+
else {
|
|
103400
|
+
var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
|
|
103401
|
+
if (configStatus)
|
|
103402
|
+
return configStatus;
|
|
103403
|
+
var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
|
|
103404
|
+
if (extendedConfigStatus)
|
|
103405
|
+
return extendedConfigStatus;
|
|
103406
|
+
var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
|
|
103407
|
+
var path = _a[0];
|
|
103408
|
+
return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
|
|
103409
|
+
});
|
|
103410
|
+
if (dependentPackageFileStatus)
|
|
103411
|
+
return dependentPackageFileStatus;
|
|
103412
|
+
}
|
|
103413
|
+
if (!force && !state.buildInfoChecked.has(resolvedPath)) {
|
|
103414
|
+
state.buildInfoChecked.set(resolvedPath, true);
|
|
103415
|
+
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
|
|
103416
|
+
if (buildInfoPath) {
|
|
103417
|
+
var value = state.readFileWithCache(buildInfoPath);
|
|
103418
|
+
var buildInfo = value && ts.getBuildInfo(value);
|
|
103419
|
+
if (buildInfo && (buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) {
|
|
103502
103420
|
return {
|
|
103503
|
-
type: ts.UpToDateStatusType.
|
|
103504
|
-
|
|
103505
|
-
newerProjectName: ref.path
|
|
103421
|
+
type: ts.UpToDateStatusType.TsVersionOutputOfDate,
|
|
103422
|
+
version: buildInfo.version
|
|
103506
103423
|
};
|
|
103507
103424
|
}
|
|
103508
|
-
if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
|
|
103509
|
-
pseudoUpToDate = true;
|
|
103510
|
-
upstreamChangedProject = ref.path;
|
|
103511
|
-
continue;
|
|
103512
|
-
}
|
|
103513
|
-
ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here");
|
|
103514
|
-
return {
|
|
103515
|
-
type: ts.UpToDateStatusType.OutOfDateWithUpstream,
|
|
103516
|
-
outOfDateOutputFileName: oldestOutputFileName,
|
|
103517
|
-
newerProjectName: ref.path
|
|
103518
|
-
};
|
|
103519
103425
|
}
|
|
103520
103426
|
}
|
|
103521
|
-
var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName);
|
|
103522
|
-
if (configStatus)
|
|
103523
|
-
return configStatus;
|
|
103524
|
-
var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
|
|
103525
|
-
if (extendedConfigStatus)
|
|
103526
|
-
return extendedConfigStatus;
|
|
103527
|
-
var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
|
|
103528
|
-
var path = _a[0];
|
|
103529
|
-
return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
|
|
103530
|
-
});
|
|
103531
|
-
if (dependentPackageFileStatus)
|
|
103532
|
-
return dependentPackageFileStatus;
|
|
103533
103427
|
if (usesPrepend && pseudoUpToDate) {
|
|
103534
103428
|
return {
|
|
103535
103429
|
type: ts.UpToDateStatusType.OutOfDateWithPrepend,
|
|
@@ -103541,29 +103435,12 @@ var ts;
|
|
|
103541
103435
|
type: pseudoUpToDate ? ts.UpToDateStatusType.UpToDateWithUpstreamTypes : ts.UpToDateStatusType.UpToDate,
|
|
103542
103436
|
newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime,
|
|
103543
103437
|
newestInputFileTime: newestInputFileTime,
|
|
103438
|
+
newestOutputFileTime: newestOutputFileTime,
|
|
103544
103439
|
newestInputFileName: newestInputFileName,
|
|
103440
|
+
newestOutputFileName: newestOutputFileName,
|
|
103545
103441
|
oldestOutputFileName: oldestOutputFileName
|
|
103546
103442
|
};
|
|
103547
103443
|
}
|
|
103548
|
-
function hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig, resolvedRefPath) {
|
|
103549
|
-
if (seenRefs.has(resolvedRefPath))
|
|
103550
|
-
return false;
|
|
103551
|
-
seenRefs.add(resolvedRefPath);
|
|
103552
|
-
var refBuildInfo = state.buildInfoCache.get(resolvedRefPath);
|
|
103553
|
-
if (refBuildInfo.path === buildInfoCacheEntry.path)
|
|
103554
|
-
return true;
|
|
103555
|
-
if (resolvedConfig.projectReferences) {
|
|
103556
|
-
for (var _i = 0, _a = resolvedConfig.projectReferences; _i < _a.length; _i++) {
|
|
103557
|
-
var ref = _a[_i];
|
|
103558
|
-
var resolvedRef = ts.resolveProjectReferencePath(ref);
|
|
103559
|
-
var resolvedRefPath_1 = toResolvedConfigFilePath(state, resolvedRef);
|
|
103560
|
-
var resolvedConfig_1 = parseConfigFile(state, resolvedRef, resolvedRefPath_1);
|
|
103561
|
-
if (hasSameBuildInfo(state, buildInfoCacheEntry, seenRefs, resolvedConfig_1, resolvedRefPath_1))
|
|
103562
|
-
return true;
|
|
103563
|
-
}
|
|
103564
|
-
}
|
|
103565
|
-
return false;
|
|
103566
|
-
}
|
|
103567
103444
|
function getUpToDateStatus(state, project, resolvedPath) {
|
|
103568
103445
|
if (project === undefined) {
|
|
103569
103446
|
return { type: ts.UpToDateStatusType.Unbuildable, reason: "File deleted mid-build" };
|
|
@@ -103576,64 +103453,39 @@ var ts;
|
|
|
103576
103453
|
state.projectStatus.set(resolvedPath, actual);
|
|
103577
103454
|
return actual;
|
|
103578
103455
|
}
|
|
103579
|
-
function updateOutputTimestampsWorker(state, proj,
|
|
103456
|
+
function updateOutputTimestampsWorker(state, proj, priorNewestUpdateTime, verboseMessage, skipOutputs) {
|
|
103580
103457
|
if (proj.options.noEmit)
|
|
103581
|
-
return;
|
|
103582
|
-
var now;
|
|
103583
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(proj.options);
|
|
103584
|
-
if (buildInfoPath) {
|
|
103585
|
-
if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(toPath(state, buildInfoPath)))) {
|
|
103586
|
-
if (!!state.options.verbose)
|
|
103587
|
-
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
103588
|
-
state.host.setModifiedTime(buildInfoPath, now = getCurrentTime(state.host));
|
|
103589
|
-
getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
|
|
103590
|
-
}
|
|
103591
|
-
state.outputTimeStamps.delete(projectPath);
|
|
103592
|
-
return;
|
|
103593
|
-
}
|
|
103458
|
+
return priorNewestUpdateTime;
|
|
103594
103459
|
var host = state.host;
|
|
103595
103460
|
var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());
|
|
103596
|
-
var outputTimeStampMap = getOutputTimeStampMap(state, projectPath);
|
|
103597
|
-
var modifiedOutputs = outputTimeStampMap ? new ts.Set() : undefined;
|
|
103598
103461
|
if (!skipOutputs || outputs.length !== skipOutputs.size) {
|
|
103599
103462
|
var reportVerbose = !!state.options.verbose;
|
|
103463
|
+
var now = host.now ? host.now() : new Date();
|
|
103600
103464
|
for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) {
|
|
103601
103465
|
var file = outputs_2[_i];
|
|
103602
|
-
|
|
103603
|
-
if (skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(path))
|
|
103466
|
+
if (skipOutputs && skipOutputs.has(toPath(state, file))) {
|
|
103604
103467
|
continue;
|
|
103468
|
+
}
|
|
103605
103469
|
if (reportVerbose) {
|
|
103606
103470
|
reportVerbose = false;
|
|
103607
103471
|
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
103608
103472
|
}
|
|
103609
|
-
|
|
103610
|
-
|
|
103611
|
-
outputTimeStampMap.set(path, now);
|
|
103612
|
-
modifiedOutputs.add(path);
|
|
103473
|
+
if (ts.isDeclarationFileName(file)) {
|
|
103474
|
+
priorNewestUpdateTime = newer(priorNewestUpdateTime, ts.getModifiedTime(host, file));
|
|
103613
103475
|
}
|
|
103476
|
+
host.setModifiedTime(file, now);
|
|
103614
103477
|
}
|
|
103615
103478
|
}
|
|
103616
|
-
|
|
103617
|
-
if (!(skipOutputs === null || skipOutputs === void 0 ? void 0 : skipOutputs.has(key)) && !modifiedOutputs.has(key))
|
|
103618
|
-
outputTimeStampMap.delete(key);
|
|
103619
|
-
});
|
|
103620
|
-
}
|
|
103621
|
-
function getDtsChangeTime(state, options, resolvedConfigPath) {
|
|
103622
|
-
var _a;
|
|
103623
|
-
if (!options.composite)
|
|
103624
|
-
return undefined;
|
|
103625
|
-
var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
|
|
103626
|
-
var buildInfo = getBuildInfo(state, buildInfoPath, resolvedConfigPath, undefined);
|
|
103627
|
-
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;
|
|
103479
|
+
return priorNewestUpdateTime;
|
|
103628
103480
|
}
|
|
103629
103481
|
function updateOutputTimestamps(state, proj, resolvedPath) {
|
|
103630
103482
|
if (state.options.dry) {
|
|
103631
103483
|
return reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, proj.options.configFilePath);
|
|
103632
103484
|
}
|
|
103633
|
-
updateOutputTimestampsWorker(state, proj,
|
|
103485
|
+
var priorNewestUpdateTime = updateOutputTimestampsWorker(state, proj, minimumDate, ts.Diagnostics.Updating_output_timestamps_of_project_0);
|
|
103634
103486
|
state.projectStatus.set(resolvedPath, {
|
|
103635
103487
|
type: ts.UpToDateStatusType.UpToDate,
|
|
103636
|
-
newestDeclarationFileContentChangedTime:
|
|
103488
|
+
newestDeclarationFileContentChangedTime: priorNewestUpdateTime,
|
|
103637
103489
|
oldestOutputFileName: ts.getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames())
|
|
103638
103490
|
});
|
|
103639
103491
|
}
|
|
@@ -103815,10 +103667,12 @@ var ts;
|
|
|
103815
103667
|
function watchConfigFile(state, resolved, resolvedPath, parsed) {
|
|
103816
103668
|
if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath))
|
|
103817
103669
|
return;
|
|
103818
|
-
state.allWatchedConfigFiles.set(resolvedPath, watchFile(
|
|
103670
|
+
state.allWatchedConfigFiles.set(resolvedPath, state.watchFile(resolved, function () {
|
|
103671
|
+
invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full);
|
|
103672
|
+
}, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.ConfigFile, resolved));
|
|
103819
103673
|
}
|
|
103820
103674
|
function watchExtendedConfigFiles(state, resolvedPath, parsed) {
|
|
103821
|
-
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return watchFile(
|
|
103675
|
+
ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return state.watchFile(extendedConfigFileName, function () {
|
|
103822
103676
|
var _a;
|
|
103823
103677
|
return (_a = state.allWatchedExtendedConfigFiles.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (projectConfigFilePath) {
|
|
103824
103678
|
return invalidateProjectAndScheduleBuilds(state, projectConfigFilePath, ts.ConfigFileProgramReloadLevel.Full);
|
|
@@ -103850,7 +103704,7 @@ var ts;
|
|
|
103850
103704
|
if (!state.watch)
|
|
103851
103705
|
return;
|
|
103852
103706
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath), ts.arrayToMap(parsed.fileNames, function (fileName) { return toPath(state, fileName); }), {
|
|
103853
|
-
createNewValue: function (_path, input) { return watchFile(
|
|
103707
|
+
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); },
|
|
103854
103708
|
onDeleteValue: ts.closeFileWatcher,
|
|
103855
103709
|
});
|
|
103856
103710
|
}
|
|
@@ -103858,7 +103712,7 @@ var ts;
|
|
|
103858
103712
|
if (!state.watch || !state.lastCachedPackageJsonLookups)
|
|
103859
103713
|
return;
|
|
103860
103714
|
ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath), new ts.Map(state.lastCachedPackageJsonLookups.get(resolvedPath)), {
|
|
103861
|
-
createNewValue: function (path, _input) { return watchFile(
|
|
103715
|
+
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); },
|
|
103862
103716
|
onDeleteValue: ts.closeFileWatcher,
|
|
103863
103717
|
});
|
|
103864
103718
|
}
|
|
@@ -103982,18 +103836,19 @@ var ts;
|
|
|
103982
103836
|
}
|
|
103983
103837
|
}
|
|
103984
103838
|
function reportUpToDateStatus(state, configFileName, status) {
|
|
103839
|
+
if (state.options.force && (status.type === ts.UpToDateStatusType.UpToDate || status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes)) {
|
|
103840
|
+
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
103841
|
+
}
|
|
103985
103842
|
switch (status.type) {
|
|
103986
103843
|
case ts.UpToDateStatusType.OutOfDateWithSelf:
|
|
103987
|
-
return reportStatus(state, ts.Diagnostics.
|
|
103844
|
+
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));
|
|
103988
103845
|
case ts.UpToDateStatusType.OutOfDateWithUpstream:
|
|
103989
|
-
return reportStatus(state, ts.Diagnostics.
|
|
103846
|
+
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));
|
|
103990
103847
|
case ts.UpToDateStatusType.OutputMissing:
|
|
103991
103848
|
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));
|
|
103992
|
-
case ts.UpToDateStatusType.OutOfDateBuildInfo:
|
|
103993
|
-
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));
|
|
103994
103849
|
case ts.UpToDateStatusType.UpToDate:
|
|
103995
103850
|
if (status.newestInputFileTime !== undefined) {
|
|
103996
|
-
return reportStatus(state, ts.Diagnostics.
|
|
103851
|
+
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 || ""));
|
|
103997
103852
|
}
|
|
103998
103853
|
break;
|
|
103999
103854
|
case ts.UpToDateStatusType.OutOfDateWithPrepend:
|
|
@@ -104010,8 +103865,6 @@ var ts;
|
|
|
104010
103865
|
return reportStatus(state, ts.Diagnostics.Failed_to_parse_file_0_Colon_1, relName(state, configFileName), status.reason);
|
|
104011
103866
|
case ts.UpToDateStatusType.TsVersionOutputOfDate:
|
|
104012
103867
|
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);
|
|
104013
|
-
case ts.UpToDateStatusType.ForceBuild:
|
|
104014
|
-
return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
|
|
104015
103868
|
case ts.UpToDateStatusType.ContainerOnly:
|
|
104016
103869
|
case ts.UpToDateStatusType.ComputingUpstream:
|
|
104017
103870
|
break;
|