@open-tomato/rafa 0.52.0 → 0.52.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.
package/dist/cli.js CHANGED
@@ -3964,7 +3964,7 @@ var init_shared_flags = __esm(() => {
3964
3964
  });
3965
3965
 
3966
3966
  // package.json
3967
- var name = "@open-tomato/rafa", version = "0.52.0";
3967
+ var name = "@open-tomato/rafa", version = "0.52.1";
3968
3968
  var init_package = () => {};
3969
3969
 
3970
3970
  // packages/rafa/src/core/command/version.ts
@@ -43809,7 +43809,8 @@ function forecastLine(read) {
43809
43809
  return `Release forecast: none computed, because ${read.problem}`;
43810
43810
  const strategy = strategyOf3(read.forecast);
43811
43811
  const by = strategy === null ? "" : `${strategy}, `;
43812
- return `Release forecast: this branch ${read.forecast.sentence}` + ` (${by}${read.ref} at ${read.baseVersion}, ${waitingClause(read.waiting.length)})`;
43812
+ const merged = read.mergedVersion === undefined ? "" : `, ${read.mergedVersion} once this branch's version file merges`;
43813
+ return `Release forecast: this branch ${read.forecast.sentence}` + ` (${by}${read.ref} at ${read.baseVersion}${merged}, ${waitingClause(read.waiting.length)})`;
43813
43814
  }
