bumpp 9.6.1 → 9.7.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 -0
- package/dist/{chunk-TBB4VMXP.mjs → chunk-7TCD6MWB.mjs} +17 -1
- package/dist/cli/index.d.mts +2 -1
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.js +36 -3
- package/dist/cli/index.mjs +17 -3
- package/dist/index.d.mts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +17 -1
- package/dist/index.mjs +1 -1
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@ Forked from [`version-bump-prompt`](https://github.com/JS-DevTools/version-bump-
|
|
|
12
12
|
- Use the current version's `preid` when available.
|
|
13
13
|
- Confirmation before bumping.
|
|
14
14
|
- Enable `--commit` `--tag` `--push` by default. (opt-out by `--no-push`, etc.)
|
|
15
|
+
- `--sign` to sign the commit and tag.
|
|
15
16
|
- `-r` or `--recursive` to bump all packages in the monorepo.
|
|
16
17
|
- Conventional Commits by default.
|
|
17
18
|
- Supports config file `bump.config.ts`:
|
|
@@ -1001,6 +1001,9 @@ async function gitCommit(operation) {
|
|
|
1001
1001
|
if (noVerify) {
|
|
1002
1002
|
args.push("--no-verify");
|
|
1003
1003
|
}
|
|
1004
|
+
if (operation.options.sign) {
|
|
1005
|
+
args.push("--gpg-sign");
|
|
1006
|
+
}
|
|
1004
1007
|
const commitMessage = formatVersionString(message, newVersion);
|
|
1005
1008
|
args.push("--message", commitMessage);
|
|
1006
1009
|
if (!all)
|
|
@@ -1023,6 +1026,9 @@ async function gitTag(operation) {
|
|
|
1023
1026
|
];
|
|
1024
1027
|
const tagName = formatVersionString(tag.name, newVersion);
|
|
1025
1028
|
args.push(tagName);
|
|
1029
|
+
if (operation.options.sign) {
|
|
1030
|
+
args.push("--sign");
|
|
1031
|
+
}
|
|
1026
1032
|
await ezSpawn2.async("git", ["tag", ...args]);
|
|
1027
1033
|
return operation.update({ event: "git tag" /* GitTag */, tagName });
|
|
1028
1034
|
}
|
|
@@ -1051,6 +1057,7 @@ import yaml from "js-yaml";
|
|
|
1051
1057
|
async function normalizeOptions(raw) {
|
|
1052
1058
|
var _a, _b, _d;
|
|
1053
1059
|
const preid = typeof raw.preid === "string" ? raw.preid : "beta";
|
|
1060
|
+
const sign = Boolean(raw.sign);
|
|
1054
1061
|
const push = Boolean(raw.push);
|
|
1055
1062
|
const all = Boolean(raw.all);
|
|
1056
1063
|
const noVerify = Boolean(raw.noVerify);
|
|
@@ -1127,6 +1134,7 @@ async function normalizeOptions(raw) {
|
|
|
1127
1134
|
release,
|
|
1128
1135
|
commit,
|
|
1129
1136
|
tag,
|
|
1137
|
+
sign,
|
|
1130
1138
|
push,
|
|
1131
1139
|
files,
|
|
1132
1140
|
cwd,
|
|
@@ -1268,7 +1276,13 @@ async function updateManifestFile(relPath, operation) {
|
|
|
1268
1276
|
const { newVersion } = operation.state;
|
|
1269
1277
|
let modified = false;
|
|
1270
1278
|
const file = await readJsoncFile(relPath, cwd);
|
|
1271
|
-
if (isManifest(file.data)
|
|
1279
|
+
if (!isManifest(file.data)) {
|
|
1280
|
+
return modified;
|
|
1281
|
+
}
|
|
1282
|
+
if (file.data.version == null) {
|
|
1283
|
+
return modified;
|
|
1284
|
+
}
|
|
1285
|
+
if (file.data.version !== newVersion) {
|
|
1272
1286
|
file.modified.push([["version"], newVersion]);
|
|
1273
1287
|
if (isPackageLockManifest(file.data))
|
|
1274
1288
|
file.modified.push([["packages", "", "version"], newVersion]);
|
|
@@ -1358,11 +1372,13 @@ var bumpConfigDefaults = {
|
|
|
1358
1372
|
commit: true,
|
|
1359
1373
|
push: true,
|
|
1360
1374
|
tag: true,
|
|
1375
|
+
sign: false,
|
|
1361
1376
|
recursive: false,
|
|
1362
1377
|
noVerify: false,
|
|
1363
1378
|
confirm: true,
|
|
1364
1379
|
ignoreScripts: false,
|
|
1365
1380
|
all: false,
|
|
1381
|
+
noGitCheck: true,
|
|
1366
1382
|
files: []
|
|
1367
1383
|
};
|
|
1368
1384
|
async function loadBumpConfig(overrides, cwd = process7.cwd()) {
|
package/dist/cli/index.d.mts
CHANGED
package/dist/cli/index.d.ts
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -134,6 +134,7 @@ var require_picocolors = __commonJS({
|
|
|
134
134
|
// src/cli/index.ts
|
|
135
135
|
var cli_exports = {};
|
|
136
136
|
__export(cli_exports, {
|
|
137
|
+
checkGitStatus: () => checkGitStatus,
|
|
137
138
|
main: () => main2
|
|
138
139
|
});
|
|
139
140
|
module.exports = __toCommonJS(cli_exports);
|
|
@@ -651,8 +652,11 @@ var fallback = {
|
|
|
651
652
|
var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
652
653
|
var log_symbols_default = logSymbols;
|
|
653
654
|
|
|
655
|
+
// src/cli/index.ts
|
|
656
|
+
var ezSpawn5 = __toESM(require("@jsdevtools/ez-spawn"));
|
|
657
|
+
|
|
654
658
|
// package.json
|
|
655
|
-
var version = "9.
|
|
659
|
+
var version = "9.7.1";
|
|
656
660
|
|
|
657
661
|
// src/version-bump.ts
|
|
658
662
|
var import_node_process5 = __toESM(require("process"));
|
|
@@ -993,6 +997,9 @@ async function gitCommit(operation) {
|
|
|
993
997
|
if (noVerify) {
|
|
994
998
|
args.push("--no-verify");
|
|
995
999
|
}
|
|
1000
|
+
if (operation.options.sign) {
|
|
1001
|
+
args.push("--gpg-sign");
|
|
1002
|
+
}
|
|
996
1003
|
const commitMessage = formatVersionString(message, newVersion);
|
|
997
1004
|
args.push("--message", commitMessage);
|
|
998
1005
|
if (!all)
|
|
@@ -1015,6 +1022,9 @@ async function gitTag(operation) {
|
|
|
1015
1022
|
];
|
|
1016
1023
|
const tagName = formatVersionString(tag.name, newVersion);
|
|
1017
1024
|
args.push(tagName);
|
|
1025
|
+
if (operation.options.sign) {
|
|
1026
|
+
args.push("--sign");
|
|
1027
|
+
}
|
|
1018
1028
|
await ezSpawn2.async("git", ["tag", ...args]);
|
|
1019
1029
|
return operation.update({ event: "git tag" /* GitTag */, tagName });
|
|
1020
1030
|
}
|
|
@@ -1043,6 +1053,7 @@ var import_js_yaml = __toESM(require("js-yaml"));
|
|
|
1043
1053
|
async function normalizeOptions(raw) {
|
|
1044
1054
|
var _a, _b, _d;
|
|
1045
1055
|
const preid = typeof raw.preid === "string" ? raw.preid : "beta";
|
|
1056
|
+
const sign = Boolean(raw.sign);
|
|
1046
1057
|
const push = Boolean(raw.push);
|
|
1047
1058
|
const all = Boolean(raw.all);
|
|
1048
1059
|
const noVerify = Boolean(raw.noVerify);
|
|
@@ -1119,6 +1130,7 @@ async function normalizeOptions(raw) {
|
|
|
1119
1130
|
release,
|
|
1120
1131
|
commit,
|
|
1121
1132
|
tag,
|
|
1133
|
+
sign,
|
|
1122
1134
|
push,
|
|
1123
1135
|
files,
|
|
1124
1136
|
cwd,
|
|
@@ -1260,7 +1272,13 @@ async function updateManifestFile(relPath, operation) {
|
|
|
1260
1272
|
const { newVersion } = operation.state;
|
|
1261
1273
|
let modified = false;
|
|
1262
1274
|
const file = await readJsoncFile(relPath, cwd);
|
|
1263
|
-
if (isManifest(file.data)
|
|
1275
|
+
if (!isManifest(file.data)) {
|
|
1276
|
+
return modified;
|
|
1277
|
+
}
|
|
1278
|
+
if (file.data.version == null) {
|
|
1279
|
+
return modified;
|
|
1280
|
+
}
|
|
1281
|
+
if (file.data.version !== newVersion) {
|
|
1264
1282
|
file.modified.push([["version"], newVersion]);
|
|
1265
1283
|
if (isPackageLockManifest(file.data))
|
|
1266
1284
|
file.modified.push([["packages", "", "version"], newVersion]);
|
|
@@ -1348,11 +1366,13 @@ var bumpConfigDefaults = {
|
|
|
1348
1366
|
commit: true,
|
|
1349
1367
|
push: true,
|
|
1350
1368
|
tag: true,
|
|
1369
|
+
sign: false,
|
|
1351
1370
|
recursive: false,
|
|
1352
1371
|
noVerify: false,
|
|
1353
1372
|
confirm: true,
|
|
1354
1373
|
ignoreScripts: false,
|
|
1355
1374
|
all: false,
|
|
1375
|
+
noGitCheck: true,
|
|
1356
1376
|
files: []
|
|
1357
1377
|
};
|
|
1358
1378
|
async function loadBumpConfig(overrides, cwd = import_node_process6.default.cwd()) {
|
|
@@ -1405,8 +1425,10 @@ async function parseArgs() {
|
|
|
1405
1425
|
preid: args.preid,
|
|
1406
1426
|
commit: args.commit,
|
|
1407
1427
|
tag: args.tag,
|
|
1428
|
+
sign: args.sign,
|
|
1408
1429
|
push: args.push,
|
|
1409
1430
|
all: args.all,
|
|
1431
|
+
noGitCheck: args.noGitCheck,
|
|
1410
1432
|
confirm: !args.yes,
|
|
1411
1433
|
noVerify: !args.verify,
|
|
1412
1434
|
files: [...args["--"] || [], ...resultArgs],
|
|
@@ -1432,7 +1454,7 @@ async function parseArgs() {
|
|
|
1432
1454
|
}
|
|
1433
1455
|
function loadCliArgs(argv = import_node_process7.default.argv) {
|
|
1434
1456
|
const cli = (0, import_cac.default)("bumpp");
|
|
1435
|
-
cli.version(version).usage("[...files]").option("--preid <preid>", "ID for prerelease").option("--all", `Include all files (default: ${bumpConfigDefaults.all})`).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("-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("-v, --version <version>", "Target version").option("--current-version <version>", "Current version").option("--print-commits", "Print recent commits", { default: true }).option("-x, --execute <command>", "Commands to execute after version bumps").help();
|
|
1457
|
+
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("-v, --version <version>", "Target version").option("--current-version <version>", "Current version").option("--print-commits", "Print recent commits", { default: true }).option("-x, --execute <command>", "Commands to execute after version bumps").help();
|
|
1436
1458
|
const result = cli.parse(argv);
|
|
1437
1459
|
const rawArgs = cli.rawArgs;
|
|
1438
1460
|
const args = result.options;
|
|
@@ -1466,6 +1488,9 @@ async function main2() {
|
|
|
1466
1488
|
console.log(version);
|
|
1467
1489
|
import_node_process8.default.exit(0 /* Success */);
|
|
1468
1490
|
} else {
|
|
1491
|
+
if (!options.all && !options.noGitCheck) {
|
|
1492
|
+
checkGitStatus();
|
|
1493
|
+
}
|
|
1469
1494
|
if (!quiet)
|
|
1470
1495
|
options.progress = options.progress ? options.progress : progress;
|
|
1471
1496
|
await versionBump(options);
|
|
@@ -1474,6 +1499,13 @@ async function main2() {
|
|
|
1474
1499
|
errorHandler2(error);
|
|
1475
1500
|
}
|
|
1476
1501
|
}
|
|
1502
|
+
function checkGitStatus() {
|
|
1503
|
+
const { stdout } = ezSpawn5.sync("git", ["status", "--porcelain"]);
|
|
1504
|
+
if (stdout.trim()) {
|
|
1505
|
+
throw new Error(`Git working tree is not clean:
|
|
1506
|
+
${stdout}`);
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1477
1509
|
function progress({ event, script, updatedFiles, skippedFiles, newVersion }) {
|
|
1478
1510
|
switch (event) {
|
|
1479
1511
|
case "file updated" /* FileUpdated */:
|
|
@@ -1505,5 +1537,6 @@ function errorHandler2(error) {
|
|
|
1505
1537
|
}
|
|
1506
1538
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1507
1539
|
0 && (module.exports = {
|
|
1540
|
+
checkGitStatus,
|
|
1508
1541
|
main
|
|
1509
1542
|
});
|
package/dist/cli/index.mjs
CHANGED
|
@@ -10,13 +10,14 @@ import {
|
|
|
10
10
|
log_symbols_default,
|
|
11
11
|
require_picocolors,
|
|
12
12
|
versionBump
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-7TCD6MWB.mjs";
|
|
14
14
|
|
|
15
15
|
// src/cli/index.ts
|
|
16
16
|
import process2 from "process";
|
|
17
|
+
import * as ezSpawn from "@jsdevtools/ez-spawn";
|
|
17
18
|
|
|
18
19
|
// package.json
|
|
19
|
-
var version = "9.
|
|
20
|
+
var version = "9.7.1";
|
|
20
21
|
|
|
21
22
|
// src/cli/parse-args.ts
|
|
22
23
|
var import_picocolors = __toESM(require_picocolors());
|
|
@@ -35,8 +36,10 @@ async function parseArgs() {
|
|
|
35
36
|
preid: args.preid,
|
|
36
37
|
commit: args.commit,
|
|
37
38
|
tag: args.tag,
|
|
39
|
+
sign: args.sign,
|
|
38
40
|
push: args.push,
|
|
39
41
|
all: args.all,
|
|
42
|
+
noGitCheck: args.noGitCheck,
|
|
40
43
|
confirm: !args.yes,
|
|
41
44
|
noVerify: !args.verify,
|
|
42
45
|
files: [...args["--"] || [], ...resultArgs],
|
|
@@ -62,7 +65,7 @@ async function parseArgs() {
|
|
|
62
65
|
}
|
|
63
66
|
function loadCliArgs(argv = process.argv) {
|
|
64
67
|
const cli = cac("bumpp");
|
|
65
|
-
cli.version(version).usage("[...files]").option("--preid <preid>", "ID for prerelease").option("--all", `Include all files (default: ${bumpConfigDefaults.all})`).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("-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("-v, --version <version>", "Target version").option("--current-version <version>", "Current version").option("--print-commits", "Print recent commits", { default: true }).option("-x, --execute <command>", "Commands to execute after version bumps").help();
|
|
68
|
+
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("-v, --version <version>", "Target version").option("--current-version <version>", "Current version").option("--print-commits", "Print recent commits", { default: true }).option("-x, --execute <command>", "Commands to execute after version bumps").help();
|
|
66
69
|
const result = cli.parse(argv);
|
|
67
70
|
const rawArgs = cli.rawArgs;
|
|
68
71
|
const args = result.options;
|
|
@@ -96,6 +99,9 @@ async function main() {
|
|
|
96
99
|
console.log(version);
|
|
97
100
|
process2.exit(0 /* Success */);
|
|
98
101
|
} else {
|
|
102
|
+
if (!options.all && !options.noGitCheck) {
|
|
103
|
+
checkGitStatus();
|
|
104
|
+
}
|
|
99
105
|
if (!quiet)
|
|
100
106
|
options.progress = options.progress ? options.progress : progress;
|
|
101
107
|
await versionBump(options);
|
|
@@ -104,6 +110,13 @@ async function main() {
|
|
|
104
110
|
errorHandler2(error);
|
|
105
111
|
}
|
|
106
112
|
}
|
|
113
|
+
function checkGitStatus() {
|
|
114
|
+
const { stdout } = ezSpawn.sync("git", ["status", "--porcelain"]);
|
|
115
|
+
if (stdout.trim()) {
|
|
116
|
+
throw new Error(`Git working tree is not clean:
|
|
117
|
+
${stdout}`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
107
120
|
function progress({ event, script, updatedFiles, skippedFiles, newVersion }) {
|
|
108
121
|
switch (event) {
|
|
109
122
|
case "file updated" /* FileUpdated */:
|
|
@@ -134,5 +147,6 @@ function errorHandler2(error) {
|
|
|
134
147
|
process2.exit(1 /* FatalError */);
|
|
135
148
|
}
|
|
136
149
|
export {
|
|
150
|
+
checkGitStatus,
|
|
137
151
|
main
|
|
138
152
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -112,6 +112,12 @@ interface VersionBumpOptions {
|
|
|
112
112
|
* Defaults to `true`.
|
|
113
113
|
*/
|
|
114
114
|
tag?: boolean | string;
|
|
115
|
+
/**
|
|
116
|
+
* Sign the git commit and tag with a configured key (GPG/SSH).
|
|
117
|
+
*
|
|
118
|
+
* Defaults to `false`.
|
|
119
|
+
*/
|
|
120
|
+
sign?: boolean;
|
|
115
121
|
/**
|
|
116
122
|
* Indicates whether to push the git commit and tag.
|
|
117
123
|
*
|
|
@@ -125,6 +131,12 @@ interface VersionBumpOptions {
|
|
|
125
131
|
* Defaults to `false`.
|
|
126
132
|
*/
|
|
127
133
|
all?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Indicates whether the git working tree needs to be cleared before bumping.
|
|
136
|
+
*
|
|
137
|
+
* Defaults to `true`.
|
|
138
|
+
*/
|
|
139
|
+
noGitCheck?: boolean;
|
|
128
140
|
/**
|
|
129
141
|
* Prompt for confirmation
|
|
130
142
|
*
|
|
@@ -266,6 +278,7 @@ interface NormalizedOptions {
|
|
|
266
278
|
tag?: {
|
|
267
279
|
name: string;
|
|
268
280
|
};
|
|
281
|
+
sign?: boolean;
|
|
269
282
|
push: boolean;
|
|
270
283
|
files: string[];
|
|
271
284
|
cwd: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -112,6 +112,12 @@ interface VersionBumpOptions {
|
|
|
112
112
|
* Defaults to `true`.
|
|
113
113
|
*/
|
|
114
114
|
tag?: boolean | string;
|
|
115
|
+
/**
|
|
116
|
+
* Sign the git commit and tag with a configured key (GPG/SSH).
|
|
117
|
+
*
|
|
118
|
+
* Defaults to `false`.
|
|
119
|
+
*/
|
|
120
|
+
sign?: boolean;
|
|
115
121
|
/**
|
|
116
122
|
* Indicates whether to push the git commit and tag.
|
|
117
123
|
*
|
|
@@ -125,6 +131,12 @@ interface VersionBumpOptions {
|
|
|
125
131
|
* Defaults to `false`.
|
|
126
132
|
*/
|
|
127
133
|
all?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Indicates whether the git working tree needs to be cleared before bumping.
|
|
136
|
+
*
|
|
137
|
+
* Defaults to `true`.
|
|
138
|
+
*/
|
|
139
|
+
noGitCheck?: boolean;
|
|
128
140
|
/**
|
|
129
141
|
* Prompt for confirmation
|
|
130
142
|
*
|
|
@@ -266,6 +278,7 @@ interface NormalizedOptions {
|
|
|
266
278
|
tag?: {
|
|
267
279
|
name: string;
|
|
268
280
|
};
|
|
281
|
+
sign?: boolean;
|
|
269
282
|
push: boolean;
|
|
270
283
|
files: string[];
|
|
271
284
|
cwd: string;
|
package/dist/index.js
CHANGED
|
@@ -1017,6 +1017,9 @@ async function gitCommit(operation) {
|
|
|
1017
1017
|
if (noVerify) {
|
|
1018
1018
|
args.push("--no-verify");
|
|
1019
1019
|
}
|
|
1020
|
+
if (operation.options.sign) {
|
|
1021
|
+
args.push("--gpg-sign");
|
|
1022
|
+
}
|
|
1020
1023
|
const commitMessage = formatVersionString(message, newVersion);
|
|
1021
1024
|
args.push("--message", commitMessage);
|
|
1022
1025
|
if (!all)
|
|
@@ -1039,6 +1042,9 @@ async function gitTag(operation) {
|
|
|
1039
1042
|
];
|
|
1040
1043
|
const tagName = formatVersionString(tag.name, newVersion);
|
|
1041
1044
|
args.push(tagName);
|
|
1045
|
+
if (operation.options.sign) {
|
|
1046
|
+
args.push("--sign");
|
|
1047
|
+
}
|
|
1042
1048
|
await ezSpawn2.async("git", ["tag", ...args]);
|
|
1043
1049
|
return operation.update({ event: "git tag" /* GitTag */, tagName });
|
|
1044
1050
|
}
|
|
@@ -1067,6 +1073,7 @@ var import_js_yaml = __toESM(require("js-yaml"));
|
|
|
1067
1073
|
async function normalizeOptions(raw) {
|
|
1068
1074
|
var _a, _b, _d;
|
|
1069
1075
|
const preid = typeof raw.preid === "string" ? raw.preid : "beta";
|
|
1076
|
+
const sign = Boolean(raw.sign);
|
|
1070
1077
|
const push = Boolean(raw.push);
|
|
1071
1078
|
const all = Boolean(raw.all);
|
|
1072
1079
|
const noVerify = Boolean(raw.noVerify);
|
|
@@ -1143,6 +1150,7 @@ async function normalizeOptions(raw) {
|
|
|
1143
1150
|
release,
|
|
1144
1151
|
commit,
|
|
1145
1152
|
tag,
|
|
1153
|
+
sign,
|
|
1146
1154
|
push,
|
|
1147
1155
|
files,
|
|
1148
1156
|
cwd,
|
|
@@ -1284,7 +1292,13 @@ async function updateManifestFile(relPath, operation) {
|
|
|
1284
1292
|
const { newVersion } = operation.state;
|
|
1285
1293
|
let modified = false;
|
|
1286
1294
|
const file = await readJsoncFile(relPath, cwd);
|
|
1287
|
-
if (isManifest(file.data)
|
|
1295
|
+
if (!isManifest(file.data)) {
|
|
1296
|
+
return modified;
|
|
1297
|
+
}
|
|
1298
|
+
if (file.data.version == null) {
|
|
1299
|
+
return modified;
|
|
1300
|
+
}
|
|
1301
|
+
if (file.data.version !== newVersion) {
|
|
1288
1302
|
file.modified.push([["version"], newVersion]);
|
|
1289
1303
|
if (isPackageLockManifest(file.data))
|
|
1290
1304
|
file.modified.push([["packages", "", "version"], newVersion]);
|
|
@@ -1374,11 +1388,13 @@ var bumpConfigDefaults = {
|
|
|
1374
1388
|
commit: true,
|
|
1375
1389
|
push: true,
|
|
1376
1390
|
tag: true,
|
|
1391
|
+
sign: false,
|
|
1377
1392
|
recursive: false,
|
|
1378
1393
|
noVerify: false,
|
|
1379
1394
|
confirm: true,
|
|
1380
1395
|
ignoreScripts: false,
|
|
1381
1396
|
all: false,
|
|
1397
|
+
noGitCheck: true,
|
|
1382
1398
|
files: []
|
|
1383
1399
|
};
|
|
1384
1400
|
async function loadBumpConfig(overrides, cwd = import_node_process6.default.cwd()) {
|
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.
|
|
3
|
+
"version": "9.7.1",
|
|
4
|
+
"packageManager": "pnpm@9.12.1",
|
|
5
5
|
"description": "Bump version, commit changes, tag, and push to Git",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "James Messinger",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"scripts": {
|
|
49
49
|
"clean": "rimraf .nyc_output coverage dist",
|
|
50
50
|
"lint": "eslint .",
|
|
51
|
+
"lint:fix": "eslint --fix .",
|
|
51
52
|
"build": "tsup src/index.ts src/cli/index.ts --format esm,cjs --dts --clean",
|
|
52
53
|
"watch": "npm run build -- --watch src",
|
|
53
54
|
"start": "esno src/cli/run.ts",
|
|
@@ -72,17 +73,17 @@
|
|
|
72
73
|
"devDependencies": {
|
|
73
74
|
"@antfu/eslint-config": "^3.7.3",
|
|
74
75
|
"@types/js-yaml": "^4.0.9",
|
|
75
|
-
"@types/node": "^22.7.
|
|
76
|
+
"@types/node": "^22.7.5",
|
|
76
77
|
"@types/prompts": "^2.4.9",
|
|
77
78
|
"@types/semver": "^7.5.8",
|
|
78
|
-
"eslint": "^9.
|
|
79
|
-
"esno": "^4.
|
|
79
|
+
"eslint": "^9.12.0",
|
|
80
|
+
"esno": "^4.8.0",
|
|
80
81
|
"log-symbols": "^6.0.0",
|
|
81
82
|
"npm-check": "^6.0.1",
|
|
82
83
|
"picocolors": "^1.1.0",
|
|
83
84
|
"rimraf": "^6.0.1",
|
|
84
85
|
"tsup": "^8.3.0",
|
|
85
|
-
"typescript": "^5.6.
|
|
86
|
-
"vitest": "^2.1.
|
|
86
|
+
"typescript": "^5.6.3",
|
|
87
|
+
"vitest": "^2.1.2"
|
|
87
88
|
}
|
|
88
89
|
}
|