graph_validation.ts

Dependency graph validation shared by the publishing plan and the analysis tasks.

Builds the graph, detects cycles by type, and computes the publishing order, reporting cycles and sort failures in the result rather than throwing, so each caller decides how to surface them: the plan turns them into errors, gitops_analyze and gitops_validate format them.

See also: dependency_graph.ts for the core graph data structure and algorithms.

view source

Declarations
#

4 declarations

analyze_repos
#

graph_validation.ts view source

(repos: LocalRepo[]): RepoAnalysis import {analyze_repos} from '@fuzdev/fuz_repos/graph_validation.js';

Builds the dependency graph and runs cycle/wildcard analysis, tolerating cycles (reports rather than throws). The shared core of gitops_analyze and gitops_validate, which format the result themselves.

repos

type LocalRepo[]

returns

RepoAnalysis

GraphValidationResult
#

graph_validation.ts view source

GraphValidationResult import type {GraphValidationResult} from '@fuzdev/fuz_repos/graph_validation.js';

graph

type DependencyGraph

publishing_order

type string[]

production_cycles

type string[][]

dev_cycles

type string[][]

sort_error?

Why the topological sort failed, when it did; publishing_order is then empty.

type string

RepoAnalysis
#

validate_dependency_graph
#

graph_validation.ts view source

(repos: LocalRepo[]): GraphValidationResult import {validate_dependency_graph} from '@fuzdev/fuz_repos/graph_validation.js';

Builds the dependency graph, detects cycles, and computes the publishing order (prod/peer dependencies only, so dev cycles don't block it).

Never throws on cycles: a production/peer cycle leaves publishing_order empty and sets sort_error, and the caller reports it.

repos

type LocalRepo[]

returns

GraphValidationResult

the graph, publishing order, and detected cycles

Depends on
#

Imported by
#