43814
43815
  function blockOpen(forecast) {
43815
43816
  if (forecast === null || !forecast.ok)
@@ -44047,6 +44048,12 @@ var init_changes = __esm(() => {
44047
44048
  `;
44048
44049
  });
44049
44050
 
44051
+ // packages/rafa-release/src/release/guard-merged-version.ts
44052
+ function mergedRootVersion(versions) {
44053
+ const { mergeBase, branch, base: base2 } = versions;
44054
+ return branch !== null && branch !== mergeBase && base2 === mergeBase ? branch : null;
44055
+ }
44056
+
44050
44057
  // packages/rafa-release/src/release/guard.ts
44051
44058
  function sectionFor(text2, version2) {
44052
44059
  if (text2 === null)
@@ -44207,7 +44214,10 @@ function slotOf2(branch) {
44207
44214
  function slotBaseVersion2(git, input, base2, pkg) {
44208
44215
  const unfolded = "so no forecast was folded";
44209
44216
  if (pkg === null) {
44210
- return base2.rootVersion === null ? { problem: `${base2.ref} declares no version in ${input.settings.releaseVersionFile}, ${unfolded}` } : { version: base2.rootVersion };
44217
+ if (base2.rootVersion === null) {
44218
+ return { problem: `${base2.ref} declares no version in ${input.settings.releaseVersionFile}, ${unfolded}` };
44219
+ }
44220
+ return base2.mergedRootVersion === null ? { version: base2.rootVersion } : { version: base2.rootVersion, merged: base2.mergedRootVersion };
44211
44221
  }
44212
44222
  return packageBaseVersionAt({ git, base: base2, package: pkg });
44213
44223
  }
@@ -44234,9 +44244,16 @@ function dryFold(git, input, base2, branch) {
44234
44244
  }
44235
44245
  }
44236
44246
  const strategy = releaseStrategyFor(input.settings.releaseStrategy, { heading: input.settings.releaseHeading });
44237
- const forecast = forecastRelease({ strategy, baseVersion: baseVersion.version, waiting: [...waiting, ...before], branch: slot });
44247
+ const merged = "merged" in baseVersion ? baseVersion.merged : undefined;
44248
+ const forecast = forecastRelease({
44249
+ strategy,
44250
+ baseVersion: merged ?? baseVersion.version,
44251
+ waiting: [...waiting, ...before],
44252
+ branch: slot
44253
+ });
44254
+ const read = { ok: true, ref: base2.ref, baseVersion: baseVersion.version, waiting: waiting.map((each) => each.id), forecast, problems };
44238
44255
  return {
44239
- forecast: { ok: true, ref: base2.ref, baseVersion: baseVersion.version, waiting: waiting.map((each) => each.id), forecast, problems },
44256
+ forecast: merged === undefined ? read : { ...read, mergedVersion: merged },
44240
44257
  problems
44241
44258
  };
44242
44259
  }
@@ -44296,7 +44313,8 @@ function readGuard(input) {
44296
44313
  };
44297
44314
  const verdict = nameVerdict(git, baseCommit, settings, judgeGuard(facts));
44298
44315
  const base2 = { ref: input.base, commit: baseCommit };
44299
- const dry = dryFold(git, input, { ...base2, rootVersion: baseSide.version }, own.folded);
44316
+ const mergedRoot = mergedRootVersion({ mergeBase: facts.mergeBase.version, branch: facts.branch.version, base: baseSide.version });
44317
+ const dry = dryFold(git, input, { ...base2, rootVersion: baseSide.version, mergedRootVersion: mergedRoot }, own.folded);
44300
44318
  const level = localLevelReport(own.folded, input.readNotes);
44301
44319
  return {
44302
44320
  ok: true,
@@ -55632,6 +55650,22 @@ var init_release_commit = __esm(() => {
55632
55650
  init_version2();
55633
55651
  });
55634
55652
 
55653
+ // packages/rafa-release/src/commands/release/tag-behind.ts
55654
+ function readBehind(git) {
55655
+ const named7 = git(["rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{upstream}"]);
55656
+ const upstream = named7.stdout.trim();
55657
+ if (!named7.ok || upstream === "")
55658
+ return null;
55659
+ const counted8 = git(["rev-list", "--count", "HEAD..@{upstream}"]);
55660
+ if (!counted8.ok)
55661
+ return null;
55662
+ const commits = Number.parseInt(counted8.stdout.trim(), 10);
55663
+ return Number.isNaN(commits) ? null : { upstream, commits };
55664
+ }
55665
+ function commitsOf(count2) {
55666
+ return count2 === 1 ? "1 commit" : `${String(count2)} commits`;
55667
+ }
55668
+
55635
55669
  // packages/rafa-release/src/commands/release/tag-follow-ups.ts
55636
55670
  function trimmedOrNull4(value) {
55637
55671
  if (typeof value !== "string")
@@ -55798,7 +55832,13 @@ function branchRefusal(inputs) {
55798
55832
  if (branch === null) {
55799
55833
  return refuse14("branch", `${problem ?? "no branch is checked out"}, and a release is tagged` + ` on ${inputs.releaseBranch}`);
55800
55834
  }
55801
- return branch === inputs.releaseBranch ? null : refuse14("branch", `a release is tagged on ${inputs.releaseBranch}, and ${branch} is checked out`);
55835
+ if (branch !== inputs.releaseBranch) {
55836
+ return refuse14("branch", `a release is tagged on ${inputs.releaseBranch}, and ${branch} is checked out`);
55837
+ }
55838
+ const behind = inputs.branch.behind ?? null;
55839
+ if (behind === null || behind.commits === 0)
55840
+ return null;
55841
+ return refuse14("behind", `${branch} is ${commitsOf(behind.commits)} behind ${behind.upstream}, which may hold` + ` a release rafa release settle pushed there; run git merge --ff-only ${behind.upstream}, then tag again`);
55802
55842
  }
55803
55843
  function changelogRefusal(inputs, version2) {
55804
55844
  const { path: path3, version: newest, problem } = inputs.changelog;
@@ -55865,7 +55905,8 @@ async function tagConfig(project, warn4) {
55865
55905
  }
55866
55906
  }
55867
55907
  function readTagInputs(root, git, config) {
55868
- const branch = readBranch2(git);
55908
+ const read2 = readBranch2(git);
55909
+ const branch = read2.branch === config.releaseBranch ? { ...read2, behind: readBehind(git) } : read2;
55869
55910
  const version2 = readVersion(root, config.versionFile);
55870
55911
  const walkable = version2.version !== null && branch.branch === config.releaseBranch;
55871
55912
  return {
@@ -13,10 +13,10 @@ import {
13
13
  openNdjsonStore,
14
14
  openSqliteStore,
15
15
  selectEffortStore
16
- } from "../../index-hyp1sraj.js";
16
+ } from "../../index-1tdzcheq.js";
17
17
  import {
18
18
  TRUSTED_PERMISSIONS
19
- } from "../../index-91cag9fr.js";
19
+ } from "../../index-4dwaxd5r.js";
20
20
  import"../../index-2a7nb3an.js";
21
21
  import"../../index-m672ptpg.js";
22
22
  import {
@@ -8,7 +8,7 @@ import {
8
8
  createGitRunner,
9
9
  normalizeRemote,
10
10
  runningCommand
11
- } from "./index-91cag9fr.js";
11
+ } from "./index-4dwaxd5r.js";
12
12
  import {
13
13
  activeOutput,
14
14
  activeOutputMode,
@@ -220,7 +220,7 @@ var HINT_FLAG_SPEC = Object.freeze({
220
220
  });
221
221
  var DEFAULT_CI_TIMEOUT_MIN = 20;
222
222
  // package.json
223
- var version = "0.52.0";
223
+ var version = "0.52.1";
224
224
 
225
225
  // packages/rafa/src/core/command/version.ts
226
226
  var RAFA_VERSION = version;
@@ -20,7 +20,7 @@ import {
20
20
  isRecord,
21
21
  normalizeRemote,
22
22
  setActiveStoreSettings
23
- } from "./index-91cag9fr.js";
23
+ } from "./index-4dwaxd5r.js";
24
24
  import {
25
25
  activeOutput,
26
26
  activeOutputMode
package/dist/index.js CHANGED
@@ -82,7 +82,7 @@ import {
82
82
  withSqliteStore,
83
83
  writeNames,
84
84
  writeSqliteStore
85
- } from "./index-hyp1sraj.js";
85
+ } from "./index-1tdzcheq.js";
86
86
  import {
87
87
  ACTION_SHAPE,
88
88
  CONFIG_DEFAULTS,
@@ -269,7 +269,7 @@ import {
269
269
  writeHopRecord,
270
270
  writePositionFile,
271
271
  writeRefsBlock
272
- } from "./index-mbxgc1zv.js";
272
+ } from "./index-4wy2nmyt.js";
273
273
  import {
274
274
  BLOCKER_GAP,
275
275
  PLAN_BLOCK_KINDS,
@@ -321,7 +321,7 @@ import {
321
321
  parseWorkingTree,
322
322
  registerAdapters,
323
323
  restoreAdapters
324
- } from "./index-91cag9fr.js";
324
+ } from "./index-4dwaxd5r.js";
325
325
  import {
326
326
  activeOutput,
327
327
  activeOutputMode,
@@ -13257,7 +13257,8 @@ function forecastLine(read) {
13257
13257
  return `Release forecast: none computed, because ${read.problem}`;
13258
13258
  const strategy = strategyOf3(read.forecast);
13259
13259
  const by = strategy === null ? "" : `${strategy}, `;
13260
- return `Release forecast: this branch ${read.forecast.sentence}` + ` (${by}${read.ref} at ${read.baseVersion}, ${waitingClause(read.waiting.length)})`;
13260
+ const merged = read.mergedVersion === undefined ? "" : `, ${read.mergedVersion} once this branch's version file merges`;
13261
+ return `Release forecast: this branch ${read.forecast.sentence}` + ` (${by}${read.ref} at ${read.baseVersion}${merged}, ${waitingClause(read.waiting.length)})`;
13261
13262
  }
13262
13263
  function blockOpen(forecast) {
13263
13264
  if (forecast === null || !forecast.ok)
@@ -28893,7 +28894,7 @@ function createPlanBlockedOffer(seams = DEFAULT_BLOCKED_SEAMS) {
28893
28894
 
28894
28895
  // src/commands/plan/ready-offer.ts
28895
28896
  var runIssueReadyLazily = async (options) => {
28896
- const { runIssueReady: run } = await import("./ready-3ccr65a2.js");
28897
+ const { runIssueReady: run } = await import("./ready-kac4ty0p.js");
28897
28898
  return run(options);
28898
28899
  };
28899
28900
  var DEFAULT_OFFER_SEAMS = Object.freeze({});
@@ -24,14 +24,14 @@ import {
24
24
  requireCompleteSpec,
25
25
  requireTrustedBoardAuthor,
26
26
  typeOfLabels
27
- } from "./index-mbxgc1zv.js";
27
+ } from "./index-4wy2nmyt.js";
28
28
  import"./index-n2r3wf2z.js";
29
29
  import {
30
30
  CommandExit,
31
31
  createGitRunner,
32
32
  createLinePrompter,
33
33
  lazyPrompter
34
- } from "./index-91cag9fr.js";
34
+ } from "./index-4dwaxd5r.js";
35
35
  import"./index-2a7nb3an.js";
36
36
  import"./index-jjxnyqvy.js";
37
37
  import"./index-m672ptpg.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tomato/rafa",
3
- "version": "0.52.0",
3
+ "version": "0.52.1",
4
4
  "description": "Alpha. Runs a plan through the ralph loop: one Claude Code session per task, one commit per task, then a pull request and a CI wait.",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -141,30 +141,21 @@
141
141
  "device:check": "bash scripts/device/check.sh"
142
142
  },
143
143
  "devDependencies": {
144
- "@eslint/js": "^9.39.4",
145
- "@eslint/markdown": "^8.0.3",
146
144
  "@open-tomato/define-config": "0.5.0",
145
+ "@open-tomato/eslint-config": "^0.1.0",
146
+ "@open-tomato/eslint-plugin": "^0.1.0",
147
147
  "@open-tomato/rafa-board": "workspace:*",
148
148
  "@open-tomato/rafa-core": "workspace:*",
149
149
  "@open-tomato/rafa-effort": "workspace:*",
150
- "@open-tomato/rafa-eslint-config": "workspace:*",
151
150
  "@open-tomato/rafa-inventory": "workspace:*",
152
151
  "@open-tomato/rafa-pr": "workspace:*",
153
152
  "@open-tomato/rafa-release": "workspace:*",
154
153
  "@open-tomato/rafa-run": "workspace:*",
155
- "@open-tomato/rafa-typescript-config": "workspace:*",
156
- "@stylistic/eslint-plugin": "^5.10.0",
154
+ "@open-tomato/typescript-config": "^0.1.0",
157
155
  "@types/bun": "^1.4.0",
158
156
  "@types/node": "^26.4.1",
159
- "@typescript-eslint/parser": "^8.69.0",
160
157
  "eslint": "^9.39.4",
161
- "eslint-import-resolver-typescript": "^4.4.4",
162
- "eslint-plugin-import": "^2.32.0",
163
- "eslint-plugin-jsonc": "^3.4.2",
164
- "globals": "^17.12.0",
165
- "jsonc-eslint-parser": "^3.1.0",
166
158
  "turbo": "^2.11.8",
167
- "typescript": "^5.9.3",
168
- "typescript-eslint": "^8.69.0"
159
+ "typescript": "^5.9.3"
169
160
  }
170
161
  }