@tallyrelease/core 0.5.0-beta.14 → 0.5.0-beta.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,46 +1,5 @@
1
- import type { Warning } from "./errors.js";
1
+ import type { AffectedDoc, AffectedOptions } from "./model/affected-types.js";
2
2
  import type { GitReader } from "./plugin.js";
3
3
  import type { Workspace } from "./workspace.js";
4
- export type BaseSource = "cli" | "push-before" | "pr-merge-base" | "merge-group" | "forge-last-success" | "local-merge-base" | "none";
5
- export type AffectedReason = "direct" | "dependent" | "global" | "all" | "group";
6
- export interface AffectedUnit {
7
- id: string;
8
- /** Unit root, `.` for the repo root. */
9
- path: string;
10
- plugin: string;
11
- reason: AffectedReason;
12
- /** Affected direct dependencies of a dependent, or affected mates of a group member. */
13
- via: string[];
14
- /** True unless the unit's version is `none`. */
15
- released: boolean;
16
- /** Sorted unit tags. */
17
- tags: string[];
18
- }
19
- /** `tallyrelease affected --json`, schema 1. */
20
- export interface AffectedDoc {
21
- schema: 1;
22
- tool: string;
23
- repo: string;
24
- branch: string;
25
- head: string;
26
- build: {
27
- base: string | null;
28
- baseSource: BaseSource;
29
- all: boolean;
30
- globalInputs: string[];
31
- };
32
- units: AffectedUnit[];
33
- unattributed: string[];
34
- warnings: Warning[];
35
- }
36
- export interface AffectedOptions {
37
- /** For example `tallyrelease@0.1.0`. */
38
- tool: string;
39
- branch: string;
40
- head: string;
41
- /** Null marks every unit affected without a diff. */
42
- base: string | null;
43
- baseSource: BaseSource;
44
- }
45
4
  /** Computes the build set for `base..head` from a tree-to-tree diff. */
46
5
  export declare const computeAffected: (workspace: Workspace, git: GitReader, opts: AffectedOptions) => Promise<AffectedDoc>;
@@ -1,23 +1,7 @@
1
- import type { Plan } from "./plan.js";
2
- import type { BumpLevel } from "./plugin.js";
3
- import type { ReleaseItem as PrItem } from "./release-items.js";
4
- import type { BranchRule } from "./release.js";
1
+ import type { BranchRule, LimitItem, LimitSubject, Line } from "./model/branch-types.js";
2
+ import type { Plan } from "./model/plan-types.js";
3
+ import type { ReleaseItem } from "./release-items.js";
5
4
  import type { Workspace } from "./workspace.js";
6
- /** The branch rule matching the planned branch. */
7
- export interface Line {
8
- rule: string;
9
- kind: "default" | "maintenance";
10
- /** Rendered with the rule's captures. */
11
- channel: string | null;
12
- /** Maintenance rules: `minor` for `{major}`, `patch` with `{minor}`. */
13
- maxBump: "minor" | "patch" | null;
14
- absolute: {
15
- unit: string | null;
16
- group: string | null;
17
- major: number;
18
- minor?: number;
19
- } | null;
20
- }
21
5
  /**
22
6
  * Validates rule names, `unit`/`group` and channels: `E_BRANCH_RULE`, `E_CHANNEL_WILDCARD`,
23
7
  * `E_CHANNEL_INVALID` and `E_CHANNEL_DUPLICATE`.
@@ -28,39 +12,7 @@ export declare const validateBranches: (rules: readonly BranchRule[]) => void;
28
12
  * maintenance rule with `{major}` gets an absolute check for its `unit` or
29
13
  * `group`, else for `single`, the repo's only release item.
30
14
  */
