MCPcopy Create free account
hub / github.com/tensorflow/tfjs / constructDependencyGraph

Function constructDependencyGraph

scripts/test-util.js:35–50  ·  view source on GitHub ↗
(dependencyFilePath)

Source from the content-addressed store, hash-verified

33// ...
34// }
35function constructDependencyGraph(dependencyFilePath) {
36 const str = fs.readFileSync(dependencyFilePath, 'utf8');
37 const dependencyInfo = JSON.parse(str);
38
39 const dependencyGraph = {};
40
41 Object.keys(dependencyInfo)
42 .forEach(package => dependencyInfo[package].forEach(dependency => {
43 if (!dependencyGraph[dependency]) {
44 dependencyGraph[dependency] = [];
45 }
46 dependencyGraph[dependency].push(package);
47 }));
48
49 return dependencyGraph;
50}
51
52function computeAffectedPackages(dependencyGraph, package) {
53 const affectedPackages = new Set();

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…