(absPath)
| 35 | const packageNames = packageDirs.map(({ name }) => name); |
| 36 | |
| 37 | function packageForAbsPath(absPath) { |
| 38 | const found = packageDirs.find(({ dir }) => absPath === dir || absPath.startsWith(dir + path.sep)); |
| 39 | return found ? found.name : null; |
| 40 | } |
| 41 | |
| 42 | // Rotates a cycle's node list to start at its lexicographically smallest entry, so the same |
| 43 | // logical cycle reported starting from different nodes (which dependency-cruiser does) collapses |