31
- export declare const matchBranch: (rules: readonly BranchRule[], branch: string, single?: ReleaseItem | null) => Line | null;
32
- /** An ungrouped released unit or a fixed group. */
33
- export interface ReleaseItem {
34
- unit: string | null;
35
- group: string | null;
36
- }
37
- /** Major and minor of a version. */
38
- export interface Core {
39
- major: number;
40
- minor: number;
41
- }
42
- /** A formatted version with its core. */
43
- export interface CoreVersion extends Core {
44
- version: string;
45
- }
46
- /** A commit that contributes to a release item's `next`. */
47
- export interface LimitCommit {
48
- sha?: string;
49
- subject: string;
50
- /** Null for a Release-As only commit. */
51
- level: BumpLevel | null;
52
- /** Absorbed unit the change came through. */
53
- via?: string;
54
- /** The Release-As value it sets. */
55
- releaseAs?: CoreVersion;
56
- }
57
- export interface LimitItem extends ReleaseItem {
58
- /** Null on a first release. */
59
- from: CoreVersion | null;
60
- /** Null without a pending release. */
61
- next: CoreVersion | null;
62
- commits: readonly LimitCommit[];
63
- }
15
+ export declare const matchBranch: (rules: readonly BranchRule[], branch: string, single?: LimitSubject | null) => Line | null;
64
16
  /**
65
17
  * Maintenance limits: `E_CAP_BASE` when the absolute item's `from` is off the
66
18
  * rule's line, `E_CAP` when a release item's `next` leaves the line of its
@@ -83,4 +35,4 @@ export interface MaintenanceCut {
83
35
  * maintenance rule with `{major}` and no `*` that targets the item or nothing,
84
36
  * rendered from `from`, at the item's base tag; else undefined.
85
37
  */
86
- export declare const maintenanceCut: (workspace: Workspace, plan: Plan, item: PrItem) => MaintenanceCut | undefined;
38
+ export declare const maintenanceCut: (workspace: Workspace, plan: Plan, item: ReleaseItem) => MaintenanceCut | undefined;
package/dist/bump.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ import type { RangeFacts } from "./model/facts-types.js";
2
+ import type { BumpLevel, Change } from "./plugin.js";
3
+ import type { ReleaseSettings } from "./release-settings.js";
4
+ /**
5
+ * A Change of a released unit; `via` names the first absorbed unit (by id) a
6
+ * change not attributed to the unit came through.
7
+ */
8
+ export interface UnitChange {
9
+ readonly change: Change;
10
+ readonly via?: string;
11
+ }
12
+ /**
13
+ * Unreleased units reachable over `id`'s dependencies, never stepping into or
14
+ * through a released unit.
15
+ */
16
+ export declare const reach: (id: string, dependencies: ReadonlyMap<string, readonly string[]>, released: ReadonlySet<string>) => Set<string>;
17
+ /**
18
+ * Level of one change. While the major is 0, breaking changes use
19
+ * `preMajor.breaking` and changes whose type level is minor `preMajor.feat`.
20
+ * An absorbed change contributes `bumps.absorbed` when its own level is set
21
+ * (`minor` caps it at minor).
22
+ */
23
+ export declare const changeLevel: ({ change, via }: UnitChange, settings: ReleaseSettings, preMajor: boolean) => BumpLevel | null;
24
+ /** Max level over the changes. */
25
+ export declare const ownBump: (changes: readonly UnitChange[], settings: ReleaseSettings, preMajor: boolean) => BumpLevel | null;
26
+ /** Changes of the range attributed to the unit or to an absorbed unit. */
27
+ export declare const unitChanges: (id: string, range: RangeFacts, absorbed: ReadonlySet<string>) => UnitChange[];
package/dist/bump.js ADDED
@@ -0,0 +1,48 @@
1
+ import { maxLevel } from "./util.js";
2
+ /**
3
+ * Unreleased units reachable over `id`'s dependencies, never stepping into or
4
+ * through a released unit.
5
+ */
6
+ export const reach = (id, dependencies, released) => {
7
+ const found = new Set();
8
+ const queue = [id];
9
+ for (const v of queue) {
10
+ for (const w of dependencies.get(v) ?? []) {
11
+ if (!released.has(w) && !found.has(w)) {
12
+ found.add(w);
13
+ queue.push(w);
14
+ }
15
+ }
16
+ }
17
+ return found;
18
+ };
19
+ /**
20
+ * Level of one change. While the major is 0, breaking changes use
21
+ * `preMajor.breaking` and changes whose type level is minor `preMajor.feat`.
22
+ * An absorbed change contributes `bumps.absorbed` when its own level is set
23
+ * (`minor` caps it at minor).
24
+ */
25
+ export const changeLevel = ({ change, via }, settings, preMajor) => {
26
+ const typed = settings.bumps.get(change.type) ?? null;
27
+ const level = change.breaking
28
+ ? preMajor
29
+ ? settings.preMajor.breaking
30
+ : "major"
31
+ : preMajor && typed === "minor"
32
+ ? settings.preMajor.feat
33
+ : typed;
34
+ if (via === undefined || level === null) {
35
+ return level;
36
+ }
37
+ return settings.absorbed === "minor" && level !== "patch" ? "minor" : "patch";
38
+ };
39
+ /** Max level over the changes. */
40
+ export const ownBump = (changes, settings, preMajor) => changes.reduce((bump, change) => maxLevel(bump, changeLevel(change, settings, preMajor)), null);
41
+ /** Changes of the range attributed to the unit or to an absorbed unit. */
42
+ export const unitChanges = (id, range, absorbed) => range.changes.flatMap(({ change, units }) => {
43
+ if (units.includes(id)) {
44
+ return [{ change }];
45
+ }
46
+ const via = units.find((u) => absorbed.has(u));
47
+ return via === undefined ? [] : [{ change, via }];
48
+ });
@@ -1,4 +1,4 @@
1
- import type { PlanChange, Plan } from "./plan.js";
1
+ import type { PlanChange, Plan } from "./model/plan-types.js";
2
2
  import type { Unit, VersionScheme } from "./plugin.js";
