publishing_plan_helpers.ts

Declarations
#

Helper functions for publishing plan calculations.

Extracted from publishing_plan.ts to reduce file size.

2 declarations

view source

calculate_dependency_updates
#

publishing_plan_helpers.ts view source

(repos: LocalRepo[], predicted_versions: Map<string, string>, breaking_packages: Set<string>): { dependency_updates: DependencyUpdate[]; breaking_cascades: Map<...>; }

Calculates all dependency updates between packages based on predicted versions.

Iterates through all repos, checking prod, peer, and dev dependencies to find which packages will need dependency version bumps after publishing.

Also tracks "breaking cascades" - when a breaking change propagates to dependents.

repos

type LocalRepo[]

predicted_versions

type Map<string, string>

breaking_packages

type Set<string>

returns

{ dependency_updates: DependencyUpdate[]; breaking_cascades: Map<string, string[]>; }

get_required_bump_for_dependencies
#

publishing_plan_helpers.ts view source

(repo: LocalRepo, dependency_updates: DependencyUpdate[], breaking_packages: Set<string>): BumpType | null

Determines the required bump type for a package based on its dependency updates.

Returns null if no prod/peer dependency updates, otherwise returns the minimum required bump type (major for breaking deps, patch otherwise).

Respects pre-1.0 semver conventions (minor for breaking in 0.x).

repo

dependency_updates

type DependencyUpdate[]

breaking_packages

type Set<string>

returns

BumpType | null

Depends on
#

Imported by
#