@typescript-deploys/pr-build 5.1.0-pr-53591-4 → 5.1.0-pr-51328-34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.es5.d.ts +1 -1
- package/lib/tsc.js +128 -102
- package/lib/tsserver.js +139 -113
- package/lib/tsserverlibrary.js +139 -112
- package/lib/typescript.js +128 -102
- package/lib/typingsInstaller.js +5 -3
- package/package.json +2 -2
package/lib/lib.es5.d.ts
CHANGED
|
@@ -1832,7 +1832,7 @@ interface DataView {
|
|
|
1832
1832
|
|
|
1833
1833
|
interface DataViewConstructor {
|
|
1834
1834
|
readonly prototype: DataView;
|
|
1835
|
-
new(buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView;
|
|
1835
|
+
new(buffer: ArrayBufferLike & { BYTES_PER_ELEMENT?: never }, byteOffset?: number, byteLength?: number): DataView;
|
|
1836
1836
|
}
|
|
1837
1837
|
declare var DataView: DataViewConstructor;
|
|
1838
1838
|
|
package/lib/tsc.js
CHANGED
|
@@ -5294,10 +5294,6 @@ function isAnyDirectorySeparator(charCode) {
|
|
|
5294
5294
|
function isRootedDiskPath(path) {
|
|
5295
5295
|
return getEncodedRootLength(path) > 0;
|
|
5296
5296
|
}
|
|
5297
|
-
function isDiskPathRoot(path) {
|
|
5298
|
-
const rootLength = getEncodedRootLength(path);
|
|
5299
|
-
return rootLength > 0 && rootLength === path.length;
|
|
5300
|
-
}
|
|
5301
5297
|
function pathIsAbsolute(path) {
|
|
5302
5298
|
return getEncodedRootLength(path) !== 0;
|
|
5303
5299
|
}
|
|
@@ -5446,11 +5442,11 @@ function getPathComponents(path, currentDirectory = "") {
|
|
|
5446
5442
|
path = combinePaths(currentDirectory, path);
|
|
5447
5443
|
return pathComponents(path, getRootLength(path));
|
|
5448
5444
|
}
|
|
5449
|
-
function getPathFromPathComponents(pathComponents2
|
|
5445
|
+
function getPathFromPathComponents(pathComponents2) {
|
|
5450
5446
|
if (pathComponents2.length === 0)
|
|
5451
5447
|
return "";
|
|
5452
5448
|
const root = pathComponents2[0] && ensureTrailingDirectorySeparator(pathComponents2[0]);
|
|
5453
|
-
return root + pathComponents2.slice(1
|
|
5449
|
+
return root + pathComponents2.slice(1).join(directorySeparator);
|
|
5454
5450
|
}
|
|
5455
5451
|
function normalizeSlashes(path) {
|
|
5456
5452
|
return path.indexOf("\\") !== -1 ? path.replace(backslashRegExp, directorySeparator) : path;
|
|
@@ -7745,7 +7741,8 @@ var Diagnostics = {
|
|
|
7745
7741
|
_0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
|
|
7746
7742
|
The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
|
|
7747
7743
|
Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string."),
|
|
7748
|
-
Non_abstract_class_0_does_not_implement_all_abstract_members_of_1: diag(18052, 1 /* Error */, "Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052", "Non-abstract class '{0}' does not implement all abstract members of '{1}'")
|
|
7744
|
+
Non_abstract_class_0_does_not_implement_all_abstract_members_of_1: diag(18052, 1 /* Error */, "Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052", "Non-abstract class '{0}' does not implement all abstract members of '{1}'"),
|
|
7745
|
+
Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type.")
|
|
7749
7746
|
};
|
|
7750
7747
|
|
|
7751
7748
|
// src/compiler/scanner.ts
|
|
@@ -68172,6 +68169,12 @@ function createTypeChecker(host) {
|
|
|
68172
68169
|
return getUnionType([jsxElementType, nullType]);
|
|
68173
68170
|
}
|
|
68174
68171
|
}
|
|
68172
|
+
function getJsxElementTypeTypeAt(location) {
|
|
68173
|
+
const type = getJsxType(JsxNames.ElementType, location);
|
|
68174
|
+
if (isErrorType(type))
|
|
68175
|
+
return void 0;
|
|
68176
|
+
return type;
|
|
68177
|
+
}
|
|
68175
68178
|
function getJsxIntrinsicTagNamesAt(location) {
|
|
68176
68179
|
const intrinsics = getJsxType(JsxNames.IntrinsicElements, location);
|
|
68177
68180
|
return intrinsics ? getPropertiesOfType(intrinsics) : emptyArray;
|
|
@@ -68234,7 +68237,24 @@ function createTypeChecker(host) {
|
|
|
68234
68237
|
const jsxOpeningLikeNode = node;
|
|
68235
68238
|
const sig = getResolvedSignature(jsxOpeningLikeNode);
|
|
68236
68239
|
checkDeprecatedSignature(sig, node);
|
|
68237
|
-
|
|
68240
|
+
const elementTypeConstraint = getJsxElementTypeTypeAt(jsxOpeningLikeNode);
|
|
68241
|
+
if (elementTypeConstraint !== void 0) {
|
|
68242
|
+
const tagType = isJsxIntrinsicIdentifier(jsxOpeningLikeNode.tagName) ? (
|
|
68243
|
+
// TODO: Should this be a literal that library authors could potentially check against?
|
|
68244
|
+
stringType
|
|
68245
|
+
) : getApparentType(checkExpression(jsxOpeningLikeNode.tagName));
|
|
68246
|
+
checkTypeRelatedTo(tagType, elementTypeConstraint, assignableRelation, jsxOpeningLikeNode.tagName, Diagnostics.Its_type_0_is_not_a_valid_JSX_element_type, () => {
|
|
68247
|
+
const componentName = getTextOfNode(jsxOpeningLikeNode.tagName);
|
|
68248
|
+
return chainDiagnosticMessages(
|
|
68249
|
+
/*details*/
|
|
68250
|
+
void 0,
|
|
68251
|
+
Diagnostics._0_cannot_be_used_as_a_JSX_component,
|
|
68252
|
+
componentName
|
|
68253
|
+
);
|
|
68254
|
+
});
|
|
68255
|
+
} else {
|
|
68256
|
+
checkJsxReturnAssignableToAppropriateBound(getJsxReferenceKind(jsxOpeningLikeNode), getReturnTypeOfSignature(sig), jsxOpeningLikeNode);
|
|
68257
|
+
}
|
|
68238
68258
|
}
|
|
68239
68259
|
}
|
|
68240
68260
|
function isKnownProperty(targetType, name, isComparingJsxAttributes) {
|
|
@@ -82997,6 +83017,7 @@ var JsxNames;
|
|
|
82997
83017
|
JsxNames2.ElementAttributesPropertyNameContainer = "ElementAttributesProperty";
|
|
82998
83018
|
JsxNames2.ElementChildrenAttributeNameContainer = "ElementChildrenAttribute";
|
|
82999
83019
|
JsxNames2.Element = "Element";
|
|
83020
|
+
JsxNames2.ElementType = "ElementType";
|
|
83000
83021
|
JsxNames2.IntrinsicAttributes = "IntrinsicAttributes";
|
|
83001
83022
|
JsxNames2.IntrinsicClassAttributes = "IntrinsicClassAttributes";
|
|
83002
83023
|
JsxNames2.LibraryManagedAttributes = "LibraryManagedAttributes";
|
|
@@ -118112,62 +118133,60 @@ function removeIgnoredPath(path) {
|
|
|
118112
118133
|
}
|
|
118113
118134
|
return some(ignoredPaths, (searchPath) => stringContains(path, searchPath)) ? void 0 : path;
|
|
118114
118135
|
}
|
|
118115
|
-
function
|
|
118116
|
-
|
|
118117
|
-
|
|
118118
|
-
let userCheckIndex = 1;
|
|
118119
|
-
let isDosStyle = pathComponents2[0].search(/[a-zA-Z]:/) === 0;
|
|
118120
|
-
if (pathComponents2[0] !== directorySeparator && !isDosStyle && // Non dos style paths
|
|
118121
|
-
pathComponents2[1].search(/[a-zA-Z]\$$/) === 0) {
|
|
118122
|
-
if (length2 === 2)
|
|
118123
|
-
return 2;
|
|
118124
|
-
userCheckIndex = 2;
|
|
118125
|
-
isDosStyle = true;
|
|
118126
|
-
}
|
|
118127
|
-
if (isDosStyle && !pathComponents2[userCheckIndex].match(/^users$/i)) {
|
|
118128
|
-
return userCheckIndex;
|
|
118129
|
-
}
|
|
118130
|
-
return userCheckIndex + 2;
|
|
118131
|
-
}
|
|
118132
|
-
function canWatchDirectoryOrFile(pathComponents2, length2) {
|
|
118133
|
-
if (length2 === void 0)
|
|
118134
|
-
length2 = pathComponents2.length;
|
|
118135
|
-
if (length2 <= 2)
|
|
118136
|
+
function canWatchDirectoryOrFile(dirPath) {
|
|
118137
|
+
const rootLength = getRootLength(dirPath);
|
|
118138
|
+
if (dirPath.length === rootLength) {
|
|
118136
118139
|
return false;
|
|
118137
|
-
|
|
118138
|
-
|
|
118139
|
-
|
|
118140
|
-
function canWatchAtTypes(atTypes) {
|
|
118141
|
-
return canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(getDirectoryPath(atTypes));
|
|
118142
|
-
}
|
|
118143
|
-
function isInDirectoryPath(dirComponents, fileOrDirComponents) {
|
|
118144
|
-
if (fileOrDirComponents.length < fileOrDirComponents.length)
|
|
118140
|
+
}
|
|
118141
|
+
let nextDirectorySeparator = dirPath.indexOf(directorySeparator, rootLength);
|
|
118142
|
+
if (nextDirectorySeparator === -1) {
|
|
118145
118143
|
return false;
|
|
118146
|
-
|
|
118147
|
-
|
|
118144
|
+
}
|
|
118145
|
+
let pathPartForUserCheck = dirPath.substring(rootLength, nextDirectorySeparator + 1);
|
|
118146
|
+
const isNonDirectorySeparatorRoot = rootLength > 1 || dirPath.charCodeAt(0) !== 47 /* slash */;
|
|
118147
|
+
if (isNonDirectorySeparatorRoot && dirPath.search(/[a-zA-Z]:/) !== 0 && // Non dos style paths
|
|
118148
|
+
pathPartForUserCheck.search(/[a-zA-Z]\$\//) === 0) {
|
|
118149
|
+
nextDirectorySeparator = dirPath.indexOf(directorySeparator, nextDirectorySeparator + 1);
|
|
118150
|
+
if (nextDirectorySeparator === -1) {
|
|
118151
|
+
return false;
|
|
118152
|
+
}
|
|
118153
|
+
pathPartForUserCheck = dirPath.substring(rootLength + pathPartForUserCheck.length, nextDirectorySeparator + 1);
|
|
118154
|
+
}
|
|
118155
|
+
if (isNonDirectorySeparatorRoot && pathPartForUserCheck.search(/users\//i) !== 0) {
|
|
118156
|
+
return true;
|
|
118157
|
+
}
|
|
118158
|
+
for (let searchIndex = nextDirectorySeparator + 1, searchLevels = 2; searchLevels > 0; searchLevels--) {
|
|
118159
|
+
searchIndex = dirPath.indexOf(directorySeparator, searchIndex) + 1;
|
|
118160
|
+
if (searchIndex === 0) {
|
|
118148
118161
|
return false;
|
|
118162
|
+
}
|
|
118149
118163
|
}
|
|
118150
118164
|
return true;
|
|
118151
118165
|
}
|
|
118152
|
-
function
|
|
118153
|
-
|
|
118166
|
+
function canWatchAtTypes(atTypes, rootPath) {
|
|
118167
|
+
const dirPath = getDirectoryPath(getDirectoryPath(atTypes));
|
|
118168
|
+
return dirPath === rootPath || canWatchDirectoryOrFile(dirPath);
|
|
118169
|
+
}
|
|
118170
|
+
function isInDirectoryPath(dir, file) {
|
|
118171
|
+
if (dir === void 0 || file.length <= dir.length) {
|
|
118172
|
+
return false;
|
|
118173
|
+
}
|
|
118174
|
+
return startsWith(file, dir) && file[dir.length] === directorySeparator;
|
|
118154
118175
|
}
|
|
118155
118176
|
function canWatchAffectingLocation(filePath) {
|
|
118156
|
-
return
|
|
118157
|
-
}
|
|
118158
|
-
function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath, rootDir, rootPath,
|
|
118159
|
-
|
|
118160
|
-
|
|
118161
|
-
|
|
118162
|
-
|
|
118163
|
-
|
|
118164
|
-
|
|
118165
|
-
|
|
118166
|
-
|
|
118167
|
-
|
|
118168
|
-
|
|
118169
|
-
if (failedLookupPathComponents.length > rootPathComponents.length + 1) {
|
|
118170
|
-
return getDirectoryOfFailedLookupWatch(failedLookupComponents, failedLookupPathComponents, Math.max(rootPathComponents.length + 1, perceivedOsRootLength + 1));
|
|
118177
|
+
return canWatchDirectoryOrFile(filePath);
|
|
118178
|
+
}
|
|
118179
|
+
function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath, rootDir, rootPath, rootSplitLength, getCurrentDirectory) {
|
|
118180
|
+
if (isInDirectoryPath(rootPath, failedLookupLocationPath)) {
|
|
118181
|
+
failedLookupLocation = isRootedDiskPath(failedLookupLocation) ? normalizePath(failedLookupLocation) : getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
|
|
118182
|
+
const failedLookupPathSplit = failedLookupLocationPath.split(directorySeparator);
|
|
118183
|
+
const failedLookupSplit = failedLookupLocation.split(directorySeparator);
|
|
118184
|
+
Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, `FailedLookup: ${failedLookupLocation} failedLookupLocationPath: ${failedLookupLocationPath}`);
|
|
118185
|
+
if (failedLookupPathSplit.length > rootSplitLength + 1) {
|
|
118186
|
+
return {
|
|
118187
|
+
dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(directorySeparator),
|
|
118188
|
+
dirPath: failedLookupPathSplit.slice(0, rootSplitLength + 1).join(directorySeparator)
|
|
118189
|
+
};
|
|
118171
118190
|
} else {
|
|
118172
118191
|
return {
|
|
118173
118192
|
dir: rootDir,
|
|
@@ -118177,55 +118196,45 @@ function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLoo
|
|
|
118177
118196
|
}
|
|
118178
118197
|
}
|
|
118179
118198
|
return getDirectoryToWatchFromFailedLookupLocationDirectory(
|
|
118180
|
-
|
|
118181
|
-
|
|
118182
|
-
|
|
118183
|
-
perceivedOsRootLength,
|
|
118184
|
-
nodeModulesIndex,
|
|
118185
|
-
rootPathComponents
|
|
118199
|
+
getDirectoryPath(getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory())),
|
|
118200
|
+
getDirectoryPath(failedLookupLocationPath),
|
|
118201
|
+
rootPath
|
|
118186
118202
|
);
|
|
118187
118203
|
}
|
|
118188
|
-
function getDirectoryToWatchFromFailedLookupLocationDirectory(
|
|
118189
|
-
|
|
118190
|
-
|
|
118204
|
+
function getDirectoryToWatchFromFailedLookupLocationDirectory(dir, dirPath, rootPath) {
|
|
118205
|
+
while (pathContainsNodeModules(dirPath)) {
|
|
118206
|
+
dir = getDirectoryPath(dir);
|
|
118207
|
+
dirPath = getDirectoryPath(dirPath);
|
|
118208
|
+
}
|
|
118209
|
+
if (isNodeModulesDirectory(dirPath)) {
|
|
118210
|
+
return canWatchDirectoryOrFile(getDirectoryPath(dirPath)) ? { dir, dirPath } : void 0;
|
|
118191
118211
|
}
|
|
118192
118212
|
let nonRecursive = true;
|
|
118193
|
-
let
|
|
118194
|
-
|
|
118195
|
-
|
|
118213
|
+
let subDirectoryPath, subDirectory;
|
|
118214
|
+
if (rootPath !== void 0) {
|
|
118215
|
+
while (!isInDirectoryPath(dirPath, rootPath)) {
|
|
118216
|
+
const parentPath = getDirectoryPath(dirPath);
|
|
118217
|
+
if (parentPath === dirPath) {
|
|
118218
|
+
break;
|
|
118219
|
+
}
|
|
118196
118220
|
nonRecursive = false;
|
|
118197
|
-
|
|
118198
|
-
|
|
118221
|
+
subDirectoryPath = dirPath;
|
|
118222
|
+
subDirectory = dir;
|
|
118223
|
+
dirPath = parentPath;
|
|
118224
|
+
dir = getDirectoryPath(dir);
|
|
118199
118225
|
}
|
|
118200
118226
|
}
|
|
118201
|
-
return
|
|
118227
|
+
return canWatchDirectoryOrFile(dirPath) ? { dir: subDirectory || dir, dirPath: subDirectoryPath || dirPath, nonRecursive } : void 0;
|
|
118202
118228
|
}
|
|
118203
|
-
function
|
|
118204
|
-
|
|
118205
|
-
dir: getPathFromPathComponents(dirComponents, length2),
|
|
118206
|
-
dirPath: getPathFromPathComponents(dirPathComponents, length2),
|
|
118207
|
-
nonRecursive
|
|
118208
|
-
};
|
|
118209
|
-
}
|
|
118210
|
-
function getDirectoryToWatchFailedLookupLocationFromTypeRoot(typeRoot, typeRootPath, rootPath, rootPathComponents, getCurrentDirectory, filterCustomPath) {
|
|
118211
|
-
const typeRootPathComponents = getPathComponents(typeRootPath);
|
|
118212
|
-
if (isInDirectoryPath(rootPathComponents, typeRootPathComponents)) {
|
|
118229
|
+
function getDirectoryToWatchFailedLookupLocationFromTypeRoot(typeRoot, typeRootPath, rootPath, filterCustomPath) {
|
|
118230
|
+
if (isInDirectoryPath(rootPath, typeRootPath)) {
|
|
118213
118231
|
return rootPath;
|
|
118214
118232
|
}
|
|
118215
|
-
|
|
118216
|
-
const toWatch = getDirectoryToWatchFromFailedLookupLocationDirectory(
|
|
118217
|
-
getPathComponents(typeRoot),
|
|
118218
|
-
typeRootPathComponents,
|
|
118219
|
-
typeRootPathComponents.length,
|
|
118220
|
-
perceivedOsRootLengthForWatching(typeRootPathComponents, typeRootPathComponents.length),
|
|
118221
|
-
typeRootPathComponents.indexOf("node_modules"),
|
|
118222
|
-
rootPathComponents
|
|
118223
|
-
);
|
|
118233
|
+
const toWatch = getDirectoryToWatchFromFailedLookupLocationDirectory(typeRoot, typeRootPath, rootPath);
|
|
118224
118234
|
return toWatch && filterCustomPath(toWatch.dirPath) ? toWatch.dirPath : void 0;
|
|
118225
118235
|
}
|
|
118226
118236
|
function getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirectory) {
|
|
118227
|
-
|
|
118228
|
-
return !isDiskPathRoot(normalized) ? removeTrailingDirectorySeparator(normalized) : normalized;
|
|
118237
|
+
return rootDirForResolution && removeTrailingDirectorySeparator(getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory()));
|
|
118229
118238
|
}
|
|
118230
118239
|
function createResolutionCache(resolutionHost, rootDirForResolution, logChangesWhenResolvingModule) {
|
|
118231
118240
|
let filesWithChangedSetOfUnresolvedImports;
|
|
@@ -118257,11 +118266,13 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118257
118266
|
resolutionHost.getCompilationSettings(),
|
|
118258
118267
|
moduleResolutionCache.getPackageJsonInfoCache()
|
|
118259
118268
|
);
|
|
118269
|
+
const failedLookupDefaultExtensions = [".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */, ".json" /* Json */];
|
|
118270
|
+
const customFailedLookupPaths = /* @__PURE__ */ new Map();
|
|
118260
118271
|
const directoryWatchesOfFailedLookups = /* @__PURE__ */ new Map();
|
|
118261
118272
|
const fileWatchesOfAffectingLocations = /* @__PURE__ */ new Map();
|
|
118262
118273
|
const rootDir = getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirectory);
|
|
118263
|
-
const rootPath = resolutionHost.toPath(rootDir);
|
|
118264
|
-
const
|
|
118274
|
+
const rootPath = rootDir && resolutionHost.toPath(rootDir);
|
|
118275
|
+
const rootSplitLength = rootPath !== void 0 ? rootPath.split(directorySeparator).length : 0;
|
|
118265
118276
|
const typeRootsWatches = /* @__PURE__ */ new Map();
|
|
118266
118277
|
return {
|
|
118267
118278
|
getModuleResolutionCache: () => moduleResolutionCache,
|
|
@@ -118295,6 +118306,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118295
118306
|
function clear2() {
|
|
118296
118307
|
clearMap(directoryWatchesOfFailedLookups, closeFileWatcherOf);
|
|
118297
118308
|
clearMap(fileWatchesOfAffectingLocations, closeFileWatcherOf);
|
|
118309
|
+
customFailedLookupPaths.clear();
|
|
118298
118310
|
nonRelativeExternalModuleResolutions.clear();
|
|
118299
118311
|
closeTypeRootsWatch();
|
|
118300
118312
|
resolvedModuleNames.clear();
|
|
@@ -118574,6 +118586,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118574
118586
|
function isNodeModulesAtTypesDirectory(dirPath) {
|
|
118575
118587
|
return endsWith(dirPath, "/node_modules/@types");
|
|
118576
118588
|
}
|
|
118589
|
+
function isPathWithDefaultFailedLookupExtension(path) {
|
|
118590
|
+
return fileExtensionIsOneOf(path, failedLookupDefaultExtensions);
|
|
118591
|
+
}
|
|
118577
118592
|
function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) {
|
|
118578
118593
|
var _a2, _b;
|
|
118579
118594
|
if (resolution.refCount) {
|
|
@@ -118614,11 +118629,15 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118614
118629
|
failedLookupLocationPath,
|
|
118615
118630
|
rootDir,
|
|
118616
118631
|
rootPath,
|
|
118617
|
-
|
|
118632
|
+
rootSplitLength,
|
|
118618
118633
|
getCurrentDirectory
|
|
118619
118634
|
);
|
|
118620
118635
|
if (toWatch) {
|
|
118621
118636
|
const { dir, dirPath, nonRecursive } = toWatch;
|
|
118637
|
+
if (!isPathWithDefaultFailedLookupExtension(failedLookupLocationPath)) {
|
|
118638
|
+
const refCount = customFailedLookupPaths.get(failedLookupLocationPath) || 0;
|
|
118639
|
+
customFailedLookupPaths.set(failedLookupLocationPath, refCount + 1);
|
|
118640
|
+
}
|
|
118622
118641
|
if (dirPath === rootPath) {
|
|
118623
118642
|
Debug.assert(nonRecursive);
|
|
118624
118643
|
setAtRoot = true;
|
|
@@ -118753,11 +118772,20 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118753
118772
|
failedLookupLocationPath,
|
|
118754
118773
|
rootDir,
|
|
118755
118774
|
rootPath,
|
|
118756
|
-
|
|
118775
|
+
rootSplitLength,
|
|
118757
118776
|
getCurrentDirectory
|
|
118758
118777
|
);
|
|
118759
118778
|
if (toWatch) {
|
|
118760
118779
|
const { dirPath } = toWatch;
|
|
118780
|
+
const refCount = customFailedLookupPaths.get(failedLookupLocationPath);
|
|
118781
|
+
if (refCount) {
|
|
118782
|
+
if (refCount === 1) {
|
|
118783
|
+
customFailedLookupPaths.delete(failedLookupLocationPath);
|
|
118784
|
+
} else {
|
|
118785
|
+
Debug.assert(refCount > 1);
|
|
118786
|
+
customFailedLookupPaths.set(failedLookupLocationPath, refCount - 1);
|
|
118787
|
+
}
|
|
118788
|
+
}
|
|
118761
118789
|
if (dirPath === rootPath) {
|
|
118762
118790
|
removeAtRoot = true;
|
|
118763
118791
|
} else {
|
|
@@ -118855,10 +118883,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118855
118883
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
118856
118884
|
(startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
118857
118885
|
} else {
|
|
118858
|
-
if (
|
|
118886
|
+
if (!isPathWithDefaultFailedLookupExtension(fileOrDirectoryPath) && !customFailedLookupPaths.has(fileOrDirectoryPath)) {
|
|
118859
118887
|
return false;
|
|
118860
118888
|
}
|
|
118861
|
-
if (
|
|
118889
|
+
if (isEmittedFileOfProgram(resolutionHost.getCurrentProgram(), fileOrDirectoryPath)) {
|
|
118862
118890
|
return false;
|
|
118863
118891
|
}
|
|
118864
118892
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
@@ -118905,7 +118933,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118905
118933
|
return (_a2 = resolution.failedLookupLocations) == null ? void 0 : _a2.some((location) => isInvalidatedFailedLookup(resolutionHost.toPath(location)));
|
|
118906
118934
|
}
|
|
118907
118935
|
function isInvalidatedFailedLookup(locationPath) {
|
|
118908
|
-
return (failedLookupChecks == null ? void 0 : failedLookupChecks.has(locationPath)) || firstDefinedIterator((startsWithPathChecks == null ? void 0 : startsWithPathChecks.keys()) || [], (fileOrDirectoryPath) => startsWith(locationPath, fileOrDirectoryPath) ? true : void 0) || firstDefinedIterator((isInDirectoryChecks == null ? void 0 : isInDirectoryChecks.keys()) || [], (
|
|
118936
|
+
return (failedLookupChecks == null ? void 0 : failedLookupChecks.has(locationPath)) || firstDefinedIterator((startsWithPathChecks == null ? void 0 : startsWithPathChecks.keys()) || [], (fileOrDirectoryPath) => startsWith(locationPath, fileOrDirectoryPath) ? true : void 0) || firstDefinedIterator((isInDirectoryChecks == null ? void 0 : isInDirectoryChecks.keys()) || [], (fileOrDirectoryPath) => isInDirectoryPath(fileOrDirectoryPath, locationPath) ? true : void 0);
|
|
118909
118937
|
}
|
|
118910
118938
|
function canInvalidatedFailedLookupResolutionWithAffectingLocation(resolution) {
|
|
118911
118939
|
var _a2;
|
|
@@ -118926,8 +118954,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118926
118954
|
typeRoot,
|
|
118927
118955
|
typeRootPath,
|
|
118928
118956
|
rootPath,
|
|
118929
|
-
rootPathComponents,
|
|
118930
|
-
getCurrentDirectory,
|
|
118931
118957
|
(dirPath2) => directoryWatchesOfFailedLookups.has(dirPath2)
|
|
118932
118958
|
);
|
|
118933
118959
|
if (dirPath) {
|
|
@@ -118958,7 +118984,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118958
118984
|
function canWatchTypeRootPath(typeRoot) {
|
|
118959
118985
|
if (resolutionHost.getCompilationSettings().typeRoots)
|
|
118960
118986
|
return true;
|
|
118961
|
-
return canWatchAtTypes(resolutionHost.toPath(typeRoot));
|
|
118987
|
+
return canWatchAtTypes(resolutionHost.toPath(typeRoot), rootPath);
|
|
118962
118988
|
}
|
|
118963
118989
|
}
|
|
118964
118990
|
function resolutionIsSymlink(resolution) {
|