@treeseed/cli 0.9.3 → 0.10.1
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.
|
@@ -21,6 +21,17 @@ function formatReleasePlanSections(payload) {
|
|
|
21
21
|
lines: versions.map(([name, version]) => `- ${name}: ${version}`)
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
+
if (payload.releaseLine) {
|
|
25
|
+
sections.push({
|
|
26
|
+
title: "Release line",
|
|
27
|
+
lines: [
|
|
28
|
+
`Target: ${String(payload.releaseLine.targetLine ?? "unknown")}`,
|
|
29
|
+
`Highest current: ${String(payload.releaseLine.highestCurrentLine ?? "unknown")}`,
|
|
30
|
+
`Repair: ${payload.releaseLine.repair === true ? "yes" : "no"}`,
|
|
31
|
+
`Aligned before: ${payload.releaseLine.alignedBefore === true ? "yes" : "no"}`
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
24
35
|
const rewrites = payload.plannedDevReferenceRewrites ?? [];
|
|
25
36
|
if (rewrites.length > 0) {
|
|
26
37
|
sections.push({
|
|
@@ -55,9 +66,12 @@ function formatReleasePlanSections(payload) {
|
|
|
55
66
|
}
|
|
56
67
|
const handleRelease = async (invocation, context) => {
|
|
57
68
|
try {
|
|
69
|
+
const repairVersionLine = invocation.args.repairVersionLine === true;
|
|
58
70
|
const bump = ["major", "minor", "patch"].find((candidate) => invocation.args[candidate] === true) ?? "patch";
|
|
59
71
|
const result = await createWorkflowSdk(context).release({
|
|
60
72
|
bump,
|
|
73
|
+
repairVersionLine,
|
|
74
|
+
targetVersionLine: typeof invocation.args.targetVersionLine === "string" ? invocation.args.targetVersionLine : void 0,
|
|
61
75
|
worktreeMode: typeof invocation.args.worktreeMode === "string" ? invocation.args.worktreeMode : void 0,
|
|
62
76
|
ciMode: typeof invocation.args.ciMode === "string" ? invocation.args.ciMode : void 0,
|
|
63
77
|
workspaceLinks: typeof invocation.args.workspaceLinks === "string" ? invocation.args.workspaceLinks : void 0,
|
|
@@ -79,6 +93,7 @@ const handleRelease = async (invocation, context) => {
|
|
|
79
93
|
{ label: "Production branch", value: payload.productionBranch },
|
|
80
94
|
{ label: "Merge strategy", value: payload.mergeStrategy },
|
|
81
95
|
{ label: "Release level", value: payload.level },
|
|
96
|
+
{ label: "Release line", value: String(payload.releaseLine?.targetLine ?? "(none)") },
|
|
82
97
|
{ label: "Root version", value: payload.rootVersion ?? payload.plannedVersions?.["@treeseed/market"] ?? "(planned)" },
|
|
83
98
|
{ label: "Release tag", value: payload.releaseTag ?? payload.rootVersion ?? payload.plannedVersions?.["@treeseed/market"] ?? "(planned)" },
|
|
84
99
|
{ label: "Released commit", value: releasedCommit },
|
|
@@ -1063,11 +1063,13 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
|
|
|
1063
1063
|
handlerName: "export"
|
|
1064
1064
|
})],
|
|
1065
1065
|
["release", command({
|
|
1066
|
-
usage: "treeseed release --major|--minor|--patch",
|
|
1066
|
+
usage: "treeseed release --major|--minor|--patch|--repair-version-line",
|
|
1067
1067
|
options: [
|
|
1068
1068
|
{ name: "major", flags: "--major", description: "Bump to the next major version.", kind: "boolean" },
|
|
1069
1069
|
{ name: "minor", flags: "--minor", description: "Bump to the next minor version.", kind: "boolean" },
|
|
1070
1070
|
{ name: "patch", flags: "--patch", description: "Bump to the next patch version.", kind: "boolean" },
|
|
1071
|
+
{ name: "repairVersionLine", flags: "--repair-version-line", description: "Repair public package major.minor drift without enforcing patch parity.", kind: "boolean" },
|
|
1072
|
+
{ name: "targetVersionLine", flags: "--target-version-line <major.minor>", description: "Target release line for --repair-version-line, for example 0.10.", kind: "string" },
|
|
1071
1073
|
{ name: "worktreeMode", flags: "--worktree <mode>", description: "Control managed workflow worktrees.", kind: "enum", values: ["auto", "on", "off"] },
|
|
1072
1074
|
{ name: "ciMode", flags: "--ci <mode>", description: "Control hosted GitHub Actions waits.", kind: "enum", values: ["auto", "hosted", "off"] },
|
|
1073
1075
|
{ name: "workspaceLinks", flags: "--workspace-links <mode>", description: "Control local workspace package links.", kind: "enum", values: ["auto", "off"] },
|
|
@@ -1076,8 +1078,8 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
|
|
|
1076
1078
|
{ name: "dryRun", flags: "--dry-run", description: "Alias for --plan.", kind: "boolean" },
|
|
1077
1079
|
{ name: "json", flags: "--json", description: "Emit machine-readable JSON instead of human-readable text.", kind: "boolean" }
|
|
1078
1080
|
],
|
|
1079
|
-
examples: ["treeseed release --patch", "treeseed release --minor", "treeseed release --
|
|
1080
|
-
notes: ["Requires exactly one bump flag."],
|
|
1081
|
+
examples: ["treeseed release --patch", "treeseed release --minor", "treeseed release --repair-version-line --target-version-line 0.10 --plan", "treeseed release --patch --fresh"],
|
|
1082
|
+
notes: ["Requires exactly one bump flag unless --repair-version-line is used."],
|
|
1081
1083
|
help: {
|
|
1082
1084
|
workflowPosition: "promote to production",
|
|
1083
1085
|
longSummary: [
|
|
@@ -1085,11 +1087,11 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
|
|
|
1085
1087
|
],
|
|
1086
1088
|
whenToUse: [
|
|
1087
1089
|
"Use this only when staging is the approved source for production promotion.",
|
|
1088
|
-
"Choose exactly one bump flag so the release version reflects the intended change size."
|
|
1090
|
+
"Choose exactly one bump flag so the release version reflects the intended change size, or use --repair-version-line to repair package line drift."
|
|
1089
1091
|
],
|
|
1090
1092
|
beforeYouRun: [
|
|
1091
1093
|
"Confirm staging is in the state you want to promote.",
|
|
1092
|
-
"Choose one of `--major`, `--minor`, or `--
|
|
1094
|
+
"Choose one of `--major`, `--minor`, `--patch`, or `--repair-version-line` before running the command."
|
|
1093
1095
|
],
|
|
1094
1096
|
outcomes: [
|
|
1095
1097
|
"Promotes the release forward and records the version bump.",
|
|
@@ -1098,10 +1100,11 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
|
|
|
1098
1100
|
examples: [
|
|
1099
1101
|
example("treeseed release --patch", "Patch release", "Promote staging to production with the next patch version."),
|
|
1100
1102
|
example("treeseed release --minor", "Minor release", "Promote staging with the next minor version bump."),
|
|
1103
|
+
example("treeseed release --repair-version-line --target-version-line 0.10 --json", "Repair package line drift", "Publish only packages below the selected public package release line."),
|
|
1101
1104
|
example("treeseed release --patch --json", "Automate release tracking", "Emit structured release output for tooling that records deployments and version changes.")
|
|
1102
1105
|
],
|
|
1103
1106
|
warnings: [
|
|
1104
|
-
"Exactly one bump flag is required.",
|
|
1107
|
+
"Exactly one bump flag is required unless --repair-version-line is used.",
|
|
1105
1108
|
"This is a production-facing promotion command, not a dry local build operation."
|
|
1106
1109
|
],
|
|
1107
1110
|
relatedDetails: [
|
package/dist/cli/parser.js
CHANGED
|
@@ -82,9 +82,9 @@ function validateTreeseedInvocation(command, invocation) {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
if (command.name === "release") {
|
|
85
|
-
const selected = ["major", "minor", "patch"].filter((name) => invocation.args[name] === true);
|
|
85
|
+
const selected = ["major", "minor", "patch", "repairVersionLine"].filter((name) => invocation.args[name] === true);
|
|
86
86
|
if (selected.length !== 1) {
|
|
87
|
-
errors.push(`Treeseed ${command.name} requires exactly one version bump flag: --major, --minor, or --
|
|
87
|
+
errors.push(`Treeseed ${command.name} requires exactly one version bump flag: --major, --minor, --patch, or --repair-version-line.`);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
return errors;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treeseed/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Operator-facing Treeseed CLI package.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"release:publish": "node ./scripts/run-ts.mjs ./scripts/publish-package.ts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@treeseed/sdk": "github:treeseed-ai/sdk#0.10.
|
|
48
|
+
"@treeseed/sdk": "github:treeseed-ai/sdk#0.10.7",
|
|
49
49
|
"ink": "^7.0.0",
|
|
50
50
|
"react": "^19.2.5"
|
|
51
51
|
},
|