mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-20 21:22:28 -05:00
When installing unrelated package inside scoped packages dont invalidate resolutions from everything in the scoped package (#53873)
This commit is contained in:
@@ -1152,7 +1152,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
// If the invalidated file is from a node_modules package, invalidate everything else
|
||||
// in the package since we might not get notifications for other files in the package.
|
||||
// This hardens our logic against unreliable file watchers.
|
||||
const packagePath = parseNodeModuleFromPath(fileOrDirectoryPath);
|
||||
const packagePath = parseNodeModuleFromPath(fileOrDirectoryPath, /*isFolder*/ true);
|
||||
if (packagePath) (startsWithPathChecks ||= new Set()).add(packagePath as Path);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user