bumpp 10.0.0 → 10.0.2
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/cli.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
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
|
|
3
|
+
import { l as loadBumpConfig, i as isReleaseType, c, b as bumpConfigDefaults, v as versionBump, P as ProgressEvent, s as symbols } from './shared/bumpp.B_9jg8A3.mjs';
|
|
4
4
|
import cac from 'cac';
|
|
5
5
|
import { valid } from 'semver';
|
|
6
|
+
import 'args-tokenizer';
|
|
6
7
|
import 'prompts';
|
|
7
8
|
import 'node:child_process';
|
|
8
9
|
import 'node:fs';
|
|
@@ -21,7 +22,7 @@ var ExitCode = /* @__PURE__ */ ((ExitCode2) => {
|
|
|
21
22
|
return ExitCode2;
|
|
22
23
|
})(ExitCode || {});
|
|
23
24
|
|
|
24
|
-
const version = "10.0.
|
|
25
|
+
const version = "10.0.2";
|
|
25
26
|
|
|
26
27
|
async function parseArgs() {
|
|
27
28
|
try {
|
|
@@ -117,22 +118,22 @@ ${stdout}`);
|
|
|
117
118
|
function progress({ event, script, updatedFiles, skippedFiles, newVersion }) {
|
|
118
119
|
switch (event) {
|
|
119
120
|
case ProgressEvent.FileUpdated:
|
|
120
|
-
console.log(success, `Updated ${updatedFiles.pop()} to ${newVersion}`);
|
|
121
|
+
console.log(symbols.success, `Updated ${updatedFiles.pop()} to ${newVersion}`);
|
|
121
122
|
break;
|
|
122
123
|
case ProgressEvent.FileSkipped:
|
|
123
|
-
console.log(info, `${skippedFiles.pop()} did not need to be updated`);
|
|
124
|
+
console.log(symbols.info, `${skippedFiles.pop()} did not need to be updated`);
|
|
124
125
|
break;
|
|
125
126
|
case ProgressEvent.GitCommit:
|
|
126
|
-
console.log(success, "Git commit");
|
|
127
|
+
console.log(symbols.success, "Git commit");
|
|
127
128
|
break;
|
|
128
129
|
case ProgressEvent.GitTag:
|
|
129
|
-
console.log(success, "Git tag");
|
|
130
|
+
console.log(symbols.success, "Git tag");
|
|
130
131
|
break;
|
|
131
132
|
case ProgressEvent.GitPush:
|
|
132
|
-
console.log(success, "Git push");
|
|
133
|
+
console.log(symbols.success, "Git push");
|
|
133
134
|
break;
|
|
134
135
|
case ProgressEvent.NpmScript:
|
|
135
|
-
console.log(success, `Npm run ${script}`);
|
|
136
|
+
console.log(symbols.success, `Npm run ${script}`);
|
|
136
137
|
break;
|
|
137
138
|
}
|
|
138
139
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { v as versionBump } from './shared/bumpp.
|
|
2
|
-
export { N as NpmScript, P as ProgressEvent, b as bumpConfigDefaults, d as defineConfig, l as loadBumpConfig, a as versionBumpInfo } from './shared/bumpp.
|
|
1
|
+
import { v as versionBump } from './shared/bumpp.B_9jg8A3.mjs';
|
|
2
|
+
export { N as NpmScript, P as ProgressEvent, b as bumpConfigDefaults, d as defineConfig, l as loadBumpConfig, a as versionBumpInfo } from './shared/bumpp.B_9jg8A3.mjs';
|
|
3
3
|
import 'node:process';
|
|
4
|
+
import 'args-tokenizer';
|
|
4
5
|
import 'prompts';
|
|
5
6
|
import 'node:child_process';
|
|
6
7
|
import 'tinyexec';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import process$1 from 'node:process';
|
|
2
|
+
import { tokenizeArgs } from 'args-tokenizer';
|
|
2
3
|
import prompts from 'prompts';
|
|
3
4
|
import { execSync } from 'node:child_process';
|
|
4
5
|
import { x } from 'tinyexec';
|
|
@@ -13,57 +14,6 @@ import { glob } from 'tinyglobby';
|
|
|
13
14
|
import { loadConfig } from 'c12';
|
|
14
15
|
import escalade from 'escalade/sync';
|
|
15
16
|
|
|
16
|
-
// src/args-tokenizer.ts
|
|
17
|
-
var spaceRegex = /\s/;
|
|
18
|
-
var tokenizeArgs = (argsString, options) => {
|
|
19
|
-
const tokens = [];
|
|
20
|
-
let currentToken = "";
|
|
21
|
-
let openningQuote;
|
|
22
|
-
let escaped = false;
|
|
23
|
-
for (let index = 0; index < argsString.length; index += 1) {
|
|
24
|
-
const char = argsString[index];
|
|
25
|
-
if (escaped) {
|
|
26
|
-
escaped = false;
|
|
27
|
-
if (openningQuote || char !== "\n") {
|
|
28
|
-
currentToken += char;
|
|
29
|
-
}
|
|
30
|
-
continue;
|
|
31
|
-
}
|
|
32
|
-
if (char === "\\") {
|
|
33
|
-
escaped = true;
|
|
34
|
-
continue;
|
|
35
|
-
}
|
|
36
|
-
if (openningQuote === undefined && spaceRegex.test(char)) {
|
|
37
|
-
if (currentToken.length > 0) {
|
|
38
|
-
tokens.push(currentToken);
|
|
39
|
-
currentToken = "";
|
|
40
|
-
}
|
|
41
|
-
continue;
|
|
42
|
-
}
|
|
43
|
-
if (char === "'" || char === '"') {
|
|
44
|
-
if (openningQuote === undefined) {
|
|
45
|
-
openningQuote = char;
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
if (openningQuote === char) {
|
|
49
|
-
openningQuote = undefined;
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
currentToken += char;
|
|
54
|
-
}
|
|
55
|
-
if (currentToken.length > 0) {
|
|
56
|
-
tokens.push(currentToken);
|
|
57
|
-
}
|
|
58
|
-
if (openningQuote) {
|
|
59
|
-
throw Error("Unexpected end of string. Closing quote is missing.");
|
|
60
|
-
}
|
|
61
|
-
return tokens;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
const info = 'ℹ️';
|
|
65
|
-
const success = '✅';
|
|
66
|
-
|
|
67
17
|
function getDefaultExportFromCjs (x) {
|
|
68
18
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
69
19
|
}
|
|
@@ -239,6 +189,11 @@ function getRecentCommits(from, to) {
|
|
|
239
189
|
return getCommits(from, to);
|
|
240
190
|
}
|
|
241
191
|
|
|
192
|
+
const symbols = {
|
|
193
|
+
success: c.green("\u2714"),
|
|
194
|
+
info: c.blue("\u2139")
|
|
195
|
+
};
|
|
196
|
+
|
|
242
197
|
async function readJsoncFile(name, cwd) {
|
|
243
198
|
const file = await readTextFile(name, cwd);
|
|
244
199
|
const data = jsonc.parse(file.data);
|
|
@@ -866,7 +821,7 @@ async function versionBump(arg = {}) {
|
|
|
866
821
|
if (!command) {
|
|
867
822
|
throw new Error("Could not find install command for package manager");
|
|
868
823
|
}
|
|
869
|
-
console.log(info, "Installing dependencies with", `${command.command} ${command.args.join(" ")}`);
|
|
824
|
+
console.log(symbols.info, "Installing dependencies with", `${command.command} ${command.args.join(" ")}`);
|
|
870
825
|
await x(command.command, command.args, {
|
|
871
826
|
throwOnError: true,
|
|
872
827
|
nodeOptions: {
|
|
@@ -874,14 +829,14 @@ async function versionBump(arg = {}) {
|
|
|
874
829
|
cwd: operation.options.cwd
|
|
875
830
|
}
|
|
876
831
|
});
|
|
877
|
-
console.log(success, "Dependencies installed");
|
|
832
|
+
console.log(symbols.success, "Dependencies installed");
|
|
878
833
|
}
|
|
879
834
|
if (operation.options.execute) {
|
|
880
835
|
if (typeof operation.options.execute === "function") {
|
|
881
836
|
await operation.options.execute(operation);
|
|
882
837
|
} else {
|
|
883
838
|
const [command, ...args] = tokenizeArgs(operation.options.execute);
|
|
884
|
-
console.log(info, "Executing script", command, ...args);
|
|
839
|
+
console.log(symbols.info, "Executing script", command, ...args);
|
|
885
840
|
await x(command, args, {
|
|
886
841
|
throwOnError: true,
|
|
887
842
|
nodeOptions: {
|
|
@@ -889,7 +844,7 @@ async function versionBump(arg = {}) {
|
|
|
889
844
|
cwd: operation.options.cwd
|
|
890
845
|
}
|
|
891
846
|
});
|
|
892
|
-
console.log(success, "Script finished");
|
|
847
|
+
console.log(symbols.success, "Script finished");
|
|
893
848
|
}
|
|
894
849
|
}
|
|
895
850
|
await runNpmScript(NpmScript.Version, operation);
|
|
@@ -983,4 +938,4 @@ function defineConfig(config) {
|
|
|
983
938
|
return config;
|
|
984
939
|
}
|
|
985
940
|
|
|
986
|
-
export { NpmScript as N, ProgressEvent as P, versionBumpInfo as a, bumpConfigDefaults as b, c, defineConfig as d,
|
|
941
|
+
export { NpmScript as N, ProgressEvent as P, versionBumpInfo as a, bumpConfigDefaults as b, c, defineConfig as d, isReleaseType as i, loadBumpConfig as l, symbols as s, versionBump as v };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bumpp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "10.0.
|
|
4
|
+
"version": "10.0.2",
|
|
5
5
|
"description": "Bump version, commit changes, tag, and push to Git",
|
|
6
6
|
"authors": [
|
|
7
7
|
{
|
|
@@ -51,33 +51,32 @@
|
|
|
51
51
|
"node": ">=18"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
+
"args-tokenizer": "^0.3.0",
|
|
54
55
|
"c12": "^2.0.1",
|
|
55
56
|
"cac": "^6.7.14",
|
|
56
57
|
"escalade": "^3.2.0",
|
|
57
58
|
"js-yaml": "^4.1.0",
|
|
58
59
|
"jsonc-parser": "^3.3.1",
|
|
59
|
-
"package-manager-detector": "^0.2.
|
|
60
|
+
"package-manager-detector": "^0.2.9",
|
|
60
61
|
"prompts": "^2.4.2",
|
|
61
|
-
"semver": "^7.
|
|
62
|
+
"semver": "^7.7.1",
|
|
62
63
|
"tinyexec": "^0.3.2",
|
|
63
64
|
"tinyglobby": "^0.2.10"
|
|
64
65
|
},
|
|
65
66
|
"devDependencies": {
|
|
66
|
-
"@antfu/eslint-config": "^4.
|
|
67
|
+
"@antfu/eslint-config": "^4.1.1",
|
|
67
68
|
"@types/js-yaml": "^4.0.9",
|
|
68
|
-
"@types/node": "^22.
|
|
69
|
+
"@types/node": "^22.13.1",
|
|
69
70
|
"@types/prompts": "^2.4.9",
|
|
70
71
|
"@types/semver": "^7.5.8",
|
|
71
|
-
"args-tokenizer": "^0.3.0",
|
|
72
72
|
"eslint": "^9.19.0",
|
|
73
73
|
"esno": "^4.8.0",
|
|
74
|
-
"log-symbols": "^7.0.0",
|
|
75
74
|
"picocolors": "^1.1.1",
|
|
76
75
|
"rimraf": "^6.0.1",
|
|
77
76
|
"tiny-conventional-commits-parser": "^0.0.1",
|
|
78
77
|
"typescript": "^5.7.3",
|
|
79
78
|
"unbuild": "^3.3.1",
|
|
80
|
-
"vitest": "^3.0.
|
|
79
|
+
"vitest": "^3.0.5"
|
|
81
80
|
},
|
|
82
81
|
"scripts": {
|
|
83
82
|
"lint": "eslint .",
|