release_state.ts

Where a release stands, derived from observed state: the plan made with what the registry shows (generate_publishing_plan's registry option) and each repo's readiness. gitops_release derives it each time it runs, applies the rewrites, and names the packages to publish, so a release proceeds in steps with no state of its own between them.

A dependency is released when it has nothing left to publish and the registry shows its current version: dependents' ranges can move to it now, and their installs will find it. A package publishes now when it's in the plan's first wave, depends (prod/peer) on no package still awaiting the registry, and its repo is ready.

The plan reads every repo as it sits, so a repo that isn't ready — behind origin, off its branch, dirty — may hide a changeset, and what it says of its package can't be trusted. Its dependents are held too: a rewrite to its version, and the publish of every package depending on it for prod or peer, however deep.

Pure — the plan, the repos, and their readiness in; the step out.

view source

Declarations
#

5 declarations

ReleaseHeld
#

release_state.ts view source

ReleaseHeld import type {ReleaseHeld} from '@fuzdev/fuz_repos/release_state.js';

A rewrite or publish that waits, and why.

name

The held package's name.

type string

reasons

Why it waits, each a line naming the fix.

type string[]

ReleaseRewrite
#

release_state.ts view source

ReleaseRewrite import type {ReleaseRewrite} from '@fuzdev/fuz_repos/release_state.js';

One dependent's rewrite: its ranges for released dependencies, in one commit.

name

The dependent's package name.

type string

updates

type DependencyUpdate[]

changeset

Whether the dependent republishes, so its prod/peer updates go in its auto-changeset.

type boolean

ReleaseState
#

release_state.ts view source

ReleaseState import type {ReleaseState} from '@fuzdev/fuz_repos/release_state.js';

rewrites

Rewrites whose dependencies are released and whose repos are ready.

type ReleaseRewrite[]

rewrites_held

Rewrites whose dependencies are released but whose repos aren't ready.

type (ReleaseHeld & { updates: DependencyUpdate[]; })[]

publish_now

Packages to publish now, in dependency order: the first wave's ready ones.

type string[]

publish_held

The first wave's packages that can't publish yet, and why.

type ReleaseHeld[]

done

Nothing left to publish, rewrite, or wait for.

type boolean

to_release_state
#

release_state.ts view source

(options: ToReleaseStateOptions): ReleaseState import {to_release_state} from '@fuzdev/fuz_repos/release_state.js';

Derives the release step from the plan and each repo's readiness.

options

returns

ReleaseState

ToReleaseStateOptions
#

release_state.ts view source

ToReleaseStateOptions import type {ToReleaseStateOptions} from '@fuzdev/fuz_repos/release_state.js';

plan

The plan, generated with registry observations.

type PublishingPlan

repos

The configured npm repos, as loaded.

type readonly LocalRepo[]

not_ready

Why each repo isn't ready to be written or published, by package name: a repo absent or with no reasons is ready. Its dependents are held with it.

type ReadonlyMap<string, readonly string[]>

held_all?

Problems with the whole report, which hold every repo.

type readonly string[]

Depends on
#

Imported by
#