bumpp 9.2.0 → 9.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{chunk-UEJT3NCU.mjs → chunk-D4MB64LD.mjs} +27 -10
- package/dist/cli/index.d.mts +0 -2
- package/dist/cli/index.d.ts +0 -2
- package/dist/cli/index.js +28 -11
- package/dist/cli/index.mjs +2 -2
- package/dist/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +27 -10
- package/dist/index.mjs +1 -1
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Forked from [`version-bump-prompt`](https://github.com/JS-DevTools/version-bump-
|
|
|
13
13
|
- Confirmation before bumping.
|
|
14
14
|
- Enable `--commit` `--tag` `--push` by default. (opt-out by `--no-push`, etc.)
|
|
15
15
|
- `-r` or `--recursive` to bump all packages in the monorepo.
|
|
16
|
-
- Conventional Commits by default.
|
|
16
|
+
- Conventional Commits by default.
|
|
17
17
|
- Supports config file `bumpp.config.ts`:
|
|
18
18
|
|
|
19
19
|
```ts
|
|
@@ -109,7 +109,7 @@ var require_picocolors = __commonJS({
|
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
-
// node_modules/.pnpm/chalk@5.
|
|
112
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
113
113
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
114
114
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
115
115
|
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -295,7 +295,7 @@ function assembleStyles() {
|
|
|
295
295
|
var ansiStyles = assembleStyles();
|
|
296
296
|
var ansi_styles_default = ansiStyles;
|
|
297
297
|
|
|
298
|
-
// node_modules/.pnpm/chalk@5.
|
|
298
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
|
|
299
299
|
import process2 from "process";
|
|
300
300
|
import os from "os";
|
|
301
301
|
import tty from "tty";
|
|
@@ -369,7 +369,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
369
369
|
return 1;
|
|
370
370
|
}
|
|
371
371
|
if ("CI" in env) {
|
|
372
|
-
if ("GITHUB_ACTIONS" in env) {
|
|
372
|
+
if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) {
|
|
373
373
|
return 3;
|
|
374
374
|
}
|
|
375
375
|
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
@@ -420,7 +420,7 @@ var supportsColor = {
|
|
|
420
420
|
};
|
|
421
421
|
var supports_color_default = supportsColor;
|
|
422
422
|
|
|
423
|
-
// node_modules/.pnpm/chalk@5.
|
|
423
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
|
|
424
424
|
function stringReplaceAll(string, substring, replacer) {
|
|
425
425
|
let index = string.indexOf(substring);
|
|
426
426
|
if (index === -1) {
|
|
@@ -450,7 +450,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
450
450
|
return returnValue;
|
|
451
451
|
}
|
|
452
452
|
|
|
453
|
-
// node_modules/.pnpm/chalk@5.
|
|
453
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
|
|
454
454
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
455
455
|
var GENERATOR = Symbol("GENERATOR");
|
|
456
456
|
var STYLER = Symbol("STYLER");
|
|
@@ -605,7 +605,7 @@ function isUnicodeSupported() {
|
|
|
605
605
|
return Boolean(process3.env.CI) || Boolean(process3.env.WT_SESSION) || Boolean(process3.env.TERMINUS_SUBLIME) || process3.env.ConEmuTask === "{cmd::Cmder}" || process3.env.TERM_PROGRAM === "Terminus-Sublime" || process3.env.TERM_PROGRAM === "vscode" || process3.env.TERM === "xterm-256color" || process3.env.TERM === "alacritty" || process3.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
606
606
|
}
|
|
607
607
|
|
|
608
|
-
// node_modules/.pnpm/log-symbols@
|
|
608
|
+
// node_modules/.pnpm/log-symbols@6.0.0/node_modules/log-symbols/index.js
|
|
609
609
|
var main = {
|
|
610
610
|
info: source_default.blue("\u2139"),
|
|
611
611
|
success: source_default.green("\u2714"),
|
|
@@ -698,21 +698,26 @@ function getNextVersions(oldVersion, preid) {
|
|
|
698
698
|
return next;
|
|
699
699
|
}
|
|
700
700
|
async function promptForNewVersion(operation) {
|
|
701
|
+
var _a, _b;
|
|
701
702
|
const { oldVersion } = operation.state;
|
|
702
703
|
const release = operation.options.release;
|
|
703
704
|
const next = getNextVersions(oldVersion, release.preid);
|
|
705
|
+
const configCustomVersion = await ((_b = (_a = operation.options).customVersion) == null ? void 0 : _b.call(_a, oldVersion, semver));
|
|
704
706
|
const PADDING = 13;
|
|
705
707
|
const answers = await prompts([
|
|
706
708
|
{
|
|
707
709
|
type: "autocomplete",
|
|
708
710
|
name: "release",
|
|
709
711
|
message: `Current version ${import_picocolors.default.green(oldVersion)}`,
|
|
710
|
-
initial: "next",
|
|
712
|
+
initial: configCustomVersion ? "config" : "next",
|
|
711
713
|
choices: [
|
|
712
714
|
{ value: "major", title: `${"major".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.major)}` },
|
|
713
715
|
{ value: "minor", title: `${"minor".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.minor)}` },
|
|
714
716
|
{ value: "patch", title: `${"patch".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.patch)}` },
|
|
715
717
|
{ value: "next", title: `${"next".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.next)}` },
|
|
718
|
+
...configCustomVersion ? [
|
|
719
|
+
{ value: "config", title: `${"from config".padStart(PADDING, " ")} ${import_picocolors.default.bold(configCustomVersion)}` }
|
|
720
|
+
] : [],
|
|
716
721
|
{ value: "prepatch", title: `${"pre-patch".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.prepatch)}` },
|
|
717
722
|
{ value: "preminor", title: `${"pre-minor".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.preminor)}` },
|
|
718
723
|
{ value: "premajor", title: `${"pre-major".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.premajor)}` },
|
|
@@ -730,11 +735,12 @@ async function promptForNewVersion(operation) {
|
|
|
730
735
|
}
|
|
731
736
|
}
|
|
732
737
|
]);
|
|
733
|
-
const newVersion = answers.release === "none" ? oldVersion : answers.release === "custom" ? cleanVersion(answers.custom) : next[answers.release];
|
|
738
|
+
const newVersion = answers.release === "none" ? oldVersion : answers.release === "custom" ? cleanVersion(answers.custom) : answers.release === "config" ? cleanVersion(configCustomVersion) : next[answers.release];
|
|
734
739
|
if (!newVersion)
|
|
735
740
|
process4.exit(1);
|
|
736
741
|
switch (answers.release) {
|
|
737
742
|
case "custom":
|
|
743
|
+
case "config":
|
|
738
744
|
case "next":
|
|
739
745
|
case "none":
|
|
740
746
|
return operation.update({ newVersion });
|
|
@@ -850,7 +856,7 @@ function detectIndent(string) {
|
|
|
850
856
|
};
|
|
851
857
|
}
|
|
852
858
|
|
|
853
|
-
// node_modules/.pnpm/detect-newline@4.0.
|
|
859
|
+
// node_modules/.pnpm/detect-newline@4.0.1/node_modules/detect-newline/index.js
|
|
854
860
|
function detectNewline(string) {
|
|
855
861
|
if (typeof string !== "string") {
|
|
856
862
|
throw new TypeError("Expected a string");
|
|
@@ -1053,7 +1059,18 @@ async function normalizeOptions(raw) {
|
|
|
1053
1059
|
}
|
|
1054
1060
|
if (release.type === "prompt" && !(ui.input && ui.output))
|
|
1055
1061
|
throw new Error("Cannot prompt for the version number because input or output has been disabled.");
|
|
1056
|
-
return {
|
|
1062
|
+
return {
|
|
1063
|
+
release,
|
|
1064
|
+
commit,
|
|
1065
|
+
tag,
|
|
1066
|
+
push,
|
|
1067
|
+
files,
|
|
1068
|
+
cwd,
|
|
1069
|
+
interface: ui,
|
|
1070
|
+
ignoreScripts,
|
|
1071
|
+
execute,
|
|
1072
|
+
customVersion: raw.customVersion
|
|
1073
|
+
};
|
|
1057
1074
|
}
|
|
1058
1075
|
|
|
1059
1076
|
// src/operation.ts
|
package/dist/cli/index.d.mts
CHANGED
package/dist/cli/index.d.ts
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -115,7 +115,7 @@ __export(cli_exports, {
|
|
|
115
115
|
module.exports = __toCommonJS(cli_exports);
|
|
116
116
|
var import_node_process8 = __toESM(require("process"));
|
|
117
117
|
|
|
118
|
-
// node_modules/.pnpm/chalk@5.
|
|
118
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
119
119
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
120
120
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
121
121
|
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -301,7 +301,7 @@ function assembleStyles() {
|
|
|
301
301
|
var ansiStyles = assembleStyles();
|
|
302
302
|
var ansi_styles_default = ansiStyles;
|
|
303
303
|
|
|
304
|
-
// node_modules/.pnpm/chalk@5.
|
|
304
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
|
|
305
305
|
var import_node_process = __toESM(require("process"), 1);
|
|
306
306
|
var import_node_os = __toESM(require("os"), 1);
|
|
307
307
|
var import_node_tty = __toESM(require("tty"), 1);
|
|
@@ -375,7 +375,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
375
375
|
return 1;
|
|
376
376
|
}
|
|
377
377
|
if ("CI" in env) {
|
|
378
|
-
if ("GITHUB_ACTIONS" in env) {
|
|
378
|
+
if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) {
|
|
379
379
|
return 3;
|
|
380
380
|
}
|
|
381
381
|
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
@@ -426,7 +426,7 @@ var supportsColor = {
|
|
|
426
426
|
};
|
|
427
427
|
var supports_color_default = supportsColor;
|
|
428
428
|
|
|
429
|
-
// node_modules/.pnpm/chalk@5.
|
|
429
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
|
|
430
430
|
function stringReplaceAll(string, substring, replacer) {
|
|
431
431
|
let index = string.indexOf(substring);
|
|
432
432
|
if (index === -1) {
|
|
@@ -456,7 +456,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
456
456
|
return returnValue;
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
-
// node_modules/.pnpm/chalk@5.
|
|
459
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
|
|
460
460
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
461
461
|
var GENERATOR = Symbol("GENERATOR");
|
|
462
462
|
var STYLER = Symbol("STYLER");
|
|
@@ -611,7 +611,7 @@ function isUnicodeSupported() {
|
|
|
611
611
|
return Boolean(import_node_process2.default.env.CI) || Boolean(import_node_process2.default.env.WT_SESSION) || Boolean(import_node_process2.default.env.TERMINUS_SUBLIME) || import_node_process2.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process2.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process2.default.env.TERM_PROGRAM === "vscode" || import_node_process2.default.env.TERM === "xterm-256color" || import_node_process2.default.env.TERM === "alacritty" || import_node_process2.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
-
// node_modules/.pnpm/log-symbols@
|
|
614
|
+
// node_modules/.pnpm/log-symbols@6.0.0/node_modules/log-symbols/index.js
|
|
615
615
|
var main = {
|
|
616
616
|
info: source_default.blue("\u2139"),
|
|
617
617
|
success: source_default.green("\u2714"),
|
|
@@ -628,7 +628,7 @@ var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
|
628
628
|
var log_symbols_default = logSymbols;
|
|
629
629
|
|
|
630
630
|
// package.json
|
|
631
|
-
var version = "9.2.
|
|
631
|
+
var version = "9.2.1";
|
|
632
632
|
|
|
633
633
|
// src/version-bump.ts
|
|
634
634
|
var import_node_process5 = __toESM(require("process"));
|
|
@@ -692,21 +692,26 @@ function getNextVersions(oldVersion, preid) {
|
|
|
692
692
|
return next;
|
|
693
693
|
}
|
|
694
694
|
async function promptForNewVersion(operation) {
|
|
695
|
+
var _a, _b;
|
|
695
696
|
const { oldVersion } = operation.state;
|
|
696
697
|
const release = operation.options.release;
|
|
697
698
|
const next = getNextVersions(oldVersion, release.preid);
|
|
699
|
+
const configCustomVersion = await ((_b = (_a = operation.options).customVersion) == null ? void 0 : _b.call(_a, oldVersion, import_semver2.default));
|
|
698
700
|
const PADDING = 13;
|
|
699
701
|
const answers = await (0, import_prompts.default)([
|
|
700
702
|
{
|
|
701
703
|
type: "autocomplete",
|
|
702
704
|
name: "release",
|
|
703
705
|
message: `Current version ${import_picocolors.default.green(oldVersion)}`,
|
|
704
|
-
initial: "next",
|
|
706
|
+
initial: configCustomVersion ? "config" : "next",
|
|
705
707
|
choices: [
|
|
706
708
|
{ value: "major", title: `${"major".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.major)}` },
|
|
707
709
|
{ value: "minor", title: `${"minor".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.minor)}` },
|
|
708
710
|
{ value: "patch", title: `${"patch".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.patch)}` },
|
|
709
711
|
{ value: "next", title: `${"next".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.next)}` },
|
|
712
|
+
...configCustomVersion ? [
|
|
713
|
+
{ value: "config", title: `${"from config".padStart(PADDING, " ")} ${import_picocolors.default.bold(configCustomVersion)}` }
|
|
714
|
+
] : [],
|
|
710
715
|
{ value: "prepatch", title: `${"pre-patch".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.prepatch)}` },
|
|
711
716
|
{ value: "preminor", title: `${"pre-minor".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.preminor)}` },
|
|
712
717
|
{ value: "premajor", title: `${"pre-major".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.premajor)}` },
|
|
@@ -724,11 +729,12 @@ async function promptForNewVersion(operation) {
|
|
|
724
729
|
}
|
|
725
730
|
}
|
|
726
731
|
]);
|
|
727
|
-
const newVersion = answers.release === "none" ? oldVersion : answers.release === "custom" ? (0, import_semver2.clean)(answers.custom) : next[answers.release];
|
|
732
|
+
const newVersion = answers.release === "none" ? oldVersion : answers.release === "custom" ? (0, import_semver2.clean)(answers.custom) : answers.release === "config" ? (0, import_semver2.clean)(configCustomVersion) : next[answers.release];
|
|
728
733
|
if (!newVersion)
|
|
729
734
|
import_node_process3.default.exit(1);
|
|
730
735
|
switch (answers.release) {
|
|
731
736
|
case "custom":
|
|
737
|
+
case "config":
|
|
732
738
|
case "next":
|
|
733
739
|
case "none":
|
|
734
740
|
return operation.update({ newVersion });
|
|
@@ -844,7 +850,7 @@ function detectIndent(string) {
|
|
|
844
850
|
};
|
|
845
851
|
}
|
|
846
852
|
|
|
847
|
-
// node_modules/.pnpm/detect-newline@4.0.
|
|
853
|
+
// node_modules/.pnpm/detect-newline@4.0.1/node_modules/detect-newline/index.js
|
|
848
854
|
function detectNewline(string) {
|
|
849
855
|
if (typeof string !== "string") {
|
|
850
856
|
throw new TypeError("Expected a string");
|
|
@@ -1047,7 +1053,18 @@ async function normalizeOptions(raw) {
|
|
|
1047
1053
|
}
|
|
1048
1054
|
if (release.type === "prompt" && !(ui.input && ui.output))
|
|
1049
1055
|
throw new Error("Cannot prompt for the version number because input or output has been disabled.");
|
|
1050
|
-
return {
|
|
1056
|
+
return {
|
|
1057
|
+
release,
|
|
1058
|
+
commit,
|
|
1059
|
+
tag,
|
|
1060
|
+
push,
|
|
1061
|
+
files,
|
|
1062
|
+
cwd,
|
|
1063
|
+
interface: ui,
|
|
1064
|
+
ignoreScripts,
|
|
1065
|
+
execute,
|
|
1066
|
+
customVersion: raw.customVersion
|
|
1067
|
+
};
|
|
1051
1068
|
}
|
|
1052
1069
|
|
|
1053
1070
|
// src/operation.ts
|
package/dist/cli/index.mjs
CHANGED
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
log_symbols_default,
|
|
7
7
|
require_picocolors,
|
|
8
8
|
versionBump
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-D4MB64LD.mjs";
|
|
10
10
|
|
|
11
11
|
// src/cli/index.ts
|
|
12
12
|
import process2 from "process";
|
|
13
13
|
|
|
14
14
|
// package.json
|
|
15
|
-
var version = "9.2.
|
|
15
|
+
var version = "9.2.1";
|
|
16
16
|
|
|
17
17
|
// src/cli/parse-args.ts
|
|
18
18
|
var import_picocolors = __toESM(require_picocolors());
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReleaseType } from 'semver';
|
|
1
|
+
import _semver, { ReleaseType } from 'semver';
|
|
2
2
|
export { ReleaseType } from 'semver';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -176,6 +176,10 @@ interface VersionBumpOptions {
|
|
|
176
176
|
* @default false
|
|
177
177
|
*/
|
|
178
178
|
recursive?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Custom function to provide the version number
|
|
181
|
+
*/
|
|
182
|
+
customVersion?: (currentVersion: string, semver: typeof _semver) => Promise<string | void> | string | void;
|
|
179
183
|
}
|
|
180
184
|
/**
|
|
181
185
|
* Options for the command-line interface.
|
|
@@ -258,6 +262,7 @@ interface NormalizedOptions {
|
|
|
258
262
|
interface: Interface;
|
|
259
263
|
ignoreScripts: boolean;
|
|
260
264
|
execute?: string;
|
|
265
|
+
customVersion?: VersionBumpOptions['customVersion'];
|
|
261
266
|
}
|
|
262
267
|
|
|
263
268
|
interface OperationState {
|
|
@@ -339,4 +344,4 @@ declare const bumpConfigDefaults: VersionBumpOptions;
|
|
|
339
344
|
declare function loadBumpConfig(overrides?: Partial<VersionBumpOptions>, cwd?: string): Promise<VersionBumpOptions>;
|
|
340
345
|
declare function defineConfig(config: Partial<VersionBumpOptions>): Partial<VersionBumpOptions>;
|
|
341
346
|
|
|
342
|
-
export { InterfaceOptions, NpmScript, ProgressEvent, VersionBumpOptions, VersionBumpProgress, VersionBumpResults, bumpConfigDefaults, versionBump as default, defineConfig, loadBumpConfig, versionBump, versionBumpInfo };
|
|
347
|
+
export { type InterfaceOptions, NpmScript, ProgressEvent, type VersionBumpOptions, type VersionBumpProgress, type VersionBumpResults, bumpConfigDefaults, versionBump as default, defineConfig, loadBumpConfig, versionBump, versionBumpInfo };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReleaseType } from 'semver';
|
|
1
|
+
import _semver, { ReleaseType } from 'semver';
|
|
2
2
|
export { ReleaseType } from 'semver';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -176,6 +176,10 @@ interface VersionBumpOptions {
|
|
|
176
176
|
* @default false
|
|
177
177
|
*/
|
|
178
178
|
recursive?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Custom function to provide the version number
|
|
181
|
+
*/
|
|
182
|
+
customVersion?: (currentVersion: string, semver: typeof _semver) => Promise<string | void> | string | void;
|
|
179
183
|
}
|
|
180
184
|
/**
|
|
181
185
|
* Options for the command-line interface.
|
|
@@ -258,6 +262,7 @@ interface NormalizedOptions {
|
|
|
258
262
|
interface: Interface;
|
|
259
263
|
ignoreScripts: boolean;
|
|
260
264
|
execute?: string;
|
|
265
|
+
customVersion?: VersionBumpOptions['customVersion'];
|
|
261
266
|
}
|
|
262
267
|
|
|
263
268
|
interface OperationState {
|
|
@@ -339,4 +344,4 @@ declare const bumpConfigDefaults: VersionBumpOptions;
|
|
|
339
344
|
declare function loadBumpConfig(overrides?: Partial<VersionBumpOptions>, cwd?: string): Promise<VersionBumpOptions>;
|
|
340
345
|
declare function defineConfig(config: Partial<VersionBumpOptions>): Partial<VersionBumpOptions>;
|
|
341
346
|
|
|
342
|
-
export { InterfaceOptions, NpmScript, ProgressEvent, VersionBumpOptions, VersionBumpProgress, VersionBumpResults, bumpConfigDefaults, versionBump as default, defineConfig, loadBumpConfig, versionBump, versionBumpInfo };
|
|
347
|
+
export { type InterfaceOptions, NpmScript, ProgressEvent, type VersionBumpOptions, type VersionBumpProgress, type VersionBumpResults, bumpConfigDefaults, versionBump as default, defineConfig, loadBumpConfig, versionBump, versionBumpInfo };
|
package/dist/index.js
CHANGED
|
@@ -127,7 +127,7 @@ var import_node_process5 = __toESM(require("process"));
|
|
|
127
127
|
var ezSpawn3 = __toESM(require("@jsdevtools/ez-spawn"));
|
|
128
128
|
var import_picocolors2 = __toESM(require_picocolors());
|
|
129
129
|
|
|
130
|
-
// node_modules/.pnpm/chalk@5.
|
|
130
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
131
131
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
132
132
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
133
133
|
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -313,7 +313,7 @@ function assembleStyles() {
|
|
|
313
313
|
var ansiStyles = assembleStyles();
|
|
314
314
|
var ansi_styles_default = ansiStyles;
|
|
315
315
|
|
|
316
|
-
// node_modules/.pnpm/chalk@5.
|
|
316
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
|
|
317
317
|
var import_node_process = __toESM(require("process"), 1);
|
|
318
318
|
var import_node_os = __toESM(require("os"), 1);
|
|
319
319
|
var import_node_tty = __toESM(require("tty"), 1);
|
|
@@ -387,7 +387,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
387
387
|
return 1;
|
|
388
388
|
}
|
|
389
389
|
if ("CI" in env) {
|
|
390
|
-
if ("GITHUB_ACTIONS" in env) {
|
|
390
|
+
if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) {
|
|
391
391
|
return 3;
|
|
392
392
|
}
|
|
393
393
|
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
@@ -438,7 +438,7 @@ var supportsColor = {
|
|
|
438
438
|
};
|
|
439
439
|
var supports_color_default = supportsColor;
|
|
440
440
|
|
|
441
|
-
// node_modules/.pnpm/chalk@5.
|
|
441
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
|
|
442
442
|
function stringReplaceAll(string, substring, replacer) {
|
|
443
443
|
let index = string.indexOf(substring);
|
|
444
444
|
if (index === -1) {
|
|
@@ -468,7 +468,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
468
468
|
return returnValue;
|
|
469
469
|
}
|
|
470
470
|
|
|
471
|
-
// node_modules/.pnpm/chalk@5.
|
|
471
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
|
|
472
472
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
473
473
|
var GENERATOR = Symbol("GENERATOR");
|
|
474
474
|
var STYLER = Symbol("STYLER");
|
|
@@ -623,7 +623,7 @@ function isUnicodeSupported() {
|
|
|
623
623
|
return Boolean(import_node_process2.default.env.CI) || Boolean(import_node_process2.default.env.WT_SESSION) || Boolean(import_node_process2.default.env.TERMINUS_SUBLIME) || import_node_process2.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process2.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process2.default.env.TERM_PROGRAM === "vscode" || import_node_process2.default.env.TERM === "xterm-256color" || import_node_process2.default.env.TERM === "alacritty" || import_node_process2.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
624
624
|
}
|
|
625
625
|
|
|
626
|
-
// node_modules/.pnpm/log-symbols@
|
|
626
|
+
// node_modules/.pnpm/log-symbols@6.0.0/node_modules/log-symbols/index.js
|
|
627
627
|
var main = {
|
|
628
628
|
info: source_default.blue("\u2139"),
|
|
629
629
|
success: source_default.green("\u2714"),
|
|
@@ -698,21 +698,26 @@ function getNextVersions(oldVersion, preid) {
|
|
|
698
698
|
return next;
|
|
699
699
|
}
|
|
700
700
|
async function promptForNewVersion(operation) {
|
|
701
|
+
var _a, _b;
|
|
701
702
|
const { oldVersion } = operation.state;
|
|
702
703
|
const release = operation.options.release;
|
|
703
704
|
const next = getNextVersions(oldVersion, release.preid);
|
|
705
|
+
const configCustomVersion = await ((_b = (_a = operation.options).customVersion) == null ? void 0 : _b.call(_a, oldVersion, import_semver2.default));
|
|
704
706
|
const PADDING = 13;
|
|
705
707
|
const answers = await (0, import_prompts.default)([
|
|
706
708
|
{
|
|
707
709
|
type: "autocomplete",
|
|
708
710
|
name: "release",
|
|
709
711
|
message: `Current version ${import_picocolors.default.green(oldVersion)}`,
|
|
710
|
-
initial: "next",
|
|
712
|
+
initial: configCustomVersion ? "config" : "next",
|
|
711
713
|
choices: [
|
|
712
714
|
{ value: "major", title: `${"major".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.major)}` },
|
|
713
715
|
{ value: "minor", title: `${"minor".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.minor)}` },
|
|
714
716
|
{ value: "patch", title: `${"patch".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.patch)}` },
|
|
715
717
|
{ value: "next", title: `${"next".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.next)}` },
|
|
718
|
+
...configCustomVersion ? [
|
|
719
|
+
{ value: "config", title: `${"from config".padStart(PADDING, " ")} ${import_picocolors.default.bold(configCustomVersion)}` }
|
|
720
|
+
] : [],
|
|
716
721
|
{ value: "prepatch", title: `${"pre-patch".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.prepatch)}` },
|
|
717
722
|
{ value: "preminor", title: `${"pre-minor".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.preminor)}` },
|
|
718
723
|
{ value: "premajor", title: `${"pre-major".padStart(PADDING, " ")} ${import_picocolors.default.bold(next.premajor)}` },
|
|
@@ -730,11 +735,12 @@ async function promptForNewVersion(operation) {
|
|
|
730
735
|
}
|
|
731
736
|
}
|
|
732
737
|
]);
|
|
733
|
-
const newVersion = answers.release === "none" ? oldVersion : answers.release === "custom" ? (0, import_semver2.clean)(answers.custom) : next[answers.release];
|
|
738
|
+
const newVersion = answers.release === "none" ? oldVersion : answers.release === "custom" ? (0, import_semver2.clean)(answers.custom) : answers.release === "config" ? (0, import_semver2.clean)(configCustomVersion) : next[answers.release];
|
|
734
739
|
if (!newVersion)
|
|
735
740
|
import_node_process3.default.exit(1);
|
|
736
741
|
switch (answers.release) {
|
|
737
742
|
case "custom":
|
|
743
|
+
case "config":
|
|
738
744
|
case "next":
|
|
739
745
|
case "none":
|
|
740
746
|
return operation.update({ newVersion });
|
|
@@ -850,7 +856,7 @@ function detectIndent(string) {
|
|
|
850
856
|
};
|
|
851
857
|
}
|
|
852
858
|
|
|
853
|
-
// node_modules/.pnpm/detect-newline@4.0.
|
|
859
|
+
// node_modules/.pnpm/detect-newline@4.0.1/node_modules/detect-newline/index.js
|
|
854
860
|
function detectNewline(string) {
|
|
855
861
|
if (typeof string !== "string") {
|
|
856
862
|
throw new TypeError("Expected a string");
|
|
@@ -1072,7 +1078,18 @@ async function normalizeOptions(raw) {
|
|
|
1072
1078
|
}
|
|
1073
1079
|
if (release.type === "prompt" && !(ui.input && ui.output))
|
|
1074
1080
|
throw new Error("Cannot prompt for the version number because input or output has been disabled.");
|
|
1075
|
-
return {
|
|
1081
|
+
return {
|
|
1082
|
+
release,
|
|
1083
|
+
commit,
|
|
1084
|
+
tag,
|
|
1085
|
+
push,
|
|
1086
|
+
files,
|
|
1087
|
+
cwd,
|
|
1088
|
+
interface: ui,
|
|
1089
|
+
ignoreScripts,
|
|
1090
|
+
execute,
|
|
1091
|
+
customVersion: raw.customVersion
|
|
1092
|
+
};
|
|
1076
1093
|
}
|
|
1077
1094
|
|
|
1078
1095
|
// src/operation.ts
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bumpp",
|
|
3
|
-
"version": "9.2.
|
|
4
|
-
"packageManager": "pnpm@8.
|
|
3
|
+
"version": "9.2.1",
|
|
4
|
+
"packageManager": "pnpm@8.12.0",
|
|
5
5
|
"description": "Bump version, commit changes, tag, and push to Git",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "James Messinger",
|
|
@@ -58,26 +58,26 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@jsdevtools/ez-spawn": "^3.0.4",
|
|
61
|
-
"c12": "^1.
|
|
61
|
+
"c12": "^1.5.1",
|
|
62
62
|
"cac": "^6.7.14",
|
|
63
|
-
"fast-glob": "^3.3.
|
|
63
|
+
"fast-glob": "^3.3.2",
|
|
64
64
|
"prompts": "^2.4.2",
|
|
65
65
|
"semver": "^7.5.4"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@antfu/eslint-config": "^
|
|
69
|
-
"@types/node": "^20.
|
|
70
|
-
"@types/prompts": "^2.4.
|
|
71
|
-
"@types/semver": "^7.5.
|
|
68
|
+
"@antfu/eslint-config": "^2.4.3",
|
|
69
|
+
"@types/node": "^20.10.4",
|
|
70
|
+
"@types/prompts": "^2.4.9",
|
|
71
|
+
"@types/semver": "^7.5.6",
|
|
72
72
|
"detect-indent": "^7.0.1",
|
|
73
|
-
"detect-newline": "^4.0.
|
|
74
|
-
"eslint": "^8.
|
|
75
|
-
"esno": "^0.
|
|
76
|
-
"log-symbols": "^
|
|
73
|
+
"detect-newline": "^4.0.1",
|
|
74
|
+
"eslint": "^8.55.0",
|
|
75
|
+
"esno": "^4.0.0",
|
|
76
|
+
"log-symbols": "^6.0.0",
|
|
77
77
|
"npm-check": "^6.0.1",
|
|
78
78
|
"picocolors": "^1.0.0",
|
|
79
|
-
"rimraf": "^5.0.
|
|
80
|
-
"tsup": "^
|
|
81
|
-
"typescript": "^5.
|
|
79
|
+
"rimraf": "^5.0.5",
|
|
80
|
+
"tsup": "^8.0.1",
|
|
81
|
+
"typescript": "^5.3.3"
|
|
82
82
|
}
|
|
83
83
|
}
|