3
3
  import type { Workspace } from "./workspace.js";
4
4
  /** `<root>/CHANGELOG.md` of a unit. */
package/dist/explain.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Warning } from "./errors.js";
2
- import type { Plan, PlanChange, PlanOptions, UnitPlan } from "./plan.js";
2
+ import type { Plan, PlanChange, PlanOptions, UnitPlan } from "./model/plan-types.js";
3
3
  import type { GitReader } from "./plugin.js";
4
4
  import type { Workspace } from "./workspace.js";
5
5
  export interface ExplainedChange extends PlanChange {
package/dist/facts.d.ts CHANGED
@@ -1,91 +1,10 @@
1
- import type { Warning } from "./errors.js";
2
- import type { Change, GitReader, ReadonlyFs } from "./plugin.js";
3
- import type { UnitTag } from "./tags.js";
1
+ import type { PlanFacts } from "./model/facts-types.js";
2
+ import type { GitReader, ReadonlyFs } from "./plugin.js";
4
3
  import type { Workspace } from "./workspace.js";
5
4
  export interface FactsOptions {
6
5
  head: string;
7
6
  fs: ReadonlyFs;
8
7
  debug?: (message: string) => void;
9
8
  }
10
- /** A Change with the ids of the units it is attributed to. */
11
- export interface AttributedChange {
12
- readonly change: Change;
13
- /** Sorted. */
14
- readonly units: readonly string[];
15
- }
16
- /**
17
- * Changes of `(from, head]`, in core commit order, attributed to all units. A
18
- * unit's consumers read only its own range (`UnitFacts.from`), filtered to the
19
- * unit and the units it absorbs.
20
- */
21
- export interface RangeFacts {
22
- readonly from: string | null;
23
- readonly changes: readonly AttributedChange[];
24
- }
25
- export interface UnitFacts {
26
- readonly id: string;
27
- /** Fixed group name. */
28
- readonly group: string | null;
29
- /**
30
- * Range key, null from the root: the base tag commit; for a group member
31
- * its own base tag when that descends from the group base tag, else the
32
- * group base tag.
33
- */
34
- readonly from: string | null;
35
- /** Every matched tag, reachable or not, scheme-sorted. */
36
- readonly tags: readonly UnitTag[];
37
- /** Highest stable tag merged into head. */
38
- readonly baseTag: UnitTag | null;
39
- /** Source of the `from` version: the group base tag for members, else `baseTag`. */
40
- readonly fromTag: UnitTag | null;
41
- /** Highest stable tag on head's first-parent chain. */
42
- readonly lineBaseTag: UnitTag | null;
43
- /**
44
- * Without a line base and with a root other than `.`: the oldest commit on
45
- * head's first-parent chain that touches the unit root.
46
- */
47
- readonly introduced: string | null;
48
- /**
49
- * First-parent commits since the line base; without one, since and
50
- * including `introduced`, else `total`.
51
- */
52
- readonly sinceLineBase: number;
53
- readonly total: number;
54
- /** Changes since the base tag attributed to this unit, core commit order. */
55
- readonly changes: readonly AttributedChange[];
56
- /** Qualified Release-As values naming this unit, core commit order. */
57
- readonly releaseAs: readonly {
58
- sha?: string;
59
- version: string;
60
- }[];
61
- }
62
- /**
63
- * A fixed group. Base and line base are the highest member tags as for a
64
- * unit; equal versions prefer the tag whose commit descends from the other's.
65
- */
66
- export interface GroupFacts {
67
- readonly name: string;
68
- readonly members: readonly string[];
69
- /** Highest stable member tag merged into head. */
70
- readonly baseTag: UnitTag | null;
71
- /** Highest stable member tag on head's first-parent chain. */
72
- readonly lineBaseTag: UnitTag | null;
73
- /** Without a line base, the max over the members. */
74
- readonly sinceLineBase: number;
75
- }
76
- /** Git and intent data of every released unit, collected before release math. */
77
- export interface PlanFacts {
78
- readonly head: string;
79
- /** Released units, sorted by id. */
80
- readonly units: readonly UnitFacts[];
81
- /** One entry per distinct base tag commit. */
82
- readonly ranges: readonly RangeFacts[];
83
- /** Sorted by name. */
84
- readonly groups: readonly GroupFacts[];
85
- /** Every tag name, sorted. */
86
- readonly tagNames: readonly string[];
87
- /** Warnings logged by intent sources and for unknown explicit units. */
88
- readonly warnings: readonly Warning[];
89
- }
90
9
  /** Runs every `GitReader` and intent source call a plan needs. */
91
10
  export declare const collectPlanFacts: (workspace: Workspace, git: GitReader, opts: FactsOptions) => Promise<PlanFacts>;
package/dist/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  /** @deprecated Unused, will be removed in 1.0. */
2
2
  export declare const version = "0.0.0";
3
- export type { AffectedDoc, AffectedOptions, AffectedReason, AffectedUnit, BaseSource, } from "./affected.js";
3
+ export type { AffectedDoc, AffectedOptions, AffectedReason, AffectedUnit, BaseSource, } from "./model/affected-types.js";
4
4
  export type { ChangelogDependency, ChangelogInput } from "./changelog.js";
5
5
  export type { CodeDoc, CodeOf, CodeRegistry, ErrorCode, WarningCode, } from "./codes.js";
6
6
  export type { ParsedCommit } from "./conventional.js";
7
7
  export type { ExplainedChange, ExplainOptions, ReleaseAsFooter, UnitExplanation, } from "./explain.js";
8
- export type { GroupPlan, Plan, PlanChange, PlanLine, PlanOptions, ReleasedUnit, UnitPlan, } from "./plan.js";
8
+ export type { BranchRule, Line as PlanLine } from "./model/branch-types.js";
9
+ export type { GroupPlan, Plan, PlanChange, PlanOptions, ReleasedUnit, UnitPlan, } from "./model/plan-types.js";
9
10
  export type { DepConfig, GroupConfig, ReleasePrMode, TallyConfig, UnitOverlay, VersionTemplate, } from "./config.js";
10
11
  export type { Warning } from "./errors.js";
11
12
  export type { Graph, SourcedEdge } from "./graph.js";
@@ -14,7 +15,7 @@ export type { BumpLevel, Change, Ctx, Edge, EdgeDraft, GitReader, IntentSource,
14
15
  export type { Marker, MarkerRelease } from "./marker.js";
15
16
  export type { ActivePlugin, PluginEnv } from "./plugins.js";
16
17
  export type { ReleaseItem } from "./release-items.js";
17
- export type { BranchRule, ReleaseSettings } from "./release.js";
18
+ export type { ReleaseSettings } from "./release-settings.js";
18
19
  export type { SchemeEntry } from "./schemes.js";
19
20
  export type { SemVer } from "./semver.js";
20
21
  export type { IntentEntry, Workspace, WorkspaceInput } from "./workspace.js";
@@ -0,0 +1,42 @@
1
+ import type { Warning } from "../errors.js";
2
+ export type BaseSource = "cli" | "push-before" | "pr-merge-base" | "merge-group" | "forge-last-success" | "local-merge-base" | "none";
3
+ export type AffectedReason = "direct" | "dependent" | "global" | "all" | "group";
4
+ export interface AffectedUnit {
5
+ id: string;
6
+ /** Unit root, `.` for the repo root. */
7
+ path: string;
8
+ plugin: string;
9
+ reason: AffectedReason;
10
+ /** Affected direct dependencies of a dependent, or affected mates of a group member. */
11
+ via: string[];
12
+ /** True unless the unit's version is `none`. */
13
+ released: boolean;
14
+ /** Sorted unit tags. */
15
+ tags: string[];
16
+ }
17
+ /** `tallyrelease affected --json`, schema 1. */
18
+ export interface AffectedDoc {
19
+ schema: 1;
20
+ tool: string;
21
+ repo: string;
22
+ branch: string;
23
+ head: string;
24
+ build: {
25
+ base: string | null;
26
+ baseSource: BaseSource;
27
+ all: boolean;
28
+ globalInputs: string[];
29
+ };
30
+ units: AffectedUnit[];
31
+ unattributed: string[];
32
+ warnings: Warning[];
33
+ }
34
+ export interface AffectedOptions {
35
+ /** For example `tallyrelease@0.1.0`. */
36
+ tool: string;
37
+ branch: string;
38
+ head: string;
39
+ /** Null marks every unit affected without a diff. */
40
+ base: string | null;
41
+ baseSource: BaseSource;
42
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,57 @@
1
+ import type { BumpLevel } from "../plugin.js";
2
+ /** A normalized branch rule. */
3
+ export interface BranchRule {
4
+ readonly name: string;
5
+ readonly line: "default" | "maintenance";
6
+ readonly channel: string | null;
7
+ /** Release item of the absolute maintenance check. */
8
+ readonly unit: string | null;
9
+ readonly group: string | null;
10
+ }
11
+ /** The branch rule matching the planned branch. */
12
+ export interface Line {
13
+ rule: string;
14
+ kind: "default" | "maintenance";
15
+ /** Rendered with the rule's captures. */
16
+ channel: string | null;
17
+ /** Maintenance rules: `minor` for `{major}`, `patch` with `{minor}`. */
18
+ maxBump: "minor" | "patch" | null;
19
+ absolute: {
20
+ unit: string | null;
21
+ group: string | null;
22
+ major: number;
23
+ minor?: number;
24
+ } | null;
25
+ }
26
+ /** An ungrouped released unit or a fixed group. */
27
+ export interface LimitSubject {
28
+ unit: string | null;
29
+ group: string | null;
30
+ }
31
+ /** Major and minor of a version. */
32
+ export interface Core {
33
+ major: number;
34
+ minor: number;
35
+ }
36
+ /** A formatted version with its core. */
37
+ export interface CoreVersion extends Core {
38
+ version: string;
39
+ }
40
+ /** A commit that contributes to a release item's `next`. */
41
+ export interface LimitCommit {
42
+ sha?: string;
43
+ subject: string;
44
+ /** Null for a Release-As only commit. */
45
+ level: BumpLevel | null;
46
+ /** Absorbed unit the change came through. */
47
+ via?: string;
48
+ /** The Release-As value it sets. */
49
+ releaseAs?: CoreVersion;
50
+ }
51
+ export interface LimitItem extends LimitSubject {
52
+ /** Null on a first release. */
53
+ from: CoreVersion | null;
54
+ /** Null without a pending release. */
55
+ next: CoreVersion | null;
56
+ commits: readonly LimitCommit[];
57
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,83 @@
1
+ import type { Warning } from "../errors.js";
2
+ import type { Change } from "../plugin.js";
3
+ import type { UnitTag } from "../tags.js";
4
+ /** A Change with the ids of the units it is attributed to. */
5
+ export interface AttributedChange {
6
+ readonly change: Change;
7
+ /** Sorted. */
8
+ readonly units: readonly string[];
9
+ }
10
+ /**
11
+ * Changes of `(from, head]`, in core commit order, attributed to all units. A
12
+ * unit's consumers read only its own range (`UnitFacts.from`), filtered to the
13
+ * unit and the units it absorbs.
14
+ */
15
+ export interface RangeFacts {
16
+ readonly from: string | null;
17
+ readonly changes: readonly AttributedChange[];
18
+ }
19
+ export interface UnitFacts {
20
+ readonly id: string;
21
+ /** Fixed group name. */
22
+ readonly group: string | null;
23
+ /**
24
+ * Range key, null from the root: the base tag commit; for a group member
25
+ * its own base tag when that descends from the group base tag, else the
26
+ * group base tag.
27
+ */
28
+ readonly from: string | null;
29
+ /** Every matched tag, reachable or not, scheme-sorted. */
30
+ readonly tags: readonly UnitTag[];
31
+ /** Highest stable tag merged into head. */
32
+ readonly baseTag: UnitTag | null;
33
+ /** Source of the `from` version: the group base tag for members, else `baseTag`. */
34
+ readonly fromTag: UnitTag | null;
35
+ /** Highest stable tag on head's first-parent chain. */
36
+ readonly lineBaseTag: UnitTag | null;
37
+ /**
38
+ * Without a line base and with a root other than `.`: the oldest commit on
39
+ * head's first-parent chain that touches the unit root.
40
+ */
41
+ readonly introduced: string | null;
42
+ /**
43
+ * First-parent commits since the line base; without one, since and
44
+ * including `introduced`, else `total`.
45
+ */
46
+ readonly sinceLineBase: number;
47
+ readonly total: number;
48
+ /** Changes since the base tag attributed to this unit, core commit order. */
49
+ readonly changes: readonly AttributedChange[];
50
+ /** Qualified Release-As values naming this unit, core commit order. */
51
+ readonly releaseAs: readonly {
52
+ sha?: string;
53
+ version: string;
54
+ }[];
55
+ }
56
+ /**
57
+ * A fixed group. Base and line base are the highest member tags as for a
58
+ * unit; equal versions prefer the tag whose commit descends from the other's.
59
+ */
60
+ export interface GroupFacts {
61
+ readonly name: string;
62
+ readonly members: readonly string[];
63
+ /** Highest stable member tag merged into head. */
64
+ readonly baseTag: UnitTag | null;
65
+ /** Highest stable member tag on head's first-parent chain. */
66
+ readonly lineBaseTag: UnitTag | null;
67
+ /** Without a line base, the max over the members. */
68
+ readonly sinceLineBase: number;
69
+ }
70
+ /** Git and intent data of every released unit, collected before release math. */
71
+ export interface PlanFacts {
72
+ readonly head: string;
73
+ /** Released units, sorted by id. */
74
+ readonly units: readonly UnitFacts[];
75
+ /** One entry per distinct base tag commit. */
76
+ readonly ranges: readonly RangeFacts[];
77
+ /** Sorted by name. */
78
+ readonly groups: readonly GroupFacts[];
79
+ /** Every tag name, sorted. */
80
+ readonly tagNames: readonly string[];
81
+ /** Warnings logged by intent sources and for unknown explicit units. */
82
+ readonly warnings: readonly Warning[];
83
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,106 @@
1
+ import type { AffectedDoc, AffectedOptions, AffectedReason } from "./affected-types.js";
2
+ import type { Line } from "./branch-types.js";
3
+ import type { PlanFacts } from "./facts-types.js";
4
+ import type { BumpLevel, ReadonlyFs, VersionScheme } from "../plugin.js";
5
+ export interface PlanChange {
6
+ /** Absent for file-based changes. */
7
+ sha?: string;
8
+ type: string;
9
+ breaking: boolean;
10
+ scope?: string;
11
+ subject: string;
12
+ /** `BREAKING CHANGE` footer text. */
13
+ notes?: string;
14
+ pr?: number;
15
+ /** Absorbed unit the change came through. */
16
+ via?: string;
17
+ /** Release-As value of this commit for the unit. */
18
+ releaseAs?: string;
19
+ }
20
+ export interface UnitPlan {
21
+ id: string;
22
+ /** Unit root, `.` for the repo root. */
23
+ path: string;
24
+ plugin: string;
25
+ scheme: string;
26
+ tags: string[];
27
+ group: string | null;
28
+ affected: {
29
+ reason: AffectedReason;
30
+ via: string[];
31
+ } | null;
32
+ kind: "prerelease" | "rebuild" | "none";
33
+ baseTag: string | null;
34
+ lineBaseTag: string | null;
35
+ /** Null on a first release. */
36
+ from: string | null;
37
+ bump: BumpLevel | null;
38
+ releaseAs: string | null;
39
+ propagatedFrom: string[];
40
+ absorbedFrom: string[];
41
+ next: string | null;
42
+ version: string | null;
43
+ /** The planned commit. */
44
+ sha: string;
45
+ /** Core commit order. */
46
+ changes: PlanChange[];
47
+ }
48
+ export interface GroupPlan {
49
+ name: string;
50
+ members: string[];
51
+ baseTag: string | null;
52
+ from: string | null;
53
+ bump: BumpLevel | null;
54
+ next: string | null;
55
+ version: string | null;
56
+ }
57
+ export interface ReleasedUnit {
58
+ id: string;
59
+ path: string;
60
+ version: string;
61
+ tag: string;
62
+ floatingTags: string[];
63
+ releaseSha: string;
64
+ /** Not built from HEAD by this run (release sha differs from HEAD, or the unit is outside the build set). */
65
+ catchUp: boolean;
66
+ /** Null when not looked up (no forge, or a forge error in `plan`). */
67
+ forge: ReleasedForge | null;
68
+ line: "default" | "maintenance";
69
+ /** Highest stable version tagged for the unit, never on a maintenance line. */
70
+ latest: boolean;
71
+ }
72
+ export interface ReleasedForge {
73
+ /** PR that merged the release sha. */
74
+ pr: {
75
+ number: number;
76
+ url: string;
77
+ } | null;
78
+ /** Forge release of the tag. */
79
+ release: {
80
+ url: string;
81
+ } | null;
82
+ }
83
+ /** `tallyrelease plan --json`, schema 1. */
84
+ export interface Plan extends Omit<AffectedDoc, "units"> {
85
+ line: Line | null;
86
+ /** Topological order, cycles by id. */
87
+ units: UnitPlan[];
88
+ /** Sorted by name. */
89
+ groups: GroupPlan[];
90
+ /** Stable releases in `(build.base, head]`; empty until filled. */
91
+ released: ReleasedUnit[];
92
+ }
93
+ export interface PlanOptions extends AffectedOptions {
94
+ /** Files at `head`, for intent source contexts. */
95
+ fs: ReadonlyFs;
96
+ /** Also list released units outside the build set with a pending release. */
97
+ all?: boolean;
98
+ debug?: (message: string) => void;
99
+ }
100
+ /** Inputs of `resolvePlan`, all collected before release math. */
101
+ export interface ResolveInput {
102
+ affected: AffectedDoc;
103
+ facts: PlanFacts;
104
+ schemes: ReadonlyMap<string, VersionScheme<any>>;
105
+ all: boolean;
106
+ }
@@ -0,0 +1 @@
1
+ export {};