bumpp 9.9.3 → 9.10.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/dist/{chunk-H7UXDA7O.mjs → chunk-HXP7VO25.mjs} +39 -3
- package/dist/cli/index.js +42 -5
- package/dist/cli/index.mjs +4 -3
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +39 -3
- package/dist/index.mjs +1 -1
- package/package.json +7 -6
|
@@ -419,14 +419,24 @@ import semver, { clean as cleanVersion, valid as isValidVersion2, SemVer } from
|
|
|
419
419
|
var import_picocolors = __toESM(require_picocolors());
|
|
420
420
|
import { x } from "tinyexec";
|
|
421
421
|
var messageColorMap = {
|
|
422
|
-
chore: import_picocolors.default.gray,
|
|
423
|
-
fix: import_picocolors.default.yellow,
|
|
424
422
|
feat: import_picocolors.default.green,
|
|
423
|
+
feature: import_picocolors.default.green,
|
|
425
424
|
refactor: import_picocolors.default.cyan,
|
|
425
|
+
style: import_picocolors.default.cyan,
|
|
426
426
|
docs: import_picocolors.default.blue,
|
|
427
427
|
doc: import_picocolors.default.blue,
|
|
428
|
+
types: import_picocolors.default.blue,
|
|
429
|
+
type: import_picocolors.default.blue,
|
|
430
|
+
chore: import_picocolors.default.gray,
|
|
428
431
|
ci: import_picocolors.default.gray,
|
|
429
|
-
build: import_picocolors.default.gray
|
|
432
|
+
build: import_picocolors.default.gray,
|
|
433
|
+
deps: import_picocolors.default.gray,
|
|
434
|
+
dev: import_picocolors.default.gray,
|
|
435
|
+
fix: import_picocolors.default.yellow,
|
|
436
|
+
test: import_picocolors.default.yellow,
|
|
437
|
+
perf: import_picocolors.default.magenta,
|
|
438
|
+
revert: import_picocolors.default.red,
|
|
439
|
+
breaking: import_picocolors.default.red
|
|
430
440
|
};
|
|
431
441
|
function parseCommits(raw) {
|
|
432
442
|
const lines = raw.toString().trim().split(/\n/g);
|
|
@@ -699,6 +709,7 @@ async function normalizeOptions(raw) {
|
|
|
699
709
|
const sign = Boolean(raw.sign);
|
|
700
710
|
const push = Boolean(raw.push);
|
|
701
711
|
const all = Boolean(raw.all);
|
|
712
|
+
const install = Boolean(raw.install);
|
|
702
713
|
const noVerify = Boolean(raw.noVerify);
|
|
703
714
|
const cwd = raw.cwd || process4.cwd();
|
|
704
715
|
const ignoreScripts = Boolean(raw.ignoreScripts);
|
|
@@ -778,6 +789,7 @@ async function normalizeOptions(raw) {
|
|
|
778
789
|
push,
|
|
779
790
|
files,
|
|
780
791
|
cwd,
|
|
792
|
+
install,
|
|
781
793
|
interface: ui,
|
|
782
794
|
ignoreScripts,
|
|
783
795
|
execute,
|
|
@@ -968,6 +980,27 @@ async function versionBump(arg = {}) {
|
|
|
968
980
|
}
|
|
969
981
|
await runNpmScript("preversion" /* PreVersion */, operation);
|
|
970
982
|
await updateFiles(operation);
|
|
983
|
+
if (operation.options.install) {
|
|
984
|
+
const { detect } = await import("package-manager-detector/detect");
|
|
985
|
+
const pm = await detect();
|
|
986
|
+
if (!(pm == null ? void 0 : pm.name)) {
|
|
987
|
+
throw new Error("Could not detect package manager, failed to run npm install");
|
|
988
|
+
}
|
|
989
|
+
const { COMMANDS, constructCommand } = await import("package-manager-detector/commands");
|
|
990
|
+
const command = constructCommand(COMMANDS[pm.name].install, []);
|
|
991
|
+
if (!command) {
|
|
992
|
+
throw new Error("Could not find install command for package manager");
|
|
993
|
+
}
|
|
994
|
+
console.log(symbols_exports.info, "Installing dependencies with", `${command.command} ${command.args.join(" ")}`);
|
|
995
|
+
await x4(command.command, command.args, {
|
|
996
|
+
throwOnError: true,
|
|
997
|
+
nodeOptions: {
|
|
998
|
+
stdio: "inherit",
|
|
999
|
+
cwd: operation.options.cwd
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
1002
|
+
console.log(symbols_exports.success, "Dependencies installed");
|
|
1003
|
+
}
|
|
971
1004
|
if (operation.options.execute) {
|
|
972
1005
|
if (typeof operation.options.execute === "function") {
|
|
973
1006
|
await operation.options.execute(operation);
|
|
@@ -1002,6 +1035,8 @@ function printSummary(operation) {
|
|
|
1002
1035
|
console.log(` execute ${import_picocolors3.default.bold(typeof operation.options.execute === "function" ? "function" : operation.options.execute)}`);
|
|
1003
1036
|
if (operation.options.push)
|
|
1004
1037
|
console.log(` push ${import_picocolors3.default.cyan(import_picocolors3.default.bold("yes"))}`);
|
|
1038
|
+
if (operation.options.install)
|
|
1039
|
+
console.log(` install ${import_picocolors3.default.cyan(import_picocolors3.default.bold("yes"))}`);
|
|
1005
1040
|
console.log();
|
|
1006
1041
|
console.log(` from ${import_picocolors3.default.bold(operation.state.currentVersion)}`);
|
|
1007
1042
|
console.log(` to ${import_picocolors3.default.green(import_picocolors3.default.bold(operation.state.newVersion))}`);
|
|
@@ -1026,6 +1061,7 @@ var bumpConfigDefaults = {
|
|
|
1026
1061
|
push: true,
|
|
1027
1062
|
tag: true,
|
|
1028
1063
|
sign: false,
|
|
1064
|
+
install: false,
|
|
1029
1065
|
recursive: false,
|
|
1030
1066
|
noVerify: false,
|
|
1031
1067
|
confirm: true,
|
package/dist/cli/index.js
CHANGED
|
@@ -404,14 +404,24 @@ var import_semver2 = __toESM(require("semver"));
|
|
|
404
404
|
var import_picocolors = __toESM(require_picocolors());
|
|
405
405
|
var import_tinyexec = require("tinyexec");
|
|
406
406
|
var messageColorMap = {
|
|
407
|
-
chore: import_picocolors.default.gray,
|
|
408
|
-
fix: import_picocolors.default.yellow,
|
|
409
407
|
feat: import_picocolors.default.green,
|
|
408
|
+
feature: import_picocolors.default.green,
|
|
410
409
|
refactor: import_picocolors.default.cyan,
|
|
410
|
+
style: import_picocolors.default.cyan,
|
|
411
411
|
docs: import_picocolors.default.blue,
|
|
412
412
|
doc: import_picocolors.default.blue,
|
|
413
|
+
types: import_picocolors.default.blue,
|
|
414
|
+
type: import_picocolors.default.blue,
|
|
415
|
+
chore: import_picocolors.default.gray,
|
|
413
416
|
ci: import_picocolors.default.gray,
|
|
414
|
-
build: import_picocolors.default.gray
|
|
417
|
+
build: import_picocolors.default.gray,
|
|
418
|
+
deps: import_picocolors.default.gray,
|
|
419
|
+
dev: import_picocolors.default.gray,
|
|
420
|
+
fix: import_picocolors.default.yellow,
|
|
421
|
+
test: import_picocolors.default.yellow,
|
|
422
|
+
perf: import_picocolors.default.magenta,
|
|
423
|
+
revert: import_picocolors.default.red,
|
|
424
|
+
breaking: import_picocolors.default.red
|
|
415
425
|
};
|
|
416
426
|
function parseCommits(raw) {
|
|
417
427
|
const lines = raw.toString().trim().split(/\n/g);
|
|
@@ -694,6 +704,7 @@ async function normalizeOptions(raw) {
|
|
|
694
704
|
const sign = Boolean(raw.sign);
|
|
695
705
|
const push = Boolean(raw.push);
|
|
696
706
|
const all = Boolean(raw.all);
|
|
707
|
+
const install = Boolean(raw.install);
|
|
697
708
|
const noVerify = Boolean(raw.noVerify);
|
|
698
709
|
const cwd = raw.cwd || import_node_process3.default.cwd();
|
|
699
710
|
const ignoreScripts = Boolean(raw.ignoreScripts);
|
|
@@ -773,6 +784,7 @@ async function normalizeOptions(raw) {
|
|
|
773
784
|
push,
|
|
774
785
|
files,
|
|
775
786
|
cwd,
|
|
787
|
+
install,
|
|
776
788
|
interface: ui,
|
|
777
789
|
ignoreScripts,
|
|
778
790
|
execute,
|
|
@@ -963,6 +975,27 @@ async function versionBump(arg = {}) {
|
|
|
963
975
|
}
|
|
964
976
|
await runNpmScript("preversion" /* PreVersion */, operation);
|
|
965
977
|
await updateFiles(operation);
|
|
978
|
+
if (operation.options.install) {
|
|
979
|
+
const { detect } = await import("package-manager-detector/detect");
|
|
980
|
+
const pm = await detect();
|
|
981
|
+
if (!(pm == null ? void 0 : pm.name)) {
|
|
982
|
+
throw new Error("Could not detect package manager, failed to run npm install");
|
|
983
|
+
}
|
|
984
|
+
const { COMMANDS, constructCommand } = await import("package-manager-detector/commands");
|
|
985
|
+
const command = constructCommand(COMMANDS[pm.name].install, []);
|
|
986
|
+
if (!command) {
|
|
987
|
+
throw new Error("Could not find install command for package manager");
|
|
988
|
+
}
|
|
989
|
+
console.log(symbols_exports.info, "Installing dependencies with", `${command.command} ${command.args.join(" ")}`);
|
|
990
|
+
await (0, import_tinyexec4.x)(command.command, command.args, {
|
|
991
|
+
throwOnError: true,
|
|
992
|
+
nodeOptions: {
|
|
993
|
+
stdio: "inherit",
|
|
994
|
+
cwd: operation.options.cwd
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
console.log(symbols_exports.success, "Dependencies installed");
|
|
998
|
+
}
|
|
966
999
|
if (operation.options.execute) {
|
|
967
1000
|
if (typeof operation.options.execute === "function") {
|
|
968
1001
|
await operation.options.execute(operation);
|
|
@@ -997,6 +1030,8 @@ function printSummary(operation) {
|
|
|
997
1030
|
console.log(` execute ${import_picocolors3.default.bold(typeof operation.options.execute === "function" ? "function" : operation.options.execute)}`);
|
|
998
1031
|
if (operation.options.push)
|
|
999
1032
|
console.log(` push ${import_picocolors3.default.cyan(import_picocolors3.default.bold("yes"))}`);
|
|
1033
|
+
if (operation.options.install)
|
|
1034
|
+
console.log(` install ${import_picocolors3.default.cyan(import_picocolors3.default.bold("yes"))}`);
|
|
1000
1035
|
console.log();
|
|
1001
1036
|
console.log(` from ${import_picocolors3.default.bold(operation.state.currentVersion)}`);
|
|
1002
1037
|
console.log(` to ${import_picocolors3.default.green(import_picocolors3.default.bold(operation.state.newVersion))}`);
|
|
@@ -1010,7 +1045,7 @@ var import_picocolors4 = __toESM(require_picocolors());
|
|
|
1010
1045
|
var import_semver3 = require("semver");
|
|
1011
1046
|
|
|
1012
1047
|
// package.json
|
|
1013
|
-
var version = "9.
|
|
1048
|
+
var version = "9.10.1";
|
|
1014
1049
|
|
|
1015
1050
|
// src/config.ts
|
|
1016
1051
|
var import_node_path2 = require("path");
|
|
@@ -1022,6 +1057,7 @@ var bumpConfigDefaults = {
|
|
|
1022
1057
|
push: true,
|
|
1023
1058
|
tag: true,
|
|
1024
1059
|
sign: false,
|
|
1060
|
+
install: false,
|
|
1025
1061
|
recursive: false,
|
|
1026
1062
|
noVerify: false,
|
|
1027
1063
|
confirm: true,
|
|
@@ -1086,6 +1122,7 @@ async function parseArgs() {
|
|
|
1086
1122
|
noGitCheck: args.noGitCheck,
|
|
1087
1123
|
confirm: !args.yes,
|
|
1088
1124
|
noVerify: !args.verify,
|
|
1125
|
+
install: args.install,
|
|
1089
1126
|
files: [...args["--"] || [], ...resultArgs],
|
|
1090
1127
|
ignoreScripts: args.ignoreScripts,
|
|
1091
1128
|
currentVersion: args.currentVersion,
|
|
@@ -1110,7 +1147,7 @@ async function parseArgs() {
|
|
|
1110
1147
|
}
|
|
1111
1148
|
function loadCliArgs(argv = import_node_process6.default.argv) {
|
|
1112
1149
|
const cli = (0, import_cac.default)("bumpp");
|
|
1113
|
-
cli.version(version).usage("[...files]").option("--preid <preid>", "ID for prerelease").option("--all", `Include all files (default: ${bumpConfigDefaults.all})`).option("--no-git-check", `Skip git check`, { default: bumpConfigDefaults.noGitCheck }).option("-c, --commit [msg]", "Commit message", { default: true }).option("--no-commit", "Skip commit", { default: false }).option("-t, --tag [tag]", "Tag name", { default: true }).option("--no-tag", "Skip tag", { default: false }).option("--sign", "Sign commit and tag").option("-p, --push", `Push to remote (default: ${bumpConfigDefaults.push})`).option("-y, --yes", `Skip confirmation (default: ${!bumpConfigDefaults.confirm})`).option("-r, --recursive", `Bump package.json files recursively (default: ${bumpConfigDefaults.recursive})`).option("--no-verify", "Skip git verification").option("--ignore-scripts", `Ignore scripts (default: ${bumpConfigDefaults.ignoreScripts})`).option("-q, --quiet", "Quiet mode").option("--current-version <version>", "Current version").option("--print-commits", "Print recent commits").option("-x, --execute <command>", "Commands to execute after version bumps").help();
|
|
1150
|
+
cli.version(version).usage("[...files]").option("--preid <preid>", "ID for prerelease").option("--all", `Include all files (default: ${bumpConfigDefaults.all})`).option("--no-git-check", `Skip git check`, { default: bumpConfigDefaults.noGitCheck }).option("-c, --commit [msg]", "Commit message", { default: true }).option("--no-commit", "Skip commit", { default: false }).option("-t, --tag [tag]", "Tag name", { default: true }).option("--no-tag", "Skip tag", { default: false }).option("--sign", "Sign commit and tag").option("--install", `Run 'npm install' after bumping version (default: ${bumpConfigDefaults.install})`, { default: false }).option("-p, --push", `Push to remote (default: ${bumpConfigDefaults.push})`).option("-y, --yes", `Skip confirmation (default: ${!bumpConfigDefaults.confirm})`).option("-r, --recursive", `Bump package.json files recursively (default: ${bumpConfigDefaults.recursive})`).option("--no-verify", "Skip git verification").option("--ignore-scripts", `Ignore scripts (default: ${bumpConfigDefaults.ignoreScripts})`).option("-q, --quiet", "Quiet mode").option("--current-version <version>", "Current version").option("--print-commits", "Print recent commits").option("-x, --execute <command>", "Commands to execute after version bumps").help();
|
|
1114
1151
|
const result = cli.parse(argv);
|
|
1115
1152
|
const rawArgs = cli.rawArgs;
|
|
1116
1153
|
const args = result.options;
|
package/dist/cli/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
require_picocolors,
|
|
11
11
|
symbols_exports,
|
|
12
12
|
versionBump
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-HXP7VO25.mjs";
|
|
14
14
|
|
|
15
15
|
// src/cli/index.ts
|
|
16
16
|
import process2 from "node:process";
|
|
@@ -23,7 +23,7 @@ import cac from "cac";
|
|
|
23
23
|
import { valid as isValidVersion } from "semver";
|
|
24
24
|
|
|
25
25
|
// package.json
|
|
26
|
-
var version = "9.
|
|
26
|
+
var version = "9.10.1";
|
|
27
27
|
|
|
28
28
|
// src/cli/parse-args.ts
|
|
29
29
|
async function parseArgs() {
|
|
@@ -44,6 +44,7 @@ async function parseArgs() {
|
|
|
44
44
|
noGitCheck: args.noGitCheck,
|
|
45
45
|
confirm: !args.yes,
|
|
46
46
|
noVerify: !args.verify,
|
|
47
|
+
install: args.install,
|
|
47
48
|
files: [...args["--"] || [], ...resultArgs],
|
|
48
49
|
ignoreScripts: args.ignoreScripts,
|
|
49
50
|
currentVersion: args.currentVersion,
|
|
@@ -68,7 +69,7 @@ async function parseArgs() {
|
|
|
68
69
|
}
|
|
69
70
|
function loadCliArgs(argv = process.argv) {
|
|
70
71
|
const cli = cac("bumpp");
|
|
71
|
-
cli.version(version).usage("[...files]").option("--preid <preid>", "ID for prerelease").option("--all", `Include all files (default: ${bumpConfigDefaults.all})`).option("--no-git-check", `Skip git check`, { default: bumpConfigDefaults.noGitCheck }).option("-c, --commit [msg]", "Commit message", { default: true }).option("--no-commit", "Skip commit", { default: false }).option("-t, --tag [tag]", "Tag name", { default: true }).option("--no-tag", "Skip tag", { default: false }).option("--sign", "Sign commit and tag").option("-p, --push", `Push to remote (default: ${bumpConfigDefaults.push})`).option("-y, --yes", `Skip confirmation (default: ${!bumpConfigDefaults.confirm})`).option("-r, --recursive", `Bump package.json files recursively (default: ${bumpConfigDefaults.recursive})`).option("--no-verify", "Skip git verification").option("--ignore-scripts", `Ignore scripts (default: ${bumpConfigDefaults.ignoreScripts})`).option("-q, --quiet", "Quiet mode").option("--current-version <version>", "Current version").option("--print-commits", "Print recent commits").option("-x, --execute <command>", "Commands to execute after version bumps").help();
|
|
72
|
+
cli.version(version).usage("[...files]").option("--preid <preid>", "ID for prerelease").option("--all", `Include all files (default: ${bumpConfigDefaults.all})`).option("--no-git-check", `Skip git check`, { default: bumpConfigDefaults.noGitCheck }).option("-c, --commit [msg]", "Commit message", { default: true }).option("--no-commit", "Skip commit", { default: false }).option("-t, --tag [tag]", "Tag name", { default: true }).option("--no-tag", "Skip tag", { default: false }).option("--sign", "Sign commit and tag").option("--install", `Run 'npm install' after bumping version (default: ${bumpConfigDefaults.install})`, { default: false }).option("-p, --push", `Push to remote (default: ${bumpConfigDefaults.push})`).option("-y, --yes", `Skip confirmation (default: ${!bumpConfigDefaults.confirm})`).option("-r, --recursive", `Bump package.json files recursively (default: ${bumpConfigDefaults.recursive})`).option("--no-verify", "Skip git verification").option("--ignore-scripts", `Ignore scripts (default: ${bumpConfigDefaults.ignoreScripts})`).option("-q, --quiet", "Quiet mode").option("--current-version <version>", "Current version").option("--print-commits", "Print recent commits").option("-x, --execute <command>", "Commands to execute after version bumps").help();
|
|
72
73
|
const result = cli.parse(argv);
|
|
73
74
|
const rawArgs = cli.rawArgs;
|
|
74
75
|
const args = result.options;
|
package/dist/index.d.mts
CHANGED
|
@@ -49,6 +49,7 @@ interface NormalizedOptions {
|
|
|
49
49
|
push: boolean;
|
|
50
50
|
files: string[];
|
|
51
51
|
cwd: string;
|
|
52
|
+
install: boolean;
|
|
52
53
|
interface: Interface;
|
|
53
54
|
ignoreScripts: boolean;
|
|
54
55
|
execute?: string | ((config: Operation) => void | PromiseLike<void>);
|
|
@@ -227,6 +228,12 @@ interface VersionBumpOptions {
|
|
|
227
228
|
* Defaults to `true`.
|
|
228
229
|
*/
|
|
229
230
|
push?: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* Run `npm install` after bumping the version number.
|
|
233
|
+
*
|
|
234
|
+
* Defaults to `false`.
|
|
235
|
+
*/
|
|
236
|
+
install?: boolean;
|
|
230
237
|
/**
|
|
231
238
|
* Indicates whether the git commit should include ALL files (`git commit --all`)
|
|
232
239
|
* rather than just the files that were modified by `versionBump()`.
|
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ interface NormalizedOptions {
|
|
|
49
49
|
push: boolean;
|
|
50
50
|
files: string[];
|
|
51
51
|
cwd: string;
|
|
52
|
+
install: boolean;
|
|
52
53
|
interface: Interface;
|
|
53
54
|
ignoreScripts: boolean;
|
|
54
55
|
execute?: string | ((config: Operation) => void | PromiseLike<void>);
|
|
@@ -227,6 +228,12 @@ interface VersionBumpOptions {
|
|
|
227
228
|
* Defaults to `true`.
|
|
228
229
|
*/
|
|
229
230
|
push?: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* Run `npm install` after bumping the version number.
|
|
233
|
+
*
|
|
234
|
+
* Defaults to `false`.
|
|
235
|
+
*/
|
|
236
|
+
install?: boolean;
|
|
230
237
|
/**
|
|
231
238
|
* Indicates whether the git commit should include ALL files (`git commit --all`)
|
|
232
239
|
* rather than just the files that were modified by `versionBump()`.
|
package/dist/index.js
CHANGED
|
@@ -406,14 +406,24 @@ var import_semver2 = __toESM(require("semver"));
|
|
|
406
406
|
var import_picocolors = __toESM(require_picocolors());
|
|
407
407
|
var import_tinyexec = require("tinyexec");
|
|
408
408
|
var messageColorMap = {
|
|
409
|
-
chore: import_picocolors.default.gray,
|
|
410
|
-
fix: import_picocolors.default.yellow,
|
|
411
409
|
feat: import_picocolors.default.green,
|
|
410
|
+
feature: import_picocolors.default.green,
|
|
412
411
|
refactor: import_picocolors.default.cyan,
|
|
412
|
+
style: import_picocolors.default.cyan,
|
|
413
413
|
docs: import_picocolors.default.blue,
|
|
414
414
|
doc: import_picocolors.default.blue,
|
|
415
|
+
types: import_picocolors.default.blue,
|
|
416
|
+
type: import_picocolors.default.blue,
|
|
417
|
+
chore: import_picocolors.default.gray,
|
|
415
418
|
ci: import_picocolors.default.gray,
|
|
416
|
-
build: import_picocolors.default.gray
|
|
419
|
+
build: import_picocolors.default.gray,
|
|
420
|
+
deps: import_picocolors.default.gray,
|
|
421
|
+
dev: import_picocolors.default.gray,
|
|
422
|
+
fix: import_picocolors.default.yellow,
|
|
423
|
+
test: import_picocolors.default.yellow,
|
|
424
|
+
perf: import_picocolors.default.magenta,
|
|
425
|
+
revert: import_picocolors.default.red,
|
|
426
|
+
breaking: import_picocolors.default.red
|
|
417
427
|
};
|
|
418
428
|
function parseCommits(raw) {
|
|
419
429
|
const lines = raw.toString().trim().split(/\n/g);
|
|
@@ -715,6 +725,7 @@ async function normalizeOptions(raw) {
|
|
|
715
725
|
const sign = Boolean(raw.sign);
|
|
716
726
|
const push = Boolean(raw.push);
|
|
717
727
|
const all = Boolean(raw.all);
|
|
728
|
+
const install = Boolean(raw.install);
|
|
718
729
|
const noVerify = Boolean(raw.noVerify);
|
|
719
730
|
const cwd = raw.cwd || import_node_process3.default.cwd();
|
|
720
731
|
const ignoreScripts = Boolean(raw.ignoreScripts);
|
|
@@ -794,6 +805,7 @@ async function normalizeOptions(raw) {
|
|
|
794
805
|
push,
|
|
795
806
|
files,
|
|
796
807
|
cwd,
|
|
808
|
+
install,
|
|
797
809
|
interface: ui,
|
|
798
810
|
ignoreScripts,
|
|
799
811
|
execute,
|
|
@@ -984,6 +996,27 @@ async function versionBump(arg = {}) {
|
|
|
984
996
|
}
|
|
985
997
|
await runNpmScript("preversion" /* PreVersion */, operation);
|
|
986
998
|
await updateFiles(operation);
|
|
999
|
+
if (operation.options.install) {
|
|
1000
|
+
const { detect } = await import("package-manager-detector/detect");
|
|
1001
|
+
const pm = await detect();
|
|
1002
|
+
if (!(pm == null ? void 0 : pm.name)) {
|
|
1003
|
+
throw new Error("Could not detect package manager, failed to run npm install");
|
|
1004
|
+
}
|
|
1005
|
+
const { COMMANDS, constructCommand } = await import("package-manager-detector/commands");
|
|
1006
|
+
const command = constructCommand(COMMANDS[pm.name].install, []);
|
|
1007
|
+
if (!command) {
|
|
1008
|
+
throw new Error("Could not find install command for package manager");
|
|
1009
|
+
}
|
|
1010
|
+
console.log(symbols_exports.info, "Installing dependencies with", `${command.command} ${command.args.join(" ")}`);
|
|
1011
|
+
await (0, import_tinyexec4.x)(command.command, command.args, {
|
|
1012
|
+
throwOnError: true,
|
|
1013
|
+
nodeOptions: {
|
|
1014
|
+
stdio: "inherit",
|
|
1015
|
+
cwd: operation.options.cwd
|
|
1016
|
+
}
|
|
1017
|
+
});
|
|
1018
|
+
console.log(symbols_exports.success, "Dependencies installed");
|
|
1019
|
+
}
|
|
987
1020
|
if (operation.options.execute) {
|
|
988
1021
|
if (typeof operation.options.execute === "function") {
|
|
989
1022
|
await operation.options.execute(operation);
|
|
@@ -1018,6 +1051,8 @@ function printSummary(operation) {
|
|
|
1018
1051
|
console.log(` execute ${import_picocolors3.default.bold(typeof operation.options.execute === "function" ? "function" : operation.options.execute)}`);
|
|
1019
1052
|
if (operation.options.push)
|
|
1020
1053
|
console.log(` push ${import_picocolors3.default.cyan(import_picocolors3.default.bold("yes"))}`);
|
|
1054
|
+
if (operation.options.install)
|
|
1055
|
+
console.log(` install ${import_picocolors3.default.cyan(import_picocolors3.default.bold("yes"))}`);
|
|
1021
1056
|
console.log();
|
|
1022
1057
|
console.log(` from ${import_picocolors3.default.bold(operation.state.currentVersion)}`);
|
|
1023
1058
|
console.log(` to ${import_picocolors3.default.green(import_picocolors3.default.bold(operation.state.newVersion))}`);
|
|
@@ -1042,6 +1077,7 @@ var bumpConfigDefaults = {
|
|
|
1042
1077
|
push: true,
|
|
1043
1078
|
tag: true,
|
|
1044
1079
|
sign: false,
|
|
1080
|
+
install: false,
|
|
1045
1081
|
recursive: false,
|
|
1046
1082
|
noVerify: false,
|
|
1047
1083
|
confirm: true,
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bumpp",
|
|
3
|
-
"version": "9.
|
|
4
|
-
"packageManager": "pnpm@9.15.
|
|
3
|
+
"version": "9.10.1",
|
|
4
|
+
"packageManager": "pnpm@9.15.4",
|
|
5
5
|
"description": "Bump version, commit changes, tag, and push to Git",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "James Messinger",
|
|
@@ -65,26 +65,27 @@
|
|
|
65
65
|
"escalade": "^3.2.0",
|
|
66
66
|
"js-yaml": "^4.1.0",
|
|
67
67
|
"jsonc-parser": "^3.3.1",
|
|
68
|
+
"package-manager-detector": "^0.2.8",
|
|
68
69
|
"prompts": "^2.4.2",
|
|
69
70
|
"semver": "^7.6.3",
|
|
70
71
|
"tinyexec": "^0.3.2",
|
|
71
72
|
"tinyglobby": "^0.2.10"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
|
-
"@antfu/eslint-config": "^3.
|
|
75
|
+
"@antfu/eslint-config": "^3.14.0",
|
|
75
76
|
"@types/js-yaml": "^4.0.9",
|
|
76
|
-
"@types/node": "^22.10.
|
|
77
|
+
"@types/node": "^22.10.6",
|
|
77
78
|
"@types/prompts": "^2.4.9",
|
|
78
79
|
"@types/semver": "^7.5.8",
|
|
79
80
|
"args-tokenizer": "^0.3.0",
|
|
80
|
-
"eslint": "^9.
|
|
81
|
+
"eslint": "^9.18.0",
|
|
81
82
|
"esno": "^4.8.0",
|
|
82
83
|
"log-symbols": "^7.0.0",
|
|
83
84
|
"npm-check": "^6.0.1",
|
|
84
85
|
"picocolors": "^1.1.1",
|
|
85
86
|
"rimraf": "^6.0.1",
|
|
86
87
|
"tsup": "^8.3.5",
|
|
87
|
-
"typescript": "^5.7.
|
|
88
|
+
"typescript": "^5.7.3",
|
|
88
89
|
"vitest": "^2.1.8"
|
|
89
90
|
}
|
|
90
91
|
}
|