MCPcopy Create free account
hub / github.com/babel/babel / removeFileDependency

Function removeFileDependency

packages/babel-cli/src/babel/watcher.ts:121–134  ·  view source on GitHub ↗
(filename: string, dep: string)

Source from the content-addressed store, hash-verified

119}
120
121function removeFileDependency(filename: string, dep: string) {
122 const deps = depToFiles.get(dep)!;
123 deps.delete(filename);
124
125 if (deps.size === 0) {
126 depToFiles.delete(dep);
127
128 if (!hasStarted) {
129 watchQueue.delete(dep);
130 } else {
131 watcher.unwatch(dep);
132 }
133 }
134}
135
136function unwatchFile(filename: string) {
137 const deps = fileToDeps.get(filename);

Callers 2

unwatchFileFunction · 0.70

Calls 2

getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected