@varlock/bumpy 1.6.0 → 1.7.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.
Files changed (31) hide show
  1. package/dist/{add-u3h5BH8e.mjs → add-CEOjsSPY.mjs} +44 -85
  2. package/dist/{ai-C66IfTzs.mjs → ai-Bbe56gBt.mjs} +2 -2
  3. package/dist/{apply-release-plan-DNpoi7cS.mjs → apply-release-plan-CAx8E9MJ.mjs} +3 -3
  4. package/dist/{bump-file-CoaSxqne.mjs → bump-file-4cnuDyfW.mjs} +110 -6
  5. package/dist/{changelog-_gBjowzN.mjs → changelog-BubwrZfr.mjs} +3 -3
  6. package/dist/{changelog-github-B_e9JWku.mjs → changelog-github-BAUnp3ic.mjs} +2 -2
  7. package/dist/{check-B3M2S2wx.mjs → check-w-edwiNw.mjs} +9 -6
  8. package/dist/{ci-h8s-soA6.mjs → ci-Di_Tur0k.mjs} +102 -17
  9. package/dist/{ci-setup-DWxrdSK6.mjs → ci-setup-DKjyiF2-.mjs} +4 -4
  10. package/dist/{clack-CJT1JFFa.mjs → clack-W95rXis0.mjs} +6 -127
  11. package/dist/cli.mjs +20 -16
  12. package/dist/{config-D13G4-R8.mjs → config-BcmlSJJd.mjs} +2 -2
  13. package/dist/{fs-DnDogVn-.mjs → fs-CBXKZhoU.mjs} +1 -1
  14. package/dist/{generate-CxKXOBNP.mjs → generate-DU27B8co.mjs} +7 -8
  15. package/dist/{git-ukq7VTuZ.mjs → git-nTR-JccX.mjs} +1 -1
  16. package/dist/index.mjs +6 -9
  17. package/dist/{init-CUIw0jg8.mjs → init-Cs6amsw5.mjs} +14 -6
  18. package/dist/{logger-C2dEe5Su.mjs → logger-BgksGFuf.mjs} +3 -1
  19. package/dist/{package-manager-CClZtIHP.mjs → package-manager-BQPwXwu5.mjs} +1 -1
  20. package/dist/{publish-CXJ0Ggkq.mjs → publish-BJ-Cs0TR.mjs} +75 -13
  21. package/dist/{publish-pipeline-C1slMaJV.mjs → publish-pipeline-BsxtJ3-A.mjs} +6 -6
  22. package/dist/{semver-DfQyVLM_.mjs → release-plan-iZvGo-SB.mjs} +312 -2
  23. package/dist/{shell-u3bYGxNy.mjs → shell-C8KgKnMQ.mjs} +1 -1
  24. package/dist/{status-lS56U6F_.mjs → status-CpGvpJBm.mjs} +8 -10
  25. package/dist/{version-BjjnO2ii.mjs → version-nJ0vhPWw.mjs} +8 -10
  26. package/package.json +1 -1
  27. package/dist/dep-graph-E-9-eQ2J.mjs +0 -64
  28. package/dist/release-plan-C1Lz9rl_.mjs +0 -249
  29. package/dist/workspace-Yt7qwsML.mjs +0 -109
  30. /package/dist/{commit-message-3e4KhzFV.mjs → commit-message-CSWVKPJ-.mjs} +0 -0
  31. /package/dist/{names-CBy7d8K_.mjs → names-COooXAFg.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import { i as __commonJSMin } from "./logger-C2dEe5Su.mjs";
1
+ import { i as __commonJSMin } from "./logger-BgksGFuf.mjs";
2
2
  import "node:path";
3
3
  import "node:fs";
4
4
  import { stripVTControlCharacters, styleText } from "node:util";
@@ -659,50 +659,6 @@ var Q$1 = class extends p {
659
659
  });
660
660
  }
661
661
  };
