@varlock/bumpy 1.2.1 → 1.2.2

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 (34) hide show
  1. package/README.md +49 -34
  2. package/dist/{add-DF6bawDT.mjs → add-DEqGa5gI.mjs} +8 -8
  3. package/dist/apply-release-plan-Bi9OSWks.mjs +57 -0
  4. package/dist/{bump-file-C3S_bzSf.mjs → bump-file-BTsntOO-.mjs} +6 -9
  5. package/dist/{changelog-github-DZSHX3Tb.mjs → changelog-github-CEaDCtTk.mjs} +30 -14
  6. package/dist/changelog-xKuL0IKx.mjs +109 -0
  7. package/dist/{check-BJL-YDWz.mjs → check-D3eXRyKJ.mjs} +7 -7
  8. package/dist/{ci-C88ecvIP.mjs → ci-BVTwTUUK.mjs} +49 -28
  9. package/dist/{ci-setup-CARJFhcE.mjs → ci-setup-D1NCzbNH.mjs} +3 -3
  10. package/dist/cli.mjs +14 -14
  11. package/dist/{config-D7Umr-fT.mjs → config-CJIj8xG3.mjs} +2 -80
  12. package/dist/{generate-D93b3NAD.mjs → generate-wHN6Ll6p.mjs} +6 -6
  13. package/dist/{git-H9S9z6g-.mjs → git-D0__HP86.mjs} +1 -1
  14. package/dist/index.d.mts +1 -1
  15. package/dist/index.mjs +10 -8
  16. package/dist/{init-DJhMaceS.mjs → init-DND7zRGD.mjs} +3 -3
  17. package/dist/{publish-DGSV607z.mjs → publish-BwidFqbo.mjs} +9 -9
  18. package/dist/{publish-pipeline-DiwZZ5AF.mjs → publish-pipeline-BvLIu7WF.mjs} +4 -4
  19. package/dist/{release-plan-CNOuSI-d.mjs → release-plan-21H89Cx1.mjs} +3 -2
  20. package/dist/{status-S2ztf_8E.mjs → status-CDGxgXWd.mjs} +7 -7
  21. package/dist/types-CSM0c2-m.mjs +80 -0
  22. package/dist/{version-BXrP4TIO.mjs → version-ClkaCNTE.mjs} +9 -9
  23. package/dist/{workspace-BHsAPUmC.mjs → workspace-c9-TqXed.mjs} +2 -2
  24. package/package.json +1 -1
  25. package/dist/apply-release-plan-B1Wwx3HG.mjs +0 -146
  26. /package/dist/{ai-STKnq09z.mjs → ai-C66IfTzs.mjs} +0 -0
  27. /package/dist/{clack-C6bVkGxf.mjs → clack-CJT1JFFa.mjs} +0 -0
  28. /package/dist/{commit-message-BwsowSds.mjs → commit-message-DOIfDxfj.mjs} +0 -0
  29. /package/dist/{dep-graph-DiLeAhl9.mjs → dep-graph-E-9-eQ2J.mjs} +0 -0
  30. /package/dist/{names-C-TuOPbd.mjs → names-CBy7d8K_.mjs} +0 -0
  31. /package/dist/{package-manager-ByJ0wKYh.mjs → package-manager-CClZtIHP.mjs} +0 -0
  32. /package/dist/{picomatch-DMmqYjgq.mjs → picomatch-TGJi--_I.mjs} +0 -0
  33. /package/dist/{semver-BJzWIuRz.mjs → semver-DfQyVLM_.mjs} +0 -0
  34. /package/dist/{shell-CY7OD48z.mjs → shell-u3bYGxNy.mjs} +0 -0
@@ -1,15 +1,15 @@
1
1
  import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
2
- import { a as loadConfig } from "./config-D7Umr-fT.mjs";
3
- import { t as detectPackageManager } from "./package-manager-ByJ0wKYh.mjs";
4
- import { n as discoverWorkspace } from "./workspace-BHsAPUmC.mjs";
5
- import { t as DependencyGraph } from "./dep-graph-DiLeAhl9.mjs";
6
- import { n as runArgs, r as runArgsAsync, s as tryRunArgs } from "./shell-CY7OD48z.mjs";
7
- import { r as readBumpFiles, t as filterBranchBumpFiles } from "./bump-file-C3S_bzSf.mjs";
8
- import { t as assembleReleasePlan } from "./release-plan-CNOuSI-d.mjs";
9
- import { r as getChangedFiles } from "./git-H9S9z6g-.mjs";
10
- import { t as randomName } from "./names-C-TuOPbd.mjs";
11
- import { findChangedPackages } from "./check-BJL-YDWz.mjs";
12
- import { t as resolveCommitMessage } from "./commit-message-BwsowSds.mjs";
2
+ import { a as loadConfig } from "./config-CJIj8xG3.mjs";
3
+ import { t as detectPackageManager } from "./package-manager-CClZtIHP.mjs";
4
+ import { n as discoverWorkspace } from "./workspace-c9-TqXed.mjs";
5
+ import { t as DependencyGraph } from "./dep-graph-E-9-eQ2J.mjs";
6
+ import { n as runArgs, r as runArgsAsync, s as tryRunArgs } from "./shell-u3bYGxNy.mjs";
7
+ import { r as readBumpFiles, t as filterBranchBumpFiles } from "./bump-file-BTsntOO-.mjs";
8
+ import { t as assembleReleasePlan } from "./release-plan-21H89Cx1.mjs";
9
+ import { r as getChangedFiles } from "./git-D0__HP86.mjs";
10
+ import { t as randomName } from "./names-CBy7d8K_.mjs";
11
+ import { findChangedPackages } from "./check-D3eXRyKJ.mjs";
12
+ import { t as resolveCommitMessage } from "./commit-message-DOIfDxfj.mjs";
13
13
  import { createHash } from "node:crypto";
