( graph: DependencyGraph, packageNamesToUpdate: string[] )
| 186 | } |
| 187 | |
| 188 | export function dependentPackageOrder( |
| 189 | graph: DependencyGraph, |
| 190 | packageNamesToUpdate: string[] |
| 191 | ): WorkspacePackage[] { |
| 192 | const dependentGraph = invertGraph(graph) |
| 193 | const visited = new Set<WorkspacePackage>() |
| 194 | for (const name of packageNamesToUpdate) { |
| 195 | visitDependents(dependentGraph, name, visited, []) |
| 196 | } |
| 197 | return [...visited].sort((left, right) => left.name.localeCompare(right.name)) |
| 198 | } |
no test coverage detected