662
- let it$1 = class extends p {
663
- options;
664
- cursor = 0;
665
- get _value() {
666
- return this.options[this.cursor].value;
667
- }
668
- get _enabledOptions() {
669
- return this.options.filter((t) => t.disabled !== !0);
670
- }
671
- toggleAll() {
672
- const t = this._enabledOptions;
673
- this.value = this.value !== void 0 && this.value.length === t.length ? [] : t.map((s) => s.value);
674
- }
675
- toggleInvert() {
676
- const t = this.value;
677
- if (!t) return;
678
- this.value = this._enabledOptions.filter((s) => !t.includes(s.value)).map((s) => s.value);
679
- }
680
- toggleValue() {
681
- this.value === void 0 && (this.value = []);
682
- this.value = this.value.includes(this._value) ? this.value.filter((e) => e !== this._value) : [...this.value, this._value];
683
- }
684
- constructor(t) {
685
- super(t, !1), this.options = t.options, this.value = [...t.initialValues ?? []];
686
- const e = Math.max(this.options.findIndex(({ value: s }) => s === t.cursorAt), 0);
687
- this.cursor = this.options[e].disabled ? d$1(e, 1, this.options) : e, this.on("key", (s) => {
688
- s === "a" && this.toggleAll(), s === "i" && this.toggleInvert();
689
- }), this.on("cursor", (s) => {
690
- switch (s) {
691
- case "left":
692
- case "up":
693
- this.cursor = d$1(this.cursor, -1, this.options);
694
- break;
695
- case "down":
696
- case "right":
697
- this.cursor = d$1(this.cursor, 1, this.options);
698
- break;
699
- case "space":
700
- this.toggleValue();
701
- break;
702
- }
703
- });
704
- }
705
- };
706
662
  var nt$1 = class extends p {
707
663
  options;
708
664
  cursor = 0;
@@ -760,7 +716,10 @@ function Ze() {
760
716
  const ee = Ze(), ae = () => process.env.CI === "true", w = (e, i) => ee ? e : i, _e = w("◆", "*"), oe = w("■", "x"), ue = w("▲", "x"), F = w("◇", "o"), le = w("┌", "T"), d = w("│", "|"), E = w("└", "—");
761
717
  w("┐", "T");
762
718
  w("┘", "—");
763
- const z = w("●", ">"), H = w("○", " "), te = w("◻", "[•]"), U = w("◼", "[+]"), J = w("◻", "[ ]");
719
+ const z = w("●", ">"), H = w("○", " ");
720
+ w("◻", "[•]");
721
+ w("◼", "[+]");
722
+ w("◻", "[ ]");
764
723
  w("▪", "•");
765
724
  const se = w("─", "-"), ce = w("╮", "+"), Ge = w("├", "+"), $e = w("╯", "+"), de = w("╰", "+");
766
725
  w("╭", "+");
@@ -908,86 +867,6 @@ ${styleText("gray", E)} ` : "";
908
867
  s.write(`${r}${e}
909
868
 
910
869
  `);
911
- }, Q = (e, i) => e.split(`
912
- `).map((s) => i(s)).join(`
913
- `), yt = (e) => {
914
- const i = (r, u) => {
915
- const n = r.label ?? String(r.value);
916
- return u === "disabled" ? `${styleText("gray", J)} ${Q(n, (o) => styleText(["strikethrough", "gray"], o))}${r.hint ? ` ${styleText("dim", `(${r.hint ?? "disabled"})`)}` : ""}` : u === "active" ? `${styleText("cyan", te)} ${n}${r.hint ? ` ${styleText("dim", `(${r.hint})`)}` : ""}` : u === "selected" ? `${styleText("green", U)} ${Q(n, (o) => styleText("dim", o))}${r.hint ? ` ${styleText("dim", `(${r.hint})`)}` : ""}` : u === "cancelled" ? `${Q(n, (o) => styleText(["strikethrough", "dim"], o))}` : u === "active-selected" ? `${styleText("green", U)} ${n}${r.hint ? ` ${styleText("dim", `(${r.hint})`)}` : ""}` : u === "submitted" ? `${Q(n, (o) => styleText("dim", o))}` : `${styleText("dim", J)} ${Q(n, (o) => styleText("dim", o))}`;
917
- }, s = e.required ?? !0;
918
- return new it$1({
919
- options: e.options,
920
- signal: e.signal,
921
- input: e.input,
922
- output: e.output,
923
- initialValues: e.initialValues,
924
- required: s,
925
- cursorAt: e.cursorAt,
926
- validate(r) {
927
- if (s && (r === void 0 || r.length === 0)) return `Please select at least one option.
928
- ${styleText("reset", styleText("dim", `Press ${styleText([
929
- "gray",
930
- "bgWhite",
931
- "inverse"
932
- ], " space ")} to select, ${styleText("gray", styleText("bgWhite", styleText("inverse", " enter ")))} to submit`))}`;
933
- },
934
- render() {
935
- const r = e.withGuide ?? u.withGuide, u$8 = R(e.output, e.message, r ? `${ye(this.state)} ` : "", `${V(this.state)} `), n = `${r ? `${styleText("gray", d)}
936
- ` : ""}${u$8}
937
- `, o = this.value ?? [], c = (a, l) => {
938
- if (a.disabled) return i(a, "disabled");
939
- const $ = o.includes(a.value);
940
- return l && $ ? i(a, "active-selected") : $ ? i(a, "selected") : i(a, l ? "active" : "inactive");
941
- };
942
- switch (this.state) {
943
- case "submit": {
944
- const a = this.options.filter(({ value: $ }) => o.includes($)).map(($) => i($, "submitted")).join(styleText("dim", ", ")) || styleText("dim", "none");
945
- return `${n}${R(e.output, a, r ? `${styleText("gray", d)} ` : "")}`;
946
- }
947
- case "cancel": {
948
- const a = this.options.filter(({ value: $ }) => o.includes($)).map(($) => i($, "cancelled")).join(styleText("dim", ", "));
949
- if (a.trim() === "") return `${n}${styleText("gray", d)}`;
950
- return `${n}${R(e.output, a, r ? `${styleText("gray", d)} ` : "")}${r ? `
951
- ${styleText("gray", d)}` : ""}`;
952
- }
953
- case "error": {
954
- const a = r ? `${styleText("yellow", d)} ` : "", l = this.error.split(`
955
- `).map((p, m) => m === 0 ? `${r ? `${styleText("yellow", E)} ` : ""}${styleText("yellow", p)}` : ` ${p}`).join(`
956
- `), $ = n.split(`
957
- `).length, y = l.split(`
958
- `).length + 1;
959
- return `${n}${a}${Y({
960
- output: e.output,
961
- options: this.options,
962
- cursor: this.cursor,
963
- maxItems: e.maxItems,
964
- columnPadding: a.length,
965
- rowPadding: $ + y,
966
- style: c
967
- }).join(`
968
- ${a}`)}
969
- ${l}
970
- `;
971
- }
972
- default: {
973
- const a = r ? `${styleText("cyan", d)} ` : "", l = n.split(`
974
- `).length, $ = r ? 2 : 1;
975
- return `${n}${a}${Y({
976
- output: e.output,
977
- options: this.options,
978
- cursor: this.cursor,
979
- maxItems: e.maxItems,
980
- columnPadding: a.length,
981
- rowPadding: l + $,
982
- style: c
983
- }).join(`
984
- ${a}`)}
985
- ${r ? styleText("cyan", E) : ""}
986
- `;
987
- }
988
- }
989
- }
990
- }).prompt();
991
870
  }, ft = (e) => styleText("dim", e), vt = (e, i, s) => {
992
871
  const r = {
993
872
  hard: !0,
@@ -1213,4 +1092,4 @@ function unwrap(value) {
1213
1092
  return value;
1214
1093
  }
1215
1094
  //#endregion
1216
- export { fe as a, ot as c, yt as d, _t as i, pt as l, O as n, gt as o, Ot as r, mt as s, unwrap as t, wt as u };
1095
+ export { fe as a, ot as c, _t as i, pt as l, O as n, gt as o, Ot as r, mt as s, unwrap as t, wt as u };
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
3
- import { n as findRoot } from "./config-D13G4-R8.mjs";
2
+ import { n as log, t as colorize } from "./logger-BgksGFuf.mjs";
3
+ import { n as findRoot } from "./config-BcmlSJJd.mjs";
4
4
  //#region src/cli.ts
5
5
  const args = process.argv.slice(2);
6
6
  const command = args[0];
@@ -25,13 +25,13 @@ async function main() {
25
25
  switch (command) {
26
26
  case "init": {
27
27
  const rootDir = await findRoot();
28
- const { initCommand } = await import("./init-CUIw0jg8.mjs");
28
+ const { initCommand } = await import("./init-Cs6amsw5.mjs");
29
29
  await initCommand(rootDir, { force: flags.force === true });
30
30
  break;
31
31
  }
32
32
  case "add": {
33
33
  const rootDir = await findRoot();
34
- const { addCommand } = await import("./add-u3h5BH8e.mjs");
34
+ const { addCommand } = await import("./add-CEOjsSPY.mjs");
35
35
  await addCommand(rootDir, {
36
36
  packages: flags.packages,
37
37
  message: flags.message,
@@ -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-lS56U6F_.mjs");
46
+ const { statusCommand } = await import("./status-CpGvpJBm.mjs");
47
47
  await statusCommand(rootDir, {
48
48
  json: flags.json === true,
49
49
  packagesOnly: flags.packages === true,
@@ -55,13 +55,13 @@ async function main() {
55
55
  }
56
56
  case "version": {
57
57
  const rootDir = await findRoot();
58
- const { versionCommand } = await import("./version-BjjnO2ii.mjs");
58
+ const { versionCommand } = await import("./version-nJ0vhPWw.mjs");
59
59
  await versionCommand(rootDir, { commit: flags.commit === true });
60
60
  break;
61
61
  }
62
62
  case "generate": {
63
63
  const rootDir = await findRoot();
64
- const { generateCommand } = await import("./generate-CxKXOBNP.mjs");
64
+ const { generateCommand } = await import("./generate-DU27B8co.mjs");
65
65
  await generateCommand(rootDir, {
66
66
  from: flags.from,
67
67
  dryRun: flags["dry-run"] === true,
@@ -71,7 +71,7 @@ async function main() {
71
71
  }
72
72
  case "check": {
73
73
  const rootDir = await findRoot();
74
- const { checkCommand } = await import("./check-B3M2S2wx.mjs");
74
+ const { checkCommand } = await import("./check-w-edwiNw.mjs").then((n) => n.t);
75
75
  const hookValue = flags.hook;
76
76
  if (hookValue && hookValue !== "pre-commit" && hookValue !== "pre-push") {
77
77
  log.error(`Invalid --hook value "${hookValue}". Expected "pre-commit" or "pre-push".`);
@@ -89,31 +89,34 @@ async function main() {
89
89
  const subcommand = args[1];
90
90
  const ciFlags = parseFlags(args.slice(2));
91
91
  if (subcommand === "check") {
92
- const { ciCheckCommand } = await import("./ci-h8s-soA6.mjs");
92
+ const { ciCheckCommand } = await import("./ci-Di_Tur0k.mjs");
93
93
  await ciCheckCommand(rootDir, {
94
94
  comment: ciFlags.comment !== void 0 ? ciFlags.comment === true : void 0,
95
95
  strict: ciFlags.strict === true,
96
96
  noFail: ciFlags["no-fail"] === true
97
97
  });
98
+ } else if (subcommand === "plan") {
99
+ const { ciPlanCommand } = await import("./ci-Di_Tur0k.mjs");
100
+ await ciPlanCommand(rootDir);
98
101
  } else if (subcommand === "release") {
99
- const { ciReleaseCommand } = await import("./ci-h8s-soA6.mjs");
102
+ const { ciReleaseCommand } = await import("./ci-Di_Tur0k.mjs");
100
103
  await ciReleaseCommand(rootDir, {
101
104
  mode: ciFlags["auto-publish"] === true ? "auto-publish" : "version-pr",
102
105
  tag: ciFlags.tag,
103
106
  branch: ciFlags.branch
104
107
  });
105
108
  } else if (subcommand === "setup") {
106
- const { ciSetupCommand } = await import("./ci-setup-DWxrdSK6.mjs");
109
+ const { ciSetupCommand } = await import("./ci-setup-DKjyiF2-.mjs");
107
110
  await ciSetupCommand(rootDir);
108
111
  } else {
109
- log.error(`Unknown ci subcommand: ${subcommand}. Use "ci check", "ci release", or "ci setup".`);
112
+ log.error(`Unknown ci subcommand: ${subcommand}. Use "ci check", "ci plan", "ci release", or "ci setup".`);
110
113
  process.exit(1);
111
114
  }
112
115
  break;
113
116
  }
114
117
  case "publish": {
115
118
  const rootDir = await findRoot();
116
- const { publishCommand } = await import("./publish-CXJ0Ggkq.mjs");
119
+ const { publishCommand } = await import("./publish-BJ-Cs0TR.mjs");
117
120
  await publishCommand(rootDir, {
118
121
  dryRun: flags["dry-run"] === true,
119
122
  tag: flags.tag,
@@ -127,7 +130,7 @@ async function main() {
127
130
  const subcommand = args[1];
128
131
  const aiFlags = parseFlags(args.slice(2));
129
132
  if (subcommand === "setup") {
130
- const { aiSetupCommand } = await import("./ai-C66IfTzs.mjs");
133
+ const { aiSetupCommand } = await import("./ai-Bbe56gBt.mjs");
131
134
  await aiSetupCommand(rootDir, { target: aiFlags.target });
132
135
  } else {
133
136
  log.error(`Unknown ai subcommand: ${subcommand}. Use "ai setup".`);
@@ -137,7 +140,7 @@ async function main() {
137
140
  }
138
141
  case "--version":
139
142
  case "-v":
140
- console.log(`bumpy 1.6.0`);
143
+ console.log(`bumpy 1.7.1`);
141
144
  break;
142
145
  case "help":
143
146
  case "--help":
@@ -157,7 +160,7 @@ async function main() {
157
160
  }
158
161
  function printHelp() {
159
162
  console.log(`
160
- ${colorize(`🐸 bumpy v1.6.0`, "bold")} - Modern monorepo versioning
163
+ ${colorize(`🐸 bumpy v1.7.1`, "bold")} - Modern monorepo versioning
161
164
 
162
165
  Usage: bumpy <command> [options]
163
166
 
@@ -175,6 +178,7 @@ function printHelp() {
175
178
  version [--commit] Apply bump files and bump versions
176
179
  publish Publish versioned packages
177
180
  ci check PR check — report pending releases, comment on PR
181
+ ci plan Report what ci release would do (JSON + GitHub Actions outputs)
178
182
  ci release Release — create version PR or auto-publish
179
183
  ci setup Set up a token for triggering CI on version PRs
180
184
  ai setup Install AI skill for creating bump files
@@ -1,5 +1,5 @@
1
- import { a as __exportAll } from "./logger-C2dEe5Su.mjs";
2
- import { a as readJson, n as exists, o as readJsonc } from "./fs-DnDogVn-.mjs";
1
+ import { a as __exportAll } from "./logger-BgksGFuf.mjs";
2
+ import { a as readJson, n as exists, o as readJsonc } from "./fs-CBXKZhoU.mjs";
3
3
  import { r as DEFAULT_CONFIG } from "./types-BX4pfmKh.mjs";
4
4
  import { resolve } from "node:path";
5
5
  //#region src/core/config.ts
@@ -1,4 +1,4 @@
1
- import { a as __exportAll } from "./logger-C2dEe5Su.mjs";
1
+ import { a as __exportAll } from "./logger-BgksGFuf.mjs";
2
2
  import { access, mkdir, readFile, readdir, unlink, writeFile } from "node:fs/promises";
3
3
  //#region src/utils/jsonc.ts
4
4
  const stringOrCommentRe = /("(?:\\?[^])*?")|(\/\/.*)|(\/\*[^]*?\*\/)/g;
@@ -1,11 +1,10 @@
1
- import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
2
- import { t as ensureDir } from "./fs-DnDogVn-.mjs";
3
- import { a as loadConfig, r as getBumpyDir } from "./config-D13G4-R8.mjs";
4
- import { t as discoverPackages } from "./workspace-Yt7qwsML.mjs";
5
- import { s as tryRunArgs } from "./shell-u3bYGxNy.mjs";
6
- import { i as writeBumpFile } from "./bump-file-CoaSxqne.mjs";
7
- import { n as getBranchCommits, o as getFilesChangedInCommit } from "./git-ukq7VTuZ.mjs";
8
- import { n as slugify, t as randomName } from "./names-CBy7d8K_.mjs";
1
+ import { n as log, t as colorize } from "./logger-BgksGFuf.mjs";
2
+ import { t as ensureDir } from "./fs-CBXKZhoU.mjs";
3
+ import { a as loadConfig, r as getBumpyDir } from "./config-BcmlSJJd.mjs";
4
+ import { a as discoverPackages, i as writeBumpFile } from "./bump-file-4cnuDyfW.mjs";
5
+ import { s as tryRunArgs } from "./shell-C8KgKnMQ.mjs";
6
+ import { n as getBranchCommits, o as getFilesChangedInCommit } from "./git-nTR-JccX.mjs";
7
+ import { n as slugify, t as randomName } from "./names-COooXAFg.mjs";
9
8
  import { relative } from "node:path";
10
9
  //#region src/commands/generate.ts
11
10
  const BUMP_MAP = {
@@ -1,4 +1,4 @@
1
- import { n as runArgs, s as tryRunArgs } from "./shell-u3bYGxNy.mjs";
1
+ import { n as runArgs, s as tryRunArgs } from "./shell-C8KgKnMQ.mjs";
2
2
  //#region src/core/git.ts
3
3
  /** Create a git tag */
4
4
  function createTag(tag, opts) {
package/dist/index.mjs CHANGED
@@ -1,11 +1,8 @@
1
1
  import { a as DEP_TYPES, c as maxBump, i as DEFAULT_PUBLISH_CONFIG, n as DEFAULT_BUMP_RULES, o as bumpLevel, r as DEFAULT_CONFIG, s as hasCascade, t as BUMP_LEVELS } from "./types-BX4pfmKh.mjs";
2
- import { a as loadConfig, n as findRoot, r as getBumpyDir, s as matchGlob } from "./config-D13G4-R8.mjs";
3
- import { t as discoverPackages } from "./workspace-Yt7qwsML.mjs";
4
- import { t as DependencyGraph } from "./dep-graph-E-9-eQ2J.mjs";
5
- import { i as writeBumpFile, n as parseBumpFile, r as readBumpFiles } from "./bump-file-CoaSxqne.mjs";
6
- import { n as satisfies, r as stripProtocol, t as bumpVersion } from "./semver-DfQyVLM_.mjs";
7
- import { t as assembleReleasePlan } from "./release-plan-C1Lz9rl_.mjs";
8
- import { a as prependToChangelog, i as loadFormatter, n as generateChangelogEntry, t as defaultFormatter } from "./changelog-_gBjowzN.mjs";
9
- import { t as applyReleasePlan } from "./apply-release-plan-DNpoi7cS.mjs";
10
- import { t as publishPackages } from "./publish-pipeline-C1slMaJV.mjs";
2
+ import { a as loadConfig, n as findRoot, r as getBumpyDir, s as matchGlob } from "./config-BcmlSJJd.mjs";
3
+ import { a as discoverPackages, i as writeBumpFile, n as parseBumpFile, r as readBumpFiles } from "./bump-file-4cnuDyfW.mjs";
4
+ import { a as DependencyGraph, i as stripProtocol, n as bumpVersion, r as satisfies, t as assembleReleasePlan } from "./release-plan-iZvGo-SB.mjs";
5
+ import { a as prependToChangelog, i as loadFormatter, n as generateChangelogEntry, t as defaultFormatter } from "./changelog-BubwrZfr.mjs";
6
+ import { t as applyReleasePlan } from "./apply-release-plan-CAx8E9MJ.mjs";
7
+ import { t as publishPackages } from "./publish-pipeline-BsxtJ3-A.mjs";
11
8
  export { BUMP_LEVELS, DEFAULT_BUMP_RULES, DEFAULT_CONFIG, DEFAULT_PUBLISH_CONFIG, DEP_TYPES, DependencyGraph, applyReleasePlan, assembleReleasePlan, bumpLevel, bumpVersion, defaultFormatter, discoverPackages, findRoot, generateChangelogEntry, getBumpyDir, hasCascade, loadConfig, loadFormatter, matchGlob, maxBump, parseBumpFile, prependToChangelog, publishPackages, readBumpFiles, satisfies, stripProtocol, writeBumpFile };
@@ -1,8 +1,8 @@
1
- import { n as log, o as __toESM, r as require_picocolors } from "./logger-C2dEe5Su.mjs";
2
- import { a as readJson, d as writeJson, f as writeText, i as listFiles, n as exists, s as readText, t as ensureDir } from "./fs-DnDogVn-.mjs";
3
- import { t as detectPackageManager } from "./package-manager-CClZtIHP.mjs";
4
- import { t as run } from "./shell-u3bYGxNy.mjs";
5
- import { c as ot, o as gt, s as mt, t as unwrap } from "./clack-CJT1JFFa.mjs";
1
+ import { n as log, r as require_picocolors, s as __toESM } from "./logger-BgksGFuf.mjs";
2
+ import { a as readJson, d as writeJson, f as writeText, i as listFiles, n as exists, s as readText, t as ensureDir } from "./fs-CBXKZhoU.mjs";
3
+ import { t as detectPackageManager } from "./package-manager-BQPwXwu5.mjs";
4
+ import { t as run } from "./shell-C8KgKnMQ.mjs";
5
+ import { c as ot, o as gt, s as mt, t as unwrap } from "./clack-W95rXis0.mjs";
6
6
  import { resolve } from "node:path";
7
7
  import { readdir, rename, rm } from "node:fs/promises";
8
8
  //#region ../../.bumpy/README.md
@@ -100,7 +100,15 @@ function migrateChangesetConfig(csConfig) {
100
100
  "ignore",
101
101
  "updateInternalDependencies",
102
102
  "privatePackages"
103
- ]) if (csConfig[field] !== void 0) bumpyConfig[field] = csConfig[field];
103
+ ]) {
104
+ const value = csConfig[field];
105
+ if (value === void 0) continue;
106
+ if (Array.isArray(value) && value.length === 0) continue;
107
+ if (field === "baseBranch" && value === "main") continue;
108
+ if (field === "access" && value === "public") continue;
109
+ if (field === "updateInternalDependencies" && value === "out-of-range") continue;
110
+ bumpyConfig[field] = value;
111
+ }
104
112
  return bumpyConfig;
105
113
  }
106
114
  async function isPackageInstalled(rootDir, pkgName) {
@@ -1,3 +1,4 @@
1
+ import { createRequire } from "node:module";
1
2
  //#region \0rolldown/runtime.js
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
@@ -29,6 +30,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
30
  value: mod,
30
31
  enumerable: true
31
32
  }) : target, mod));
