@varlock/bumpy 1.4.0 → 1.4.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.
package/README.md CHANGED
@@ -226,7 +226,7 @@ Tools like semantic-release infer version bumps from commit messages (`feat:`
226
226
 
227
227
  ## Why not just use changesets?
228
228
 
229
- Bumpy is built as a successor to [@changesets/changesets](https://github.com/changesets/changesets). Changesets is mature and widely adopted, but has stagnated - hundreds of open issues around core design problems that are unlikely to be fixed without a rewrite. See [differences from changesets](https://github.com/dmno-dev/bumpy/blob/main/docs/differences-from-changesets.md) for a detailed comparison with links to specific issues. The biggest pain points bumpy addresses:
229
+ Bumpy is built as a successor to [🦋changesets](https://github.com/changesets/changesets). Changesets is mature and widely adopted, but has stagnated - hundreds of open issues around core design problems that are unlikely to be fixed without a rewrite. See [differences from changesets](https://github.com/dmno-dev/bumpy/blob/main/docs/differences-from-changesets.md) for a detailed comparison with links to specific issues. The biggest pain points bumpy addresses:
230
230
 
231
231
  - **Sane dependency propagation** - changesets hardcodes aggressive behavior where a minor bump triggers a major bump on all peer dependents. Bumpy uses a [three-phase algorithm](https://github.com/dmno-dev/bumpy/blob/main/docs/version-propagation.md) with sensible defaults and full configurability.
232
232
  - **Workspace protocol resolution** - changesets uses `npm publish` even in pnpm/yarn workspaces, so `workspace:^` and `catalog:` protocols are NOT resolved, resulting in broken published packages.
@@ -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-pyxf71dx.mjs";
8
+ import { t as assembleReleasePlan } from "./release-plan-ClHMgUMl.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";
@@ -91,6 +91,10 @@ async function ciCheckCommand(rootDir, opts) {
91
91
  if (shouldComment && prNumber) await postOrUpdatePrComment(prNumber, formatEmptyBumpFileComment(emptyBumpFileIds, prNumber, detectPrBranch(rootDir)), rootDir);
92
92
  return;
93
93
  }
94
+ if ((await findChangedPackages(changedFiles, packages, rootDir, config)).length === 0 && parseErrors.length === 0) {
95
+ log.info("No managed packages have changed — no bump files needed.");
96
+ return;
97
+ }
94
98
  const willFail = !opts.noFail || parseErrors.length > 0;
95
99
  const msg = parseErrors.length > 0 ? "Bump file(s) found but failed to parse — see errors above." : "No bump files found in this PR.";
96
100
  if (willFail) log.error(msg);
@@ -112,6 +116,7 @@ async function ciCheckCommand(rootDir, opts) {
112
116
  if (shouldComment && prNumber) await postOrUpdatePrComment(prNumber, formatReleasePlanComment(plan, prBumpFiles, prNumber, detectPrBranch(rootDir), pm, plan.warnings, parseErrors, emptyBumpFileIds), rootDir);
113
117
  if (parseErrors.length > 0 && !opts.noFail) process.exit(1);
114
118
  const coveredPackages = new Set(plan.releases.map((r) => r.name));
119
+ for (const bf of prBumpFiles) for (const release of bf.releases) coveredPackages.add(release.name);
115
120
  const missing = (await findChangedPackages(changedFiles, packages, rootDir, config)).filter((name) => !coveredPackages.has(name));
116
121
  if (missing.length > 0) {
117
122
  const willFail = opts.strict && !opts.noFail;
@@ -149,7 +154,7 @@ async function ciReleaseCommand(rootDir, opts) {
149
154
  }
150
155
  async function autoPublish(rootDir, config, plan, tag) {
151
156
  log.step("Running bumpy version...");
152
- const { versionCommand } = await import("./version-BxDhayli.mjs");
157
+ const { versionCommand } = await import("./version-sDrbp6HI.mjs");
153
158
  await versionCommand(rootDir);
154
159
  log.step("Committing version changes...");
155
160
  runArgs([
@@ -344,7 +349,7 @@ async function createVersionPr(rootDir, plan, config, packageDirs, branchName) {
344
349
  branch
345
350
  ], { cwd: rootDir });
346
351
  log.step("Running bumpy version...");
347
- const { versionCommand } = await import("./version-BxDhayli.mjs");
352
+ const { versionCommand } = await import("./version-sDrbp6HI.mjs");
348
353
  await versionCommand(rootDir);
349
354
  runArgs([
350
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-DyzcQ6CD.mjs");
46
+ const { statusCommand } = await import("./status-DsHn_xdJ.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-BxDhayli.mjs");
58
+ const { versionCommand } = await import("./version-sDrbp6HI.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-CnIkaf7Q.mjs");
92
+ const { ciCheckCommand } = await import("./ci-S7H1RK-6.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-CnIkaf7Q.mjs");
99
+ const { ciReleaseCommand } = await import("./ci-S7H1RK-6.mjs");
100
100
  await ciReleaseCommand(rootDir, {
101
101
  mode: ciFlags["auto-publish"] === true ? "auto-publish" : "version-pr",
102
102
  tag: ciFlags.tag,
@@ -137,7 +137,7 @@ async function main() {
137
137
  }
138
138
  case "--version":
139
139
  case "-v":
140
- console.log(`bumpy 1.4.0`);
140
+ console.log(`bumpy 1.4.2`);
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.4.0`, "bold")} - Modern monorepo versioning
160
+ ${colorize(`🐸 bumpy v1.4.2`, "bold")} - Modern monorepo versioning
161
161
 
162
162
  Usage: bumpy <command> [options]
163
163
 
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ 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-pyxf71dx.mjs";
7
+ import { t as assembleReleasePlan } from "./release-plan-ClHMgUMl.mjs";
8
8
  import { a as prependToChangelog, i as loadFormatter, n as generateChangelogEntry, t as defaultFormatter } from "./changelog-DP3OrTqQ.mjs";
9
9
  import { t as applyReleasePlan } from "./apply-release-plan-60VfCLF8.mjs";
10
10
  import { t as publishPackages } from "./publish-pipeline-C1slMaJV.mjs";
@@ -60,7 +60,7 @@ function assembleReleasePlan(bumpFiles, packages, depGraph, config) {
60
60
  let depBump;
61
61
  if (dep.depType === "peerDependencies") depBump = bump.type;
62
62
  else depBump = "patch";
63
- if (dep.depType === "peerDependencies" && depBump !== "patch") {
63
+ if (dep.depType === "peerDependencies" && depBump !== "patch" && bump.type !== "major") {
64
64
  let resolvedRange = dep.versionRange.replace(/^workspace:/, "");
65
65
  if (resolvedRange === "^" || resolvedRange === "~") resolvedRange = `${resolvedRange}${pkg.version}`;
66
66
  if (/^\^0(\.|$)/.test(resolvedRange)) warnings.push(`${dep.name} gets a ${depBump} bump because ${pkgName}@${newVersion} is out of range for its peer dep "${dep.versionRange}" (resolves to ${resolvedRange}). npm treats ^ on 0.x as minor-breaking. Consider using >=0.x ranges for pre-1.0 peer deps.`);
@@ -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-pyxf71dx.mjs";
6
+ import { t as assembleReleasePlan } from "./release-plan-ClHMgUMl.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,7 +5,7 @@ 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-pyxf71dx.mjs";
8
+ import { t as assembleReleasePlan } from "./release-plan-ClHMgUMl.mjs";
9
9
  import { t as applyReleasePlan } from "./apply-release-plan-60VfCLF8.mjs";
10
10
  import { t as resolveCommitMessage } from "./commit-message-3e4KhzFV.mjs";
11
11
  //#region src/commands/version.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlock/bumpy",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Modern monorepo versioning and changelog tool",
5
5
  "keywords": [
6
6
  "bump",