MCPcopy
hub / github.com/rollup/rollup / resetSourcemapCache

Function resetSourcemapCache

src/utils/decodedSourcemap.ts:37–57  ·  view source on GitHub ↗
(
	map: ExistingDecodedSourceMap | null,
	sourcemapChain?: DecodedSourceMapOrMissing[]
)

Source from the content-addressed store, hash-verified

35}
36
37export function resetSourcemapCache(
38 map: ExistingDecodedSourceMap | null,
39 sourcemapChain?: DecodedSourceMapOrMissing[]
40) {
41 if (map) {
42 const cache = sourceMapCache.get(map);
43 if (cache) {
44 resetCacheToEncoded(cache);
45 }
46 }
47
48 if (!sourcemapChain) {
49 return;
50 }
51
52 for (const map of sourcemapChain) {
53 if (map.missing) continue;
54
55 resetSourcemapCache(map);
56 }
57}
58
59export function decodedSourcemap(map: null | undefined): null;
60export function decodedSourcemap(map: Exclude<Input, null | undefined>): ExistingDecodedSourceMap;

Callers 2

setSourceMethod · 0.90
collapseSourcemapsFunction · 0.90

Calls 2

resetCacheToEncodedFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…