@typescript-deploys/pr-build 5.1.0-pr-53420-2 → 5.1.0-pr-53487-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +29 -12
- package/lib/tsserver.js +36 -13
- package/lib/tsserverlibrary.js +36 -13
- package/lib/typescript.js +36 -13
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -118065,6 +118065,8 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118065
118065
|
resolutionHost.getCompilationSettings(),
|
|
118066
118066
|
moduleResolutionCache.getPackageJsonInfoCache()
|
|
118067
118067
|
);
|
|
118068
|
+
const failedLookupDefaultExtensions = [".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */, ".json" /* Json */];
|
|
118069
|
+
const customFailedLookupPaths = /* @__PURE__ */ new Map();
|
|
118068
118070
|
const directoryWatchesOfFailedLookups = /* @__PURE__ */ new Map();
|
|
118069
118071
|
const fileWatchesOfAffectingLocations = /* @__PURE__ */ new Map();
|
|
118070
118072
|
const rootDir = rootDirForResolution && removeTrailingDirectorySeparator(getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory()));
|
|
@@ -118109,6 +118111,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118109
118111
|
function clear2() {
|
|
118110
118112
|
clearMap(directoryWatchesOfFailedLookups, closeFileWatcherOf);
|
|
118111
118113
|
clearMap(fileWatchesOfAffectingLocations, closeFileWatcherOf);
|
|
118114
|
+
customFailedLookupPaths.clear();
|
|
118112
118115
|
nonRelativeExternalModuleResolutions.clear();
|
|
118113
118116
|
closeTypeRootsWatch();
|
|
118114
118117
|
resolvedModuleNames.clear();
|
|
@@ -118418,7 +118421,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118418
118421
|
dirPath = getDirectoryPath(dirPath);
|
|
118419
118422
|
}
|
|
118420
118423
|
if (isNodeModulesDirectory(dirPath)) {
|
|
118421
|
-
return canWatchDirectoryOrFile(dirPath) ? { dir, dirPath } : void 0;
|
|
118424
|
+
return canWatchDirectoryOrFile(getDirectoryPath(dirPath)) ? { dir, dirPath } : void 0;
|
|
118422
118425
|
}
|
|
118423
118426
|
let nonRecursive = true;
|
|
118424
118427
|
let subDirectoryPath, subDirectory;
|
|
@@ -118437,6 +118440,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118437
118440
|
}
|
|
118438
118441
|
return canWatchDirectoryOrFile(dirPath) ? { dir: subDirectory || dir, dirPath: subDirectoryPath || dirPath, nonRecursive } : void 0;
|
|
118439
118442
|
}
|
|
118443
|
+
function isPathWithDefaultFailedLookupExtension(path) {
|
|
118444
|
+
return fileExtensionIsOneOf(path, failedLookupDefaultExtensions);
|
|
118445
|
+
}
|
|
118440
118446
|
function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) {
|
|
118441
118447
|
var _a2, _b;
|
|
118442
118448
|
if (resolution.refCount) {
|
|
@@ -118475,6 +118481,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118475
118481
|
const toWatch = getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath);
|
|
118476
118482
|
if (toWatch) {
|
|
118477
118483
|
const { dir, dirPath, nonRecursive } = toWatch;
|
|
118484
|
+
if (!isPathWithDefaultFailedLookupExtension(failedLookupLocationPath)) {
|
|
118485
|
+
const refCount = customFailedLookupPaths.get(failedLookupLocationPath) || 0;
|
|
118486
|
+
customFailedLookupPaths.set(failedLookupLocationPath, refCount + 1);
|
|
118487
|
+
}
|
|
118478
118488
|
if (dirPath === rootPath) {
|
|
118479
118489
|
Debug.assert(!nonRecursive);
|
|
118480
118490
|
setAtRoot = true;
|
|
@@ -118509,10 +118519,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118509
118519
|
);
|
|
118510
118520
|
}
|
|
118511
118521
|
}
|
|
118512
|
-
function isInRootPathOrCanWatchDirectoryOrFile(locationToWatch) {
|
|
118513
|
-
const path = resolutionHost.toPath(locationToWatch);
|
|
118514
|
-
return isInDirectoryPath(rootPath, path) || canWatchDirectoryOrFile(path);
|
|
118515
|
-
}
|
|
118516
118522
|
function createFileWatcherOfAffectingLocation(affectingLocation, forResolution) {
|
|
118517
118523
|
const fileWatcher = fileWatchesOfAffectingLocations.get(affectingLocation);
|
|
118518
118524
|
if (fileWatcher) {
|
|
@@ -118540,7 +118546,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118540
118546
|
}
|
|
118541
118547
|
const paths = /* @__PURE__ */ new Set();
|
|
118542
118548
|
paths.add(locationToWatch);
|
|
118543
|
-
let actualWatcher =
|
|
118549
|
+
let actualWatcher = canWatchDirectoryOrFile(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => {
|
|
118544
118550
|
cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind);
|
|
118545
118551
|
const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
|
|
118546
118552
|
paths.forEach((path) => {
|
|
@@ -118611,6 +118617,15 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118611
118617
|
const toWatch = getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath);
|
|
118612
118618
|
if (toWatch) {
|
|
118613
118619
|
const { dirPath } = toWatch;
|
|
118620
|
+
const refCount = customFailedLookupPaths.get(failedLookupLocationPath);
|
|
118621
|
+
if (refCount) {
|
|
118622
|
+
if (refCount === 1) {
|
|
118623
|
+
customFailedLookupPaths.delete(failedLookupLocationPath);
|
|
118624
|
+
} else {
|
|
118625
|
+
Debug.assert(refCount > 1);
|
|
118626
|
+
customFailedLookupPaths.set(failedLookupLocationPath, refCount - 1);
|
|
118627
|
+
}
|
|
118628
|
+
}
|
|
118614
118629
|
if (dirPath === rootPath) {
|
|
118615
118630
|
removeAtRoot = true;
|
|
118616
118631
|
} else {
|
|
@@ -118708,10 +118723,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118708
118723
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
118709
118724
|
(startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
118710
118725
|
} else {
|
|
118711
|
-
if (
|
|
118726
|
+
if (!isPathWithDefaultFailedLookupExtension(fileOrDirectoryPath) && !customFailedLookupPaths.has(fileOrDirectoryPath)) {
|
|
118712
118727
|
return false;
|
|
118713
118728
|
}
|
|
118714
|
-
if (
|
|
118729
|
+
if (isEmittedFileOfProgram(resolutionHost.getCurrentProgram(), fileOrDirectoryPath)) {
|
|
118715
118730
|
return false;
|
|
118716
118731
|
}
|
|
118717
118732
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
@@ -118808,10 +118823,12 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118808
118823
|
closeTypeRootsWatch();
|
|
118809
118824
|
}
|
|
118810
118825
|
}
|
|
118811
|
-
function canWatchTypeRootPath(
|
|
118812
|
-
|
|
118813
|
-
|
|
118814
|
-
|
|
118826
|
+
function canWatchTypeRootPath(nodeTypesDirectory) {
|
|
118827
|
+
if (resolutionHost.getCompilationSettings().typeRoots)
|
|
118828
|
+
return true;
|
|
118829
|
+
const dir = getDirectoryPath(getDirectoryPath(nodeTypesDirectory));
|
|
118830
|
+
const dirPath = resolutionHost.toPath(dir);
|
|
118831
|
+
return dirPath === rootPath || canWatchDirectoryOrFile(dirPath);
|
|
118815
118832
|
}
|
|
118816
118833
|
}
|
|
118817
118834
|
function resolutionIsSymlink(resolution) {
|
package/lib/tsserver.js
CHANGED
|
@@ -122960,6 +122960,8 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
122960
122960
|
resolutionHost.getCompilationSettings(),
|
|
122961
122961
|
moduleResolutionCache.getPackageJsonInfoCache()
|
|
122962
122962
|
);
|
|
122963
|
+
const failedLookupDefaultExtensions = [".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */, ".json" /* Json */];
|
|
122964
|
+
const customFailedLookupPaths = /* @__PURE__ */ new Map();
|
|
122963
122965
|
const directoryWatchesOfFailedLookups = /* @__PURE__ */ new Map();
|
|
122964
122966
|
const fileWatchesOfAffectingLocations = /* @__PURE__ */ new Map();
|
|
122965
122967
|
const rootDir = rootDirForResolution && removeTrailingDirectorySeparator(getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory()));
|
|
@@ -123004,6 +123006,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123004
123006
|
function clear2() {
|
|
123005
123007
|
clearMap(directoryWatchesOfFailedLookups, closeFileWatcherOf);
|
|
123006
123008
|
clearMap(fileWatchesOfAffectingLocations, closeFileWatcherOf);
|
|
123009
|
+
customFailedLookupPaths.clear();
|
|
123007
123010
|
nonRelativeExternalModuleResolutions.clear();
|
|
123008
123011
|
closeTypeRootsWatch();
|
|
123009
123012
|
resolvedModuleNames.clear();
|
|
@@ -123313,7 +123316,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123313
123316
|
dirPath = getDirectoryPath(dirPath);
|
|
123314
123317
|
}
|
|
123315
123318
|
if (isNodeModulesDirectory(dirPath)) {
|
|
123316
|
-
return canWatchDirectoryOrFile(dirPath) ? { dir, dirPath } : void 0;
|
|
123319
|
+
return canWatchDirectoryOrFile(getDirectoryPath(dirPath)) ? { dir, dirPath } : void 0;
|
|
123317
123320
|
}
|
|
123318
123321
|
let nonRecursive = true;
|
|
123319
123322
|
let subDirectoryPath, subDirectory;
|
|
@@ -123332,6 +123335,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123332
123335
|
}
|
|
123333
123336
|
return canWatchDirectoryOrFile(dirPath) ? { dir: subDirectory || dir, dirPath: subDirectoryPath || dirPath, nonRecursive } : void 0;
|
|
123334
123337
|
}
|
|
123338
|
+
function isPathWithDefaultFailedLookupExtension(path) {
|
|
123339
|
+
return fileExtensionIsOneOf(path, failedLookupDefaultExtensions);
|
|
123340
|
+
}
|
|
123335
123341
|
function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) {
|
|
123336
123342
|
var _a2, _b;
|
|
123337
123343
|
if (resolution.refCount) {
|
|
@@ -123370,6 +123376,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123370
123376
|
const toWatch = getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath);
|
|
123371
123377
|
if (toWatch) {
|
|
123372
123378
|
const { dir, dirPath, nonRecursive } = toWatch;
|
|
123379
|
+
if (!isPathWithDefaultFailedLookupExtension(failedLookupLocationPath)) {
|
|
123380
|
+
const refCount = customFailedLookupPaths.get(failedLookupLocationPath) || 0;
|
|
123381
|
+
customFailedLookupPaths.set(failedLookupLocationPath, refCount + 1);
|
|
123382
|
+
}
|
|
123373
123383
|
if (dirPath === rootPath) {
|
|
123374
123384
|
Debug.assert(!nonRecursive);
|
|
123375
123385
|
setAtRoot = true;
|
|
@@ -123404,10 +123414,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123404
123414
|
);
|
|
123405
123415
|
}
|
|
123406
123416
|
}
|
|
123407
|
-
function isInRootPathOrCanWatchDirectoryOrFile(locationToWatch) {
|
|
123408
|
-
const path = resolutionHost.toPath(locationToWatch);
|
|
123409
|
-
return isInDirectoryPath(rootPath, path) || canWatchDirectoryOrFile(path);
|
|
123410
|
-
}
|
|
123411
123417
|
function createFileWatcherOfAffectingLocation(affectingLocation, forResolution) {
|
|
123412
123418
|
const fileWatcher = fileWatchesOfAffectingLocations.get(affectingLocation);
|
|
123413
123419
|
if (fileWatcher) {
|
|
@@ -123435,7 +123441,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123435
123441
|
}
|
|
123436
123442
|
const paths = /* @__PURE__ */ new Set();
|
|
123437
123443
|
paths.add(locationToWatch);
|
|
123438
|
-
let actualWatcher =
|
|
123444
|
+
let actualWatcher = canWatchDirectoryOrFile(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => {
|
|
123439
123445
|
cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind);
|
|
123440
123446
|
const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
|
|
123441
123447
|
paths.forEach((path) => {
|
|
@@ -123506,6 +123512,15 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123506
123512
|
const toWatch = getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath);
|
|
123507
123513
|
if (toWatch) {
|
|
123508
123514
|
const { dirPath } = toWatch;
|
|
123515
|
+
const refCount = customFailedLookupPaths.get(failedLookupLocationPath);
|
|
123516
|
+
if (refCount) {
|
|
123517
|
+
if (refCount === 1) {
|
|
123518
|
+
customFailedLookupPaths.delete(failedLookupLocationPath);
|
|
123519
|
+
} else {
|
|
123520
|
+
Debug.assert(refCount > 1);
|
|
123521
|
+
customFailedLookupPaths.set(failedLookupLocationPath, refCount - 1);
|
|
123522
|
+
}
|
|
123523
|
+
}
|
|
123509
123524
|
if (dirPath === rootPath) {
|
|
123510
123525
|
removeAtRoot = true;
|
|
123511
123526
|
} else {
|
|
@@ -123603,10 +123618,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123603
123618
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
123604
123619
|
(startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
123605
123620
|
} else {
|
|
123606
|
-
if (
|
|
123621
|
+
if (!isPathWithDefaultFailedLookupExtension(fileOrDirectoryPath) && !customFailedLookupPaths.has(fileOrDirectoryPath)) {
|
|
123607
123622
|
return false;
|
|
123608
123623
|
}
|
|
123609
|
-
if (
|
|
123624
|
+
if (isEmittedFileOfProgram(resolutionHost.getCurrentProgram(), fileOrDirectoryPath)) {
|
|
123610
123625
|
return false;
|
|
123611
123626
|
}
|
|
123612
123627
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
@@ -123703,10 +123718,12 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123703
123718
|
closeTypeRootsWatch();
|
|
123704
123719
|
}
|
|
123705
123720
|
}
|
|
123706
|
-
function canWatchTypeRootPath(
|
|
123707
|
-
|
|
123708
|
-
|
|
123709
|
-
|
|
123721
|
+
function canWatchTypeRootPath(nodeTypesDirectory) {
|
|
123722
|
+
if (resolutionHost.getCompilationSettings().typeRoots)
|
|
123723
|
+
return true;
|
|
123724
|
+
const dir = getDirectoryPath(getDirectoryPath(nodeTypesDirectory));
|
|
123725
|
+
const dirPath = resolutionHost.toPath(dir);
|
|
123726
|
+
return dirPath === rootPath || canWatchDirectoryOrFile(dirPath);
|
|
123710
123727
|
}
|
|
123711
123728
|
}
|
|
123712
123729
|
function resolutionIsSymlink(resolution) {
|
|
@@ -128742,7 +128759,13 @@ function findPrecedingToken(position, sourceFile, startNode2, excludeJsdoc) {
|
|
|
128742
128759
|
sourceFile,
|
|
128743
128760
|
n.kind
|
|
128744
128761
|
);
|
|
128745
|
-
|
|
128762
|
+
if (candidate2) {
|
|
128763
|
+
if (isJSDocCommentContainingNode(candidate2) && candidate2.getChildren(sourceFile).length) {
|
|
128764
|
+
return find2(candidate2);
|
|
128765
|
+
}
|
|
128766
|
+
return findRightmostToken(candidate2, sourceFile);
|
|
128767
|
+
}
|
|
128768
|
+
return void 0;
|
|
128746
128769
|
} else {
|
|
128747
128770
|
return find2(child);
|
|
128748
128771
|
}
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -121131,6 +121131,8 @@ ${lanes.join("\n")}
|
|
|
121131
121131
|
resolutionHost.getCompilationSettings(),
|
|
121132
121132
|
moduleResolutionCache.getPackageJsonInfoCache()
|
|
121133
121133
|
);
|
|
121134
|
+
const failedLookupDefaultExtensions = [".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */, ".json" /* Json */];
|
|
121135
|
+
const customFailedLookupPaths = /* @__PURE__ */ new Map();
|
|
121134
121136
|
const directoryWatchesOfFailedLookups = /* @__PURE__ */ new Map();
|
|
121135
121137
|
const fileWatchesOfAffectingLocations = /* @__PURE__ */ new Map();
|
|
121136
121138
|
const rootDir = rootDirForResolution && removeTrailingDirectorySeparator(getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory()));
|
|
@@ -121175,6 +121177,7 @@ ${lanes.join("\n")}
|
|
|
121175
121177
|
function clear2() {
|
|
121176
121178
|
clearMap(directoryWatchesOfFailedLookups, closeFileWatcherOf);
|
|
121177
121179
|
clearMap(fileWatchesOfAffectingLocations, closeFileWatcherOf);
|
|
121180
|
+
customFailedLookupPaths.clear();
|
|
121178
121181
|
nonRelativeExternalModuleResolutions.clear();
|
|
121179
121182
|
closeTypeRootsWatch();
|
|
121180
121183
|
resolvedModuleNames.clear();
|
|
@@ -121484,7 +121487,7 @@ ${lanes.join("\n")}
|
|
|
121484
121487
|
dirPath = getDirectoryPath(dirPath);
|
|
121485
121488
|
}
|
|
121486
121489
|
if (isNodeModulesDirectory(dirPath)) {
|
|
121487
|
-
return canWatchDirectoryOrFile(dirPath) ? { dir, dirPath } : void 0;
|
|
121490
|
+
return canWatchDirectoryOrFile(getDirectoryPath(dirPath)) ? { dir, dirPath } : void 0;
|
|
121488
121491
|
}
|
|
121489
121492
|
let nonRecursive = true;
|
|
121490
121493
|
let subDirectoryPath, subDirectory;
|
|
@@ -121503,6 +121506,9 @@ ${lanes.join("\n")}
|
|
|
121503
121506
|
}
|
|
121504
121507
|
return canWatchDirectoryOrFile(dirPath) ? { dir: subDirectory || dir, dirPath: subDirectoryPath || dirPath, nonRecursive } : void 0;
|
|
121505
121508
|
}
|
|
121509
|
+
function isPathWithDefaultFailedLookupExtension(path) {
|
|
121510
|
+
return fileExtensionIsOneOf(path, failedLookupDefaultExtensions);
|
|
121511
|
+
}
|
|
121506
121512
|
function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) {
|
|
121507
121513
|
var _a2, _b;
|
|
121508
121514
|
if (resolution.refCount) {
|
|
@@ -121541,6 +121547,10 @@ ${lanes.join("\n")}
|
|
|
121541
121547
|
const toWatch = getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath);
|
|
121542
121548
|
if (toWatch) {
|
|
121543
121549
|
const { dir, dirPath, nonRecursive } = toWatch;
|
|
121550
|
+
if (!isPathWithDefaultFailedLookupExtension(failedLookupLocationPath)) {
|
|
121551
|
+
const refCount = customFailedLookupPaths.get(failedLookupLocationPath) || 0;
|
|
121552
|
+
customFailedLookupPaths.set(failedLookupLocationPath, refCount + 1);
|
|
121553
|
+
}
|
|
121544
121554
|
if (dirPath === rootPath) {
|
|
121545
121555
|
Debug.assert(!nonRecursive);
|
|
121546
121556
|
setAtRoot = true;
|
|
@@ -121575,10 +121585,6 @@ ${lanes.join("\n")}
|
|
|
121575
121585
|
);
|
|
121576
121586
|
}
|
|
121577
121587
|
}
|
|
121578
|
-
function isInRootPathOrCanWatchDirectoryOrFile(locationToWatch) {
|
|
121579
|
-
const path = resolutionHost.toPath(locationToWatch);
|
|
121580
|
-
return isInDirectoryPath(rootPath, path) || canWatchDirectoryOrFile(path);
|
|
121581
|
-
}
|
|
121582
121588
|
function createFileWatcherOfAffectingLocation(affectingLocation, forResolution) {
|
|
121583
121589
|
const fileWatcher = fileWatchesOfAffectingLocations.get(affectingLocation);
|
|
121584
121590
|
if (fileWatcher) {
|
|
@@ -121606,7 +121612,7 @@ ${lanes.join("\n")}
|
|
|
121606
121612
|
}
|
|
121607
121613
|
const paths = /* @__PURE__ */ new Set();
|
|
121608
121614
|
paths.add(locationToWatch);
|
|
121609
|
-
let actualWatcher =
|
|
121615
|
+
let actualWatcher = canWatchDirectoryOrFile(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => {
|
|
121610
121616
|
cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind);
|
|
121611
121617
|
const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
|
|
121612
121618
|
paths.forEach((path) => {
|
|
@@ -121677,6 +121683,15 @@ ${lanes.join("\n")}
|
|
|
121677
121683
|
const toWatch = getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath);
|
|
121678
121684
|
if (toWatch) {
|
|
121679
121685
|
const { dirPath } = toWatch;
|
|
121686
|
+
const refCount = customFailedLookupPaths.get(failedLookupLocationPath);
|
|
121687
|
+
if (refCount) {
|
|
121688
|
+
if (refCount === 1) {
|
|
121689
|
+
customFailedLookupPaths.delete(failedLookupLocationPath);
|
|
121690
|
+
} else {
|
|
121691
|
+
Debug.assert(refCount > 1);
|
|
121692
|
+
customFailedLookupPaths.set(failedLookupLocationPath, refCount - 1);
|
|
121693
|
+
}
|
|
121694
|
+
}
|
|
121680
121695
|
if (dirPath === rootPath) {
|
|
121681
121696
|
removeAtRoot = true;
|
|
121682
121697
|
} else {
|
|
@@ -121774,10 +121789,10 @@ ${lanes.join("\n")}
|
|
|
121774
121789
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
121775
121790
|
(startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
121776
121791
|
} else {
|
|
121777
|
-
if (
|
|
121792
|
+
if (!isPathWithDefaultFailedLookupExtension(fileOrDirectoryPath) && !customFailedLookupPaths.has(fileOrDirectoryPath)) {
|
|
121778
121793
|
return false;
|
|
121779
121794
|
}
|
|
121780
|
-
if (
|
|
121795
|
+
if (isEmittedFileOfProgram(resolutionHost.getCurrentProgram(), fileOrDirectoryPath)) {
|
|
121781
121796
|
return false;
|
|
121782
121797
|
}
|
|
121783
121798
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
@@ -121874,10 +121889,12 @@ ${lanes.join("\n")}
|
|
|
121874
121889
|
closeTypeRootsWatch();
|
|
121875
121890
|
}
|
|
121876
121891
|
}
|
|
121877
|
-
function canWatchTypeRootPath(
|
|
121878
|
-
|
|
121879
|
-
|
|
121880
|
-
|
|
121892
|
+
function canWatchTypeRootPath(nodeTypesDirectory) {
|
|
121893
|
+
if (resolutionHost.getCompilationSettings().typeRoots)
|
|
121894
|
+
return true;
|
|
121895
|
+
const dir = getDirectoryPath(getDirectoryPath(nodeTypesDirectory));
|
|
121896
|
+
const dirPath = resolutionHost.toPath(dir);
|
|
121897
|
+
return dirPath === rootPath || canWatchDirectoryOrFile(dirPath);
|
|
121881
121898
|
}
|
|
121882
121899
|
}
|
|
121883
121900
|
function resolutionIsSymlink(resolution) {
|
|
@@ -127061,7 +127078,13 @@ ${lanes.join("\n")}
|
|
|
127061
127078
|
sourceFile,
|
|
127062
127079
|
n.kind
|
|
127063
127080
|
);
|
|
127064
|
-
|
|
127081
|
+
if (candidate2) {
|
|
127082
|
+
if (isJSDocCommentContainingNode(candidate2) && candidate2.getChildren(sourceFile).length) {
|
|
127083
|
+
return find2(candidate2);
|
|
127084
|
+
}
|
|
127085
|
+
return findRightmostToken(candidate2, sourceFile);
|
|
127086
|
+
}
|
|
127087
|
+
return void 0;
|
|
127065
127088
|
} else {
|
|
127066
127089
|
return find2(child);
|
|
127067
127090
|
}
|
package/lib/typescript.js
CHANGED
|
@@ -121131,6 +121131,8 @@ ${lanes.join("\n")}
|
|
|
121131
121131
|
resolutionHost.getCompilationSettings(),
|
|
121132
121132
|
moduleResolutionCache.getPackageJsonInfoCache()
|
|
121133
121133
|
);
|
|
121134
|
+
const failedLookupDefaultExtensions = [".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */, ".json" /* Json */];
|
|
121135
|
+
const customFailedLookupPaths = /* @__PURE__ */ new Map();
|
|
121134
121136
|
const directoryWatchesOfFailedLookups = /* @__PURE__ */ new Map();
|
|
121135
121137
|
const fileWatchesOfAffectingLocations = /* @__PURE__ */ new Map();
|
|
121136
121138
|
const rootDir = rootDirForResolution && removeTrailingDirectorySeparator(getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory()));
|
|
@@ -121175,6 +121177,7 @@ ${lanes.join("\n")}
|
|
|
121175
121177
|
function clear2() {
|
|
121176
121178
|
clearMap(directoryWatchesOfFailedLookups, closeFileWatcherOf);
|
|
121177
121179
|
clearMap(fileWatchesOfAffectingLocations, closeFileWatcherOf);
|
|
121180
|
+
customFailedLookupPaths.clear();
|
|
121178
121181
|
nonRelativeExternalModuleResolutions.clear();
|
|
121179
121182
|
closeTypeRootsWatch();
|
|
121180
121183
|
resolvedModuleNames.clear();
|
|
@@ -121484,7 +121487,7 @@ ${lanes.join("\n")}
|
|
|
121484
121487
|
dirPath = getDirectoryPath(dirPath);
|
|
121485
121488
|
}
|
|
121486
121489
|
if (isNodeModulesDirectory(dirPath)) {
|
|
121487
|
-
return canWatchDirectoryOrFile(dirPath) ? { dir, dirPath } : void 0;
|
|
121490
|
+
return canWatchDirectoryOrFile(getDirectoryPath(dirPath)) ? { dir, dirPath } : void 0;
|
|
121488
121491
|
}
|
|
121489
121492
|
let nonRecursive = true;
|
|
121490
121493
|
let subDirectoryPath, subDirectory;
|
|
@@ -121503,6 +121506,9 @@ ${lanes.join("\n")}
|
|
|
121503
121506
|
}
|
|
121504
121507
|
return canWatchDirectoryOrFile(dirPath) ? { dir: subDirectory || dir, dirPath: subDirectoryPath || dirPath, nonRecursive } : void 0;
|
|
121505
121508
|
}
|
|
121509
|
+
function isPathWithDefaultFailedLookupExtension(path) {
|
|
121510
|
+
return fileExtensionIsOneOf(path, failedLookupDefaultExtensions);
|
|
121511
|
+
}
|
|
121506
121512
|
function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) {
|
|
121507
121513
|
var _a2, _b;
|
|
121508
121514
|
if (resolution.refCount) {
|
|
@@ -121541,6 +121547,10 @@ ${lanes.join("\n")}
|
|
|
121541
121547
|
const toWatch = getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath);
|
|
121542
121548
|
if (toWatch) {
|
|
121543
121549
|
const { dir, dirPath, nonRecursive } = toWatch;
|
|
121550
|
+
if (!isPathWithDefaultFailedLookupExtension(failedLookupLocationPath)) {
|
|
121551
|
+
const refCount = customFailedLookupPaths.get(failedLookupLocationPath) || 0;
|
|
121552
|
+
customFailedLookupPaths.set(failedLookupLocationPath, refCount + 1);
|
|
121553
|
+
}
|
|
121544
121554
|
if (dirPath === rootPath) {
|
|
121545
121555
|
Debug.assert(!nonRecursive);
|
|
121546
121556
|
setAtRoot = true;
|
|
@@ -121575,10 +121585,6 @@ ${lanes.join("\n")}
|
|
|
121575
121585
|
);
|
|
121576
121586
|
}
|
|
121577
121587
|
}
|
|
121578
|
-
function isInRootPathOrCanWatchDirectoryOrFile(locationToWatch) {
|
|
121579
|
-
const path = resolutionHost.toPath(locationToWatch);
|
|
121580
|
-
return isInDirectoryPath(rootPath, path) || canWatchDirectoryOrFile(path);
|
|
121581
|
-
}
|
|
121582
121588
|
function createFileWatcherOfAffectingLocation(affectingLocation, forResolution) {
|
|
121583
121589
|
const fileWatcher = fileWatchesOfAffectingLocations.get(affectingLocation);
|
|
121584
121590
|
if (fileWatcher) {
|
|
@@ -121606,7 +121612,7 @@ ${lanes.join("\n")}
|
|
|
121606
121612
|
}
|
|
121607
121613
|
const paths = /* @__PURE__ */ new Set();
|
|
121608
121614
|
paths.add(locationToWatch);
|
|
121609
|
-
let actualWatcher =
|
|
121615
|
+
let actualWatcher = canWatchDirectoryOrFile(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => {
|
|
121610
121616
|
cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind);
|
|
121611
121617
|
const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
|
|
121612
121618
|
paths.forEach((path) => {
|
|
@@ -121677,6 +121683,15 @@ ${lanes.join("\n")}
|
|
|
121677
121683
|
const toWatch = getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath);
|
|
121678
121684
|
if (toWatch) {
|
|
121679
121685
|
const { dirPath } = toWatch;
|
|
121686
|
+
const refCount = customFailedLookupPaths.get(failedLookupLocationPath);
|
|
121687
|
+
if (refCount) {
|
|
121688
|
+
if (refCount === 1) {
|
|
121689
|
+
customFailedLookupPaths.delete(failedLookupLocationPath);
|
|
121690
|
+
} else {
|
|
121691
|
+
Debug.assert(refCount > 1);
|
|
121692
|
+
customFailedLookupPaths.set(failedLookupLocationPath, refCount - 1);
|
|
121693
|
+
}
|
|
121694
|
+
}
|
|
121680
121695
|
if (dirPath === rootPath) {
|
|
121681
121696
|
removeAtRoot = true;
|
|
121682
121697
|
} else {
|
|
@@ -121774,10 +121789,10 @@ ${lanes.join("\n")}
|
|
|
121774
121789
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
121775
121790
|
(startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
121776
121791
|
} else {
|
|
121777
|
-
if (
|
|
121792
|
+
if (!isPathWithDefaultFailedLookupExtension(fileOrDirectoryPath) && !customFailedLookupPaths.has(fileOrDirectoryPath)) {
|
|
121778
121793
|
return false;
|
|
121779
121794
|
}
|
|
121780
|
-
if (
|
|
121795
|
+
if (isEmittedFileOfProgram(resolutionHost.getCurrentProgram(), fileOrDirectoryPath)) {
|
|
121781
121796
|
return false;
|
|
121782
121797
|
}
|
|
121783
121798
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
@@ -121874,10 +121889,12 @@ ${lanes.join("\n")}
|
|
|
121874
121889
|
closeTypeRootsWatch();
|
|
121875
121890
|
}
|
|
121876
121891
|
}
|
|
121877
|
-
function canWatchTypeRootPath(
|
|
121878
|
-
|
|
121879
|
-
|
|
121880
|
-
|
|
121892
|
+
function canWatchTypeRootPath(nodeTypesDirectory) {
|
|
121893
|
+
if (resolutionHost.getCompilationSettings().typeRoots)
|
|
121894
|
+
return true;
|
|
121895
|
+
const dir = getDirectoryPath(getDirectoryPath(nodeTypesDirectory));
|
|
121896
|
+
const dirPath = resolutionHost.toPath(dir);
|
|
121897
|
+
return dirPath === rootPath || canWatchDirectoryOrFile(dirPath);
|
|
121881
121898
|
}
|
|
121882
121899
|
}
|
|
121883
121900
|
function resolutionIsSymlink(resolution) {
|
|
@@ -127075,7 +127092,13 @@ ${lanes.join("\n")}
|
|
|
127075
127092
|
sourceFile,
|
|
127076
127093
|
n.kind
|
|
127077
127094
|
);
|
|
127078
|
-
|
|
127095
|
+
if (candidate2) {
|
|
127096
|
+
if (isJSDocCommentContainingNode(candidate2) && candidate2.getChildren(sourceFile).length) {
|
|
127097
|
+
return find2(candidate2);
|
|
127098
|
+
}
|
|
127099
|
+
return findRightmostToken(candidate2, sourceFile);
|
|
127100
|
+
}
|
|
127101
|
+
return void 0;
|
|
127079
127102
|
} else {
|
|
127080
127103
|
return find2(child);
|
|
127081
127104
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.1.0-pr-
|
|
5
|
+
"version": "5.1.0-pr-53487-5",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "14.21.1",
|
|
115
115
|
"npm": "8.19.3"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "7685ef5dcb0017eda471fd0cfbc7b8cb8494c789"
|
|
118
118
|
}
|