bumpp 9.8.1 → 9.9.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-UNJYHD4B.mjs → chunk-PU4CGCPI.mjs} +343 -544
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +381 -584
- 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 +348 -553
- package/dist/index.mjs +1 -1
- package/package.json +11 -10
package/dist/cli/index.mjs
CHANGED
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
bumpConfigDefaults,
|
|
8
8
|
isReleaseType,
|
|
9
9
|
loadBumpConfig,
|
|
10
|
-
log_symbols_default,
|
|
11
10
|
require_picocolors,
|
|
11
|
+
symbols_exports,
|
|
12
12
|
versionBump
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-PU4CGCPI.mjs";
|
|
14
14
|
|
|
15
15
|
// src/cli/index.ts
|
|
16
16
|
import process2 from "node:process";
|
|
17
|
-
import
|
|
17
|
+
import { x } from "tinyexec";
|
|
18
18
|
|
|
19
19
|
// src/cli/parse-args.ts
|
|
20
20
|
var import_picocolors = __toESM(require_picocolors());
|
|
@@ -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.9.1";
|
|
27
27
|
|
|
28
28
|
// src/cli/parse-args.ts
|
|
29
29
|
async function parseArgs() {
|
|
@@ -100,7 +100,7 @@ async function main() {
|
|
|
100
100
|
process2.exit(0 /* Success */);
|
|
101
101
|
} else {
|
|
102
102
|
if (!options.all && !options.noGitCheck) {
|
|
103
|
-
checkGitStatus();
|
|
103
|
+
await checkGitStatus();
|
|
104
104
|
}
|
|
105
105
|
if (!quiet)
|
|
106
106
|
options.progress = options.progress ? options.progress : progress;
|
|
@@ -110,8 +110,8 @@ async function main() {
|
|
|
110
110
|
errorHandler2(error);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function checkGitStatus() {
|
|
114
|
-
const { stdout } =
|
|
113
|
+
async function checkGitStatus() {
|
|
114
|
+
const { stdout } = await x("git", ["status", "--porcelain"]);
|
|
115
115
|
if (stdout.trim()) {
|
|
116
116
|
throw new Error(`Git working tree is not clean:
|
|
117
117
|
${stdout}`);
|
|
@@ -120,22 +120,22 @@ ${stdout}`);
|
|
|
120
120
|
function progress({ event, script, updatedFiles, skippedFiles, newVersion }) {
|
|
121
121
|
switch (event) {
|
|
122
122
|
case "file updated" /* FileUpdated */:
|
|
123
|
-
console.log(
|
|
123
|
+
console.log(symbols_exports.success, `Updated ${updatedFiles.pop()} to ${newVersion}`);
|
|
124
124
|
break;
|
|
125
125
|
case "file skipped" /* FileSkipped */:
|
|
126
|
-
console.log(
|
|
126
|
+
console.log(symbols_exports.info, `${skippedFiles.pop()} did not need to be updated`);
|
|
127
127
|
break;
|
|
128
128
|
case "git commit" /* GitCommit */:
|
|
129
|
-
console.log(
|
|
129
|
+
console.log(symbols_exports.success, "Git commit");
|
|
130
130
|
break;
|
|
131
131
|
case "git tag" /* GitTag */:
|
|
132
|
-
console.log(
|
|
132
|
+
console.log(symbols_exports.success, "Git tag");
|
|
133
133
|
break;
|
|
134
134
|
case "git push" /* GitPush */:
|
|
135
|
-
console.log(
|
|
135
|
+
console.log(symbols_exports.success, "Git push");
|
|
136
136
|
break;
|
|
137
137
|
case "npm script" /* NpmScript */:
|
|
138
|
-
console.log(
|
|
138
|
+
console.log(symbols_exports.success, `Npm run ${script}`);
|
|
139
139
|
break;
|
|
140
140
|
}
|
|
141
141
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -51,7 +51,7 @@ interface NormalizedOptions {
|
|
|
51
51
|
cwd: string;
|
|
52
52
|
interface: Interface;
|
|
53
53
|
ignoreScripts: boolean;
|
|
54
|
-
execute?: string | ((config
|
|
54
|
+
execute?: string | ((config: Operation) => void | PromiseLike<void>);
|
|
55
55
|
printCommits?: boolean;
|
|
56
56
|
customVersion?: VersionBumpOptions['customVersion'];
|
|
57
57
|
currentVersion?: string;
|
|
@@ -288,9 +288,9 @@ interface VersionBumpOptions {
|
|
|
288
288
|
*/
|
|
289
289
|
progress?: (progress: VersionBumpProgress) => void;
|
|
290
290
|
/**
|
|
291
|
-
*
|
|
291
|
+
* Execute additional command after bumping and before committing
|
|
292
292
|
*/
|
|
293
|
-
execute?: string | ((config
|
|
293
|
+
execute?: string | ((config: Operation) => void | PromiseLike<void>);
|
|
294
294
|
/**
|
|
295
295
|
* Bump the files recursively for monorepo. Only works without `files` option.
|
|
296
296
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ interface NormalizedOptions {
|
|
|
51
51
|
cwd: string;
|
|
52
52
|
interface: Interface;
|
|
53
53
|
ignoreScripts: boolean;
|
|
54
|
-
execute?: string | ((config
|
|
54
|
+
execute?: string | ((config: Operation) => void | PromiseLike<void>);
|
|
55
55
|
printCommits?: boolean;
|
|
56
56
|
customVersion?: VersionBumpOptions['customVersion'];
|
|
57
57
|
currentVersion?: string;
|
|
@@ -288,9 +288,9 @@ interface VersionBumpOptions {
|
|
|
288
288
|
*/
|
|
289
289
|
progress?: (progress: VersionBumpProgress) => void;
|
|
290
290
|
/**
|
|
291
|
-
*
|
|
291
|
+
* Execute additional command after bumping and before committing
|
|
292
292
|
*/
|
|
293
|
-
execute?: string | ((config
|
|
293
|
+
execute?: string | ((config: Operation) => void | PromiseLike<void>);
|
|
294
294
|
/**
|
|
295
295
|
* Bump the files recursively for monorepo. Only works without `files` option.
|
|
296
296
|
*
|