(dependencyFilePath)
| 33 | // ... |
| 34 | // } |
| 35 | function 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 | |
| 52 | function computeAffectedPackages(dependencyGraph, package) { |
| 53 | const affectedPackages = new Set(); |
nothing calls this directly
no test coverage detected
searching dependent graphs…