(
pkg: PackageWithDependencies,
options: GraphOptions = {}
)
| 94 | } |
| 95 | |
| 96 | export function dependencyNames( |
| 97 | pkg: PackageWithDependencies, |
| 98 | options: GraphOptions = {} |
| 99 | ): string[] { |
| 100 | const fields = options.includePeerDependencies |
| 101 | ? DEPENDENCY_FIELDS.concat(PEER_DEPENDENCY_FIELDS) |
| 102 | : DEPENDENCY_FIELDS |
| 103 | const names = new Set() |
| 104 | for (const field of fields) { |
| 105 | for (const name of Object.keys(dependencyMap(pkg[field]))) { |
| 106 | names.add(name) |
| 107 | } |
| 108 | } |
| 109 | return [...names].sort() |
| 110 | } |
| 111 | |
| 112 | export function buildDependencyGraph( |
| 113 | packages: unknown[], |
no test coverage detected