Skip to main content

PackageGraph

Home > @backstage/cli-node > PackageGraph

Represents a local Backstage monorepo package graph.

Signature:

class PackageGraph extends Map<string, PackageGraphNode> 

Extends: Map<string, PackageGraphNode>

Methods

Method

Modifiers

Description

collectPackageNames(startingPackageNames, collectFn)

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.

fromPackages(packages)

static

Creates a package graph from a list of local packages.

listChangedPackages(options)

Lists all packages that have changed since a given git ref.

listTargetPackages()

static

Lists all local packages in a monorepo.