Skip to main content

Module dependent_version_policy

Module dependent_version_policy 

Source
Expand description

The decision and findings of mono/dependent-version-bump. What: The decision of mono/dependent-version-bump: when to plan, and the findings a plan becomes. Why: The plan is a pre-commit step. Another forwarded command such as git add could not apply its patches, so it plans only for git commit among forwarded commands, and for git cli-git check and git cli-git fix; and only when a workspace manifest is modified, so ordinary commits read nothing. Each stale dependent is one finding whose patch rewrites a tracked manifest that may not be a candidate, which adds that manifest to the commit (dependent-version-bump-policy.ts:178-235).

In TS you’d write (pseudocode):

// await findDependentBumps(context);

Structs§

Candidate
What: One candidate path and how it changed. Why: The decision to plan looks at candidate paths only.
DependentFinding
What: One finding of this policy. Option<ManifestBump> is the patch, or nothing. Why: The wiring turns patch into a full-content patch of the tracked manifest at path.
DependentRequest
What: What the lifecycle tells the policy. &'request [Candidate] borrows the candidate list for as long as the request lives. Why: forwards_commit is whether the forwarded subcommand is commit; it matters only for the pre-forward trigger.

Enums§

CandidateChange
What: How a candidate path changed against the base. Why: Only a modified manifest can hold a raised version; a new one has no base version.

Constants§

DEPENDENT_VERSION_STALE_CODE
What: The finding code of a dependent whose version must move with a raised dependency. Why: Callers and transcripts identify the finding by this stable code.
DEPENDENT_VERSION_UNSUPPORTED_CODE
What: The finding code of a dependent whose version cannot be bumped automatically. Why: It carries no patch; the person bumps that package by hand.

Functions§

find_dependent_bumps
What: The findings of this policy for one lifecycle point. Why: A bump of a manifest that is not an ordinary file cannot be patched and is dropped, as in the incumbent.
should_plan
What: Whether this lifecycle should plan at all. Why: A forwarded command other than commit cannot apply the patches; a change that modifies no workspace manifest cannot raise a version.