MCPcopy Index your code
hub / github.com/adobe/react-spectrum / followInvertedDependencies

Function followInvertedDependencies

scripts/compareAPIs.js:238–258  ·  view source on GitHub ↗
(iname, deps)

Source from the content-addressed store, hash-verified

236// takes an interface name and follows all the interfaces dependencies to
237// see if the interface changed as a result of a dependency changing
238function followInvertedDependencies(iname, deps) {
239 let visited = new Set();
240 let affectedInterfaces = [];
241 function visit(iname) {
242 if (visited.has(iname)) {
243 return;
244 }
245 visited.add(iname);
246 if (deps.has(iname)) {
247 let affected = deps.get(iname);
248 if (affected && affected.length > 0) {
249 for (let dep of affected) {
250 affectedInterfaces.push(dep);
251 visit(dep);
252 }
253 }
254 }
255 }
256 visit(iname);
257 return affectedInterfaces;
258}
259
260function getAPI(filePath) {
261 let json = readJsonSync(filePath);

Callers 1

compareFunction · 0.85

Calls 1

visitFunction · 0.70

Tested by

no test coverage detected