MCPcopy
hub / github.com/formatjs/formatjs / dependencyNames

Function dependencyNames

tools/release-please/npm-workspace-graph.ts:96–110  ·  view source on GitHub ↗
(
  pkg: PackageWithDependencies,
  options: GraphOptions = {}
)

Source from the content-addressed store, hash-verified

94}
95
96export 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
112export function buildDependencyGraph(
113 packages: unknown[],

Callers 2

buildDependencyGraphFunction · 0.85

Calls 1

dependencyMapFunction · 0.85

Tested by

no test coverage detected