@varlock/bumpy 1.5.0 → 1.5.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.
@@ -1,6 +1,6 @@
1
1
  import { a as readJson, c as removeFile, f as writeText, i as listFiles, l as updateJsonFields, n as exists, s as readText, u as updateJsonNestedField } from "./fs-DnDogVn-.mjs";
2
2
  import { r as getBumpyDir } from "./config-D13G4-R8.mjs";
3
- import { a as prependToChangelog, i as loadFormatter, n as generateChangelogEntry } from "./changelog-CXX-Cviy.mjs";
3
+ import { a as prependToChangelog, i as loadFormatter, n as generateChangelogEntry } from "./changelog-_gBjowzN.mjs";
4
4
  import { resolve } from "node:path";
5
5
  //#region src/core/apply-release-plan.ts
6
6
  /** Apply the release plan: bump versions, update changelogs, delete bump files */
@@ -1,5 +1,5 @@
1
1
  import { n as log } from "./logger-C2dEe5Su.mjs";
2
- import { t as BUMP_LEVELS } from "./types-BX4pfmKh.mjs";
2
+ import { c as maxBump, t as BUMP_LEVELS } from "./types-BX4pfmKh.mjs";
3
3
  import { relative, resolve } from "node:path";
4
4
  import { realpathSync } from "node:fs";
5
5
  //#region src/core/changelog.ts
@@ -33,7 +33,8 @@ const defaultFormatter = (ctx) => {
33
33
  }
34
34
  const sourceList = release.bumpSources.length > 0 ? release.bumpSources.map((s) => `\`${s.name}\` v${s.newVersion}`).join(", ") : "";
35
35
  if (release.isDependencyBump) {
36
- const tag = release.type !== "patch" ? `*(patch)* ` : "";
36
+ const depBumpType = release.bumpSources.reduce((max, s) => maxBump(max, s.bumpType), void 0);
37
+ const tag = depBumpType && depBumpType !== release.type ? `*(${depBumpType})* ` : "";
37
38
  lines.push(`- ${tag}Updated dependency ${sourceList || "(internal)"}`);
38
39
  }
39
40
  if (release.isGroupBump) lines.push(sourceList ? `- Version bump from group with ${sourceList}` : "- Version bump from group");
