bumpp 9.8.1 → 9.9.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/{chunk-UNJYHD4B.mjs → chunk-SDGX7IFY.mjs} +153 -554
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +184 -587
- package/dist/cli/index.mjs +13 -13
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +148 -553
- package/dist/index.mjs +1 -1
- package/package.json +10 -10
|
@@ -37,6 +37,10 @@ var __objRest = (source, exclude) => {
|
|
|
37
37
|
var __commonJS = (cb, mod) => function __require() {
|
|
38
38
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
39
39
|
};
|
|
40
|
+
var __export = (target, all) => {
|
|
41
|
+
for (var name in all)
|
|
42
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
43
|
+
};
|
|
40
44
|
var __copyProps = (to, from, except, desc) => {
|
|
41
45
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
42
46
|
for (let key of __getOwnPropNames(from))
|
|
@@ -59,8 +63,8 @@ var require_picocolors = __commonJS({
|
|
|
59
63
|
"node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
|
|
60
64
|
var p = process || {};
|
|
61
65
|
var argv = p.argv || [];
|
|
62
|
-
var
|
|
63
|
-
var isColorSupported = !(!!
|
|
66
|
+
var env = p.env || {};
|
|
67
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
64
68
|
var formatter = (open, close, replace = open) => (input) => {
|
|
65
69
|
let string = "" + input, index = string.indexOf(close, open.length);
|
|
66
70
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
@@ -126,517 +130,101 @@ var require_picocolors = __commonJS({
|
|
|
126
130
|
}
|
|
127
131
|
});
|
|
128
132
|
|
|
129
|
-
// node_modules/.pnpm/
|
|
130
|
-
var
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
// 21 isn't widely supported and 22 does the same thing
|
|
138
|
-
bold: [1, 22],
|
|
139
|
-
dim: [2, 22],
|
|
140
|
-
italic: [3, 23],
|
|
141
|
-
underline: [4, 24],
|
|
142
|
-
overline: [53, 55],
|
|
143
|
-
inverse: [7, 27],
|
|
144
|
-
hidden: [8, 28],
|
|
145
|
-
strikethrough: [9, 29]
|
|
146
|
-
},
|
|
147
|
-
color: {
|
|
148
|
-
black: [30, 39],
|
|
149
|
-
red: [31, 39],
|
|
150
|
-
green: [32, 39],
|
|
151
|
-
yellow: [33, 39],
|
|
152
|
-
blue: [34, 39],
|
|
153
|
-
magenta: [35, 39],
|
|
154
|
-
cyan: [36, 39],
|
|
155
|
-
white: [37, 39],
|
|
156
|
-
// Bright color
|
|
157
|
-
blackBright: [90, 39],
|
|
158
|
-
gray: [90, 39],
|
|
159
|
-
// Alias of `blackBright`
|
|
160
|
-
grey: [90, 39],
|
|
161
|
-
// Alias of `blackBright`
|
|
162
|
-
redBright: [91, 39],
|
|
163
|
-
greenBright: [92, 39],
|
|
164
|
-
yellowBright: [93, 39],
|
|
165
|
-
blueBright: [94, 39],
|
|
166
|
-
magentaBright: [95, 39],
|
|
167
|
-
cyanBright: [96, 39],
|
|
168
|
-
whiteBright: [97, 39]
|
|
169
|
-
},
|
|
170
|
-
bgColor: {
|
|
171
|
-
bgBlack: [40, 49],
|
|
172
|
-
bgRed: [41, 49],
|
|
173
|
-
bgGreen: [42, 49],
|
|
174
|
-
bgYellow: [43, 49],
|
|
175
|
-
bgBlue: [44, 49],
|
|
176
|
-
bgMagenta: [45, 49],
|
|
177
|
-
bgCyan: [46, 49],
|
|
178
|
-
bgWhite: [47, 49],
|
|
179
|
-
// Bright color
|
|
180
|
-
bgBlackBright: [100, 49],
|
|
181
|
-
bgGray: [100, 49],
|
|
182
|
-
// Alias of `bgBlackBright`
|
|
183
|
-
bgGrey: [100, 49],
|
|
184
|
-
// Alias of `bgBlackBright`
|
|
185
|
-
bgRedBright: [101, 49],
|
|
186
|
-
bgGreenBright: [102, 49],
|
|
187
|
-
bgYellowBright: [103, 49],
|
|
188
|
-
bgBlueBright: [104, 49],
|
|
189
|
-
bgMagentaBright: [105, 49],
|
|
190
|
-
bgCyanBright: [106, 49],
|
|
191
|
-
bgWhiteBright: [107, 49]
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
var modifierNames = Object.keys(styles.modifier);
|
|
195
|
-
var foregroundColorNames = Object.keys(styles.color);
|
|
196
|
-
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
197
|
-
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
198
|
-
function assembleStyles() {
|
|
199
|
-
const codes = /* @__PURE__ */ new Map();
|
|
200
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
201
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
202
|
-
styles[styleName] = {
|
|
203
|
-
open: `\x1B[${style[0]}m`,
|
|
204
|
-
close: `\x1B[${style[1]}m`
|
|
205
|
-
};
|
|
206
|
-
group[styleName] = styles[styleName];
|
|
207
|
-
codes.set(style[0], style[1]);
|
|
208
|
-
}
|
|
209
|
-
Object.defineProperty(styles, groupName, {
|
|
210
|
-
value: group,
|
|
211
|
-
enumerable: false
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
Object.defineProperty(styles, "codes", {
|
|
215
|
-
value: codes,
|
|
216
|
-
enumerable: false
|
|
217
|
-
});
|
|
218
|
-
styles.color.close = "\x1B[39m";
|
|
219
|
-
styles.bgColor.close = "\x1B[49m";
|
|
220
|
-
styles.color.ansi = wrapAnsi16();
|
|
221
|
-
styles.color.ansi256 = wrapAnsi256();
|
|
222
|
-
styles.color.ansi16m = wrapAnsi16m();
|
|
223
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
224
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
225
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
226
|
-
Object.defineProperties(styles, {
|
|
227
|
-
rgbToAnsi256: {
|
|
228
|
-
value(red, green, blue) {
|
|
229
|
-
if (red === green && green === blue) {
|
|
230
|
-
if (red < 8) {
|
|
231
|
-
return 16;
|
|
232
|
-
}
|
|
233
|
-
if (red > 248) {
|
|
234
|
-
return 231;
|
|
235
|
-
}
|
|
236
|
-
return Math.round((red - 8) / 247 * 24) + 232;
|
|
237
|
-
}
|
|
238
|
-
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
239
|
-
},
|
|
240
|
-
enumerable: false
|
|
241
|
-
},
|
|
242
|
-
hexToRgb: {
|
|
243
|
-
value(hex) {
|
|
244
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
245
|
-
if (!matches) {
|
|
246
|
-
return [0, 0, 0];
|
|
247
|
-
}
|
|
248
|
-
let [colorString] = matches;
|
|
249
|
-
if (colorString.length === 3) {
|
|
250
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
251
|
-
}
|
|
252
|
-
const integer = Number.parseInt(colorString, 16);
|
|
253
|
-
return [
|
|
254
|
-
/* eslint-disable no-bitwise */
|
|
255
|
-
integer >> 16 & 255,
|
|
256
|
-
integer >> 8 & 255,
|
|
257
|
-
integer & 255
|
|
258
|
-
/* eslint-enable no-bitwise */
|
|
259
|
-
];
|
|
260
|
-
},
|
|
261
|
-
enumerable: false
|
|
262
|
-
},
|
|
263
|
-
hexToAnsi256: {
|
|
264
|
-
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
265
|
-
enumerable: false
|
|
266
|
-
},
|
|
267
|
-
ansi256ToAnsi: {
|
|
268
|
-
value(code) {
|
|
269
|
-
if (code < 8) {
|
|
270
|
-
return 30 + code;
|
|
271
|
-
}
|
|
272
|
-
if (code < 16) {
|
|
273
|
-
return 90 + (code - 8);
|
|
274
|
-
}
|
|
275
|
-
let red;
|
|
276
|
-
let green;
|
|
277
|
-
let blue;
|
|
278
|
-
if (code >= 232) {
|
|
279
|
-
red = ((code - 232) * 10 + 8) / 255;
|
|
280
|
-
green = red;
|
|
281
|
-
blue = red;
|
|
282
|
-
} else {
|
|
283
|
-
code -= 16;
|
|
284
|
-
const remainder = code % 36;
|
|
285
|
-
red = Math.floor(code / 36) / 5;
|
|
286
|
-
green = Math.floor(remainder / 6) / 5;
|
|
287
|
-
blue = remainder % 6 / 5;
|
|
288
|
-
}
|
|
289
|
-
const value = Math.max(red, green, blue) * 2;
|
|
290
|
-
if (value === 0) {
|
|
291
|
-
return 30;
|
|
292
|
-
}
|
|
293
|
-
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
294
|
-
if (value === 2) {
|
|
295
|
-
result += 60;
|
|
296
|
-
}
|
|
297
|
-
return result;
|
|
298
|
-
},
|
|
299
|
-
enumerable: false
|
|
300
|
-
},
|
|
301
|
-
rgbToAnsi: {
|
|
302
|
-
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
303
|
-
enumerable: false
|
|
304
|
-
},
|
|
305
|
-
hexToAnsi: {
|
|
306
|
-
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
307
|
-
enumerable: false
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
return styles;
|
|
311
|
-
}
|
|
312
|
-
var ansiStyles = assembleStyles();
|
|
313
|
-
var ansi_styles_default = ansiStyles;
|
|
133
|
+
// node_modules/.pnpm/log-symbols@7.0.0/node_modules/log-symbols/symbols.js
|
|
134
|
+
var symbols_exports = {};
|
|
135
|
+
__export(symbols_exports, {
|
|
136
|
+
error: () => error,
|
|
137
|
+
info: () => info,
|
|
138
|
+
success: () => success,
|
|
139
|
+
warning: () => warning
|
|
140
|
+
});
|
|
314
141
|
|
|
315
|
-
// node_modules/.pnpm/
|
|
316
|
-
import process2 from "node:process";
|
|
317
|
-
import os from "node:os";
|
|
142
|
+
// node_modules/.pnpm/yoctocolors@2.1.1/node_modules/yoctocolors/base.js
|
|
318
143
|
import tty from "node:tty";
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
function envForceColor() {
|
|
333
|
-
if ("FORCE_COLOR" in env) {
|
|
334
|
-
if (env.FORCE_COLOR === "true") {
|
|
335
|
-
return 1;
|
|
144
|
+
var _a, _b, _c, _d, _e;
|
|
145
|
+
var hasColors = (_e = (_d = (_c = (_b = (_a = tty) == null ? void 0 : _a.WriteStream) == null ? void 0 : _b.prototype) == null ? void 0 : _c.hasColors) == null ? void 0 : _d.call(_c)) != null ? _e : false;
|
|
146
|
+
var format = (open, close) => {
|
|
147
|
+
if (!hasColors) {
|
|
148
|
+
return (input) => input;
|
|
149
|
+
}
|
|
150
|
+
const openCode = `\x1B[${open}m`;
|
|
151
|
+
const closeCode = `\x1B[${close}m`;
|
|
152
|
+
return (input) => {
|
|
153
|
+
const string = input + "";
|
|
154
|
+
let index = string.indexOf(closeCode);
|
|
155
|
+
if (index === -1) {
|
|
156
|
+
return openCode + string + closeCode;
|
|
336
157
|
}
|
|
337
|
-
|
|
338
|
-
|
|
158
|
+
let result = openCode;
|
|
159
|
+
let lastIndex = 0;
|
|
160
|
+
while (index !== -1) {
|
|
161
|
+
result += string.slice(lastIndex, index) + openCode;
|
|
162
|
+
lastIndex = index + closeCode.length;
|
|
163
|
+
index = string.indexOf(closeCode, lastIndex);
|
|
339
164
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
function translateLevel(level) {
|
|
344
|
-
if (level === 0) {
|
|
345
|
-
return false;
|
|
346
|
-
}
|
|
347
|
-
return {
|
|
348
|
-
level,
|
|
349
|
-
hasBasic: true,
|
|
350
|
-
has256: level >= 2,
|
|
351
|
-
has16m: level >= 3
|
|
165
|
+
result += string.slice(lastIndex) + closeCode;
|
|
166
|
+
return result;
|
|
352
167
|
};
|
|
353
|
-
}
|
|
354
|
-
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
355
|
-
const noFlagForceColor = envForceColor();
|
|
356
|
-
if (noFlagForceColor !== void 0) {
|
|
357
|
-
flagForceColor = noFlagForceColor;
|
|
358
|
-
}
|
|
359
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
360
|
-
if (forceColor === 0) {
|
|
361
|
-
return 0;
|
|
362
|
-
}
|
|
363
|
-
if (sniffFlags) {
|
|
364
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
365
|
-
return 3;
|
|
366
|
-
}
|
|
367
|
-
if (hasFlag("color=256")) {
|
|
368
|
-
return 2;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
372
|
-
return 1;
|
|
373
|
-
}
|
|
374
|
-
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
375
|
-
return 0;
|
|
376
|
-
}
|
|
377
|
-
const min = forceColor || 0;
|
|
378
|
-
if (env.TERM === "dumb") {
|
|
379
|
-
return min;
|
|
380
|
-
}
|
|
381
|
-
if (process2.platform === "win32") {
|
|
382
|
-
const osRelease = os.release().split(".");
|
|
383
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
384
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
385
|
-
}
|
|
386
|
-
return 1;
|
|
387
|
-
}
|
|
388
|
-
if ("CI" in env) {
|
|
389
|
-
if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) {
|
|
390
|
-
return 3;
|
|
391
|
-
}
|
|
392
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
393
|
-
return 1;
|
|
394
|
-
}
|
|
395
|
-
return min;
|
|
396
|
-
}
|
|
397
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
398
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
399
|
-
}
|
|
400
|
-
if (env.COLORTERM === "truecolor") {
|
|
401
|
-
return 3;
|
|
402
|
-
}
|
|
403
|
-
if (env.TERM === "xterm-kitty") {
|
|
404
|
-
return 3;
|
|
405
|
-
}
|
|
406
|
-
if ("TERM_PROGRAM" in env) {
|
|
407
|
-
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
408
|
-
switch (env.TERM_PROGRAM) {
|
|
409
|
-
case "iTerm.app": {
|
|
410
|
-
return version >= 3 ? 3 : 2;
|
|
411
|
-
}
|
|
412
|
-
case "Apple_Terminal": {
|
|
413
|
-
return 2;
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
418
|
-
return 2;
|
|
419
|
-
}
|
|
420
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
421
|
-
return 1;
|
|
422
|
-
}
|
|
423
|
-
if ("COLORTERM" in env) {
|
|
424
|
-
return 1;
|
|
425
|
-
}
|
|
426
|
-
return min;
|
|
427
|
-
}
|
|
428
|
-
function createSupportsColor(stream, options = {}) {
|
|
429
|
-
const level = _supportsColor(stream, __spreadValues({
|
|
430
|
-
streamIsTTY: stream && stream.isTTY
|
|
431
|
-
}, options));
|
|
432
|
-
return translateLevel(level);
|
|
433
|
-
}
|
|
434
|
-
var supportsColor = {
|
|
435
|
-
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
436
|
-
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
437
168
|
};
|
|
438
|
-
var
|
|
169
|
+
var reset = format(0, 0);
|
|
170
|
+
var bold = format(1, 22);
|
|
171
|
+
var dim = format(2, 22);
|
|
172
|
+
var italic = format(3, 23);
|
|
173
|
+
var underline = format(4, 24);
|
|
174
|
+
var overline = format(53, 55);
|
|
175
|
+
var inverse = format(7, 27);
|
|
176
|
+
var hidden = format(8, 28);
|
|
177
|
+
var strikethrough = format(9, 29);
|
|
178
|
+
var black = format(30, 39);
|
|
179
|
+
var red = format(31, 39);
|
|
180
|
+
var green = format(32, 39);
|
|
181
|
+
var yellow = format(33, 39);
|
|
182
|
+
var blue = format(34, 39);
|
|
183
|
+
var magenta = format(35, 39);
|
|
184
|
+
var cyan = format(36, 39);
|
|
185
|
+
var white = format(37, 39);
|
|
186
|
+
var gray = format(90, 39);
|
|
187
|
+
var bgBlack = format(40, 49);
|
|
188
|
+
var bgRed = format(41, 49);
|
|
189
|
+
var bgGreen = format(42, 49);
|
|
190
|
+
var bgYellow = format(43, 49);
|
|
191
|
+
var bgBlue = format(44, 49);
|
|
192
|
+
var bgMagenta = format(45, 49);
|
|
193
|
+
var bgCyan = format(46, 49);
|
|
194
|
+
var bgWhite = format(47, 49);
|
|
195
|
+
var bgGray = format(100, 49);
|
|
196
|
+
var redBright = format(91, 39);
|
|
197
|
+
var greenBright = format(92, 39);
|
|
198
|
+
var yellowBright = format(93, 39);
|
|
199
|
+
var blueBright = format(94, 39);
|
|
200
|
+
var magentaBright = format(95, 39);
|
|
201
|
+
var cyanBright = format(96, 39);
|
|
202
|
+
var whiteBright = format(97, 39);
|
|
203
|
+
var bgRedBright = format(101, 49);
|
|
204
|
+
var bgGreenBright = format(102, 49);
|
|
205
|
+
var bgYellowBright = format(103, 49);
|
|
206
|
+
var bgBlueBright = format(104, 49);
|
|
207
|
+
var bgMagentaBright = format(105, 49);
|
|
208
|
+
var bgCyanBright = format(106, 49);
|
|
209
|
+
var bgWhiteBright = format(107, 49);
|
|
439
210
|
|
|
440
|
-
// node_modules/.pnpm/
|
|
441
|
-
|
|
442
|
-
let index = string.indexOf(substring);
|
|
443
|
-
if (index === -1) {
|
|
444
|
-
return string;
|
|
445
|
-
}
|
|
446
|
-
const substringLength = substring.length;
|
|
447
|
-
let endIndex = 0;
|
|
448
|
-
let returnValue = "";
|
|
449
|
-
do {
|
|
450
|
-
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
451
|
-
endIndex = index + substringLength;
|
|
452
|
-
index = string.indexOf(substring, endIndex);
|
|
453
|
-
} while (index !== -1);
|
|
454
|
-
returnValue += string.slice(endIndex);
|
|
455
|
-
return returnValue;
|
|
456
|
-
}
|
|
457
|
-
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
458
|
-
let endIndex = 0;
|
|
459
|
-
let returnValue = "";
|
|
460
|
-
do {
|
|
461
|
-
const gotCR = string[index - 1] === "\r";
|
|
462
|
-
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
463
|
-
endIndex = index + 1;
|
|
464
|
-
index = string.indexOf("\n", endIndex);
|
|
465
|
-
} while (index !== -1);
|
|
466
|
-
returnValue += string.slice(endIndex);
|
|
467
|
-
return returnValue;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
|
|
471
|
-
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
472
|
-
var GENERATOR = Symbol("GENERATOR");
|
|
473
|
-
var STYLER = Symbol("STYLER");
|
|
474
|
-
var IS_EMPTY = Symbol("IS_EMPTY");
|
|
475
|
-
var levelMapping = [
|
|
476
|
-
"ansi",
|
|
477
|
-
"ansi",
|
|
478
|
-
"ansi256",
|
|
479
|
-
"ansi16m"
|
|
480
|
-
];
|
|
481
|
-
var styles2 = /* @__PURE__ */ Object.create(null);
|
|
482
|
-
var applyOptions = (object, options = {}) => {
|
|
483
|
-
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
484
|
-
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
485
|
-
}
|
|
486
|
-
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
487
|
-
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
488
|
-
};
|
|
489
|
-
var chalkFactory = (options) => {
|
|
490
|
-
const chalk2 = (...strings) => strings.join(" ");
|
|
491
|
-
applyOptions(chalk2, options);
|
|
492
|
-
Object.setPrototypeOf(chalk2, createChalk.prototype);
|
|
493
|
-
return chalk2;
|
|
494
|
-
};
|
|
495
|
-
function createChalk(options) {
|
|
496
|
-
return chalkFactory(options);
|
|
497
|
-
}
|
|
498
|
-
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
499
|
-
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
500
|
-
styles2[styleName] = {
|
|
501
|
-
get() {
|
|
502
|
-
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
503
|
-
Object.defineProperty(this, styleName, { value: builder });
|
|
504
|
-
return builder;
|
|
505
|
-
}
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
styles2.visible = {
|
|
509
|
-
get() {
|
|
510
|
-
const builder = createBuilder(this, this[STYLER], true);
|
|
511
|
-
Object.defineProperty(this, "visible", { value: builder });
|
|
512
|
-
return builder;
|
|
513
|
-
}
|
|
514
|
-
};
|
|
515
|
-
var getModelAnsi = (model, level, type, ...arguments_) => {
|
|
516
|
-
if (model === "rgb") {
|
|
517
|
-
if (level === "ansi16m") {
|
|
518
|
-
return ansi_styles_default[type].ansi16m(...arguments_);
|
|
519
|
-
}
|
|
520
|
-
if (level === "ansi256") {
|
|
521
|
-
return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
522
|
-
}
|
|
523
|
-
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
524
|
-
}
|
|
525
|
-
if (model === "hex") {
|
|
526
|
-
return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
527
|
-
}
|
|
528
|
-
return ansi_styles_default[type][model](...arguments_);
|
|
529
|
-
};
|
|
530
|
-
var usedModels = ["rgb", "hex", "ansi256"];
|
|
531
|
-
for (const model of usedModels) {
|
|
532
|
-
styles2[model] = {
|
|
533
|
-
get() {
|
|
534
|
-
const { level } = this;
|
|
535
|
-
return function(...arguments_) {
|
|
536
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
537
|
-
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
538
|
-
};
|
|
539
|
-
}
|
|
540
|
-
};
|
|
541
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
542
|
-
styles2[bgModel] = {
|
|
543
|
-
get() {
|
|
544
|
-
const { level } = this;
|
|
545
|
-
return function(...arguments_) {
|
|
546
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
547
|
-
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
548
|
-
};
|
|
549
|
-
}
|
|
550
|
-
};
|
|
551
|
-
}
|
|
552
|
-
var proto = Object.defineProperties(() => {
|
|
553
|
-
}, __spreadProps(__spreadValues({}, styles2), {
|
|
554
|
-
level: {
|
|
555
|
-
enumerable: true,
|
|
556
|
-
get() {
|
|
557
|
-
return this[GENERATOR].level;
|
|
558
|
-
},
|
|
559
|
-
set(level) {
|
|
560
|
-
this[GENERATOR].level = level;
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
}));
|
|
564
|
-
var createStyler = (open, close, parent) => {
|
|
565
|
-
let openAll;
|
|
566
|
-
let closeAll;
|
|
567
|
-
if (parent === void 0) {
|
|
568
|
-
openAll = open;
|
|
569
|
-
closeAll = close;
|
|
570
|
-
} else {
|
|
571
|
-
openAll = parent.openAll + open;
|
|
572
|
-
closeAll = close + parent.closeAll;
|
|
573
|
-
}
|
|
574
|
-
return {
|
|
575
|
-
open,
|
|
576
|
-
close,
|
|
577
|
-
openAll,
|
|
578
|
-
closeAll,
|
|
579
|
-
parent
|
|
580
|
-
};
|
|
581
|
-
};
|
|
582
|
-
var createBuilder = (self, _styler, _isEmpty) => {
|
|
583
|
-
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
584
|
-
Object.setPrototypeOf(builder, proto);
|
|
585
|
-
builder[GENERATOR] = self;
|
|
586
|
-
builder[STYLER] = _styler;
|
|
587
|
-
builder[IS_EMPTY] = _isEmpty;
|
|
588
|
-
return builder;
|
|
589
|
-
};
|
|
590
|
-
var applyStyle = (self, string) => {
|
|
591
|
-
if (self.level <= 0 || !string) {
|
|
592
|
-
return self[IS_EMPTY] ? "" : string;
|
|
593
|
-
}
|
|
594
|
-
let styler = self[STYLER];
|
|
595
|
-
if (styler === void 0) {
|
|
596
|
-
return string;
|
|
597
|
-
}
|
|
598
|
-
const { openAll, closeAll } = styler;
|
|
599
|
-
if (string.includes("\x1B")) {
|
|
600
|
-
while (styler !== void 0) {
|
|
601
|
-
string = stringReplaceAll(string, styler.close, styler.open);
|
|
602
|
-
styler = styler.parent;
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
const lfIndex = string.indexOf("\n");
|
|
606
|
-
if (lfIndex !== -1) {
|
|
607
|
-
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
608
|
-
}
|
|
609
|
-
return openAll + string + closeAll;
|
|
610
|
-
};
|
|
611
|
-
Object.defineProperties(createChalk.prototype, styles2);
|
|
612
|
-
var chalk = createChalk();
|
|
613
|
-
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
614
|
-
var source_default = chalk;
|
|
615
|
-
|
|
616
|
-
// node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js
|
|
617
|
-
import process3 from "node:process";
|
|
211
|
+
// node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
212
|
+
import process2 from "node:process";
|
|
618
213
|
function isUnicodeSupported() {
|
|
619
|
-
|
|
620
|
-
|
|
214
|
+
const { env } = process2;
|
|
215
|
+
const { TERM, TERM_PROGRAM } = env;
|
|
216
|
+
if (process2.platform !== "win32") {
|
|
217
|
+
return TERM !== "linux";
|
|
621
218
|
}
|
|
622
|
-
return Boolean(
|
|
219
|
+
return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
623
220
|
}
|
|
624
221
|
|
|
625
|
-
// node_modules/.pnpm/log-symbols@
|
|
626
|
-
var
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
};
|
|
632
|
-
var fallback = {
|
|
633
|
-
info: source_default.blue("i"),
|
|
634
|
-
success: source_default.green("\u221A"),
|
|
635
|
-
warning: source_default.yellow("\u203C"),
|
|
636
|
-
error: source_default.red("\xD7")
|
|
637
|
-
};
|
|
638
|
-
var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
639
|
-
var log_symbols_default = logSymbols;
|
|
222
|
+
// node_modules/.pnpm/log-symbols@7.0.0/node_modules/log-symbols/symbols.js
|
|
223
|
+
var _isUnicodeSupported = isUnicodeSupported();
|
|
224
|
+
var info = blue(_isUnicodeSupported ? "\u2139" : "i");
|
|
225
|
+
var success = green(_isUnicodeSupported ? "\u2714" : "\u221A");
|
|
226
|
+
var warning = yellow(_isUnicodeSupported ? "\u26A0" : "\u203C");
|
|
227
|
+
var error = red(_isUnicodeSupported ? "\u2716\uFE0F" : "\xD7");
|
|
640
228
|
|
|
641
229
|
// src/release-type.ts
|
|
642
230
|
var prereleaseTypes = ["premajor", "preminor", "prepatch", "prerelease"];
|
|
@@ -666,10 +254,10 @@ var NpmScript = /* @__PURE__ */ ((NpmScript2) => {
|
|
|
666
254
|
})(NpmScript || {});
|
|
667
255
|
|
|
668
256
|
// src/version-bump.ts
|
|
669
|
-
import
|
|
670
|
-
import * as ezSpawn4 from "@jsdevtools/ez-spawn";
|
|
257
|
+
import process5 from "node:process";
|
|
671
258
|
var import_picocolors3 = __toESM(require_picocolors());
|
|
672
259
|
import prompts2 from "prompts";
|
|
260
|
+
import { x as x4 } from "tinyexec";
|
|
673
261
|
|
|
674
262
|
// src/get-current-version.ts
|
|
675
263
|
import { valid as isValidVersion } from "semver";
|
|
@@ -723,8 +311,8 @@ function isManifest(obj) {
|
|
|
723
311
|
return obj && typeof obj === "object" && isOptionalString(obj.name) && isOptionalString(obj.version) && isOptionalString(obj.description);
|
|
724
312
|
}
|
|
725
313
|
function isPackageLockManifest(manifest) {
|
|
726
|
-
var
|
|
727
|
-
return typeof ((
|
|
314
|
+
var _a2, _b2;
|
|
315
|
+
return typeof ((_b2 = (_a2 = manifest.packages) == null ? void 0 : _a2[""]) == null ? void 0 : _b2.version) === "string";
|
|
728
316
|
}
|
|
729
317
|
function isOptionalString(value) {
|
|
730
318
|
const type = typeof value;
|
|
@@ -770,13 +358,13 @@ async function readVersion(file, cwd) {
|
|
|
770
358
|
|
|
771
359
|
// src/get-new-version.ts
|
|
772
360
|
var import_picocolors2 = __toESM(require_picocolors());
|
|
773
|
-
import
|
|
361
|
+
import process3 from "node:process";
|
|
774
362
|
import prompts from "prompts";
|
|
775
363
|
import semver, { clean as cleanVersion, valid as isValidVersion2, SemVer } from "semver";
|
|
776
364
|
|
|
777
365
|
// src/print-commits.ts
|
|
778
366
|
var import_picocolors = __toESM(require_picocolors());
|
|
779
|
-
import
|
|
367
|
+
import { x } from "tinyexec";
|
|
780
368
|
var messageColorMap = {
|
|
781
369
|
chore: import_picocolors.default.gray,
|
|
782
370
|
fix: import_picocolors.default.yellow,
|
|
@@ -795,20 +383,21 @@ function parseCommits(raw) {
|
|
|
795
383
|
return lines.map((line) => {
|
|
796
384
|
const [hash, ...parts] = line.split(" ");
|
|
797
385
|
const message = parts.join(" ");
|
|
798
|
-
const match = message.match(/^(\w+)(!)?(\([^)]+\))?:(.*)$/);
|
|
386
|
+
const match = message.match(/^(\w+)(!)?(\([^)]+\))?(!)?:(.*)$/);
|
|
799
387
|
if (match) {
|
|
800
388
|
let color = messageColorMap[match[1].toLowerCase()] || ((c4) => c4);
|
|
801
|
-
|
|
389
|
+
const breaking = match[2] === "!" || match[4] === "!";
|
|
390
|
+
if (breaking) {
|
|
802
391
|
color = (s) => import_picocolors.default.inverse(import_picocolors.default.red(s));
|
|
803
392
|
}
|
|
804
|
-
const tag = [match[1], match[2]].filter(Boolean).join("");
|
|
393
|
+
const tag = [match[1], match[2], match[4]].filter(Boolean).join("");
|
|
805
394
|
const scope = match[3] || "";
|
|
806
395
|
return {
|
|
807
396
|
hash,
|
|
808
397
|
tag,
|
|
809
|
-
message: match[
|
|
398
|
+
message: match[5].trim(),
|
|
810
399
|
scope,
|
|
811
|
-
breaking
|
|
400
|
+
breaking,
|
|
812
401
|
color
|
|
813
402
|
};
|
|
814
403
|
}
|
|
@@ -843,23 +432,23 @@ function formatParsedCommits(commits) {
|
|
|
843
432
|
}
|
|
844
433
|
async function printRecentCommits(operation) {
|
|
845
434
|
let sha;
|
|
846
|
-
sha || (sha = await
|
|
435
|
+
sha || (sha = await x(
|
|
847
436
|
"git",
|
|
848
437
|
["rev-list", "-n", "1", `v${operation.state.currentVersion}`],
|
|
849
|
-
{ stdio: "pipe" }
|
|
850
|
-
).then((res) => res.stdout.trim())
|
|
851
|
-
sha || (sha = await
|
|
438
|
+
{ nodeOptions: { stdio: "pipe" }, throwOnError: false }
|
|
439
|
+
).then((res) => res.stdout.trim()));
|
|
440
|
+
sha || (sha = await x(
|
|
852
441
|
"git",
|
|
853
442
|
["rev-list", "-n", "1", operation.state.currentVersion],
|
|
854
|
-
{ stdio: "pipe" }
|
|
855
|
-
).then((res) => res.stdout.trim())
|
|
443
|
+
{ nodeOptions: { stdio: "pipe" }, throwOnError: false }
|
|
444
|
+
).then((res) => res.stdout.trim()));
|
|
856
445
|
if (!sha) {
|
|
857
446
|
console.log(
|
|
858
447
|
import_picocolors.default.blue(`i`) + import_picocolors.default.gray(` Failed to locate the previous tag ${import_picocolors.default.yellow(`v${operation.state.currentVersion}`)}`)
|
|
859
448
|
);
|
|
860
449
|
return;
|
|
861
450
|
}
|
|
862
|
-
const { stdout } = await
|
|
451
|
+
const { stdout } = await x(
|
|
863
452
|
"git",
|
|
864
453
|
[
|
|
865
454
|
"--no-pager",
|
|
@@ -867,7 +456,11 @@ async function printRecentCommits(operation) {
|
|
|
867
456
|
`${sha}..HEAD`,
|
|
868
457
|
"--oneline"
|
|
869
458
|
],
|
|
870
|
-
{
|
|
459
|
+
{
|
|
460
|
+
nodeOptions: {
|
|
461
|
+
stdio: "pipe"
|
|
462
|
+
}
|
|
463
|
+
}
|
|
871
464
|
);
|
|
872
465
|
const parsed = parseCommits(stdout.toString().trim());
|
|
873
466
|
const prettified = formatParsedCommits(parsed);
|
|
@@ -926,11 +519,11 @@ function getNextVersions(currentVersion, preid) {
|
|
|
926
519
|
return next;
|
|
927
520
|
}
|
|
928
521
|
async function promptForNewVersion(operation) {
|
|
929
|
-
var
|
|
522
|
+
var _a2, _b2;
|
|
930
523
|
const { currentVersion } = operation.state;
|
|
931
524
|
const release = operation.options.release;
|
|
932
525
|
const next = getNextVersions(currentVersion, release.preid);
|
|
933
|
-
const configCustomVersion = await ((
|
|
526
|
+
const configCustomVersion = await ((_b2 = (_a2 = operation.options).customVersion) == null ? void 0 : _b2.call(_a2, currentVersion, semver));
|
|
934
527
|
if (operation.options.printCommits) {
|
|
935
528
|
await printRecentCommits(operation);
|
|
936
529
|
}
|
|
@@ -968,7 +561,7 @@ async function promptForNewVersion(operation) {
|
|
|
968
561
|
]);
|
|
969
562
|
const newVersion = answers.release === "none" ? currentVersion : answers.release === "custom" ? cleanVersion(answers.custom) : answers.release === "config" ? cleanVersion(configCustomVersion) : next[answers.release];
|
|
970
563
|
if (!newVersion)
|
|
971
|
-
|
|
564
|
+
process3.exit(1);
|
|
972
565
|
switch (answers.release) {
|
|
973
566
|
case "custom":
|
|
974
567
|
case "config":
|
|
@@ -981,7 +574,7 @@ async function promptForNewVersion(operation) {
|
|
|
981
574
|
}
|
|
982
575
|
|
|
983
576
|
// src/git.ts
|
|
984
|
-
import
|
|
577
|
+
import { x as x2 } from "tinyexec";
|
|
985
578
|
async function gitCommit(operation) {
|
|
986
579
|
if (!operation.options.commit)
|
|
987
580
|
return operation;
|
|
@@ -1001,7 +594,7 @@ async function gitCommit(operation) {
|
|
|
1001
594
|
args.push("--message", commitMessage);
|
|
1002
595
|
if (!all)
|
|
1003
596
|
args = args.concat(updatedFiles);
|
|
1004
|
-
await
|
|
597
|
+
await x2("git", ["commit", ...args]);
|
|
1005
598
|
return operation.update({ event: "git commit" /* GitCommit */, commitMessage });
|
|
1006
599
|
}
|
|
1007
600
|
async function gitTag(operation) {
|
|
@@ -1022,15 +615,15 @@ async function gitTag(operation) {
|
|
|
1022
615
|
if (operation.options.sign) {
|
|
1023
616
|
args.push("--sign");
|
|
1024
617
|
}
|
|
1025
|
-
await
|
|
618
|
+
await x2("git", ["tag", ...args]);
|
|
1026
619
|
return operation.update({ event: "git tag" /* GitTag */, tagName });
|
|
1027
620
|
}
|
|
1028
621
|
async function gitPush(operation) {
|
|
1029
622
|
if (!operation.options.push)
|
|
1030
623
|
return operation;
|
|
1031
|
-
await
|
|
624
|
+
await x2("git", ["push"]);
|
|
1032
625
|
if (operation.options.tag) {
|
|
1033
|
-
await
|
|
626
|
+
await x2("git", ["push", "--tags"]);
|
|
1034
627
|
}
|
|
1035
628
|
return operation.update({ event: "git push" /* GitPush */ });
|
|
1036
629
|
}
|
|
@@ -1044,17 +637,17 @@ function formatVersionString(template, newVersion) {
|
|
|
1044
637
|
// src/normalize-options.ts
|
|
1045
638
|
import fsSync from "node:fs";
|
|
1046
639
|
import fs2 from "node:fs/promises";
|
|
1047
|
-
import
|
|
640
|
+
import process4 from "node:process";
|
|
1048
641
|
import yaml from "js-yaml";
|
|
1049
642
|
import { glob } from "tinyglobby";
|
|
1050
643
|
async function normalizeOptions(raw) {
|
|
1051
|
-
var
|
|
644
|
+
var _a2, _b2, _d2;
|
|
1052
645
|
const preid = typeof raw.preid === "string" ? raw.preid : "beta";
|
|
1053
646
|
const sign = Boolean(raw.sign);
|
|
1054
647
|
const push = Boolean(raw.push);
|
|
1055
648
|
const all = Boolean(raw.all);
|
|
1056
649
|
const noVerify = Boolean(raw.noVerify);
|
|
1057
|
-
const cwd = raw.cwd ||
|
|
650
|
+
const cwd = raw.cwd || process4.cwd();
|
|
1058
651
|
const ignoreScripts = Boolean(raw.ignoreScripts);
|
|
1059
652
|
const execute = raw.execute;
|
|
1060
653
|
const recursive = Boolean(raw.recursive);
|
|
@@ -1075,7 +668,7 @@ async function normalizeOptions(raw) {
|
|
|
1075
668
|
commit = { all, noVerify, message: raw.commit };
|
|
1076
669
|
else if (raw.commit || tag || push)
|
|
1077
670
|
commit = { all, noVerify, message: "chore: release v" };
|
|
1078
|
-
if (recursive && !((
|
|
671
|
+
if (recursive && !((_a2 = raw.files) == null ? void 0 : _a2.length)) {
|
|
1079
672
|
raw.files = [
|
|
1080
673
|
"package.json",
|
|
1081
674
|
"package-lock.json",
|
|
@@ -1090,13 +683,13 @@ async function normalizeOptions(raw) {
|
|
|
1090
683
|
const workspaces = yaml.load(pnpmWorkspace);
|
|
1091
684
|
const workspacesWithPackageJson = workspaces.packages.map((workspace) => `${workspace}/package.json`);
|
|
1092
685
|
const withoutExcludedWorkspaces = workspacesWithPackageJson.filter((workspace) => {
|
|
1093
|
-
var
|
|
1094
|
-
return !workspace.startsWith("!") && !((
|
|
686
|
+
var _a3;
|
|
687
|
+
return !workspace.startsWith("!") && !((_a3 = raw.files) == null ? void 0 : _a3.includes(workspace));
|
|
1095
688
|
});
|
|
1096
689
|
raw.files = raw.files.concat(withoutExcludedWorkspaces);
|
|
1097
690
|
}
|
|
1098
691
|
} else {
|
|
1099
|
-
raw.files = ((
|
|
692
|
+
raw.files = ((_b2 = raw.files) == null ? void 0 : _b2.length) ? raw.files : ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc", "deno.json", "deno.jsonc"];
|
|
1100
693
|
}
|
|
1101
694
|
const files = await glob(
|
|
1102
695
|
raw.files,
|
|
@@ -1113,13 +706,13 @@ async function normalizeOptions(raw) {
|
|
|
1113
706
|
if (raw.interface === false) {
|
|
1114
707
|
ui = { input: false, output: false };
|
|
1115
708
|
} else if (raw.interface === true || !raw.interface) {
|
|
1116
|
-
ui = { input:
|
|
709
|
+
ui = { input: process4.stdin, output: process4.stdout };
|
|
1117
710
|
} else {
|
|
1118
|
-
let
|
|
711
|
+
let _c2 = raw.interface, { input, output } = _c2, other = __objRest(_c2, ["input", "output"]);
|
|
1119
712
|
if (input === true || input !== false && !input)
|
|
1120
|
-
input =
|
|
713
|
+
input = process4.stdin;
|
|
1121
714
|
if (output === true || output !== false && !output)
|
|
1122
|
-
output =
|
|
715
|
+
output = process4.stdout;
|
|
1123
716
|
ui = __spreadValues({ input, output }, other);
|
|
1124
717
|
}
|
|
1125
718
|
if (release.type === "prompt" && !(ui.input && ui.output))
|
|
@@ -1135,7 +728,7 @@ async function normalizeOptions(raw) {
|
|
|
1135
728
|
interface: ui,
|
|
1136
729
|
ignoreScripts,
|
|
1137
730
|
execute,
|
|
1138
|
-
printCommits: (
|
|
731
|
+
printCommits: (_d2 = raw.printCommits) != null ? _d2 : true,
|
|
1139
732
|
customVersion: raw.customVersion,
|
|
1140
733
|
currentVersion: raw.currentVersion
|
|
1141
734
|
};
|
|
@@ -1195,8 +788,8 @@ var Operation = class _Operation {
|
|
|
1195
788
|
/**
|
|
1196
789
|
* Updates the operation state and results, and reports the updated progress to the user.
|
|
1197
790
|
*/
|
|
1198
|
-
update(
|
|
1199
|
-
var
|
|
791
|
+
update(_a2) {
|
|
792
|
+
var _b2 = _a2, { event, script } = _b2, newState = __objRest(_b2, ["event", "script"]);
|
|
1200
793
|
Object.assign(this.state, newState);
|
|
1201
794
|
if (event && this._progress) {
|
|
1202
795
|
this._progress(__spreadValues({ event, script }, this.results));
|
|
@@ -1206,13 +799,15 @@ var Operation = class _Operation {
|
|
|
1206
799
|
};
|
|
1207
800
|
|
|
1208
801
|
// src/run-npm-script.ts
|
|
1209
|
-
import
|
|
802
|
+
import { x as x3 } from "tinyexec";
|
|
1210
803
|
async function runNpmScript(script, operation) {
|
|
1211
804
|
const { cwd, ignoreScripts } = operation.options;
|
|
1212
805
|
if (!ignoreScripts) {
|
|
1213
806
|
const { data: manifest } = await readJsoncFile("package.json", cwd);
|
|
1214
807
|
if (isManifest(manifest) && hasScript(manifest, script)) {
|
|
1215
|
-
await
|
|
808
|
+
await x3("npm", ["run", script, "--silent"], {
|
|
809
|
+
nodeOptions: { stdio: "inherit" }
|
|
810
|
+
});
|
|
1216
811
|
operation.update({ event: "npm script" /* NpmScript */, script });
|
|
1217
812
|
}
|
|
1218
813
|
}
|
|
@@ -1315,7 +910,7 @@ async function versionBump(arg = {}) {
|
|
|
1315
910
|
message: "Bump?",
|
|
1316
911
|
initial: true
|
|
1317
912
|
}).then((r) => r.yes)) {
|
|
1318
|
-
|
|
913
|
+
process5.exit(1);
|
|
1319
914
|
}
|
|
1320
915
|
}
|
|
1321
916
|
await runNpmScript("preversion" /* PreVersion */, operation);
|
|
@@ -1324,9 +919,13 @@ async function versionBump(arg = {}) {
|
|
|
1324
919
|
if (typeof operation.options.execute === "function") {
|
|
1325
920
|
await operation.options.execute(operation);
|
|
1326
921
|
} else {
|
|
1327
|
-
console.log(
|
|
1328
|
-
await
|
|
1329
|
-
|
|
922
|
+
console.log(symbols_exports.info, "Executing script", operation.options.execute);
|
|
923
|
+
await x4(operation.options.execute, [], {
|
|
924
|
+
nodeOptions: {
|
|
925
|
+
stdio: "inherit"
|
|
926
|
+
}
|
|
927
|
+
});
|
|
928
|
+
console.log(symbols_exports.success, "Script finished");
|
|
1330
929
|
}
|
|
1331
930
|
}
|
|
1332
931
|
await runNpmScript("version" /* Version */, operation);
|
|
@@ -1363,7 +962,7 @@ async function versionBumpInfo(arg = {}) {
|
|
|
1363
962
|
|
|
1364
963
|
// src/config.ts
|
|
1365
964
|
import { dirname } from "node:path";
|
|
1366
|
-
import
|
|
965
|
+
import process6 from "node:process";
|
|
1367
966
|
import { loadConfig } from "c12";
|
|
1368
967
|
import escalade from "escalade/sync";
|
|
1369
968
|
var bumpConfigDefaults = {
|
|
@@ -1379,7 +978,7 @@ var bumpConfigDefaults = {
|
|
|
1379
978
|
noGitCheck: true,
|
|
1380
979
|
files: []
|
|
1381
980
|
};
|
|
1382
|
-
async function loadBumpConfig(overrides, cwd =
|
|
981
|
+
async function loadBumpConfig(overrides, cwd = process6.cwd()) {
|
|
1383
982
|
const name = "bump";
|
|
1384
983
|
const configFile = findConfigFile(name, cwd);
|
|
1385
984
|
const { config } = await loadConfig({
|
|
@@ -1409,10 +1008,10 @@ function findConfigFile(name, cwd) {
|
|
|
1409
1008
|
}
|
|
1410
1009
|
return false;
|
|
1411
1010
|
});
|
|
1412
|
-
} catch (
|
|
1011
|
+
} catch (error2) {
|
|
1413
1012
|
if (foundRepositoryRoot)
|
|
1414
1013
|
return null;
|
|
1415
|
-
throw
|
|
1014
|
+
throw error2;
|
|
1416
1015
|
}
|
|
1417
1016
|
}
|
|
1418
1017
|
function defineConfig(config) {
|
|
@@ -1424,7 +1023,7 @@ export {
|
|
|
1424
1023
|
__spreadProps,
|
|
1425
1024
|
__objRest,
|
|
1426
1025
|
__toESM,
|
|
1427
|
-
|
|
1026
|
+
symbols_exports,
|
|
1428
1027
|
require_picocolors,
|
|
1429
1028
|
isReleaseType,
|
|
1430
1029
|
ProgressEvent,
|