@varlock/bumpy 1.5.0 → 1.6.0
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/dist/{add-D1uiW7VA.mjs → add-u3h5BH8e.mjs} +2 -2
- package/dist/{apply-release-plan-CIlB1M6e.mjs → apply-release-plan-DNpoi7cS.mjs} +1 -1
- package/dist/{changelog-CXX-Cviy.mjs → changelog-_gBjowzN.mjs} +5 -4
- package/dist/{changelog-github-BOs4cEhS.mjs → changelog-github-B_e9JWku.mjs} +4 -2
- package/dist/{check-CS8WIGZA.mjs → check-B3M2S2wx.mjs} +1 -1
- package/dist/{ci-DjrgGbYj.mjs → ci-h8s-soA6.mjs} +7 -7
- package/dist/cli.mjs +10 -10
- package/dist/{generate-D0KJsvpD.mjs → generate-CxKXOBNP.mjs} +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +4 -4
- package/dist/{publish-Kf5bq4Ph.mjs → publish-CXJ0Ggkq.mjs} +2 -2
- package/dist/{release-plan-DGDgSWZo.mjs → release-plan-C1Lz9rl_.mjs} +9 -8
- package/dist/{status-CqefyAEI.mjs → status-lS56U6F_.mjs} +2 -2
- package/dist/{version-Cj-Lkhbh.mjs → version-BjjnO2ii.mjs} +3 -3
- package/dist/{workspace-BKOAMeki.mjs → workspace-Yt7qwsML.mjs} +6 -4
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { n as log, o as __toESM, r as require_picocolors } from "./logger-C2dEe5Su.mjs";
|
|
2
2
|
import { n as exists, t as ensureDir } from "./fs-DnDogVn-.mjs";
|
|
3
3
|
import { a as loadConfig, o as loadPackageConfig, r as getBumpyDir, s as matchGlob } from "./config-D13G4-R8.mjs";
|
|
4
|
-
import { n as discoverWorkspace, t as discoverPackages } from "./workspace-
|
|
4
|
+
import { n as discoverWorkspace, t as discoverPackages } from "./workspace-Yt7qwsML.mjs";
|
|
5
5
|
import { t as DependencyGraph } from "./dep-graph-E-9-eQ2J.mjs";
|
|
6
6
|
import { i as writeBumpFile } from "./bump-file-CoaSxqne.mjs";
|
|
7
7
|
import { r as getChangedFiles } from "./git-ukq7VTuZ.mjs";
|
|
8
8
|
import { c as ot, d as yt, i as _t, l as pt, o as gt, r as Ot, s as mt, t as unwrap, u as wt } from "./clack-CJT1JFFa.mjs";
|
|
9
9
|
import { n as slugify, t as randomName } from "./names-CBy7d8K_.mjs";
|
|
10
|
-
import { findChangedPackages, t as require_picomatch } from "./check-
|
|
10
|
+
import { findChangedPackages, t as require_picomatch } from "./check-B3M2S2wx.mjs";
|
|
11
11
|
import { relative, resolve } from "node:path";
|
|
12
12
|
import * as readline from "node:readline";
|
|
13
13
|
//#region src/prompts/bump-select.ts
|
|
@@ -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-
|
|
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
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
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");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __commonJSMin, n as log, o as __toESM, t as colorize } from "./logger-C2dEe5Su.mjs";
|
|
2
2
|
import { a as loadConfig, o as loadPackageConfig, r as getBumpyDir } from "./config-D13G4-R8.mjs";
|
|
3
|
-
import { n as discoverWorkspace } from "./workspace-
|
|
3
|
+
import { n as discoverWorkspace } from "./workspace-Yt7qwsML.mjs";
|
|
4
4
|
import { r as readBumpFiles, t as filterBranchBumpFiles } from "./bump-file-CoaSxqne.mjs";
|
|
5
5
|
import { a as getFileStatuses, r as getChangedFiles } from "./git-ukq7VTuZ.mjs";
|
|
6
6
|
import { relative } from "node:path";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
|
|
2
2
|
import { a as loadConfig } from "./config-D13G4-R8.mjs";
|
|
3
3
|
import { t as detectPackageManager } from "./package-manager-CClZtIHP.mjs";
|
|
4
|
-
import { n as discoverWorkspace } from "./workspace-
|
|
4
|
+
import { n as discoverWorkspace } from "./workspace-Yt7qwsML.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-
|
|
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
|
-
import { findChangedPackages } from "./check-
|
|
11
|
+
import { findChangedPackages } from "./check-B3M2S2wx.mjs";
|
|
12
12
|
import { t as resolveCommitMessage } from "./commit-message-3e4KhzFV.mjs";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
14
14
|
//#region src/commands/ci.ts
|
|
@@ -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-
|
|
143
|
+
const { publishCommand } = await import("./publish-CXJ0Ggkq.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-
|
|
157
|
+
const { versionCommand } = await import("./version-BjjnO2ii.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-
|
|
186
|
+
const { publishCommand } = await import("./publish-CXJ0Ggkq.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-
|
|
352
|
+
const { versionCommand } = await import("./version-BjjnO2ii.mjs");
|
|
353
353
|
await versionCommand(rootDir);
|
|
354
354
|
runArgs([
|
|
355
355
|
"git",
|
package/dist/cli.mjs
CHANGED
|
@@ -31,7 +31,7 @@ async function main() {
|
|
|
31
31
|
}
|
|
32
32
|
case "add": {
|
|
33
33
|
const rootDir = await findRoot();
|
|
34
|
-
const { addCommand } = await import("./add-
|
|
34
|
+
const { addCommand } = await import("./add-u3h5BH8e.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-
|
|
46
|
+
const { statusCommand } = await import("./status-lS56U6F_.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-
|
|
58
|
+
const { versionCommand } = await import("./version-BjjnO2ii.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-
|
|
64
|
+
const { generateCommand } = await import("./generate-CxKXOBNP.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-
|
|
74
|
+
const { checkCommand } = await import("./check-B3M2S2wx.mjs");
|
|
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,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-
|
|
92
|
+
const { ciCheckCommand } = await import("./ci-h8s-soA6.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-
|
|
99
|
+
const { ciReleaseCommand } = await import("./ci-h8s-soA6.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-
|
|
116
|
+
const { publishCommand } = await import("./publish-CXJ0Ggkq.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.
|
|
140
|
+
console.log(`bumpy 1.6.0`);
|
|
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.
|
|
160
|
+
${colorize(`🐸 bumpy v1.6.0`, "bold")} - Modern monorepo versioning
|
|
161
161
|
|
|
162
162
|
Usage: bumpy <command> [options]
|
|
163
163
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
|
|
2
2
|
import { t as ensureDir } from "./fs-DnDogVn-.mjs";
|
|
3
3
|
import { a as loadConfig, r as getBumpyDir } from "./config-D13G4-R8.mjs";
|
|
4
|
-
import { t as discoverPackages } from "./workspace-
|
|
4
|
+
import { t as discoverPackages } from "./workspace-Yt7qwsML.mjs";
|
|
5
5
|
import { s as tryRunArgs } from "./shell-u3bYGxNy.mjs";
|
|
6
6
|
import { i as writeBumpFile } from "./bump-file-CoaSxqne.mjs";
|
|
7
7
|
import { n as getBranchCommits, o as getFilesChangedInCommit } from "./git-ukq7VTuZ.mjs";
|
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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
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-
|
|
3
|
+
import { t as discoverPackages } from "./workspace-Yt7qwsML.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-
|
|
8
|
-
import { a as prependToChangelog, i as loadFormatter, n as generateChangelogEntry, t as defaultFormatter } from "./changelog-
|
|
9
|
-
import { t as applyReleasePlan } from "./apply-release-plan-
|
|
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 };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
|
|
2
2
|
import { a as loadConfig } from "./config-D13G4-R8.mjs";
|
|
3
3
|
import { n as detectWorkspaces } from "./package-manager-CClZtIHP.mjs";
|
|
4
|
-
import { n as discoverWorkspace } from "./workspace-
|
|
4
|
+
import { n as discoverWorkspace } from "./workspace-Yt7qwsML.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-
|
|
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
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
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
|
|
225
|
+
bumpSources: new Map([[sourcePackageName, type]])
|
|
225
226
|
});
|
|
226
227
|
return true;
|
|
227
228
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
|
|
2
2
|
import { a as loadConfig } from "./config-D13G4-R8.mjs";
|
|
3
|
-
import { t as discoverPackages } from "./workspace-
|
|
3
|
+
import { t as discoverPackages } from "./workspace-Yt7qwsML.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-
|
|
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) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as log, t as colorize } from "./logger-C2dEe5Su.mjs";
|
|
2
2
|
import { a as loadConfig } from "./config-D13G4-R8.mjs";
|
|
3
3
|
import { n as detectWorkspaces } from "./package-manager-CClZtIHP.mjs";
|
|
4
|
-
import { t as discoverPackages } from "./workspace-
|
|
4
|
+
import { t as discoverPackages } from "./workspace-Yt7qwsML.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-
|
|
9
|
-
import { t as applyReleasePlan } from "./apply-release-plan-
|
|
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 = {}) {
|
|
@@ -4,12 +4,14 @@ import { n as detectWorkspaces } from "./package-manager-CClZtIHP.mjs";
|
|
|
4
4
|
import { relative, resolve } from "node:path";
|
|
5
5
|
import { readdir, stat } from "node:fs/promises";
|
|
6
6
|
//#region src/core/workspace.ts
|
|
7
|
-
/** Discover all workspace packages and catalogs in a monorepo */
|
|
7
|
+
/** Discover all workspace packages and catalogs in a monorepo or single-package repo */
|
|
8
8
|
async function discoverWorkspace(rootDir, config) {
|
|
9
9
|
const { globs, catalogs } = await detectWorkspaces(rootDir);
|
|
10
|
-
if (globs.length === 0) throw new Error("No workspace globs found. Is this a monorepo?");
|
|
11
10
|
const packages = /* @__PURE__ */ new Map();
|
|
12
|
-
|
|
11
|
+
if (globs.length === 0) {
|
|
12
|
+
const pkg = await loadWorkspacePackage(rootDir, rootDir, config);
|
|
13
|
+
if (pkg && isPackageManaged(pkg.name, pkg.private, config, pkg.bumpy)) packages.set(pkg.name, pkg);
|
|
14
|
+
} else for (const glob of globs) {
|
|
13
15
|
const dirs = await resolveGlob(rootDir, glob);
|
|
14
16
|
for (const dir of dirs) {
|
|
15
17
|
const pkg = await loadWorkspacePackage(dir, rootDir, config);
|
|
@@ -93,7 +95,7 @@ async function loadWorkspacePackage(dir, rootDir, config) {
|
|
|
93
95
|
name,
|
|
94
96
|
version: pkg.version || "0.0.0",
|
|
95
97
|
dir: resolve(dir),
|
|
96
|
-
relativeDir: relative(rootDir, dir),
|
|
98
|
+
relativeDir: relative(rootDir, dir) || ".",
|
|
97
99
|
packageJson: pkg,
|
|
98
100
|
private: !!pkg.private,
|
|
99
101
|
dependencies: pkg.dependencies || {},
|