bumpp 9.11.0 → 10.0.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/bin/bumpp.mjs +4 -0
- package/dist/{cli/index.js → cli.mjs} +52 -55
- package/dist/index.mjs +19 -0
- package/dist/{chunk-BEM77VRK.js → shared/bumpp.DE3hJRX3.mjs} +313 -380
- package/package.json +31 -32
- package/bin/bumpp.js +0 -5
- package/dist/cli/index.cjs +0 -1161
- package/dist/index.cjs +0 -1070
- package/dist/index.js +0 -23
- /package/dist/{cli/index.d.cts → cli.d.mts} +0 -0
- /package/dist/{cli/index.d.ts → cli.d.ts} +0 -0
- /package/dist/{index.d.cts → index.d.mts} +0 -0
package/bin/bumpp.mjs
ADDED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import process from 'node:process';
|
|
2
|
+
import { x } from 'tinyexec';
|
|
3
|
+
import { l as loadBumpConfig, i as isReleaseType, c, b as bumpConfigDefaults, v as versionBump, P as ProgressEvent, s as success, e as info } from './shared/bumpp.DE3hJRX3.mjs';
|
|
4
|
+
import cac from 'cac';
|
|
5
|
+
import { valid } from 'semver';
|
|
6
|
+
import 'prompts';
|
|
7
|
+
import 'node:child_process';
|
|
8
|
+
import 'node:fs';
|
|
9
|
+
import 'node:path';
|
|
10
|
+
import 'jsonc-parser';
|
|
11
|
+
import 'node:fs/promises';
|
|
12
|
+
import 'js-yaml';
|
|
13
|
+
import 'tinyglobby';
|
|
14
|
+
import 'c12';
|
|
15
|
+
import 'escalade/sync';
|
|
11
16
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
var ExitCode = /* @__PURE__ */ ((ExitCode2) => {
|
|
18
|
+
ExitCode2[ExitCode2["Success"] = 0] = "Success";
|
|
19
|
+
ExitCode2[ExitCode2["FatalError"] = 1] = "FatalError";
|
|
20
|
+
ExitCode2[ExitCode2["InvalidArgument"] = 9] = "InvalidArgument";
|
|
21
|
+
return ExitCode2;
|
|
22
|
+
})(ExitCode || {});
|
|
15
23
|
|
|
16
|
-
|
|
17
|
-
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
18
|
-
import process from "node:process";
|
|
19
|
-
import cac from "cac";
|
|
20
|
-
import { valid as isValidVersion } from "semver";
|
|
24
|
+
const version = "10.0.0";
|
|
21
25
|
|
|
22
|
-
// package.json
|
|
23
|
-
var version = "9.11.0";
|
|
24
|
-
|
|
25
|
-
// src/cli/parse-args.ts
|
|
26
26
|
async function parseArgs() {
|
|
27
27
|
try {
|
|
28
28
|
const { args, resultArgs } = loadCliArgs();
|
|
@@ -51,16 +51,16 @@ async function parseArgs() {
|
|
|
51
51
|
};
|
|
52
52
|
if (parsedArgs.options.files && parsedArgs.options.files.length > 0) {
|
|
53
53
|
const firstArg = parsedArgs.options.files[0];
|
|
54
|
-
if (firstArg === "prompt" || isReleaseType(firstArg) ||
|
|
54
|
+
if (firstArg === "prompt" || isReleaseType(firstArg) || valid(firstArg)) {
|
|
55
55
|
parsedArgs.options.release = firstArg;
|
|
56
56
|
parsedArgs.options.files.shift();
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
if (parsedArgs.options.recursive && parsedArgs.options.files?.length)
|
|
60
|
-
console.log(
|
|
60
|
+
console.log(c.yellow("The --recursive option is ignored when files are specified"));
|
|
61
61
|
return parsedArgs;
|
|
62
62
|
} catch (error) {
|
|
63
|
-
return errorHandler(error);
|
|
63
|
+
return errorHandler$1(error);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
function loadCliArgs(argv = process.argv) {
|
|
@@ -77,25 +77,24 @@ function loadCliArgs(argv = process.argv) {
|
|
|
77
77
|
return {
|
|
78
78
|
args: {
|
|
79
79
|
...rest,
|
|
80
|
-
commit: hasCommitFlag ? commit :
|
|
81
|
-
tag: hasTagFlag ? tag :
|
|
80
|
+
commit: hasCommitFlag ? commit : undefined,
|
|
81
|
+
tag: hasTagFlag ? tag : undefined
|
|
82
82
|
},
|
|
83
83
|
resultArgs: result.args
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function errorHandler(error) {
|
|
86
|
+
function errorHandler$1(error) {
|
|
87
87
|
console.error(error.message);
|
|
88
|
-
return process.exit(
|
|
88
|
+
return process.exit(ExitCode.InvalidArgument);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
// src/cli/index.ts
|
|
92
91
|
async function main() {
|
|
93
92
|
try {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const { help, version
|
|
97
|
-
if (help ||
|
|
98
|
-
|
|
93
|
+
process.on("uncaughtException", errorHandler);
|
|
94
|
+
process.on("unhandledRejection", errorHandler);
|
|
95
|
+
const { help, version, quiet, options } = await parseArgs();
|
|
96
|
+
if (help || version) {
|
|
97
|
+
process.exit(ExitCode.Success);
|
|
99
98
|
} else {
|
|
100
99
|
if (!options.all && !options.noGitCheck) {
|
|
101
100
|
await checkGitStatus();
|
|
@@ -105,7 +104,7 @@ async function main() {
|
|
|
105
104
|
await versionBump(options);
|
|
106
105
|
}
|
|
107
106
|
} catch (error) {
|
|
108
|
-
|
|
107
|
+
errorHandler(error);
|
|
109
108
|
}
|
|
110
109
|
}
|
|
111
110
|
async function checkGitStatus() {
|
|
@@ -117,34 +116,32 @@ ${stdout}`);
|
|
|
117
116
|
}
|
|
118
117
|
function progress({ event, script, updatedFiles, skippedFiles, newVersion }) {
|
|
119
118
|
switch (event) {
|
|
120
|
-
case
|
|
121
|
-
console.log(
|
|
119
|
+
case ProgressEvent.FileUpdated:
|
|
120
|
+
console.log(success, `Updated ${updatedFiles.pop()} to ${newVersion}`);
|
|
122
121
|
break;
|
|
123
|
-
case
|
|
124
|
-
console.log(
|
|
122
|
+
case ProgressEvent.FileSkipped:
|
|
123
|
+
console.log(info, `${skippedFiles.pop()} did not need to be updated`);
|
|
125
124
|
break;
|
|
126
|
-
case
|
|
127
|
-
console.log(
|
|
125
|
+
case ProgressEvent.GitCommit:
|
|
126
|
+
console.log(success, "Git commit");
|
|
128
127
|
break;
|
|
129
|
-
case
|
|
130
|
-
console.log(
|
|
128
|
+
case ProgressEvent.GitTag:
|
|
129
|
+
console.log(success, "Git tag");
|
|
131
130
|
break;
|
|
132
|
-
case
|
|
133
|
-
console.log(
|
|
131
|
+
case ProgressEvent.GitPush:
|
|
132
|
+
console.log(success, "Git push");
|
|
134
133
|
break;
|
|
135
|
-
case
|
|
136
|
-
console.log(
|
|
134
|
+
case ProgressEvent.NpmScript:
|
|
135
|
+
console.log(success, `Npm run ${script}`);
|
|
137
136
|
break;
|
|
138
137
|
}
|
|
139
138
|
}
|
|
140
|
-
function
|
|
139
|
+
function errorHandler(error) {
|
|
141
140
|
let message = error.message || String(error);
|
|
142
|
-
if (
|
|
141
|
+
if (process.env.DEBUG || process.env.NODE_ENV === "development")
|
|
143
142
|
message = error.stack || message;
|
|
144
143
|
console.error(message);
|
|
145
|
-
|
|
144
|
+
process.exit(ExitCode.FatalError);
|
|
146
145
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
main
|
|
150
|
-
};
|
|
146
|
+
|
|
147
|
+
export { checkGitStatus, main };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { v as versionBump } from './shared/bumpp.DE3hJRX3.mjs';
|
|
2
|
+
export { N as NpmScript, P as ProgressEvent, b as bumpConfigDefaults, d as defineConfig, l as loadBumpConfig, a as versionBumpInfo } from './shared/bumpp.DE3hJRX3.mjs';
|
|
3
|
+
import 'node:process';
|
|
4
|
+
import 'prompts';
|
|
5
|
+
import 'node:child_process';
|
|
6
|
+
import 'tinyexec';
|
|
7
|
+
import 'semver';
|
|
8
|
+
import 'node:fs';
|
|
9
|
+
import 'node:path';
|
|
10
|
+
import 'jsonc-parser';
|
|
11
|
+
import 'node:fs/promises';
|
|
12
|
+
import 'js-yaml';
|
|
13
|
+
import 'tinyglobby';
|
|
14
|
+
import 'c12';
|
|
15
|
+
import 'escalade/sync';
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export { versionBump as default, versionBump };
|