bumpp 9.4.0 → 9.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/dist/{chunk-OMAU23UL.mjs → chunk-WWXZEF5W.mjs} +79 -43
- package/dist/cli/index.js +85 -70
- package/dist/cli/index.mjs +8 -30
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +78 -41
- package/dist/index.mjs +1 -1
- package/package.json +12 -12
|
@@ -25,8 +25,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
25
25
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
26
26
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
27
27
|
}) : x)(function(x) {
|
|
28
|
-
if (typeof require !== "undefined")
|
|
29
|
-
return require.apply(this, arguments);
|
|
28
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
30
29
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
31
30
|
});
|
|
32
31
|
var __objRest = (source, exclude) => {
|
|
@@ -61,50 +60,58 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
61
60
|
mod
|
|
62
61
|
));
|
|
63
62
|
|
|
64
|
-
// node_modules/.pnpm/picocolors@1.0.
|
|
63
|
+
// node_modules/.pnpm/picocolors@1.0.1/node_modules/picocolors/picocolors.js
|
|
65
64
|
var require_picocolors = __commonJS({
|
|
66
|
-
"node_modules/.pnpm/picocolors@1.0.
|
|
67
|
-
var
|
|
68
|
-
var
|
|
65
|
+
"node_modules/.pnpm/picocolors@1.0.1/node_modules/picocolors/picocolors.js"(exports, module) {
|
|
66
|
+
var argv = process.argv || [];
|
|
67
|
+
var env2 = process.env;
|
|
68
|
+
var isColorSupported = !("NO_COLOR" in env2 || argv.includes("--no-color")) && ("FORCE_COLOR" in env2 || argv.includes("--color") || process.platform === "win32" || __require != null && __require("tty").isatty(1) && env2.TERM !== "dumb" || "CI" in env2);
|
|
69
69
|
var formatter = (open, close, replace = open) => (input) => {
|
|
70
70
|
let string = "" + input;
|
|
71
71
|
let index = string.indexOf(close, open.length);
|
|
72
72
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
73
73
|
};
|
|
74
74
|
var replaceClose = (string, close, replace, index) => {
|
|
75
|
-
let
|
|
76
|
-
let
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
let result = "";
|
|
76
|
+
let cursor = 0;
|
|
77
|
+
do {
|
|
78
|
+
result += string.substring(cursor, index) + replace;
|
|
79
|
+
cursor = index + close.length;
|
|
80
|
+
index = string.indexOf(close, cursor);
|
|
81
|
+
} while (~index);
|
|
82
|
+
return result + string.substring(cursor);
|
|
83
|
+
};
|
|
84
|
+
var createColors = (enabled = isColorSupported) => {
|
|
85
|
+
let init = enabled ? formatter : () => String;
|
|
86
|
+
return {
|
|
87
|
+
isColorSupported: enabled,
|
|
88
|
+
reset: init("\x1B[0m", "\x1B[0m"),
|
|
89
|
+
bold: init("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
90
|
+
dim: init("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
91
|
+
italic: init("\x1B[3m", "\x1B[23m"),
|
|
92
|
+
underline: init("\x1B[4m", "\x1B[24m"),
|
|
93
|
+
inverse: init("\x1B[7m", "\x1B[27m"),
|
|
94
|
+
hidden: init("\x1B[8m", "\x1B[28m"),
|
|
95
|
+
strikethrough: init("\x1B[9m", "\x1B[29m"),
|
|
96
|
+
black: init("\x1B[30m", "\x1B[39m"),
|
|
97
|
+
red: init("\x1B[31m", "\x1B[39m"),
|
|
98
|
+
green: init("\x1B[32m", "\x1B[39m"),
|
|
99
|
+
yellow: init("\x1B[33m", "\x1B[39m"),
|
|
100
|
+
blue: init("\x1B[34m", "\x1B[39m"),
|
|
101
|
+
magenta: init("\x1B[35m", "\x1B[39m"),
|
|
102
|
+
cyan: init("\x1B[36m", "\x1B[39m"),
|
|
103
|
+
white: init("\x1B[37m", "\x1B[39m"),
|
|
104
|
+
gray: init("\x1B[90m", "\x1B[39m"),
|
|
105
|
+
bgBlack: init("\x1B[40m", "\x1B[49m"),
|
|
106
|
+
bgRed: init("\x1B[41m", "\x1B[49m"),
|
|
107
|
+
bgGreen: init("\x1B[42m", "\x1B[49m"),
|
|
108
|
+
bgYellow: init("\x1B[43m", "\x1B[49m"),
|
|
109
|
+
bgBlue: init("\x1B[44m", "\x1B[49m"),
|
|
110
|
+
bgMagenta: init("\x1B[45m", "\x1B[49m"),
|
|
111
|
+
bgCyan: init("\x1B[46m", "\x1B[49m"),
|
|
112
|
+
bgWhite: init("\x1B[47m", "\x1B[49m")
|
|
113
|
+
};
|
|
79
114
|
};
|
|
80
|
-
var createColors = (enabled = isColorSupported) => ({
|
|
81
|
-
isColorSupported: enabled,
|
|
82
|
-
reset: enabled ? (s) => `\x1B[0m${s}\x1B[0m` : String,
|
|
83
|
-
bold: enabled ? formatter("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m") : String,
|
|
84
|
-
dim: enabled ? formatter("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m") : String,
|
|
85
|
-
italic: enabled ? formatter("\x1B[3m", "\x1B[23m") : String,
|
|
86
|
-
underline: enabled ? formatter("\x1B[4m", "\x1B[24m") : String,
|
|
87
|
-
inverse: enabled ? formatter("\x1B[7m", "\x1B[27m") : String,
|
|
88
|
-
hidden: enabled ? formatter("\x1B[8m", "\x1B[28m") : String,
|
|
89
|
-
strikethrough: enabled ? formatter("\x1B[9m", "\x1B[29m") : String,
|
|
90
|
-
black: enabled ? formatter("\x1B[30m", "\x1B[39m") : String,
|
|
91
|
-
red: enabled ? formatter("\x1B[31m", "\x1B[39m") : String,
|
|
92
|
-
green: enabled ? formatter("\x1B[32m", "\x1B[39m") : String,
|
|
93
|
-
yellow: enabled ? formatter("\x1B[33m", "\x1B[39m") : String,
|
|
94
|
-
blue: enabled ? formatter("\x1B[34m", "\x1B[39m") : String,
|
|
95
|
-
magenta: enabled ? formatter("\x1B[35m", "\x1B[39m") : String,
|
|
96
|
-
cyan: enabled ? formatter("\x1B[36m", "\x1B[39m") : String,
|
|
97
|
-
white: enabled ? formatter("\x1B[37m", "\x1B[39m") : String,
|
|
98
|
-
gray: enabled ? formatter("\x1B[90m", "\x1B[39m") : String,
|
|
99
|
-
bgBlack: enabled ? formatter("\x1B[40m", "\x1B[49m") : String,
|
|
100
|
-
bgRed: enabled ? formatter("\x1B[41m", "\x1B[49m") : String,
|
|
101
|
-
bgGreen: enabled ? formatter("\x1B[42m", "\x1B[49m") : String,
|
|
102
|
-
bgYellow: enabled ? formatter("\x1B[43m", "\x1B[49m") : String,
|
|
103
|
-
bgBlue: enabled ? formatter("\x1B[44m", "\x1B[49m") : String,
|
|
104
|
-
bgMagenta: enabled ? formatter("\x1B[45m", "\x1B[49m") : String,
|
|
105
|
-
bgCyan: enabled ? formatter("\x1B[46m", "\x1B[49m") : String,
|
|
106
|
-
bgWhite: enabled ? formatter("\x1B[47m", "\x1B[49m") : String
|
|
107
|
-
});
|
|
108
115
|
module.exports = createColors();
|
|
109
116
|
module.exports.createColors = createColors;
|
|
110
117
|
}
|
|
@@ -950,7 +957,7 @@ async function readVersion(file, cwd) {
|
|
|
950
957
|
if (isValidVersion2(manifest.version))
|
|
951
958
|
return manifest.version;
|
|
952
959
|
}
|
|
953
|
-
} catch (
|
|
960
|
+
} catch (e) {
|
|
954
961
|
return void 0;
|
|
955
962
|
}
|
|
956
963
|
}
|
|
@@ -1012,9 +1019,12 @@ function formatVersionString(template, newVersion) {
|
|
|
1012
1019
|
|
|
1013
1020
|
// src/normalize-options.ts
|
|
1014
1021
|
import process5 from "process";
|
|
1022
|
+
import fs2 from "fs/promises";
|
|
1023
|
+
import fsSync from "fs";
|
|
1015
1024
|
import fg from "fast-glob";
|
|
1025
|
+
import yaml from "js-yaml";
|
|
1016
1026
|
async function normalizeOptions(raw) {
|
|
1017
|
-
var _a;
|
|
1027
|
+
var _a, _b;
|
|
1018
1028
|
const preid = typeof raw.preid === "string" ? raw.preid : "beta";
|
|
1019
1029
|
const push = Boolean(raw.push);
|
|
1020
1030
|
const all = Boolean(raw.all);
|
|
@@ -1022,6 +1032,7 @@ async function normalizeOptions(raw) {
|
|
|
1022
1032
|
const cwd = raw.cwd || process5.cwd();
|
|
1023
1033
|
const ignoreScripts = Boolean(raw.ignoreScripts);
|
|
1024
1034
|
const execute = raw.execute;
|
|
1035
|
+
const recursive = Boolean(raw.recursive);
|
|
1025
1036
|
let release;
|
|
1026
1037
|
if (!raw.release || raw.release === "prompt")
|
|
1027
1038
|
release = { type: "prompt", preid };
|
|
@@ -1039,8 +1050,31 @@ async function normalizeOptions(raw) {
|
|
|
1039
1050
|
commit = { all, noVerify, message: raw.commit };
|
|
1040
1051
|
else if (raw.commit || tag || push)
|
|
1041
1052
|
commit = { all, noVerify, message: "chore: release v" };
|
|
1053
|
+
if (recursive && !((_a = raw.files) == null ? void 0 : _a.length)) {
|
|
1054
|
+
raw.files = [
|
|
1055
|
+
"package.json",
|
|
1056
|
+
"package-lock.json",
|
|
1057
|
+
"packages/**/package.json",
|
|
1058
|
+
"jsr.json",
|
|
1059
|
+
"jsr.jsonc",
|
|
1060
|
+
"deno.json",
|
|
1061
|
+
"deno.jsonc"
|
|
1062
|
+
];
|
|
1063
|
+
if (fsSync.existsSync("pnpm-workspace.yaml")) {
|
|
1064
|
+
const pnpmWorkspace = await fs2.readFile("pnpm-workspace.yaml", "utf8");
|
|
1065
|
+
const workspaces = yaml.load(pnpmWorkspace);
|
|
1066
|
+
const workspacesWithPackageJson = workspaces.packages.map((workspace) => `${workspace}/package.json`);
|
|
1067
|
+
const withoutExcludedWorkspaces = workspacesWithPackageJson.filter((workspace) => {
|
|
1068
|
+
var _a2;
|
|
1069
|
+
return !workspace.startsWith("!") && !((_a2 = raw.files) == null ? void 0 : _a2.includes(workspace));
|
|
1070
|
+
});
|
|
1071
|
+
raw.files = raw.files.concat(withoutExcludedWorkspaces);
|
|
1072
|
+
}
|
|
1073
|
+
} else {
|
|
1074
|
+
raw.files = ((_b = raw.files) == null ? void 0 : _b.length) ? raw.files : ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc", "deno.json", "deno.jsonc"];
|
|
1075
|
+
}
|
|
1042
1076
|
const files = await fg(
|
|
1043
|
-
|
|
1077
|
+
raw.files,
|
|
1044
1078
|
{
|
|
1045
1079
|
cwd,
|
|
1046
1080
|
onlyFiles: true,
|
|
@@ -1055,7 +1089,7 @@ async function normalizeOptions(raw) {
|
|
|
1055
1089
|
} else if (raw.interface === true || !raw.interface) {
|
|
1056
1090
|
ui = { input: process5.stdin, output: process5.stdout };
|
|
1057
1091
|
} else {
|
|
1058
|
-
let
|
|
1092
|
+
let _c = raw.interface, { input, output } = _c, other = __objRest(_c, ["input", "output"]);
|
|
1059
1093
|
if (input === true || input !== false && !input)
|
|
1060
1094
|
input = process5.stdin;
|
|
1061
1095
|
if (output === true || output !== false && !output)
|
|
@@ -1191,6 +1225,7 @@ async function updateFile(relPath, operation) {
|
|
|
1191
1225
|
case "bower.json":
|
|
1192
1226
|
case "component.json":
|
|
1193
1227
|
case "jsr.json":
|
|
1228
|
+
case "deno.json":
|
|
1194
1229
|
return updateManifestFile(relPath, operation);
|
|
1195
1230
|
default:
|
|
1196
1231
|
return updateTextFile(relPath, operation);
|
|
@@ -1239,8 +1274,9 @@ async function versionBump(arg = {}) {
|
|
|
1239
1274
|
type: "confirm",
|
|
1240
1275
|
message: "Bump?",
|
|
1241
1276
|
initial: true
|
|
1242
|
-
}).then((r) => r.yes))
|
|
1277
|
+
}).then((r) => r.yes)) {
|
|
1243
1278
|
process6.exit(1);
|
|
1279
|
+
}
|
|
1244
1280
|
}
|
|
1245
1281
|
await runNpmScript("preversion" /* PreVersion */, operation);
|
|
1246
1282
|
await updateFiles(operation);
|
package/dist/cli/index.js
CHANGED
|
@@ -58,50 +58,58 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
58
58
|
));
|
|
59
59
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
60
60
|
|
|
61
|
-
// node_modules/.pnpm/picocolors@1.0.
|
|
61
|
+
// node_modules/.pnpm/picocolors@1.0.1/node_modules/picocolors/picocolors.js
|
|
62
62
|
var require_picocolors = __commonJS({
|
|
63
|
-
"node_modules/.pnpm/picocolors@1.0.
|
|
64
|
-
var
|
|
65
|
-
var
|
|
63
|
+
"node_modules/.pnpm/picocolors@1.0.1/node_modules/picocolors/picocolors.js"(exports2, module2) {
|
|
64
|
+
var argv = process.argv || [];
|
|
65
|
+
var env2 = process.env;
|
|
66
|
+
var isColorSupported = !("NO_COLOR" in env2 || argv.includes("--no-color")) && ("FORCE_COLOR" in env2 || argv.includes("--color") || process.platform === "win32" || require != null && require("tty").isatty(1) && env2.TERM !== "dumb" || "CI" in env2);
|
|
66
67
|
var formatter = (open, close, replace = open) => (input) => {
|
|
67
68
|
let string = "" + input;
|
|
68
69
|
let index = string.indexOf(close, open.length);
|
|
69
70
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
70
71
|
};
|
|
71
72
|
var replaceClose = (string, close, replace, index) => {
|
|
72
|
-
let
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
let result = "";
|
|
74
|
+
let cursor = 0;
|
|
75
|
+
do {
|
|
76
|
+
result += string.substring(cursor, index) + replace;
|
|
77
|
+
cursor = index + close.length;
|
|
78
|
+
index = string.indexOf(close, cursor);
|
|
79
|
+
} while (~index);
|
|
80
|
+
return result + string.substring(cursor);
|
|
81
|
+
};
|
|
82
|
+
var createColors = (enabled = isColorSupported) => {
|
|
83
|
+
let init = enabled ? formatter : () => String;
|
|
84
|
+
return {
|
|
85
|
+
isColorSupported: enabled,
|
|
86
|
+
reset: init("\x1B[0m", "\x1B[0m"),
|
|
87
|
+
bold: init("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
88
|
+
dim: init("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
89
|
+
italic: init("\x1B[3m", "\x1B[23m"),
|
|
90
|
+
underline: init("\x1B[4m", "\x1B[24m"),
|
|
91
|
+
inverse: init("\x1B[7m", "\x1B[27m"),
|
|
92
|
+
hidden: init("\x1B[8m", "\x1B[28m"),
|
|
93
|
+
strikethrough: init("\x1B[9m", "\x1B[29m"),
|
|
94
|
+
black: init("\x1B[30m", "\x1B[39m"),
|
|
95
|
+
red: init("\x1B[31m", "\x1B[39m"),
|
|
96
|
+
green: init("\x1B[32m", "\x1B[39m"),
|
|
97
|
+
yellow: init("\x1B[33m", "\x1B[39m"),
|
|
98
|
+
blue: init("\x1B[34m", "\x1B[39m"),
|
|
99
|
+
magenta: init("\x1B[35m", "\x1B[39m"),
|
|
100
|
+
cyan: init("\x1B[36m", "\x1B[39m"),
|
|
101
|
+
white: init("\x1B[37m", "\x1B[39m"),
|
|
102
|
+
gray: init("\x1B[90m", "\x1B[39m"),
|
|
103
|
+
bgBlack: init("\x1B[40m", "\x1B[49m"),
|
|
104
|
+
bgRed: init("\x1B[41m", "\x1B[49m"),
|
|
105
|
+
bgGreen: init("\x1B[42m", "\x1B[49m"),
|
|
106
|
+
bgYellow: init("\x1B[43m", "\x1B[49m"),
|
|
107
|
+
bgBlue: init("\x1B[44m", "\x1B[49m"),
|
|
108
|
+
bgMagenta: init("\x1B[45m", "\x1B[49m"),
|
|
109
|
+
bgCyan: init("\x1B[46m", "\x1B[49m"),
|
|
110
|
+
bgWhite: init("\x1B[47m", "\x1B[49m")
|
|
111
|
+
};
|
|
76
112
|
};
|
|
77
|
-
var createColors = (enabled = isColorSupported) => ({
|
|
78
|
-
isColorSupported: enabled,
|
|
79
|
-
reset: enabled ? (s) => `\x1B[0m${s}\x1B[0m` : String,
|
|
80
|
-
bold: enabled ? formatter("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m") : String,
|
|
81
|
-
dim: enabled ? formatter("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m") : String,
|
|
82
|
-
italic: enabled ? formatter("\x1B[3m", "\x1B[23m") : String,
|
|
83
|
-
underline: enabled ? formatter("\x1B[4m", "\x1B[24m") : String,
|
|
84
|
-
inverse: enabled ? formatter("\x1B[7m", "\x1B[27m") : String,
|
|
85
|
-
hidden: enabled ? formatter("\x1B[8m", "\x1B[28m") : String,
|
|
86
|
-
strikethrough: enabled ? formatter("\x1B[9m", "\x1B[29m") : String,
|
|
87
|
-
black: enabled ? formatter("\x1B[30m", "\x1B[39m") : String,
|
|
88
|
-
red: enabled ? formatter("\x1B[31m", "\x1B[39m") : String,
|
|
89
|
-
green: enabled ? formatter("\x1B[32m", "\x1B[39m") : String,
|
|
90
|
-
yellow: enabled ? formatter("\x1B[33m", "\x1B[39m") : String,
|
|
91
|
-
blue: enabled ? formatter("\x1B[34m", "\x1B[39m") : String,
|
|
92
|
-
magenta: enabled ? formatter("\x1B[35m", "\x1B[39m") : String,
|
|
93
|
-
cyan: enabled ? formatter("\x1B[36m", "\x1B[39m") : String,
|
|
94
|
-
white: enabled ? formatter("\x1B[37m", "\x1B[39m") : String,
|
|
95
|
-
gray: enabled ? formatter("\x1B[90m", "\x1B[39m") : String,
|
|
96
|
-
bgBlack: enabled ? formatter("\x1B[40m", "\x1B[49m") : String,
|
|
97
|
-
bgRed: enabled ? formatter("\x1B[41m", "\x1B[49m") : String,
|
|
98
|
-
bgGreen: enabled ? formatter("\x1B[42m", "\x1B[49m") : String,
|
|
99
|
-
bgYellow: enabled ? formatter("\x1B[43m", "\x1B[49m") : String,
|
|
100
|
-
bgBlue: enabled ? formatter("\x1B[44m", "\x1B[49m") : String,
|
|
101
|
-
bgMagenta: enabled ? formatter("\x1B[45m", "\x1B[49m") : String,
|
|
102
|
-
bgCyan: enabled ? formatter("\x1B[46m", "\x1B[49m") : String,
|
|
103
|
-
bgWhite: enabled ? formatter("\x1B[47m", "\x1B[49m") : String
|
|
104
|
-
});
|
|
105
113
|
module2.exports = createColors();
|
|
106
114
|
module2.exports.createColors = createColors;
|
|
107
115
|
}
|
|
@@ -628,7 +636,7 @@ var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
|
628
636
|
var log_symbols_default = logSymbols;
|
|
629
637
|
|
|
630
638
|
// package.json
|
|
631
|
-
var version = "9.4.
|
|
639
|
+
var version = "9.4.2";
|
|
632
640
|
|
|
633
641
|
// src/version-bump.ts
|
|
634
642
|
var import_node_process5 = __toESM(require("process"));
|
|
@@ -943,7 +951,7 @@ async function readVersion(file, cwd) {
|
|
|
943
951
|
if ((0, import_semver2.valid)(manifest.version))
|
|
944
952
|
return manifest.version;
|
|
945
953
|
}
|
|
946
|
-
} catch (
|
|
954
|
+
} catch (e) {
|
|
947
955
|
return void 0;
|
|
948
956
|
}
|
|
949
957
|
}
|
|
@@ -1005,9 +1013,12 @@ function formatVersionString(template, newVersion) {
|
|
|
1005
1013
|
|
|
1006
1014
|
// src/normalize-options.ts
|
|
1007
1015
|
var import_node_process4 = __toESM(require("process"));
|
|
1016
|
+
var import_promises = __toESM(require("fs/promises"));
|
|
1017
|
+
var import_node_fs2 = __toESM(require("fs"));
|
|
1008
1018
|
var import_fast_glob = __toESM(require("fast-glob"));
|
|
1019
|
+
var import_js_yaml = __toESM(require("js-yaml"));
|
|
1009
1020
|
async function normalizeOptions(raw) {
|
|
1010
|
-
var _a;
|
|
1021
|
+
var _a, _b;
|
|
1011
1022
|
const preid = typeof raw.preid === "string" ? raw.preid : "beta";
|
|
1012
1023
|
const push = Boolean(raw.push);
|
|
1013
1024
|
const all = Boolean(raw.all);
|
|
@@ -1015,6 +1026,7 @@ async function normalizeOptions(raw) {
|
|
|
1015
1026
|
const cwd = raw.cwd || import_node_process4.default.cwd();
|
|
1016
1027
|
const ignoreScripts = Boolean(raw.ignoreScripts);
|
|
1017
1028
|
const execute = raw.execute;
|
|
1029
|
+
const recursive = Boolean(raw.recursive);
|
|
1018
1030
|
let release;
|
|
1019
1031
|
if (!raw.release || raw.release === "prompt")
|
|
1020
1032
|
release = { type: "prompt", preid };
|
|
@@ -1032,8 +1044,31 @@ async function normalizeOptions(raw) {
|
|
|
1032
1044
|
commit = { all, noVerify, message: raw.commit };
|
|
1033
1045
|
else if (raw.commit || tag || push)
|
|
1034
1046
|
commit = { all, noVerify, message: "chore: release v" };
|
|
1047
|
+
if (recursive && !((_a = raw.files) == null ? void 0 : _a.length)) {
|
|
1048
|
+
raw.files = [
|
|
1049
|
+
"package.json",
|
|
1050
|
+
"package-lock.json",
|
|
1051
|
+
"packages/**/package.json",
|
|
1052
|
+
"jsr.json",
|
|
1053
|
+
"jsr.jsonc",
|
|
1054
|
+
"deno.json",
|
|
1055
|
+
"deno.jsonc"
|
|
1056
|
+
];
|
|
1057
|
+
if (import_node_fs2.default.existsSync("pnpm-workspace.yaml")) {
|
|
1058
|
+
const pnpmWorkspace = await import_promises.default.readFile("pnpm-workspace.yaml", "utf8");
|
|
1059
|
+
const workspaces = import_js_yaml.default.load(pnpmWorkspace);
|
|
1060
|
+
const workspacesWithPackageJson = workspaces.packages.map((workspace) => `${workspace}/package.json`);
|
|
1061
|
+
const withoutExcludedWorkspaces = workspacesWithPackageJson.filter((workspace) => {
|
|
1062
|
+
var _a2;
|
|
1063
|
+
return !workspace.startsWith("!") && !((_a2 = raw.files) == null ? void 0 : _a2.includes(workspace));
|
|
1064
|
+
});
|
|
1065
|
+
raw.files = raw.files.concat(withoutExcludedWorkspaces);
|
|
1066
|
+
}
|
|
1067
|
+
} else {
|
|
1068
|
+
raw.files = ((_b = raw.files) == null ? void 0 : _b.length) ? raw.files : ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc", "deno.json", "deno.jsonc"];
|
|
1069
|
+
}
|
|
1035
1070
|
const files = await (0, import_fast_glob.default)(
|
|
1036
|
-
|
|
1071
|
+
raw.files,
|
|
1037
1072
|
{
|
|
1038
1073
|
cwd,
|
|
1039
1074
|
onlyFiles: true,
|
|
@@ -1048,7 +1083,7 @@ async function normalizeOptions(raw) {
|
|
|
1048
1083
|
} else if (raw.interface === true || !raw.interface) {
|
|
1049
1084
|
ui = { input: import_node_process4.default.stdin, output: import_node_process4.default.stdout };
|
|
1050
1085
|
} else {
|
|
1051
|
-
let
|
|
1086
|
+
let _c = raw.interface, { input, output } = _c, other = __objRest(_c, ["input", "output"]);
|
|
1052
1087
|
if (input === true || input !== false && !input)
|
|
1053
1088
|
input = import_node_process4.default.stdin;
|
|
1054
1089
|
if (output === true || output !== false && !output)
|
|
@@ -1184,6 +1219,7 @@ async function updateFile(relPath, operation) {
|
|
|
1184
1219
|
case "bower.json":
|
|
1185
1220
|
case "component.json":
|
|
1186
1221
|
case "jsr.json":
|
|
1222
|
+
case "deno.json":
|
|
1187
1223
|
return updateManifestFile(relPath, operation);
|
|
1188
1224
|
default:
|
|
1189
1225
|
return updateTextFile(relPath, operation);
|
|
@@ -1232,8 +1268,9 @@ async function versionBump(arg = {}) {
|
|
|
1232
1268
|
type: "confirm",
|
|
1233
1269
|
message: "Bump?",
|
|
1234
1270
|
initial: true
|
|
1235
|
-
}).then((r) => r.yes))
|
|
1271
|
+
}).then((r) => r.yes)) {
|
|
1236
1272
|
import_node_process5.default.exit(1);
|
|
1273
|
+
}
|
|
1237
1274
|
}
|
|
1238
1275
|
await runNpmScript("preversion" /* PreVersion */, operation);
|
|
1239
1276
|
await updateFiles(operation);
|
|
@@ -1268,12 +1305,9 @@ function printSummary(operation) {
|
|
|
1268
1305
|
|
|
1269
1306
|
// src/cli/parse-args.ts
|
|
1270
1307
|
var import_node_process7 = __toESM(require("process"));
|
|
1271
|
-
var import_promises = __toESM(require("fs/promises"));
|
|
1272
|
-
var import_node_fs2 = __toESM(require("fs"));
|
|
1273
1308
|
var import_semver3 = require("semver");
|
|
1274
1309
|
var import_cac = __toESM(require("cac"));
|
|
1275
1310
|
var import_picocolors3 = __toESM(require_picocolors());
|
|
1276
|
-
var import_js_yaml = __toESM(require("js-yaml"));
|
|
1277
1311
|
|
|
1278
1312
|
// src/config.ts
|
|
1279
1313
|
var import_node_process6 = __toESM(require("process"));
|
|
@@ -1359,29 +1393,8 @@ async function parseArgs() {
|
|
|
1359
1393
|
parsedArgs.options.files.shift();
|
|
1360
1394
|
}
|
|
1361
1395
|
}
|
|
1362
|
-
if (parsedArgs.options.recursive)
|
|
1363
|
-
|
|
1364
|
-
console.log(import_picocolors3.default.yellow("The --recursive option is ignored when files are specified"));
|
|
1365
|
-
} else {
|
|
1366
|
-
parsedArgs.options.files = [
|
|
1367
|
-
"package.json",
|
|
1368
|
-
"package-lock.json",
|
|
1369
|
-
"packages/**/package.json",
|
|
1370
|
-
"jsr.json",
|
|
1371
|
-
"jsr.jsonc"
|
|
1372
|
-
];
|
|
1373
|
-
if (import_node_fs2.default.existsSync("pnpm-workspace.yaml")) {
|
|
1374
|
-
const pnpmWorkspace = await import_promises.default.readFile("pnpm-workspace.yaml", "utf8");
|
|
1375
|
-
const workspaces = import_js_yaml.default.load(pnpmWorkspace);
|
|
1376
|
-
const workspacesWithPackageJson = workspaces.packages.map((workspace) => `${workspace}/package.json`);
|
|
1377
|
-
const withoutExcludedWorkspaces = workspacesWithPackageJson.filter((workspace) => {
|
|
1378
|
-
var _a2;
|
|
1379
|
-
return !workspace.startsWith("!") && !((_a2 = parsedArgs.options.files) == null ? void 0 : _a2.includes(workspace));
|
|
1380
|
-
});
|
|
1381
|
-
parsedArgs.options.files = parsedArgs.options.files.concat(withoutExcludedWorkspaces);
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1396
|
+
if (parsedArgs.options.recursive && ((_a = parsedArgs.options.files) == null ? void 0 : _a.length))
|
|
1397
|
+
console.log(import_picocolors3.default.yellow("The --recursive option is ignored when files are specified"));
|
|
1385
1398
|
return parsedArgs;
|
|
1386
1399
|
} catch (error) {
|
|
1387
1400
|
return errorHandler(error);
|
|
@@ -1393,8 +1406,10 @@ function loadCliArgs(argv = import_node_process7.default.argv) {
|
|
|
1393
1406
|
const result = cli.parse(argv);
|
|
1394
1407
|
const rawArgs = cli.rawArgs;
|
|
1395
1408
|
const args = result.options;
|
|
1396
|
-
const
|
|
1397
|
-
const
|
|
1409
|
+
const COMMIT_REG = /(?:-c|--commit|--no-commit)(?:=.*|$)/;
|
|
1410
|
+
const TAG_REG = /(?:-t|--tag|--no-tag)(?:=.*|$)/;
|
|
1411
|
+
const hasCommitFlag = rawArgs.some((arg) => COMMIT_REG.test(arg));
|
|
1412
|
+
const hasTagFlag = rawArgs.some((arg) => TAG_REG.test(arg));
|
|
1398
1413
|
const _a = args, { tag, commit } = _a, rest = __objRest(_a, ["tag", "commit"]);
|
|
1399
1414
|
return {
|
|
1400
1415
|
args: __spreadProps(__spreadValues({}, rest), {
|
package/dist/cli/index.mjs
CHANGED
|
@@ -10,22 +10,19 @@ import {
|
|
|
10
10
|
log_symbols_default,
|
|
11
11
|
require_picocolors,
|
|
12
12
|
versionBump
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-WWXZEF5W.mjs";
|
|
14
14
|
|
|
15
15
|
// src/cli/index.ts
|
|
16
16
|
import process2 from "process";
|
|
17
17
|
|
|
18
18
|
// package.json
|
|
19
|
-
var version = "9.4.
|
|
19
|
+
var version = "9.4.2";
|
|
20
20
|
|
|
21
21
|
// src/cli/parse-args.ts
|
|
22
22
|
var import_picocolors = __toESM(require_picocolors());
|
|
23
23
|
import process from "process";
|
|
24
|
-
import fs from "fs/promises";
|
|
25
|
-
import fsSync from "fs";
|
|
26
24
|
import { valid as isValidVersion } from "semver";
|
|
27
25
|
import cac from "cac";
|
|
28
|
-
import yaml from "js-yaml";
|
|
29
26
|
async function parseArgs() {
|
|
30
27
|
var _a;
|
|
31
28
|
try {
|
|
@@ -56,29 +53,8 @@ async function parseArgs() {
|
|
|
56
53
|
parsedArgs.options.files.shift();
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
|
-
if (parsedArgs.options.recursive)
|
|
60
|
-
|
|
61
|
-
console.log(import_picocolors.default.yellow("The --recursive option is ignored when files are specified"));
|
|
62
|
-
} else {
|
|
63
|
-
parsedArgs.options.files = [
|
|
64
|
-
"package.json",
|
|
65
|
-
"package-lock.json",
|
|
66
|
-
"packages/**/package.json",
|
|
67
|
-
"jsr.json",
|
|
68
|
-
"jsr.jsonc"
|
|
69
|
-
];
|
|
70
|
-
if (fsSync.existsSync("pnpm-workspace.yaml")) {
|
|
71
|
-
const pnpmWorkspace = await fs.readFile("pnpm-workspace.yaml", "utf8");
|
|
72
|
-
const workspaces = yaml.load(pnpmWorkspace);
|
|
73
|
-
const workspacesWithPackageJson = workspaces.packages.map((workspace) => `${workspace}/package.json`);
|
|
74
|
-
const withoutExcludedWorkspaces = workspacesWithPackageJson.filter((workspace) => {
|
|
75
|
-
var _a2;
|
|
76
|
-
return !workspace.startsWith("!") && !((_a2 = parsedArgs.options.files) == null ? void 0 : _a2.includes(workspace));
|
|
77
|
-
});
|
|
78
|
-
parsedArgs.options.files = parsedArgs.options.files.concat(withoutExcludedWorkspaces);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
56
|
+
if (parsedArgs.options.recursive && ((_a = parsedArgs.options.files) == null ? void 0 : _a.length))
|
|
57
|
+
console.log(import_picocolors.default.yellow("The --recursive option is ignored when files are specified"));
|
|
82
58
|
return parsedArgs;
|
|
83
59
|
} catch (error) {
|
|
84
60
|
return errorHandler(error);
|
|
@@ -90,8 +66,10 @@ function loadCliArgs(argv = process.argv) {
|
|
|
90
66
|
const result = cli.parse(argv);
|
|
91
67
|
const rawArgs = cli.rawArgs;
|
|
92
68
|
const args = result.options;
|
|
93
|
-
const
|
|
94
|
-
const
|
|
69
|
+
const COMMIT_REG = /(?:-c|--commit|--no-commit)(?:=.*|$)/;
|
|
70
|
+
const TAG_REG = /(?:-t|--tag|--no-tag)(?:=.*|$)/;
|
|
71
|
+
const hasCommitFlag = rawArgs.some((arg) => COMMIT_REG.test(arg));
|
|
72
|
+
const hasTagFlag = rawArgs.some((arg) => TAG_REG.test(arg));
|
|
95
73
|
const _a = args, { tag, commit } = _a, rest = __objRest(_a, ["tag", "commit"]);
|
|
96
74
|
return {
|
|
97
75
|
args: __spreadProps(__spreadValues({}, rest), {
|
package/dist/index.d.mts
CHANGED
|
@@ -100,7 +100,7 @@ interface VersionBumpOptions {
|
|
|
100
100
|
* with the new version number. If the message string does _not_ contain any `%s` placeholders,
|
|
101
101
|
* then the new version number will be appended to the message.
|
|
102
102
|
*
|
|
103
|
-
* Defaults to `
|
|
103
|
+
* Defaults to `true`.
|
|
104
104
|
*/
|
|
105
105
|
commit?: boolean | string;
|
|
106
106
|
/**
|
|
@@ -109,13 +109,13 @@ interface VersionBumpOptions {
|
|
|
109
109
|
* with the new version number. If the tag string does _not_ contain any `%s` placeholders,
|
|
110
110
|
* then the new version number will be appended to the tag.
|
|
111
111
|
*
|
|
112
|
-
* Defaults to `
|
|
112
|
+
* Defaults to `true`.
|
|
113
113
|
*/
|
|
114
114
|
tag?: boolean | string;
|
|
115
115
|
/**
|
|
116
116
|
* Indicates whether to push the git commit and tag.
|
|
117
117
|
*
|
|
118
|
-
* Defaults to `
|
|
118
|
+
* Defaults to `true`.
|
|
119
119
|
*/
|
|
120
120
|
push?: boolean;
|
|
121
121
|
/**
|
|
@@ -128,7 +128,7 @@ interface VersionBumpOptions {
|
|
|
128
128
|
/**
|
|
129
129
|
* Prompt for confirmation
|
|
130
130
|
*
|
|
131
|
-
* @default
|
|
131
|
+
* @default true
|
|
132
132
|
*/
|
|
133
133
|
confirm?: boolean;
|
|
134
134
|
/**
|
|
@@ -143,7 +143,7 @@ interface VersionBumpOptions {
|
|
|
143
143
|
* (ReadMe files, config files, source code, etc.) it will simply do a global replacement
|
|
144
144
|
* of the old version number with the new version number.
|
|
145
145
|
*
|
|
146
|
-
* Defaults to ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc"]
|
|
146
|
+
* Defaults to ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc", "deno.json", "deno.jsonc"].
|
|
147
147
|
*/
|
|
148
148
|
files?: string[];
|
|
149
149
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -100,7 +100,7 @@ interface VersionBumpOptions {
|
|
|
100
100
|
* with the new version number. If the message string does _not_ contain any `%s` placeholders,
|
|
101
101
|
* then the new version number will be appended to the message.
|
|
102
102
|
*
|
|
103
|
-
* Defaults to `
|
|
103
|
+
* Defaults to `true`.
|
|
104
104
|
*/
|
|
105
105
|
commit?: boolean | string;
|
|
106
106
|
/**
|
|
@@ -109,13 +109,13 @@ interface VersionBumpOptions {
|
|
|
109
109
|
* with the new version number. If the tag string does _not_ contain any `%s` placeholders,
|
|
110
110
|
* then the new version number will be appended to the tag.
|
|
111
111
|
*
|
|
112
|
-
* Defaults to `
|
|
112
|
+
* Defaults to `true`.
|
|
113
113
|
*/
|
|
114
114
|
tag?: boolean | string;
|
|
115
115
|
/**
|
|
116
116
|
* Indicates whether to push the git commit and tag.
|
|
117
117
|
*
|
|
118
|
-
* Defaults to `
|
|
118
|
+
* Defaults to `true`.
|
|
119
119
|
*/
|
|
120
120
|
push?: boolean;
|
|
121
121
|
/**
|
|
@@ -128,7 +128,7 @@ interface VersionBumpOptions {
|
|
|
128
128
|
/**
|
|
129
129
|
* Prompt for confirmation
|
|
130
130
|
*
|
|
131
|
-
* @default
|
|
131
|
+
* @default true
|
|
132
132
|
*/
|
|
133
133
|
confirm?: boolean;
|
|
134
134
|
/**
|
|
@@ -143,7 +143,7 @@ interface VersionBumpOptions {
|
|
|
143
143
|
* (ReadMe files, config files, source code, etc.) it will simply do a global replacement
|
|
144
144
|
* of the old version number with the new version number.
|
|
145
145
|
*
|
|
146
|
-
* Defaults to ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc"]
|
|
146
|
+
* Defaults to ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc", "deno.json", "deno.jsonc"].
|
|
147
147
|
*/
|
|
148
148
|
files?: string[];
|
|
149
149
|
/**
|
package/dist/index.js
CHANGED
|
@@ -58,50 +58,58 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
58
58
|
));
|
|
59
59
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
60
60
|
|
|
61
|
-
// node_modules/.pnpm/picocolors@1.0.
|
|
61
|
+
// node_modules/.pnpm/picocolors@1.0.1/node_modules/picocolors/picocolors.js
|
|
62
62
|
var require_picocolors = __commonJS({
|
|
63
|
-
"node_modules/.pnpm/picocolors@1.0.
|
|
64
|
-
var
|
|
65
|
-
var
|
|
63
|
+
"node_modules/.pnpm/picocolors@1.0.1/node_modules/picocolors/picocolors.js"(exports2, module2) {
|
|
64
|
+
var argv = process.argv || [];
|
|
65
|
+
var env2 = process.env;
|
|
66
|
+
var isColorSupported = !("NO_COLOR" in env2 || argv.includes("--no-color")) && ("FORCE_COLOR" in env2 || argv.includes("--color") || process.platform === "win32" || require != null && require("tty").isatty(1) && env2.TERM !== "dumb" || "CI" in env2);
|
|
66
67
|
var formatter = (open, close, replace = open) => (input) => {
|
|
67
68
|
let string = "" + input;
|
|
68
69
|
let index = string.indexOf(close, open.length);
|
|
69
70
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
70
71
|
};
|
|
71
72
|
var replaceClose = (string, close, replace, index) => {
|
|
72
|
-
let
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
let result = "";
|
|
74
|
+
let cursor = 0;
|
|
75
|
+
do {
|
|
76
|
+
result += string.substring(cursor, index) + replace;
|
|
77
|
+
cursor = index + close.length;
|
|
78
|
+
index = string.indexOf(close, cursor);
|
|
79
|
+
} while (~index);
|
|
80
|
+
return result + string.substring(cursor);
|
|
81
|
+
};
|
|
82
|
+
var createColors = (enabled = isColorSupported) => {
|
|
83
|
+
let init = enabled ? formatter : () => String;
|
|
84
|
+
return {
|
|
85
|
+
isColorSupported: enabled,
|
|
86
|
+
reset: init("\x1B[0m", "\x1B[0m"),
|
|
87
|
+
bold: init("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
88
|
+
dim: init("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
89
|
+
italic: init("\x1B[3m", "\x1B[23m"),
|
|
90
|
+
underline: init("\x1B[4m", "\x1B[24m"),
|
|
91
|
+
inverse: init("\x1B[7m", "\x1B[27m"),
|
|
92
|
+
hidden: init("\x1B[8m", "\x1B[28m"),
|
|
93
|
+
strikethrough: init("\x1B[9m", "\x1B[29m"),
|
|
94
|
+
black: init("\x1B[30m", "\x1B[39m"),
|
|
95
|
+
red: init("\x1B[31m", "\x1B[39m"),
|
|
96
|
+
green: init("\x1B[32m", "\x1B[39m"),
|
|
97
|
+
yellow: init("\x1B[33m", "\x1B[39m"),
|
|
98
|
+
blue: init("\x1B[34m", "\x1B[39m"),
|
|
99
|
+
magenta: init("\x1B[35m", "\x1B[39m"),
|
|
100
|
+
cyan: init("\x1B[36m", "\x1B[39m"),
|
|
101
|
+
white: init("\x1B[37m", "\x1B[39m"),
|
|
102
|
+
gray: init("\x1B[90m", "\x1B[39m"),
|
|
103
|
+
bgBlack: init("\x1B[40m", "\x1B[49m"),
|
|
104
|
+
bgRed: init("\x1B[41m", "\x1B[49m"),
|
|
105
|
+
bgGreen: init("\x1B[42m", "\x1B[49m"),
|
|
106
|
+
bgYellow: init("\x1B[43m", "\x1B[49m"),
|
|
107
|
+
bgBlue: init("\x1B[44m", "\x1B[49m"),
|
|
108
|
+
bgMagenta: init("\x1B[45m", "\x1B[49m"),
|
|
109
|
+
bgCyan: init("\x1B[46m", "\x1B[49m"),
|
|
110
|
+
bgWhite: init("\x1B[47m", "\x1B[49m")
|
|
111
|
+
};
|
|
76
112
|
};
|
|
77
|
-
var createColors = (enabled = isColorSupported) => ({
|
|
78
|
-
isColorSupported: enabled,
|
|
79
|
-
reset: enabled ? (s) => `\x1B[0m${s}\x1B[0m` : String,
|
|
80
|
-
bold: enabled ? formatter("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m") : String,
|
|
81
|
-
dim: enabled ? formatter("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m") : String,
|
|
82
|
-
italic: enabled ? formatter("\x1B[3m", "\x1B[23m") : String,
|
|
83
|
-
underline: enabled ? formatter("\x1B[4m", "\x1B[24m") : String,
|
|
84
|
-
inverse: enabled ? formatter("\x1B[7m", "\x1B[27m") : String,
|
|
85
|
-
hidden: enabled ? formatter("\x1B[8m", "\x1B[28m") : String,
|
|
86
|
-
strikethrough: enabled ? formatter("\x1B[9m", "\x1B[29m") : String,
|
|
87
|
-
black: enabled ? formatter("\x1B[30m", "\x1B[39m") : String,
|
|
88
|
-
red: enabled ? formatter("\x1B[31m", "\x1B[39m") : String,
|
|
89
|
-
green: enabled ? formatter("\x1B[32m", "\x1B[39m") : String,
|
|
90
|
-
yellow: enabled ? formatter("\x1B[33m", "\x1B[39m") : String,
|
|
91
|
-
blue: enabled ? formatter("\x1B[34m", "\x1B[39m") : String,
|
|
92
|
-
magenta: enabled ? formatter("\x1B[35m", "\x1B[39m") : String,
|
|
93
|
-
cyan: enabled ? formatter("\x1B[36m", "\x1B[39m") : String,
|
|
94
|
-
white: enabled ? formatter("\x1B[37m", "\x1B[39m") : String,
|
|
95
|
-
gray: enabled ? formatter("\x1B[90m", "\x1B[39m") : String,
|
|
96
|
-
bgBlack: enabled ? formatter("\x1B[40m", "\x1B[49m") : String,
|
|
97
|
-
bgRed: enabled ? formatter("\x1B[41m", "\x1B[49m") : String,
|
|
98
|
-
bgGreen: enabled ? formatter("\x1B[42m", "\x1B[49m") : String,
|
|
99
|
-
bgYellow: enabled ? formatter("\x1B[43m", "\x1B[49m") : String,
|
|
100
|
-
bgBlue: enabled ? formatter("\x1B[44m", "\x1B[49m") : String,
|
|
101
|
-
bgMagenta: enabled ? formatter("\x1B[45m", "\x1B[49m") : String,
|
|
102
|
-
bgCyan: enabled ? formatter("\x1B[46m", "\x1B[49m") : String,
|
|
103
|
-
bgWhite: enabled ? formatter("\x1B[47m", "\x1B[49m") : String
|
|
104
|
-
});
|
|
105
113
|
module2.exports = createColors();
|
|
106
114
|
module2.exports.createColors = createColors;
|
|
107
115
|
}
|
|
@@ -948,7 +956,7 @@ async function readVersion(file, cwd) {
|
|
|
948
956
|
if ((0, import_semver2.valid)(manifest.version))
|
|
949
957
|
return manifest.version;
|
|
950
958
|
}
|
|
951
|
-
} catch (
|
|
959
|
+
} catch (e) {
|
|
952
960
|
return void 0;
|
|
953
961
|
}
|
|
954
962
|
}
|
|
@@ -1029,9 +1037,12 @@ function formatVersionString(template, newVersion) {
|
|
|
1029
1037
|
|
|
1030
1038
|
// src/normalize-options.ts
|
|
1031
1039
|
var import_node_process4 = __toESM(require("process"));
|
|
1040
|
+
var import_promises = __toESM(require("fs/promises"));
|
|
1041
|
+
var import_node_fs2 = __toESM(require("fs"));
|
|
1032
1042
|
var import_fast_glob = __toESM(require("fast-glob"));
|
|
1043
|
+
var import_js_yaml = __toESM(require("js-yaml"));
|
|
1033
1044
|
async function normalizeOptions(raw) {
|
|
1034
|
-
var _a;
|
|
1045
|
+
var _a, _b;
|
|
1035
1046
|
const preid = typeof raw.preid === "string" ? raw.preid : "beta";
|
|
1036
1047
|
const push = Boolean(raw.push);
|
|
1037
1048
|
const all = Boolean(raw.all);
|
|
@@ -1039,6 +1050,7 @@ async function normalizeOptions(raw) {
|
|
|
1039
1050
|
const cwd = raw.cwd || import_node_process4.default.cwd();
|
|
1040
1051
|
const ignoreScripts = Boolean(raw.ignoreScripts);
|
|
1041
1052
|
const execute = raw.execute;
|
|
1053
|
+
const recursive = Boolean(raw.recursive);
|
|
1042
1054
|
let release;
|
|
1043
1055
|
if (!raw.release || raw.release === "prompt")
|
|
1044
1056
|
release = { type: "prompt", preid };
|
|
@@ -1056,8 +1068,31 @@ async function normalizeOptions(raw) {
|
|
|
1056
1068
|
commit = { all, noVerify, message: raw.commit };
|
|
1057
1069
|
else if (raw.commit || tag || push)
|
|
1058
1070
|
commit = { all, noVerify, message: "chore: release v" };
|
|
1071
|
+
if (recursive && !((_a = raw.files) == null ? void 0 : _a.length)) {
|
|
1072
|
+
raw.files = [
|
|
1073
|
+
"package.json",
|
|
1074
|
+
"package-lock.json",
|
|
1075
|
+
"packages/**/package.json",
|
|
1076
|
+
"jsr.json",
|
|
1077
|
+
"jsr.jsonc",
|
|
1078
|
+
"deno.json",
|
|
1079
|
+
"deno.jsonc"
|
|
1080
|
+
];
|
|
1081
|
+
if (import_node_fs2.default.existsSync("pnpm-workspace.yaml")) {
|
|
1082
|
+
const pnpmWorkspace = await import_promises.default.readFile("pnpm-workspace.yaml", "utf8");
|
|
1083
|
+
const workspaces = import_js_yaml.default.load(pnpmWorkspace);
|
|
1084
|
+
const workspacesWithPackageJson = workspaces.packages.map((workspace) => `${workspace}/package.json`);
|
|
1085
|
+
const withoutExcludedWorkspaces = workspacesWithPackageJson.filter((workspace) => {
|
|
1086
|
+
var _a2;
|
|
1087
|
+
return !workspace.startsWith("!") && !((_a2 = raw.files) == null ? void 0 : _a2.includes(workspace));
|
|
1088
|
+
});
|
|
1089
|
+
raw.files = raw.files.concat(withoutExcludedWorkspaces);
|
|
1090
|
+
}
|
|
1091
|
+
} else {
|
|
1092
|
+
raw.files = ((_b = raw.files) == null ? void 0 : _b.length) ? raw.files : ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc", "deno.json", "deno.jsonc"];
|
|
1093
|
+
}
|
|
1059
1094
|
const files = await (0, import_fast_glob.default)(
|
|
1060
|
-
|
|
1095
|
+
raw.files,
|
|
1061
1096
|
{
|
|
1062
1097
|
cwd,
|
|
1063
1098
|
onlyFiles: true,
|
|
@@ -1072,7 +1107,7 @@ async function normalizeOptions(raw) {
|
|
|
1072
1107
|
} else if (raw.interface === true || !raw.interface) {
|
|
1073
1108
|
ui = { input: import_node_process4.default.stdin, output: import_node_process4.default.stdout };
|
|
1074
1109
|
} else {
|
|
1075
|
-
let
|
|
1110
|
+
let _c = raw.interface, { input, output } = _c, other = __objRest(_c, ["input", "output"]);
|
|
1076
1111
|
if (input === true || input !== false && !input)
|
|
1077
1112
|
input = import_node_process4.default.stdin;
|
|
1078
1113
|
if (output === true || output !== false && !output)
|
|
@@ -1208,6 +1243,7 @@ async function updateFile(relPath, operation) {
|
|
|
1208
1243
|
case "bower.json":
|
|
1209
1244
|
case "component.json":
|
|
1210
1245
|
case "jsr.json":
|
|
1246
|
+
case "deno.json":
|
|
1211
1247
|
return updateManifestFile(relPath, operation);
|
|
1212
1248
|
default:
|
|
1213
1249
|
return updateTextFile(relPath, operation);
|
|
@@ -1256,8 +1292,9 @@ async function versionBump(arg = {}) {
|
|
|
1256
1292
|
type: "confirm",
|
|
1257
1293
|
message: "Bump?",
|
|
1258
1294
|
initial: true
|
|
1259
|
-
}).then((r) => r.yes))
|
|
1295
|
+
}).then((r) => r.yes)) {
|
|
1260
1296
|
import_node_process5.default.exit(1);
|
|
1297
|
+
}
|
|
1261
1298
|
}
|
|
1262
1299
|
await runNpmScript("preversion" /* PreVersion */, operation);
|
|
1263
1300
|
await updateFiles(operation);
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bumpp",
|
|
3
|
-
"version": "9.4.
|
|
4
|
-
"packageManager": "pnpm@
|
|
3
|
+
"version": "9.4.2",
|
|
4
|
+
"packageManager": "pnpm@9.6.0",
|
|
5
5
|
"description": "Bump version, commit changes, tag, and push to Git",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "James Messinger",
|
|
@@ -60,30 +60,30 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@jsdevtools/ez-spawn": "^3.0.4",
|
|
63
|
-
"c12": "^1.
|
|
63
|
+
"c12": "^1.11.1",
|
|
64
64
|
"cac": "^6.7.14",
|
|
65
65
|
"escalade": "^3.1.2",
|
|
66
66
|
"fast-glob": "^3.3.2",
|
|
67
67
|
"js-yaml": "^4.1.0",
|
|
68
68
|
"prompts": "^2.4.2",
|
|
69
|
-
"semver": "^7.6.
|
|
69
|
+
"semver": "^7.6.3"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@antfu/eslint-config": "^2.
|
|
72
|
+
"@antfu/eslint-config": "^2.24.1",
|
|
73
73
|
"@types/js-yaml": "^4.0.9",
|
|
74
|
-
"@types/node": "^
|
|
74
|
+
"@types/node": "^22.0.2",
|
|
75
75
|
"@types/prompts": "^2.4.9",
|
|
76
76
|
"@types/semver": "^7.5.8",
|
|
77
77
|
"detect-indent": "^7.0.1",
|
|
78
78
|
"detect-newline": "^4.0.1",
|
|
79
|
-
"eslint": "^8.
|
|
79
|
+
"eslint": "^9.8.0",
|
|
80
80
|
"esno": "^4.7.0",
|
|
81
81
|
"log-symbols": "^6.0.0",
|
|
82
82
|
"npm-check": "^6.0.1",
|
|
83
|
-
"picocolors": "^1.0.
|
|
84
|
-
"rimraf": "^
|
|
85
|
-
"tsup": "^8.
|
|
86
|
-
"typescript": "^5.
|
|
87
|
-
"vitest": "^
|
|
83
|
+
"picocolors": "^1.0.1",
|
|
84
|
+
"rimraf": "^6.0.1",
|
|
85
|
+
"tsup": "^8.2.3",
|
|
86
|
+
"typescript": "^5.5.4",
|
|
87
|
+
"vitest": "^2.0.5"
|
|
88
88
|
}
|
|
89
89
|
}
|