33
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
32
34
  //#endregion
33
35
  //#region ../../node_modules/.bun/picocolors@1.1.1/node_modules/picocolors/picocolors.js
34
36
  var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -132,4 +134,4 @@ function colorize(text, color) {
132
134
  return import_picocolors.default[color](text);
133
135
  }
134
136
  //#endregion
135
- export { __exportAll as a, __commonJSMin as i, log as n, __toESM as o, require_picocolors as r, colorize as t };
137
+ export { __exportAll as a, __commonJSMin as i, log as n, __require as o, require_picocolors as r, __toESM as s, colorize as t };
@@ -1,4 +1,4 @@
1
- import { a as readJson, n as exists, s as readText } from "./fs-DnDogVn-.mjs";
1
+ import { a as readJson, n as exists, s as readText } from "./fs-CBXKZhoU.mjs";
2
2
  import { resolve } from "node:path";
3
3
  //#region ../../node_modules/.bun/js-yaml@4.1.1/node_modules/js-yaml/dist/js-yaml.mjs
4
4
  /*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
@@ -1,12 +1,13 @@
1
- import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
2
- import { a as loadConfig } from "./config-D13G4-R8.mjs";
3
- import { n as detectWorkspaces } from "./package-manager-CClZtIHP.mjs";
4
- import { n as discoverWorkspace } from "./workspace-Yt7qwsML.mjs";
5
- import { t as DependencyGraph } from "./dep-graph-E-9-eQ2J.mjs";
6
- import { r as runArgsAsync, s as tryRunArgs } from "./shell-u3bYGxNy.mjs";
7
- import { i as loadFormatter, n as generateChangelogEntry } from "./changelog-_gBjowzN.mjs";
8
- import { c as listTags, l as pushWithTags, s as hasUncommittedChanges } from "./git-ukq7VTuZ.mjs";
9
- import { t as publishPackages } from "./publish-pipeline-C1slMaJV.mjs";
1
+ import { n as log, o as __require, t as colorize } from "./logger-BgksGFuf.mjs";
2
+ import { a as loadConfig } from "./config-BcmlSJJd.mjs";
3
+ import { n as detectWorkspaces } from "./package-manager-BQPwXwu5.mjs";
4
+ import { o as discoverWorkspace } from "./bump-file-4cnuDyfW.mjs";
5
+ import { a as DependencyGraph } from "./release-plan-iZvGo-SB.mjs";
6
+ import { r as runArgsAsync, s as tryRunArgs } from "./shell-C8KgKnMQ.mjs";
7
+ import { i as loadFormatter, n as generateChangelogEntry } from "./changelog-BubwrZfr.mjs";
8
+ import { c as listTags, l as pushWithTags, s as hasUncommittedChanges } from "./git-nTR-JccX.mjs";
9
+ import { t as publishPackages } from "./publish-pipeline-BsxtJ3-A.mjs";
10
+ import { CI_PLAN_CACHE_PATH } from "./ci-Di_Tur0k.mjs";
10
11
  //#region src/core/github-release.ts
11
12
  /** Get the current HEAD commit SHA */
