Skip to main content

PackageGraph.collectPackageNames()

Home > @backstage/cli-node > PackageGraph > collectPackageNames

Traverses the package graph and collects a set of package names.

The traversal starts at the provided list names, and continues throughout all the names returned by the collectFn, which is called once for each seen package.

Signature:

collectPackageNames(startingPackageNames: string[], collectFn: (pkg: PackageGraphNode) => Iterable<string> | undefined): Set<string>;

Parameters

ParameterTypeDescription
startingPackageNamesstring[]
collectFn(pkg: PackageGraphNode) => Iterable<string> | undefined

Returns:

Set<string>