@varlock/bumpy 1.14.0-rc.0 → 1.14.0-rc.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.
@@ -8,7 +8,7 @@ import { a as getChangedFiles, p as withGitToken } from "./git-DAWj8LyV.mjs";
8
8
  import { t as randomName } from "./names-COooXAFg.mjs";
9
9
  import { n as findChangedPackages } from "./check-DIl9Dz68.mjs";
10
10
  import { channelNames, detectReleaseBranch, matchChannelByBranch, resolveChannels } from "./channels-CFXZkyGd.mjs";
11
- import { n as formatChannelVersionSummary, t as buildChannelReleasePlan } from "./prerelease-Blnk8FE1.mjs";
11
+ import { n as channelDisplayPlan, r as formatChannelVersionSummary, t as buildChannelReleasePlan } from "./prerelease-B2PVfXkm.mjs";
12
12
  import { t as resolveCommitMessage } from "./commit-message-BwsowSds.mjs";
13
13
  import { appendFileSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
14
14
  import { createHash } from "node:crypto";
@@ -115,7 +115,7 @@ async function ciCheckCommand(rootDir, opts) {
115
115
  return;
116
116
  }
117
117
  const plan = assembleReleasePlan(prBumpFiles, packages, depGraph, config, prChannel ? { prereleasePreid: prChannel.preid } : {});
118
- const releaseSuffix = prChannel ? `-${prChannel.preid}.?` : "";
118
+ const releaseSuffix = prChannel ? `-${prChannel.preid}.x` : "";
119
119
  log.bold(`${prBumpFiles.length} bump file(s) → ${plan.releases.length} package(s) to release${prChannel ? ` on the "${prChannel.name}" channel (@${prChannel.tag})` : ""}\n`);
120
120
  for (const r of plan.releases) {
121
121
  const tag = r.isDependencyBump ? " (dep)" : r.isCascadeBump ? " (cascade)" : "";
@@ -169,7 +169,7 @@ async function ciPlanCommand(rootDir) {
169
169
  packageNames: plan.releases.map((r) => r.name)
170
170
  };
171
171
  else {
172
- const { findUnpublishedPackages } = await import("./publish-Cz0e4KYT.mjs");
172
+ const { findUnpublishedPackages } = await import("./publish-Ak6jmwi_.mjs");
173
173
  const unpublished = await findUnpublishedPackages(packages, config);
174
174
  if (unpublished.length > 0) output = {
175
175
  mode: "publish",
@@ -253,7 +253,7 @@ async function ciReleaseCommand(rootDir, opts) {
253
253
  const msg = bumpFiles.length === 0 ? "No pending bump files — checking for unpublished packages..." : "Bump files found but no packages would be released — checking for unpublished packages...";
254
254
  log.info(msg);
255
255
  const recoveredBumpFiles = recoverDeletedBumpFiles(rootDir);
256
- const { publishCommand } = await import("./publish-Cz0e4KYT.mjs");
256
+ const { publishCommand } = await import("./publish-Ak6jmwi_.mjs");
257
257
  await publishCommand(rootDir, {
258
258
  tag: opts.tag,
259
259
  recoveredBumpFiles
@@ -277,7 +277,7 @@ async function ciReleaseCommand(rootDir, opts) {
277
277
  */
278
278
  async function autoPublish(rootDir, config, plan, tag) {
279
279
  log.step("Running bumpy version...");
280
- const { versionCommand } = await import("./version-BUUf8vKC.mjs");
280
+ const { versionCommand } = await import("./version-CMJUopVj.mjs");
281
281
  await versionCommand(rootDir);
282
282
  log.step("Committing version changes...");
283
283
  runArgs([
@@ -306,7 +306,7 @@ async function autoPublish(rootDir, config, plan, tag) {
306
306
  ], { cwd: rootDir });
307
307
  }
308
308
  log.step("Running bumpy publish...");
309
- const { publishCommand } = await import("./publish-Cz0e4KYT.mjs");
309
+ const { publishCommand } = await import("./publish-Ak6jmwi_.mjs");
310
310
  await publishCommand(rootDir, { tag });
311
311
  }
312
312
  /**
@@ -380,7 +380,7 @@ async function createVersionPr(rootDir, plan, config, packageDirs, branchName) {
380
380
  branch
381
381
  ], { cwd: rootDir });
382
382
  log.step("Running bumpy version...");
383
- const { versionCommand } = await import("./version-BUUf8vKC.mjs");
383
+ const { versionCommand } = await import("./version-CMJUopVj.mjs");
384
384
  await versionCommand(rootDir);
385
385
  runArgs([
386
386
  "git",
@@ -548,14 +548,14 @@ async function ciChannelRelease(rootDir, config, channel, opts) {
548
548
  const pending = bumpFiles.filter((bf) => bf.channel !== channel.name);
549
549
  if (opts.autoPublish) {
550
550
  if (pending.length > 0) {
551
- const { channelVersion } = await import("./version-BUUf8vKC.mjs");
551
+ const { channelVersion } = await import("./version-CMJUopVj.mjs");
552
552
  if (await channelVersion(rootDir, config, channel, { commit: true })) runArgs([
553
553
  "git",
554
554
  "push",
555
555
  "--no-verify"
556
556
  ], { cwd: rootDir });
557
557
  }
558
- const { publishCommand } = await import("./publish-Cz0e4KYT.mjs");
558
+ const { publishCommand } = await import("./publish-Ak6jmwi_.mjs");
559
559
  await publishCommand(rootDir, {
560
560
  channel: channel.name,
561
561
  tag: opts.tag
@@ -566,7 +566,7 @@ async function ciChannelRelease(rootDir, config, channel, opts) {
566
566
  const shouldPublish = movedIds.length > 0 && opts.assertMode !== "version-pr";
567
567
  if (shouldPublish) {
568
568
  log.step(`Release PR merge detected (${movedIds.map((id) => `${id}.md`).join(", ")}) — publishing prereleases...`);
569
- const { publishCommand } = await import("./publish-Cz0e4KYT.mjs");
569
+ const { publishCommand } = await import("./publish-Ak6jmwi_.mjs");
570
570
  await publishCommand(rootDir, {
571
571
  channel: channel.name,
572
572
  tag: opts.tag
@@ -582,8 +582,8 @@ async function ciChannelRelease(rootDir, config, channel, opts) {
582
582
  /**
583
583
  * Create or update the channel's release PR. Unlike the stable version PR, its diff
584
584
  * is pure file moves (pending bump files → `.bumpy/<channel>/`) — no versions, no
585
- * changelogs. Computed prerelease versions appear in the PR title and body as
586
- * point-in-time narrative; the registry wins at publish time.
585
+ * changelogs. The PR title/body show targets with a wildcard counter (`1.2.0-rc.x`),
586
+ * derived purely from committed state; the exact counter is assigned at publish time.
587
587
  */
588
588
  async function createChannelReleasePr(rootDir, config, channel, packages, branchOverride) {
589
589
  const branch = validateBranchName(branchOverride || channel.versionPr.branch);
@@ -623,7 +623,7 @@ async function createChannelReleasePr(rootDir, config, channel, packages, branch
623
623
  "-b",
624
624
  branch
625
625
  ], { cwd: rootDir });
626
- const { channelVersion } = await import("./version-BUUf8vKC.mjs");
626
+ const { channelVersion } = await import("./version-CMJUopVj.mjs");
627
627
  const result = await channelVersion(rootDir, config, channel);
628
628
  if (!result) {
629
629
  log.info("No pending bump files to move.");
@@ -634,22 +634,7 @@ async function createChannelReleasePr(rootDir, config, channel, packages, branch
634
634
  ], { cwd: rootDir });
635
635
  return;
636
636
  }
637
- let displayPlan = result.cyclePlan;
638
- let displayIsExact = false;
639
- try {
640
- const built = await buildChannelReleasePlan(result.cyclePlan, channel, packages, rootDir, { forDisplay: true });
641
- if (built.plan.releases.length > 0) {
642
- displayPlan = built.plan;
643
- displayIsExact = true;
644
- }
645
- } catch {}
646
- if (!displayIsExact) displayPlan = {
647
- ...displayPlan,
648
- releases: displayPlan.releases.map((r) => ({
649
- ...r,
650
- newVersion: `${r.newVersion}-${channel.preid}.?`
651
- }))
652
- };
637
+ const displayPlan = channelDisplayPlan(result.cyclePlan, channel, packages);
653
638
  const versionSummary = formatChannelVersionSummary(displayPlan.releases);
654
639
  const prTitle = versionSummary ? `${channel.versionPr.title}: ${versionSummary}` : channel.versionPr.title;
655
640
  runArgs([
@@ -753,7 +738,7 @@ function buildChannelPrPreamble(config, channel) {
753
738
  config.versionPr.preamble,
754
739
  "",
755
740
  `> 🔀 **Prerelease channel \`${channel.name}\`** — merging this PR publishes the versions below to the \`@${channel.tag}\` dist-tag.`,
756
- `> The diff only moves bump files into \`.bumpy/${channel.name}/\` — prerelease versions are derived at publish time and never committed. Version numbers shown here are estimates; the registry wins at publish.`
741
+ `> The diff only moves bump files into \`.bumpy/${channel.name}/\` — prerelease versions are derived at publish time and never committed. The \`.x\` counter is assigned from the registry at publish time.`
757
742
  ].join("\n");
758
743
  }
759
744
  /** Enable GitHub auto-merge on a PR, trying the available merge methods in order */
@@ -842,7 +827,7 @@ function pmRunCommand(pm) {
842
827
  function formatReleasePlanComment(plan, bumpFiles, prNumber, prBranch, pm, warnings = [], parseErrors = [], emptyBumpFileIds = [], channel = null) {
843
828
  const repo = process.env.GITHUB_REPOSITORY;
844
829
  const lines = [];
845
- const versionSuffix = channel ? `-${channel.preid}.?` : "";
830
+ const versionSuffix = channel ? `-${channel.preid}.x` : "";
846
831
  const headline = channel ? `**This PR targets the \`${channel.name}\` prerelease channel** — merging it ships these packages as a **prerelease** to the \`@${channel.tag}\` dist-tag, not a stable release.` : "**The changes in this PR will be included in the next version bump.**";
847
832
  const preamble = [
848
833
  `<a href="https://bumpy.varlock.dev"><img src="${FROG_IMG_BASE}/frog-clipboard.png" alt="bumpy-frog" width="60" align="left" style="image-rendering: pixelated;" title="Hi! I'm bumpy!" /></a>`,
@@ -876,7 +861,7 @@ function formatReleasePlanComment(plan, bumpFiles, prNumber, prBranch, pm, warni
876
861
  if (channel) {
877
862
  const examplePkg = plan.releases.find((r) => !r.isDependencyBump && !r.isCascadeBump)?.name ?? plan.releases[0]?.name;
878
863
  const installHint = examplePkg ? ` (e.g. \`npm i ${examplePkg}@${channel.tag}\`)` : "";
879
- lines.push(`> 🔀 Published to the \`@${channel.tag}\` dist-tag${installHint}. Prerelease versions are derived at publish time — the \`.?\` counter is filled in from the registry. Promote to a stable release by merging \`${channel.branch}\` into your base branch.`);
864
+ lines.push(`> 🔀 Published to the \`@${channel.tag}\` dist-tag${installHint}. Prerelease versions are derived at publish time — the \`.x\` counter is filled in from the registry. Promote to a stable release by merging \`${channel.branch}\` into your base branch.`);
880
865
  lines.push("");
881
866
  }
882
867
  lines.push(`#### Bump files in this PR`);
package/dist/cli.mjs CHANGED
@@ -43,7 +43,7 @@ async function main() {
43
43
  }
44
44
  case "status": {
45
45
  const rootDir = await findRoot();
46
- const { statusCommand } = await import("./status-CrMvvvNy.mjs");
46
+ const { statusCommand } = await import("./status-DIzi-Iai.mjs");
47
47
  await statusCommand(rootDir, {
48
48
  json: flags.json === true,
49
49
  packagesOnly: flags.packages === true,
@@ -56,7 +56,7 @@ async function main() {
56
56
  }
57
57
  case "version": {
58
58
  const rootDir = await findRoot();
59
- const { versionCommand } = await import("./version-BUUf8vKC.mjs");
59
+ const { versionCommand } = await import("./version-CMJUopVj.mjs");
60
60
  await versionCommand(rootDir, {
61
61
  commit: flags.commit === true,
62
62
  channel: flags.channel
@@ -94,17 +94,17 @@ async function main() {
94
94
  const subcommand = args[1];
95
95
  const ciFlags = parseFlags(args.slice(2));
96
96
  if (subcommand === "check") {
97
- const { ciCheckCommand } = await import("./ci-hO7tAbCN.mjs");
97
+ const { ciCheckCommand } = await import("./ci-ChYmDuwy.mjs");
98
98
  await ciCheckCommand(rootDir, {
99
99
  comment: ciFlags.comment !== void 0 ? ciFlags.comment === true : void 0,
100
100
  strict: ciFlags.strict === true,
101
101
  noFail: ciFlags["no-fail"] === true
102
102
  });
103
103
  } else if (subcommand === "plan") {
104
- const { ciPlanCommand } = await import("./ci-hO7tAbCN.mjs");
104
+ const { ciPlanCommand } = await import("./ci-ChYmDuwy.mjs");
105
105
  await ciPlanCommand(rootDir);
106
106
  } else if (subcommand === "release") {
107
- const { ciReleaseCommand } = await import("./ci-hO7tAbCN.mjs");
107
+ const { ciReleaseCommand } = await import("./ci-ChYmDuwy.mjs");
108
108
  const expectModeFlag = ciFlags["expect-mode"];
109
109
  const autoPublishFlag = ciFlags["auto-publish"] === true;
110
110
  if (expectModeFlag !== void 0 && expectModeFlag !== "version-pr" && expectModeFlag !== "publish") {
@@ -132,7 +132,7 @@ async function main() {
132
132
  }
133
133
  case "publish": {
134
134
  const rootDir = await findRoot();
135
- const { publishCommand } = await import("./publish-Cz0e4KYT.mjs");
135
+ const { publishCommand } = await import("./publish-Ak6jmwi_.mjs");
136
136
  await publishCommand(rootDir, {
137
137
  dryRun: flags["dry-run"] === true,
138
138
  tag: flags.tag,
@@ -175,12 +175,31 @@ async function writeChannelVersionsInPlace(plan, packages) {
175
175
  for (const [path, content] of originals) await writeText(path, content);
176
176
  };
177
177
  }
178
+ /**
179
+ * Derive display versions for a channel cycle without touching the registry:
180
+ * each target gets a wildcard counter (`1.2.0-rc.x`). Everything here comes from
181
+ * committed state (bump files + config), so PR titles/bodies and commit messages
182
+ * can never disagree with what eventually publishes. Unpublishable packages are
183
+ * dropped, mirroring the filter in `buildChannelReleasePlan`.
184
+ */
185
+ function channelDisplayPlan(stablePlan, channel, packages) {
186
+ const releases = stablePlan.releases.filter((r) => {
187
+ const pkg = packages.get(r.name);
188
+ return !!pkg && !(pkg.private && !pkg.bumpy?.publishCommand);
189
+ }).map((r) => ({
190
+ ...r,
191
+ newVersion: `${r.newVersion}-${channel.preid}.x`
192
+ }));
193
+ return {
194
+ ...stablePlan,
195
+ releases
196
+ };
197
+ }
178
198
  /** One-line summary of a channel plan's versions, for PR titles and commit messages */
179
199
  function formatChannelVersionSummary(releases) {
180
200
  if (releases.length === 0) return "";
181
- const lead = releases.filter((r) => !r.isDependencyBump && !r.isCascadeBump && !r.isGroupBump)[0] ?? releases[0];
182
- const rest = releases.length - 1;
183
- return rest > 0 ? `${lead.name}@${lead.newVersion} (+${rest} more)` : `${lead.name}@${lead.newVersion}`;
201
+ if (releases.length === 1) return `${releases[0].name}@${releases[0].newVersion}`;
202
+ return `${releases.length} packages`;
184
203
  }
185
204
  //#endregion
186
- export { formatChannelVersionSummary as n, writeChannelVersionsInPlace as r, buildChannelReleasePlan as t };
205
+ export { writeChannelVersionsInPlace as i, channelDisplayPlan as n, formatChannelVersionSummary as r, buildChannelReleasePlan as t };
@@ -8,8 +8,8 @@ import { i as loadFormatter, n as generateChangelogEntry } from "./changelog-DuF
8
8
  import { f as tagExists, l as hasUncommittedChanges, n as forcePushTag } from "./git-DAWj8LyV.mjs";
9
9
  import { n as willUseOidcExclusively, t as publishPackages } from "./publish-pipeline-BD8mLbL9.mjs";
10
10
  import { channelNames, resolveActiveChannel } from "./channels-CFXZkyGd.mjs";
11
- import { r as writeChannelVersionsInPlace, t as buildChannelReleasePlan } from "./prerelease-Blnk8FE1.mjs";
12
- import { CI_PLAN_CACHE_PATH } from "./ci-hO7tAbCN.mjs";
11
+ import { i as writeChannelVersionsInPlace, t as buildChannelReleasePlan } from "./prerelease-B2PVfXkm.mjs";
12
+ import { CI_PLAN_CACHE_PATH } from "./ci-ChYmDuwy.mjs";
13
13
  //#region src/core/github-release.ts
14
14
  var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
15
15
  /** Get the current HEAD commit SHA */
@@ -4,7 +4,7 @@ import { i as readBumpFiles, s as discoverPackages, t as filterBranchBumpFiles }
4
4
  import { o as DependencyGraph, t as assembleReleasePlan } from "./release-plan-C84pcBi-.mjs";
5
5
  import { a as getChangedFiles, o as getCurrentBranch } from "./git-DAWj8LyV.mjs";
6
6
  import { channelNames, resolveActiveChannel } from "./channels-CFXZkyGd.mjs";
7
- import { t as buildChannelReleasePlan } from "./prerelease-Blnk8FE1.mjs";
7
+ import { t as buildChannelReleasePlan } from "./prerelease-B2PVfXkm.mjs";
8
8
  //#region src/commands/status.ts
9
9
  async function statusCommand(rootDir, opts) {
10
10
  const config = await loadConfig(rootDir);
@@ -125,7 +125,7 @@ async function channelVersion(rootDir, config, channel, opts = {}) {
125
125
  log.step("Cycle targets (counters are derived from the registry at publish time):");
126
126
  for (const r of cyclePlan.releases) {
127
127
  const tag = r.isDependencyBump ? " (dep)" : r.isCascadeBump ? " (cascade)" : "";
128
- console.log(` ${r.name}: ${r.oldVersion} → ${colorize(`${r.newVersion}-${channel.preid}.?`, "cyan")}${tag}`);
128
+ console.log(` ${r.name}: ${r.oldVersion} → ${colorize(`${r.newVersion}-${channel.preid}.x`, "cyan")}${tag}`);
129
129
  }
130
130
  await moveBumpFilesToChannel(rootDir, pending, channel.name);
131
131
  log.success(`🐸 Moved ${pending.length} bump file(s) — no versions written (prereleases are derived, not committed)`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlock/bumpy",
3
- "version": "1.14.0-rc.0",
3
+ "version": "1.14.0-rc.1",
4
4
  "description": "Modern monorepo versioning and changelog tool",
5
5
  "keywords": [
6
6
  "bump",