@@ -44,7 +45,7 @@ const defaultFormatter = (ctx) => {
44
45
  const BUILTIN_FORMATTERS = {
45
46
  default: defaultFormatter,
46
47
  github: async () => {
47
- const { createGithubFormatter } = await import("./changelog-github-BOs4cEhS.mjs");
48
+ const { createGithubFormatter } = await import("./changelog-github-B_e9JWku.mjs");
48
49
  return createGithubFormatter();
49
50
  }
50
51
  };
@@ -55,7 +56,7 @@ const BUILTIN_FORMATTERS = {
55
56
  async function loadFormatter(changelog, rootDir) {
56
57
  const [name, options] = Array.isArray(changelog) ? changelog : [changelog, {}];
57
58
  if (name === "github") {
58
- const { createGithubFormatter } = await import("./changelog-github-BOs4cEhS.mjs");
59
+ const { createGithubFormatter } = await import("./changelog-github-B_e9JWku.mjs");
59
60
  return createGithubFormatter(options);
60
61
  }
61
62
  if (typeof name === "string" && BUILTIN_FORMATTERS[name]) {
@@ -1,5 +1,6 @@
1
+ import { c as maxBump } from "./types-BX4pfmKh.mjs";
1
2
  import { s as tryRunArgs } from "./shell-u3bYGxNy.mjs";
2
- import { o as sortBumpFilesByType, r as getBumpTypeForPackage } from "./changelog-CXX-Cviy.mjs";
3
+ import { o as sortBumpFilesByType, r as getBumpTypeForPackage } from "./changelog-_gBjowzN.mjs";
3
4
  //#region src/core/changelog-github.ts
4
5
  /** Authors filtered from "Thanks" attribution by default (e.g. bots) */
5
6
  /** Authors filtered from "Thanks" attribution by default (e.g. AI/automation bots) */
@@ -58,7 +59,8 @@ function createGithubFormatter(options = {}) {
58
59
  }
59
60
  const sourceList = release.bumpSources.length > 0 ? release.bumpSources.map((s) => `\`${s.name}\` v${s.newVersion}`).join(", ") : "";
60
61
  if (release.isDependencyBump) {
61
- const depTag = release.type !== "patch" ? ` *(patch)* -` : "";
62
+ const depBumpType = release.bumpSources.reduce((max, s) => maxBump(max, s.bumpType), void 0);
63
+ const depTag = depBumpType && depBumpType !== release.type ? ` *(${depBumpType})* -` : "";
62
64
  lines.push(`-${depTag} Updated dependency ${sourceList || "(internal)"}`);
63
65
  }
64
66
  if (release.isGroupBump) lines.push(sourceList ? `- Version bump from group with ${sourceList}` : "- Version bump from group");
@@ -5,7 +5,7 @@ import { n as discoverWorkspace } from "./workspace-BKOAMeki.mjs";
5
5
  import { t as DependencyGraph } from "./dep-graph-E-9-eQ2J.mjs";
6
6
  import { n as runArgs, r as runArgsAsync, s as tryRunArgs } from "./shell-u3bYGxNy.mjs";
7
7
  import { r as readBumpFiles, t as filterBranchBumpFiles } from "./bump-file-CoaSxqne.mjs";
8
- import { t as assembleReleasePlan } from "./release-plan-DGDgSWZo.mjs";
8
+ import { t as assembleReleasePlan } from "./release-plan-C1Lz9rl_.mjs";
9
9
  import { r as getChangedFiles } from "./git-ukq7VTuZ.mjs";
10
10
  import { t as randomName } from "./names-CBy7d8K_.mjs";
11
11
  import { findChangedPackages } from "./check-CS8WIGZA.mjs";
@@ -140,7 +140,7 @@ async function ciReleaseCommand(rootDir, opts) {
140
140
  }
141
141
  if (bumpFiles.length === 0) {
142
142
  log.info("No pending bump files — checking for unpublished packages...");
143
- const { publishCommand } = await import("./publish-Kf5bq4Ph.mjs");
143
+ const { publishCommand } = await import("./publish-iwMZmdFW.mjs");
144
144
  await publishCommand(rootDir, { tag: opts.tag });
145
145
  return;
146
146
  }
@@ -154,7 +154,7 @@ async function ciReleaseCommand(rootDir, opts) {
154
154
  }
155
155
  async function autoPublish(rootDir, config, plan, tag) {
156
156
  log.step("Running bumpy version...");
157
- const { versionCommand } = await import("./version-Cj-Lkhbh.mjs");
157
+ const { versionCommand } = await import("./version-Da222zOi.mjs");
158
158
  await versionCommand(rootDir);
159
159
  log.step("Committing version changes...");
160
160
  runArgs([
@@ -183,7 +183,7 @@ async function autoPublish(rootDir, config, plan, tag) {
183
183
  ], { cwd: rootDir });
184
184
  }
185
185
  log.step("Running bumpy publish...");
186
- const { publishCommand } = await import("./publish-Kf5bq4Ph.mjs");
186
+ const { publishCommand } = await import("./publish-iwMZmdFW.mjs");
187
187
  await publishCommand(rootDir, { tag });
188
188
  }
189
189
  /**
@@ -349,7 +349,7 @@ async function createVersionPr(rootDir, plan, config, packageDirs, branchName) {
349
349
  branch
350
350
  ], { cwd: rootDir });
351
351
  log.step("Running bumpy version...");
352
- const { versionCommand } = await import("./version-Cj-Lkhbh.mjs");
352
+ const { versionCommand } = await import("./version-Da222zOi.mjs");
353
353
  await versionCommand(rootDir);
354
354
  runArgs([
355
355
  "git",
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-CqefyAEI.mjs");
46
+ const { statusCommand } = await import("./status-pe5aLZlu.mjs");
47
47
  await statusCommand(rootDir, {
48
48
  json: flags.json === true,
49
49
  packagesOnly: flags.packages === true,
@@ -55,7 +55,7 @@ async function main() {
55
55
  }
56
56
  case "version": {
57
57
  const rootDir = await findRoot();
58
- const { versionCommand } = await import("./version-Cj-Lkhbh.mjs");
58
+ const { versionCommand } = await import("./version-Da222zOi.mjs");
59
59
  await versionCommand(rootDir, { commit: flags.commit === true });
60
60
  break;
61
61
  }
@@ -89,14 +89,14 @@ 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-DjrgGbYj.mjs");
92
+ const { ciCheckCommand } = await import("./ci-CcOYaywq.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
98
  } else if (subcommand === "release") {
99
- const { ciReleaseCommand } = await import("./ci-DjrgGbYj.mjs");
99
+ const { ciReleaseCommand } = await import("./ci-CcOYaywq.mjs");
100
100
  await ciReleaseCommand(rootDir, {
101
101
  mode: ciFlags["auto-publish"] === true ? "auto-publish" : "version-pr",
102
102
  tag: ciFlags.tag,
@@ -113,7 +113,7 @@ async function main() {
113
113
  }
114
114
  case "publish": {
115
115
  const rootDir = await findRoot();
116
- const { publishCommand } = await import("./publish-Kf5bq4Ph.mjs");
116
+ const { publishCommand } = await import("./publish-iwMZmdFW.mjs");
117
117
  await publishCommand(rootDir, {
118
118
  dryRun: flags["dry-run"] === true,
119
119
  tag: flags.tag,
@@ -137,7 +137,7 @@ async function main() {
137
137
  }
138
138
  case "--version":
139
139
  case "-v":
140
- console.log(`bumpy 1.5.0`);
140
+ console.log(`bumpy 1.5.1`);
141
141
  break;
142
142
  case "help":
143
143
  case "--help":
@@ -157,7 +157,7 @@ async function main() {
157
157
  }
158
158
  function printHelp() {
159
159
  console.log(`
160
- ${colorize(`🐸 bumpy v1.5.0`, "bold")} - Modern monorepo versioning
160
+ ${colorize(`🐸 bumpy v1.5.1`, "bold")} - Modern monorepo versioning
161
161
 
162
162
  Usage: bumpy <command> [options]
163
163
 
package/dist/index.d.mts CHANGED
@@ -155,6 +155,7 @@ interface PlannedRelease {
155
155
  bumpSources: Array<{
156
156
  name: string;
157
157
  newVersion: string;
158
+ bumpType: BumpType;
158
159
  }>;
159
160
  }
160
161
  interface ReleasePlan {
package/dist/index.mjs CHANGED
@@ -4,8 +4,8 @@ import { t as discoverPackages } from "./workspace-BKOAMeki.mjs";
4
4
  import { t as DependencyGraph } from "./dep-graph-E-9-eQ2J.mjs";
5
5
  import { i as writeBumpFile, n as parseBumpFile, r as readBumpFiles } from "./bump-file-CoaSxqne.mjs";
6
6
  import { n as satisfies, r as stripProtocol, t as bumpVersion } from "./semver-DfQyVLM_.mjs";
7
- import { t as assembleReleasePlan } from "./release-plan-DGDgSWZo.mjs";
8
- import { a as prependToChangelog, i as loadFormatter, n as generateChangelogEntry, t as defaultFormatter } from "./changelog-CXX-Cviy.mjs";
9
- import { t as applyReleasePlan } from "./apply-release-plan-CIlB1M6e.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
10
  import { t as publishPackages } from "./publish-pipeline-C1slMaJV.mjs";
11
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 };
@@ -4,7 +4,7 @@ import { n as detectWorkspaces } from "./package-manager-CClZtIHP.mjs";
4
4
  import { n as discoverWorkspace } from "./workspace-BKOAMeki.mjs";
5
5
  import { t as DependencyGraph } from "./dep-graph-E-9-eQ2J.mjs";
6
6
  import { r as runArgsAsync, s as tryRunArgs } from "./shell-u3bYGxNy.mjs";
7
- import { i as loadFormatter, n as generateChangelogEntry } from "./changelog-CXX-Cviy.mjs";
7
+ import { i as loadFormatter, n as generateChangelogEntry } from "./changelog-_gBjowzN.mjs";
8
8
  import { c as listTags, l as pushWithTags, s as hasUncommittedChanges } from "./git-ukq7VTuZ.mjs";
9
9
  import { t as publishPackages } from "./publish-pipeline-C1slMaJV.mjs";
10
10
  //#region src/core/github-release.ts
@@ -34,7 +34,7 @@ function assembleReleasePlan(bumpFiles, packages, depGraph, config) {
34
34
  isCascadeBump: false,
35
35
  isGroupBump: false,
36
36
  bumpFiles: new Set([bf.id]),
37
- bumpSources: /* @__PURE__ */ new Set()
37
+ bumpSources: /* @__PURE__ */ new Map()
38
38
  });
39
39
  if (hasCascade(release)) {
40
40
  if (!cascadeOverrides.has(release.name)) cascadeOverrides.set(release.name, /* @__PURE__ */ new Map());
@@ -89,7 +89,7 @@ function assembleReleasePlan(bumpFiles, packages, depGraph, config) {
89
89
  if (newType !== existing.type) {
90
90
  existing.type = newType;
91
91
  existing.isGroupBump = true;
92
- for (const src of groupSources) if (src !== name) existing.bumpSources.add(src);
92
+ for (const src of groupSources) if (src !== name) existing.bumpSources.set(src, groupBump);
93
93
  changed = true;
94
94
  }
95
95
  } else {
@@ -99,7 +99,7 @@ function assembleReleasePlan(bumpFiles, packages, depGraph, config) {
99
99
  isCascadeBump: false,
100
100
  isGroupBump: true,
101
101
  bumpFiles: /* @__PURE__ */ new Set(),
102
- bumpSources: new Set(groupSources.filter((s) => s !== name))
102
+ bumpSources: new Map(groupSources.filter((s) => s !== name).map((s) => [s, groupBump]))
103
103
  });
104
104
  changed = true;
105
105
  }
@@ -124,7 +124,7 @@ function assembleReleasePlan(bumpFiles, packages, depGraph, config) {
124
124
  if (newType !== existing.type) {
125
125
  existing.type = newType;
126
126
  existing.isGroupBump = true;
127
- for (const src of groupSources) if (src !== name) existing.bumpSources.add(src);
127
+ for (const src of groupSources) if (src !== name) existing.bumpSources.set(src, groupBump);
128
128
  changed = true;
129
129
  }
130
130
  }
@@ -185,12 +185,13 @@ function assembleReleasePlan(bumpFiles, packages, depGraph, config) {
185
185
  isDependencyBump: bump.isDependencyBump,
186
186
  isCascadeBump: bump.isCascadeBump,
187
187
  isGroupBump: bump.isGroupBump,
188
- bumpSources: [...bump.bumpSources].map((srcName) => {
188
+ bumpSources: [...bump.bumpSources].map(([srcName, contributedType]) => {
189
189
  const srcBump = planned.get(srcName);
190
190
  const srcPkg = packages.get(srcName);
191
191
  return {
192
192
  name: srcName,
193
- newVersion: srcPkg && srcBump ? bumpVersion(srcPkg.version, srcBump.type) : "unknown"
193
+ newVersion: srcPkg && srcBump ? bumpVersion(srcPkg.version, srcBump.type) : "unknown",
194
+ bumpType: contributedType
194
195
  };
195
196
  })
196
197
  });
@@ -212,7 +213,7 @@ function applyBump(planned, name, type, isDependencyBump, isCascadeBump, sourceP
212
213
  existing.type = newType;
213
214
  if (isDependencyBump) existing.isDependencyBump = true;
214
215
  if (isCascadeBump) existing.isCascadeBump = true;
215
- existing.bumpSources.add(sourcePackageName);
216
+ existing.bumpSources.set(sourcePackageName, type);
216
217
  return true;
217
218
  }
218
219
  planned.set(name, {
@@ -221,7 +222,7 @@ function applyBump(planned, name, type, isDependencyBump, isCascadeBump, sourceP
221
222
  isCascadeBump,
222
223
  isGroupBump: false,
223
224
  bumpFiles: /* @__PURE__ */ new Set(),
224
- bumpSources: new Set([sourcePackageName])
225
+ bumpSources: new Map([[sourcePackageName, type]])
225
226
  });
226
227
  return true;
227
228
  }
@@ -3,7 +3,7 @@ import { a as loadConfig } from "./config-D13G4-R8.mjs";
3
3
  import { t as discoverPackages } from "./workspace-BKOAMeki.mjs";
4
4
  import { t as DependencyGraph } from "./dep-graph-E-9-eQ2J.mjs";
5
5
  import { r as readBumpFiles, t as filterBranchBumpFiles } from "./bump-file-CoaSxqne.mjs";
6
- import { t as assembleReleasePlan } from "./release-plan-DGDgSWZo.mjs";
6
+ import { t as assembleReleasePlan } from "./release-plan-C1Lz9rl_.mjs";
7
7
  import { i as getCurrentBranch, r as getChangedFiles } from "./git-ukq7VTuZ.mjs";
8
8
  //#region src/commands/status.ts
9
9
  async function statusCommand(rootDir, opts) {
@@ -5,8 +5,8 @@ import { t as discoverPackages } from "./workspace-BKOAMeki.mjs";
5
5
  import { t as DependencyGraph } from "./dep-graph-E-9-eQ2J.mjs";
6
6
  import { n as runArgs, s as tryRunArgs } from "./shell-u3bYGxNy.mjs";
7
7
  import { r as readBumpFiles } from "./bump-file-CoaSxqne.mjs";
8
- import { t as assembleReleasePlan } from "./release-plan-DGDgSWZo.mjs";
9
- import { t as applyReleasePlan } from "./apply-release-plan-CIlB1M6e.mjs";
8
+ import { t as assembleReleasePlan } from "./release-plan-C1Lz9rl_.mjs";
9
+ import { t as applyReleasePlan } from "./apply-release-plan-DNpoi7cS.mjs";
10
10
  import { t as resolveCommitMessage } from "./commit-message-3e4KhzFV.mjs";
11
11
  //#region src/commands/version.ts
12
12
  async function versionCommand(rootDir, opts = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlock/bumpy",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Modern monorepo versioning and changelog tool",
5
5
  "keywords": [
6
6
  "bump",