12
13
  function getHeadSha(rootDir) {
@@ -194,9 +195,9 @@ async function publishCommand(rootDir, opts) {
194
195
  log.warn("You have uncommitted changes. Commit or stash them before publishing.");
195
196
  process.exit(1);
196
197
  }
197
- let toPublish = await findUnpublishedPackages(packages, config);
198
+ let toPublish = await findUnpublishedWithCache(rootDir, packages, config);
198
199
  if (opts.filter) {
199
- const { matchGlob } = await import("./config-D13G4-R8.mjs").then((n) => n.t);
200
+ const { matchGlob } = await import("./config-BcmlSJJd.mjs").then((n) => n.t);
200
201
  const patterns = opts.filter.split(",").map((p) => p.trim());
201
202
  toPublish = toPublish.filter((r) => patterns.some((p) => matchGlob(r.name, p)));
202
203
  }
@@ -248,6 +249,67 @@ async function publishCommand(rootDir, opts) {
248
249
  }
249
250
  }
250
251
  /**
252
+ * Try to load cached plan from `ci plan`. Returns the unpublished package names
253
+ * if the cache is valid, or null to fall back to registry lookups.
254
+ *
255
+ * Validates that every cached package exists in the workspace with the same version,
256
+ * so the cache can only filter — never fabricate — the set of packages.
257
+ */
258
+ function loadCachedPlan(rootDir, packages) {
259
+ const cachePath = `${rootDir}/${CI_PLAN_CACHE_PATH}`;
260
+ let raw;
261
+ try {
262
+ raw = __require("node:fs").readFileSync(cachePath, "utf-8");
263
+ __require("node:fs").unlinkSync(cachePath);
264
+ } catch {
265
+ return null;
266
+ }
267
+ try {
268
+ const cached = JSON.parse(raw);
269
+ if (cached?.mode !== "publish" || !Array.isArray(cached.releases)) return null;
270
+ const names = /* @__PURE__ */ new Set();
271
+ for (const r of cached.releases) {
272
+ if (typeof r.name !== "string" || typeof r.newVersion !== "string") return null;
273
+ const pkg = packages.get(r.name);
274
+ if (!pkg || pkg.version !== r.newVersion) {
275
+ log.dim(" ci plan cache is stale — falling back to registry lookups");
276
+ return null;
277
+ }
278
+ names.add(r.name);
279
+ }
280
+ log.dim(" Using cached plan from ci plan");
281
+ return names;
282
+ } catch {
283
+ return null;
284
+ }
285
+ }
286
+ /**
287
+ * Find unpublished packages, using the ci plan cache if available.
288
+ * Falls back to registry lookups if no cache or cache is invalid.
289
+ */
290
+ async function findUnpublishedWithCache(rootDir, packages, config) {
291
+ const cachedNames = loadCachedPlan(rootDir, packages);
292
+ if (cachedNames) {
293
+ const unpublished = [];
294
+ for (const name of cachedNames) {
295
+ const pkg = packages.get(name);
296
+ unpublished.push({
297
+ name,
298
+ type: "patch",
299
+ oldVersion: pkg.version,
300
+ newVersion: pkg.version,
301
+ bumpFiles: [],
302
+ isDependencyBump: false,
303
+ isCascadeBump: false,
304
+ isGroupBump: false,
305
+ bumpSources: []
306
+ });
307
+ }
308
+ return unpublished;
309
+ }
310
+ return findUnpublishedPackages(packages, config);
311
+ }
312
+ /**
251
313
  * Find packages whose current version is not yet published.
252
314
  *
253
315
  * Detection strategy (per package):
@@ -275,7 +337,7 @@ async function findUnpublishedPackages(packages, _config) {
275
337
  return unpublished;
276
338
  }
277
339
  async function checkIfPublished(name, version, pkgConfig) {
278
- const { runAsync, runArgsAsync, tryRunArgs } = await import("./shell-u3bYGxNy.mjs").then((n) => n.a);
340
+ const { runAsync, runArgsAsync, tryRunArgs } = await import("./shell-C8KgKnMQ.mjs").then((n) => n.a);
279
341
  if (pkgConfig?.checkPublished) try {
280
342
  return (await runAsync(pkgConfig.checkPublished)).trim() === version;
281
343
  } catch {
@@ -304,4 +366,4 @@ async function checkIfPublished(name, version, pkgConfig) {
304
366
  }
305
367
  }
306
368
  //#endregion
307
- export { publishCommand };
369
+ export { findUnpublishedPackages, publishCommand };
@@ -1,9 +1,9 @@
1
- import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
2
- import { a as readJson, u as updateJsonNestedField } from "./fs-DnDogVn-.mjs";
3
- import { r as resolveCatalogDep } from "./package-manager-CClZtIHP.mjs";
4
- import { i as runAsync, o as sq, r as runArgsAsync, s as tryRunArgs } from "./shell-u3bYGxNy.mjs";
5
- import { r as stripProtocol } from "./semver-DfQyVLM_.mjs";
6
- import { t as createTag, u as tagExists } from "./git-ukq7VTuZ.mjs";
1
+ import { n as log, t as colorize } from "./logger-BgksGFuf.mjs";
2
+ import { a as readJson, u as updateJsonNestedField } from "./fs-CBXKZhoU.mjs";
3
+ import { r as resolveCatalogDep } from "./package-manager-BQPwXwu5.mjs";
4
+ import { i as stripProtocol } from "./release-plan-iZvGo-SB.mjs";
5
+ import { i as runAsync, o as sq, r as runArgsAsync, s as tryRunArgs } from "./shell-C8KgKnMQ.mjs";
6
+ import { t as createTag, u as tagExists } from "./git-nTR-JccX.mjs";
7
7
  import { resolve } from "node:path";
8
8
  import { unlink } from "node:fs/promises";
9
9
  import { appendFileSync, existsSync, readFileSync, writeFileSync } from "node:fs";