14
14
  //#region src/commands/ci.ts
15
15
  /**
@@ -89,12 +89,12 @@ async function ciCheckCommand(rootDir, opts) {
89
89
  const prNumber = detectPrNumber();
90
90
  const pm = await detectPackageManager(rootDir);
91
91
  const changedFiles = getChangedFiles(rootDir, config.baseBranch);
92
- const { branchBumpFiles: prBumpFiles, hasEmptyBumpFile } = filterBranchBumpFiles(allBumpFiles, changedFiles, rootDir, parseErrors);
92
+ const { branchBumpFiles: prBumpFiles, emptyBumpFileIds } = filterBranchBumpFiles(allBumpFiles, changedFiles, rootDir, parseErrors);
93
93
  if (parseErrors.length > 0) for (const err of parseErrors) log.error(err);
94
94
  if (prBumpFiles.length === 0) {
95
- if (hasEmptyBumpFile && parseErrors.length === 0) {
95
+ if (emptyBumpFileIds.length > 0 && parseErrors.length === 0) {
96
96
  log.success("Empty bump file found — no releases needed.");
97
- if (shouldComment && prNumber) await postOrUpdatePrComment(prNumber, formatEmptyBumpFileComment(), rootDir, opts.patComments);
97
+ if (shouldComment && prNumber) await postOrUpdatePrComment(prNumber, formatEmptyBumpFileComment(emptyBumpFileIds, prNumber, detectPrBranch(rootDir)), rootDir, opts.patComments);
98
98
  return;
99
99
  }
100
100
  const willFail = !opts.noFail || parseErrors.length > 0;
@@ -115,7 +115,7 @@ async function ciCheckCommand(rootDir, opts) {
115
115
  console.log(` ${r.name}: ${r.oldVersion} → ${colorize(r.newVersion, "cyan")}${tag}`);
116
116
  }
117
117
  if (plan.warnings.length > 0) for (const w of plan.warnings) log.warn(w);
118
- if (shouldComment && prNumber) await postOrUpdatePrComment(prNumber, formatReleasePlanComment(plan, prBumpFiles, prNumber, detectPrBranch(rootDir), pm, plan.warnings, parseErrors), rootDir, opts.patComments);
118
+ if (shouldComment && prNumber) await postOrUpdatePrComment(prNumber, formatReleasePlanComment(plan, prBumpFiles, prNumber, detectPrBranch(rootDir), pm, plan.warnings, parseErrors, emptyBumpFileIds), rootDir, opts.patComments);
119
119
  if (parseErrors.length > 0 && !opts.noFail) process.exit(1);
120
120
  const coveredPackages = new Set(plan.releases.map((r) => r.name));
121
121
  const missing = (await findChangedPackages(changedFiles, packages, rootDir, config)).filter((name) => !coveredPackages.has(name));
@@ -141,7 +141,7 @@ async function ciReleaseCommand(rootDir, opts) {
141
141
  }
142
142
  if (bumpFiles.length === 0) {
143
143
  log.info("No pending bump files — checking for unpublished packages...");
144
- const { publishCommand } = await import("./publish-DGSV607z.mjs");
144
+ const { publishCommand } = await import("./publish-BwidFqbo.mjs");
145
145
  await publishCommand(rootDir, { tag: opts.tag });
146
146
  return;
147
147
  }
@@ -155,7 +155,7 @@ async function ciReleaseCommand(rootDir, opts) {
155
155
  }
156
156
  async function autoPublish(rootDir, config, plan, tag) {
157
157
  log.step("Running bumpy version...");
158
- const { versionCommand } = await import("./version-BXrP4TIO.mjs");
158
+ const { versionCommand } = await import("./version-ClkaCNTE.mjs");
159
159
  await versionCommand(rootDir);
160
160
  log.step("Committing version changes...");
161
161
  runArgs([
@@ -184,7 +184,7 @@ async function autoPublish(rootDir, config, plan, tag) {
184
184
  ], { cwd: rootDir });
185
185
  }
186
186
  log.step("Running bumpy publish...");
187
- const { publishCommand } = await import("./publish-DGSV607z.mjs");
187
+ const { publishCommand } = await import("./publish-BwidFqbo.mjs");
188
188
  await publishCommand(rootDir, { tag });
189
189
  }
190
190
  /**
@@ -350,7 +350,7 @@ async function createVersionPr(rootDir, plan, config, packageDirs, branchName, p
350
350
  branch
351
351
  ], { cwd: rootDir });
352
352
  log.step("Running bumpy version...");
353
- const { versionCommand } = await import("./version-BXrP4TIO.mjs");
353
+ const { versionCommand } = await import("./version-ClkaCNTE.mjs");
354
354
  await versionCommand(rootDir);
355
355
  runArgs([
356
356
  "git",
@@ -467,11 +467,11 @@ function pmRunCommand(pm) {
467
467
  if (pm === "yarn") return "yarn bumpy";
468
468
  return "npx bumpy";
469
469
  }
470
- function formatReleasePlanComment(plan, bumpFiles, prNumber, prBranch, pm, warnings = [], parseErrors = []) {
470
+ function formatReleasePlanComment(plan, bumpFiles, prNumber, prBranch, pm, warnings = [], parseErrors = [], emptyBumpFileIds = []) {
471
471
  const repo = process.env.GITHUB_REPOSITORY;
472
472
  const lines = [];
473
473
  const preamble = [
474
- `<a href="https://bumpy.varlock.dev"><img src="${FROG_IMG_BASE}/frog-talking.png" alt="bumpy-frog" width="60" align="left" style="image-rendering: pixelated;" title="Hi! I'm bumpy!" /></a>`,
474
+ `<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>`,
475
475
  "",
476
476
  "**The changes in this PR will be included in the next version bump.**",
477
477
  "<br clear=\"left\" />"
@@ -510,6 +510,15 @@ function formatReleasePlanComment(plan, bumpFiles, prNumber, prBranch, pm, warni
510
510
  }
511
511
  lines.push(`- ${parts.join(" ")}`);
512
512
  }
513
+ for (const id of emptyBumpFileIds) {
514
+ const filename = `${id}.md`;
515
+ const parts = [`\`${filename}\` _(empty — no release)_`];
516
+ if (repo) {
517
+ parts.push(`([view diff](https://github.com/${repo}/pull/${prNumber}/changes#diff-${sha256Hex(`.bumpy/${filename}`)}))`);
518
+ if (prBranch) parts.push(`([edit](https://github.com/${repo}/edit/${prBranch}/.bumpy/${filename}))`);
519
+ }
520
+ lines.push(`- ${parts.join(" ")}`);
521
+ }
513
522
  lines.push("");
514
523
  if (parseErrors.length > 0) {
515
524
  lines.push("#### Errors");
@@ -533,7 +542,7 @@ function formatReleasePlanComment(plan, bumpFiles, prNumber, prBranch, pm, warni
533
542
  function formatBumpFileErrorsComment(errors, prBranch, pm) {
534
543
  const runCmd = pmRunCommand(pm);
535
544
  const lines = [
536
- `<a href="https://bumpy.varlock.dev"><img src="${FROG_IMG_BASE}/frog-neutral.png" alt="bumpy-frog" width="60" align="left" style="image-rendering: pixelated;" title="Hi! I'm bumpy!" /></a>`,
545
+ `<a href="https://bumpy.varlock.dev"><img src="${FROG_IMG_BASE}/frog-error.png" alt="bumpy-frog" width="60" align="left" style="image-rendering: pixelated;" title="Hi! I'm bumpy!" /></a>`,
537
546
  "",
538
547
  "**This PR has bump file(s) with errors that need to be fixed.**",
539
548
  "<br clear=\"left\" />\n",
@@ -555,20 +564,32 @@ function formatBumpFileErrorsComment(errors, prBranch, pm) {
555
564
  lines.push(`_This comment is maintained by [bumpy](https://bumpy.varlock.dev)._`);
556
565
  return lines.join("\n");
557
566
  }
558
- function formatEmptyBumpFileComment() {
559
- return [
567
+ function formatEmptyBumpFileComment(emptyBumpFileIds, prNumber, prBranch) {
568
+ const repo = process.env.GITHUB_REPOSITORY;
569
+ const lines = [
560
570
  `<a href="https://bumpy.varlock.dev"><img src="${FROG_IMG_BASE}/frog-neutral.png" alt="bumpy-frog" width="60" align="left" style="image-rendering: pixelated;" title="Hi! I'm bumpy!" /></a>`,
561
571
  "",
562
572
  "**This PR includes an empty bump file — no version bump is needed.** :white_check_mark:",
563
573
  "<br clear=\"left\" />",
564
- "\n---",
565
- `_This comment is maintained by [bumpy](https://bumpy.varlock.dev)._`
566
- ].join("\n");
574
+ ""
575
+ ];
576
+ for (const id of emptyBumpFileIds) {
577
+ const filename = `${id}.md`;
578
+ const parts = [`\`${filename}\``];
579
+ if (repo) {
580
+ parts.push(`([view diff](https://github.com/${repo}/pull/${prNumber}/changes#diff-${sha256Hex(`.bumpy/${filename}`)}))`);
581
+ if (prBranch) parts.push(`([edit](https://github.com/${repo}/edit/${prBranch}/.bumpy/${filename}))`);
582
+ }
583
+ lines.push(`- ${parts.join(" ")}`);
584
+ }
585
+ lines.push("\n---");
586
+ lines.push(`_This comment is maintained by [bumpy](https://bumpy.varlock.dev)._`);
587
+ return lines.join("\n");
567
588
  }
568
589
  function formatNoBumpFilesComment(prBranch, pm) {
569
590
  const runCmd = pmRunCommand(pm);
570
591
  const lines = [
571
- `<a href="https://bumpy.varlock.dev"><img src="${FROG_IMG_BASE}/frog-neutral.png" alt="bumpy-frog" width="60" align="left" style="image-rendering: pixelated;" title="Hi! I'm bumpy!" /></a>`,
592
+ `<a href="https://bumpy.varlock.dev"><img src="${FROG_IMG_BASE}/frog-warning.png" alt="bumpy-frog" width="60" align="left" style="image-rendering: pixelated;" title="Hi! I'm bumpy!" /></a>`,
572
593
  "",
573
594
  "Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a bump file.**",
574
595
  "<br clear=\"left\" />\n",
@@ -1,7 +1,7 @@
1
1
  import { n as log, o as __toESM, r as require_picocolors } from "./logger-C2dEe5Su.mjs";
2
- import { t as detectPackageManager } from "./package-manager-ByJ0wKYh.mjs";
3
- import { s as tryRunArgs } from "./shell-CY7OD48z.mjs";
4
- import { a as fe, c as ot, i as _t, n as O, o as gt, r as Ot, s as mt, t as unwrap, u as wt } from "./clack-C6bVkGxf.mjs";
2
+ import { t as detectPackageManager } from "./package-manager-CClZtIHP.mjs";
3
+ import { s as tryRunArgs } from "./shell-u3bYGxNy.mjs";
4
+ import { a as fe, c as ot, i as _t, n as O, o as gt, r as Ot, s as mt, t as unwrap, u as wt } from "./clack-CJT1JFFa.mjs";
5
5
  //#region src/commands/ci-setup.ts
6
6
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
7
7
  const PAT_PERMISSIONS = [
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
3
- import { n as findRoot } from "./config-D7Umr-fT.mjs";
3
+ import { n as findRoot } from "./config-CJIj8xG3.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-DJhMaceS.mjs");
28
+ const { initCommand } = await import("./init-DND7zRGD.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-DF6bawDT.mjs");
34
+ const { addCommand } = await import("./add-DEqGa5gI.mjs");
35
35
  await addCommand(rootDir, {
36
36
  packages: flags.packages,
37
37
  message: flags.message,
@@ -42,7 +42,7 @@ async function main() {
42
42
  }
43
43
  case "status": {
44
44
  const rootDir = await findRoot();
45
- const { statusCommand } = await import("./status-S2ztf_8E.mjs");
45
+ const { statusCommand } = await import("./status-CDGxgXWd.mjs");
46
46
  await statusCommand(rootDir, {
47
47
  json: flags.json === true,
48
48
  packagesOnly: flags.packages === true,
@@ -54,13 +54,13 @@ async function main() {
54
54
  }
55
55
  case "version": {
56
56
  const rootDir = await findRoot();
57
- const { versionCommand } = await import("./version-BXrP4TIO.mjs");
57
+ const { versionCommand } = await import("./version-ClkaCNTE.mjs");
58
58
  await versionCommand(rootDir, { commit: flags.commit === true });
59
59
  break;
60
60
  }
61
61
  case "generate": {
62
62
  const rootDir = await findRoot();
63
- const { generateCommand } = await import("./generate-D93b3NAD.mjs");
63
+ const { generateCommand } = await import("./generate-wHN6Ll6p.mjs");
64
64
  await generateCommand(rootDir, {
65
65
  from: flags.from,
66
66
  dryRun: flags["dry-run"] === true,
@@ -70,7 +70,7 @@ async function main() {
70
70
  }
71
71
  case "check": {
72
72
  const rootDir = await findRoot();
73
- const { checkCommand } = await import("./check-BJL-YDWz.mjs");
73
+ const { checkCommand } = await import("./check-D3eXRyKJ.mjs");
74
74
  await checkCommand(rootDir, {
75
75
  strict: flags.strict === true,
76
76
  noFail: flags["no-fail"] === true
@@ -82,7 +82,7 @@ async function main() {
82
82
  const subcommand = args[1];
83
83
  const ciFlags = parseFlags(args.slice(2));
84
84
  if (subcommand === "check") {
85
- const { ciCheckCommand } = await import("./ci-C88ecvIP.mjs");
85
+ const { ciCheckCommand } = await import("./ci-BVTwTUUK.mjs");
86
86
  await ciCheckCommand(rootDir, {
87
87
  comment: ciFlags.comment !== void 0 ? ciFlags.comment === true : void 0,
88
88
  strict: ciFlags.strict === true,
@@ -90,7 +90,7 @@ async function main() {
90
90
  patComments: ciFlags["pat-comments"] === true
91
91
  });
92
92
  } else if (subcommand === "release") {
93
- const { ciReleaseCommand } = await import("./ci-C88ecvIP.mjs");
93
+ const { ciReleaseCommand } = await import("./ci-BVTwTUUK.mjs");
94
94
  await ciReleaseCommand(rootDir, {
95
95
  mode: ciFlags["auto-publish"] === true ? "auto-publish" : "version-pr",
96
96
  tag: ciFlags.tag,
@@ -98,7 +98,7 @@ async function main() {
98
98
  patPr: ciFlags["pat-pr"] === true
99
99
  });
100
100
  } else if (subcommand === "setup") {
101
- const { ciSetupCommand } = await import("./ci-setup-CARJFhcE.mjs");
101
+ const { ciSetupCommand } = await import("./ci-setup-D1NCzbNH.mjs");
102
102
  await ciSetupCommand(rootDir);
103
103
  } else {
104
104
  log.error(`Unknown ci subcommand: ${subcommand}. Use "ci check", "ci release", or "ci setup".`);
@@ -108,7 +108,7 @@ async function main() {
108
108
  }
109
109
  case "publish": {
110
110
  const rootDir = await findRoot();
111
- const { publishCommand } = await import("./publish-DGSV607z.mjs");
111
+ const { publishCommand } = await import("./publish-BwidFqbo.mjs");
112
112
  await publishCommand(rootDir, {
113
113
  dryRun: flags["dry-run"] === true,
114
114
  tag: flags.tag,
@@ -122,7 +122,7 @@ async function main() {
122
122
  const subcommand = args[1];
123
123
  const aiFlags = parseFlags(args.slice(2));
124
124
  if (subcommand === "setup") {
125
- const { aiSetupCommand } = await import("./ai-STKnq09z.mjs");
125
+ const { aiSetupCommand } = await import("./ai-C66IfTzs.mjs");
126
126
  await aiSetupCommand(rootDir, { target: aiFlags.target });
127
127
  } else {
128
128
  log.error(`Unknown ai subcommand: ${subcommand}. Use "ai setup".`);
@@ -132,7 +132,7 @@ async function main() {
132
132
  }
133
133
  case "--version":
134
134
  case "-v":
135
- console.log(`bumpy 1.2.1`);
135
+ console.log(`bumpy 1.2.2`);
136
136
  break;
137
137
  case "help":
138
138
  case "--help":
@@ -152,7 +152,7 @@ async function main() {
152
152
  }
153
153
  function printHelp() {
154
154
  console.log(`
155
- ${colorize(`🐸 bumpy v1.2.1`, "bold")} - Modern monorepo versioning
155
+ ${colorize(`🐸 bumpy v1.2.2`, "bold")} - Modern monorepo versioning
156
156
 
157
157
  Usage: bumpy <command> [options]
158
158
 
@@ -1,85 +1,7 @@
1
1
  import { a as __exportAll } from "./logger-C2dEe5Su.mjs";
2
2
  import { a as readJson, n as exists, o as readJsonc } from "./fs-DnDogVn-.mjs";
3
+ import { r as DEFAULT_CONFIG } from "./types-CSM0c2-m.mjs";
3
4
  import { resolve } from "node:path";
4
- //#region src/types.ts
5
- const BUMP_LEVELS = {
6
- patch: 0,
7
- minor: 1,
8
- major: 2
9
- };
10
- function bumpLevel(type) {
11
- return BUMP_LEVELS[type];
12
- }
13
- function maxBump(a, b) {
14
- if (!a) return b;
15
- return bumpLevel(a) >= bumpLevel(b) ? a : b;
16
- }
17
- const DEFAULT_BUMP_RULES = {
18
- dependencies: {
19
- trigger: "patch",
20
- bumpAs: "patch"
21
- },
22
- peerDependencies: {
23
- trigger: "major",
24
- bumpAs: "match"
25
- },
26
- devDependencies: false,
27
- optionalDependencies: {
28
- trigger: "minor",
29
- bumpAs: "patch"
30
- }
31
- };
32
- const DEP_TYPES = [
33
- "dependencies",
34
- "devDependencies",
35
- "peerDependencies",
36
- "optionalDependencies"
37
- ];
38
- const DEFAULT_PUBLISH_CONFIG = {
39
- packManager: "auto",
40
- publishManager: "npm",
41
- publishArgs: [],
42
- protocolResolution: "pack"
43
- };
44
- const DEFAULT_CONFIG = {
45
- baseBranch: "main",
46
- access: "public",
47
- versionCommitMessage: void 0,
48
- changedFilePatterns: ["**"],
49
- changelog: "default",
50
- fixed: [],
51
- linked: [],
52
- ignore: [],
53
- include: [],
54
- updateInternalDependencies: "out-of-range",
55
- dependencyBumpRules: {},
56
- privatePackages: {
57
- version: false,
58
- tag: false
59
- },
60
- allowCustomCommands: false,
61
- packages: {},
62
- publish: { ...DEFAULT_PUBLISH_CONFIG },
63
- aggregateRelease: false,
64
- gitUser: {
65
- name: "bumpy-bot",
66
- email: "276066384+bumpy-bot@users.noreply.github.com"
67
- },
68
- versionPr: {
69
- title: "🐸 Versioned release",
70
- branch: "bumpy/version-packages",
71
- preamble: [
72
- `<a href="https://bumpy.varlock.dev"><img src="https://raw.githubusercontent.com/dmno-dev/bumpy/main/images/frog-talking.png" alt="bumpy-frog" width="60" align="left" style="image-rendering: pixelated;" title="Hi! I'm bumpy!" /></a>`,
73
- "",
74
- `This PR was created and will be kept in sync by [bumpy](https://bumpy.varlock.dev) based on your bump files (in \`.bumpy/\`). Merge it when you are ready to release the packages listed below:`,
75
- "<br clear=\"left\" />"
76
- ].join("\n")
77
- }
78
- };
79
- function hasCascade(r) {
80
- return "cascade" in r && Object.keys(r.cascade).length > 0;
81
- }
82
- //#endregion
83
5
  //#region src/core/config.ts
84
6
  var config_exports = /* @__PURE__ */ __exportAll({
85
7
  findRoot: () => findRoot,
@@ -218,4 +140,4 @@ function isPackageManaged(pkgName, isPrivate, config, pkgBumpy) {
218
140
  return true;
219
141
  }
220
142
  //#endregion
221
- export { loadConfig as a, BUMP_LEVELS as c, DEFAULT_PUBLISH_CONFIG as d, DEP_TYPES as f, maxBump as h, isPackageManaged as i, DEFAULT_BUMP_RULES as l, hasCascade as m, findRoot as n, loadPackageConfig as o, bumpLevel as p, getBumpyDir as r, matchGlob as s, config_exports as t, DEFAULT_CONFIG as u };
143
+ export { loadConfig as a, isPackageManaged as i, findRoot as n, loadPackageConfig as o, getBumpyDir as r, matchGlob as s, config_exports as t };
@@ -1,11 +1,11 @@
1
1
  import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
2
2
  import { t as ensureDir } from "./fs-DnDogVn-.mjs";
3
- import { a as loadConfig, r as getBumpyDir } from "./config-D7Umr-fT.mjs";
4
- import { t as discoverPackages } from "./workspace-BHsAPUmC.mjs";
5
- import { s as tryRunArgs } from "./shell-CY7OD48z.mjs";
6
- import { i as writeBumpFile } from "./bump-file-C3S_bzSf.mjs";
7
- import { a as getFilesChangedInCommit, n as getBranchCommits } from "./git-H9S9z6g-.mjs";
8
- import { n as slugify, t as randomName } from "./names-C-TuOPbd.mjs";
3
+ import { a as loadConfig, r as getBumpyDir } from "./config-CJIj8xG3.mjs";
4
+ import { t as discoverPackages } from "./workspace-c9-TqXed.mjs";
5
+ import { s as tryRunArgs } from "./shell-u3bYGxNy.mjs";
6
+ import { i as writeBumpFile } from "./bump-file-BTsntOO-.mjs";
7
+ import { a as getFilesChangedInCommit, n as getBranchCommits } from "./git-D0__HP86.mjs";
8
+ import { n as slugify, t as randomName } from "./names-CBy7d8K_.mjs";
9
9
  import { relative } from "node:path";
10
10
  //#region src/commands/generate.ts
11
11
  const BUMP_MAP = {
@@ -1,4 +1,4 @@
1
- import { n as runArgs, s as tryRunArgs } from "./shell-CY7OD48z.mjs";
1
+ import { n as runArgs, s as tryRunArgs } from "./shell-u3bYGxNy.mjs";
2
2
  //#region src/core/git.ts
3
3
  /** Create a git tag */
4
4
  function createTag(tag, opts) {
package/dist/index.d.mts CHANGED
@@ -237,7 +237,7 @@ interface ChangelogContext {
237
237
  * changelog entry string for a single release.
238
238
  */
239
239
  type ChangelogFormatter = (ctx: ChangelogContext) => string | Promise<string>;
240
- /** Default formatter — version heading, date, bullet points */
240
+ /** Default formatter — version heading with date, bullet points sorted by bump type */
241
241
  declare const defaultFormatter: ChangelogFormatter;
242
242
  /**
243
243
  * Load a changelog formatter from config.
package/dist/index.mjs CHANGED
@@ -1,9 +1,11 @@
1
- import { a as loadConfig, c as BUMP_LEVELS, d as DEFAULT_PUBLISH_CONFIG, f as DEP_TYPES, h as maxBump, l as DEFAULT_BUMP_RULES, m as hasCascade, n as findRoot, p as bumpLevel, r as getBumpyDir, s as matchGlob, u as DEFAULT_CONFIG } from "./config-D7Umr-fT.mjs";
2
- import { t as discoverPackages } from "./workspace-BHsAPUmC.mjs";
3
- import { t as DependencyGraph } from "./dep-graph-DiLeAhl9.mjs";
4
- import { i as writeBumpFile, n as parseBumpFile, r as readBumpFiles } from "./bump-file-C3S_bzSf.mjs";
5
- import { n as satisfies, r as stripProtocol, t as bumpVersion } from "./semver-BJzWIuRz.mjs";
6
- import { t as assembleReleasePlan } from "./release-plan-CNOuSI-d.mjs";
7
- import { a as prependToChangelog, i as loadFormatter, n as defaultFormatter, r as generateChangelogEntry, t as applyReleasePlan } from "./apply-release-plan-B1Wwx3HG.mjs";
8
- import { t as publishPackages } from "./publish-pipeline-DiwZZ5AF.mjs";
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-CSM0c2-m.mjs";
2
+ import { a as loadConfig, n as findRoot, r as getBumpyDir, s as matchGlob } from "./config-CJIj8xG3.mjs";
3
+ import { t as discoverPackages } from "./workspace-c9-TqXed.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-BTsntOO-.mjs";
6
+ import { n as satisfies, r as stripProtocol, t as bumpVersion } from "./semver-DfQyVLM_.mjs";
7
+ import { t as assembleReleasePlan } from "./release-plan-21H89Cx1.mjs";
8
+ import { a as prependToChangelog, i as loadFormatter, n as generateChangelogEntry, t as defaultFormatter } from "./changelog-xKuL0IKx.mjs";
9
+ import { t as applyReleasePlan } from "./apply-release-plan-Bi9OSWks.mjs";
10
+ import { t as publishPackages } from "./publish-pipeline-BvLIu7WF.mjs";
9
11
  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
1
  import { n as log, o as __toESM, r as require_picocolors } from "./logger-C2dEe5Su.mjs";
2
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-ByJ0wKYh.mjs";
4
- import { t as run } from "./shell-CY7OD48z.mjs";
5
- import { c as ot, o as gt, s as mt, t as unwrap } from "./clack-C6bVkGxf.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";
6
6
  import { resolve } from "node:path";
7
7
  import { readdir, rename, rm } from "node:fs/promises";
8
8
  //#region ../../.bumpy/README.md
@@ -1,11 +1,11 @@
1
1
  import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
2
- import { a as loadConfig } from "./config-D7Umr-fT.mjs";
3
- import { n as detectWorkspaces } from "./package-manager-ByJ0wKYh.mjs";
4
- import { n as discoverWorkspace } from "./workspace-BHsAPUmC.mjs";
5
- import { t as DependencyGraph } from "./dep-graph-DiLeAhl9.mjs";
6
- import { r as runArgsAsync, s as tryRunArgs } from "./shell-CY7OD48z.mjs";
7
- import { c as pushWithTags, o as hasUncommittedChanges, s as listTags } from "./git-H9S9z6g-.mjs";
8
- import { t as publishPackages } from "./publish-pipeline-DiwZZ5AF.mjs";
2
+ import { a as loadConfig } from "./config-CJIj8xG3.mjs";
3
+ import { n as detectWorkspaces } from "./package-manager-CClZtIHP.mjs";
4
+ import { n as discoverWorkspace } from "./workspace-c9-TqXed.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 { c as pushWithTags, o as hasUncommittedChanges, s as listTags } from "./git-D0__HP86.mjs";
8
+ import { t as publishPackages } from "./publish-pipeline-BvLIu7WF.mjs";
9
9
  //#region src/core/github-release.ts
10
10
  /** Get the current HEAD commit SHA */
11
11
  function getHeadSha(rootDir) {
@@ -148,7 +148,7 @@ async function publishCommand(rootDir, opts) {
148
148
  }
149
149
  let toPublish = await findUnpublishedPackages(packages, config);
150
150
  if (opts.filter) {
151
- const { matchGlob } = await import("./config-D7Umr-fT.mjs").then((n) => n.t);
151
+ const { matchGlob } = await import("./config-CJIj8xG3.mjs").then((n) => n.t);
152
152
  const patterns = opts.filter.split(",").map((p) => p.trim());
153
153
  toPublish = toPublish.filter((r) => patterns.some((p) => matchGlob(r.name, p)));
154
154
  }
@@ -220,7 +220,7 @@ async function findUnpublishedPackages(packages, _config) {
220
220
  return unpublished;
221
221
  }
222
222
  async function checkIfPublished(name, version, pkgConfig) {
223
- const { runAsync, runArgsAsync, tryRunArgs } = await import("./shell-CY7OD48z.mjs").then((n) => n.a);
223
+ const { runAsync, runArgsAsync, tryRunArgs } = await import("./shell-u3bYGxNy.mjs").then((n) => n.a);
224
224
  if (pkgConfig?.checkPublished) try {
225
225
  return (await runAsync(pkgConfig.checkPublished)).trim() === version;
226
226
  } catch {
@@ -1,9 +1,9 @@
1
1
  import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
2
2
  import { a as readJson, u as updateJsonNestedField } from "./fs-DnDogVn-.mjs";
3
- import { r as resolveCatalogDep } from "./package-manager-ByJ0wKYh.mjs";
4
- import { i as runAsync, o as sq, r as runArgsAsync, s as tryRunArgs } from "./shell-CY7OD48z.mjs";
5
- import { r as stripProtocol } from "./semver-BJzWIuRz.mjs";
6
- import { l as tagExists, t as createTag } from "./git-H9S9z6g-.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 { l as tagExists, t as createTag } from "./git-D0__HP86.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";
@@ -1,5 +1,6 @@
1
- import { h as maxBump, l as DEFAULT_BUMP_RULES, m as hasCascade, p as bumpLevel, s as matchGlob } from "./config-D7Umr-fT.mjs";
2
- import { n as satisfies, t as bumpVersion } from "./semver-BJzWIuRz.mjs";
1
+ import { c as maxBump, n as DEFAULT_BUMP_RULES, o as bumpLevel, s as hasCascade } from "./types-CSM0c2-m.mjs";
2
+ import { s as matchGlob } from "./config-CJIj8xG3.mjs";
3
+ import { n as satisfies, t as bumpVersion } from "./semver-DfQyVLM_.mjs";
3
4
  //#region src/core/release-plan.ts
4
5
  /**
5
6
  * Build a release plan from pending bump files, the dependency graph, and config.
@@ -1,10 +1,10 @@
1
1
  import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
2
- import { a as loadConfig } from "./config-D7Umr-fT.mjs";
3
- import { t as discoverPackages } from "./workspace-BHsAPUmC.mjs";
4
- import { t as DependencyGraph } from "./dep-graph-DiLeAhl9.mjs";
5
- import { r as readBumpFiles, t as filterBranchBumpFiles } from "./bump-file-C3S_bzSf.mjs";
6
- import { t as assembleReleasePlan } from "./release-plan-CNOuSI-d.mjs";
7
- import { i as getCurrentBranch, r as getChangedFiles } from "./git-H9S9z6g-.mjs";
2
+ import { a as loadConfig } from "./config-CJIj8xG3.mjs";
3
+ import { t as discoverPackages } from "./workspace-c9-TqXed.mjs";
4
+ import { t as DependencyGraph } from "./dep-graph-E-9-eQ2J.mjs";
5
+ import { r as readBumpFiles, t as filterBranchBumpFiles } from "./bump-file-BTsntOO-.mjs";
6
+ import { t as assembleReleasePlan } from "./release-plan-21H89Cx1.mjs";
7
+ import { i as getCurrentBranch, r as getChangedFiles } from "./git-D0__HP86.mjs";
8
8
  //#region src/commands/status.ts
9
9
  async function statusCommand(rootDir, opts) {
10
10
  const config = await loadConfig(rootDir);
@@ -31,7 +31,7 @@ async function statusCommand(rootDir, opts) {
31
31
  releases = releases.filter((r) => types.includes(r.type));
32
32
  }
33
33
  if (opts.filter) {
34
- const { matchGlob } = await import("./config-D7Umr-fT.mjs").then((n) => n.t);
34
+ const { matchGlob } = await import("./config-CJIj8xG3.mjs").then((n) => n.t);
35
35
  const patterns = opts.filter.split(",").map((p) => p.trim());
36
36
  releases = releases.filter((r) => patterns.some((p) => matchGlob(r.name, p)));
37
37
  }
@@ -0,0 +1,80 @@
1
+ //#region src/types.ts
2
+ const BUMP_LEVELS = {
3
+ patch: 0,
4
+ minor: 1,
5
+ major: 2
6
+ };
7
+ function bumpLevel(type) {
8
+ return BUMP_LEVELS[type];
9
+ }
10
+ function maxBump(a, b) {
11
+ if (!a) return b;
12
+ return bumpLevel(a) >= bumpLevel(b) ? a : b;
13
+ }
14
+ const DEFAULT_BUMP_RULES = {
15
+ dependencies: {
16
+ trigger: "patch",
17
+ bumpAs: "patch"
18
+ },
19
+ peerDependencies: {
20
+ trigger: "major",
21
+ bumpAs: "match"
22
+ },
23
+ devDependencies: false,
24
+ optionalDependencies: {
25
+ trigger: "minor",
26
+ bumpAs: "patch"
27
+ }
28
+ };
29
+ const DEP_TYPES = [
30
+ "dependencies",
31
+ "devDependencies",
32
+ "peerDependencies",
33
+ "optionalDependencies"
34
+ ];
35
+ const DEFAULT_PUBLISH_CONFIG = {
36
+ packManager: "auto",
37
+ publishManager: "npm",
38
+ publishArgs: [],
39
+ protocolResolution: "pack"
40
+ };
41
+ const DEFAULT_CONFIG = {
42
+ baseBranch: "main",
43
+ access: "public",
44
+ versionCommitMessage: void 0,
45
+ changedFilePatterns: ["**"],
46
+ changelog: "default",
47
+ fixed: [],
48
+ linked: [],
49
+ ignore: [],
50
+ include: [],
51
+ updateInternalDependencies: "out-of-range",
52
+ dependencyBumpRules: {},
53
+ privatePackages: {
54
+ version: false,
55
+ tag: false
56
+ },
57
+ allowCustomCommands: false,
58
+ packages: {},
59
+ publish: { ...DEFAULT_PUBLISH_CONFIG },
60
+ aggregateRelease: false,
61
+ gitUser: {
62
+ name: "bumpy-bot",
63
+ email: "276066384+bumpy-bot@users.noreply.github.com"
64
+ },
65
+ versionPr: {
66
+ title: "🐸 Versioned release",
67
+ branch: "bumpy/version-packages",
68
+ preamble: [
69
+ `<a href="https://bumpy.varlock.dev"><img src="https://raw.githubusercontent.com/dmno-dev/bumpy/main/images/frog-party.png" alt="bumpy-frog" width="60" align="left" style="image-rendering: pixelated;" title="Hi! I'm bumpy!" /></a>`,
70
+ "",
71
+ `This PR was created and will be kept in sync by [bumpy](https://bumpy.varlock.dev) based on your bump files (in \`.bumpy/\`). Merge it when you are ready to release the packages listed below:`,
72
+ "<br clear=\"left\" />"
73
+ ].join("\n")
74
+ }
75
+ };
76
+ function hasCascade(r) {
77
+ return "cascade" in r && Object.keys(r.cascade).length > 0;
78
+ }
79
+ //#endregion
80
+ export { DEP_TYPES as a, maxBump as c, DEFAULT_PUBLISH_CONFIG as i, DEFAULT_BUMP_RULES as n, bumpLevel as o, DEFAULT_CONFIG as r, hasCascade as s, BUMP_LEVELS as t };