@varlock/bumpy 1.5.1 → 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/{check-CS8WIGZA.mjs → check-B3M2S2wx.mjs} +1 -1
- package/dist/{ci-CcOYaywq.mjs → ci-h8s-soA6.mjs} +6 -6
- package/dist/cli.mjs +10 -10
- package/dist/{generate-D0KJsvpD.mjs → generate-CxKXOBNP.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{publish-iwMZmdFW.mjs → publish-CXJ0Ggkq.mjs} +1 -1
- package/dist/{status-pe5aLZlu.mjs → status-lS56U6F_.mjs} +1 -1
- package/dist/{version-Da222zOi.mjs → version-BjjnO2ii.mjs} +1 -1
- 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 { 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
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.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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";
|
|
@@ -1,7 +1,7 @@
|
|
|
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
7
|
import { i as loadFormatter, n as generateChangelogEntry } from "./changelog-_gBjowzN.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
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
6
|
import { t as assembleReleasePlan } from "./release-plan-C1Lz9rl_.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
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";
|
|
@@ -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 || {},
|