MCPcopy
hub / github.com/vitejs/vite / invalidatePackageData

Function invalidatePackageData

packages/vite/src/node/packages.ts:51–61  ·  view source on GitHub ↗
(
  packageCache: PackageCache,
  pkgPath: string,
)

Source from the content-addressed store, hash-verified

49}
50
51function invalidatePackageData(
52 packageCache: PackageCache,
53 pkgPath: string,
54): void {
55 const pkgDir = normalizePath(path.dirname(pkgPath))
56 packageCache.forEach((pkg, cacheKey) => {
57 if (pkg.dir === pkgDir) {
58 packageCache.delete(cacheKey)
59 }
60 })
61}
62
63export function resolvePackageData(
64 pkgName: string,

Callers 1

watchChangeFunction · 0.85

Calls 2

normalizePathFunction · 0.90
deleteMethod · 0.80

Tested by

no test coverage detected