bumpp 9.3.0 → 9.3.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-ZY4OVS4D.mjs → chunk-2LHJGPFO.mjs} +9 -1
- package/dist/cli/index.js +17 -3
- package/dist/cli/index.mjs +9 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -1
- package/dist/index.mjs +1 -1
- package/package.json +9 -9
|
@@ -914,6 +914,10 @@ function writeTextFile(file) {
|
|
|
914
914
|
function isManifest(obj) {
|
|
915
915
|
return obj && typeof obj === "object" && isOptionalString(obj.name) && isOptionalString(obj.version) && isOptionalString(obj.description);
|
|
916
916
|
}
|
|
917
|
+
function isPackageLockManifest(manifest) {
|
|
918
|
+
var _a, _b;
|
|
919
|
+
return typeof ((_b = (_a = manifest.packages) == null ? void 0 : _a[""]) == null ? void 0 : _b.version) === "string";
|
|
920
|
+
}
|
|
917
921
|
function isOptionalString(value) {
|
|
918
922
|
const type = typeof value;
|
|
919
923
|
return value === null || type === "undefined" || type === "string";
|
|
@@ -1035,7 +1039,7 @@ async function normalizeOptions(raw) {
|
|
|
1035
1039
|
else if (raw.commit || tag || push)
|
|
1036
1040
|
commit = { all, noVerify, message: "chore: release v" };
|
|
1037
1041
|
const files = await fg(
|
|
1038
|
-
((_a = raw.files) == null ? void 0 : _a.length) ? raw.files : ["package.json", "package-lock.json"],
|
|
1042
|
+
((_a = raw.files) == null ? void 0 : _a.length) ? raw.files : ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc"],
|
|
1039
1043
|
{
|
|
1040
1044
|
cwd,
|
|
1041
1045
|
onlyFiles: true,
|
|
@@ -1178,6 +1182,7 @@ async function updateFile(relPath, operation) {
|
|
|
1178
1182
|
case "package-lock.json":
|
|
1179
1183
|
case "bower.json":
|
|
1180
1184
|
case "component.json":
|
|
1185
|
+
case "jsr.json":
|
|
1181
1186
|
return updateManifestFile(relPath, operation);
|
|
1182
1187
|
default:
|
|
1183
1188
|
return updateTextFile(relPath, operation);
|
|
@@ -1190,6 +1195,9 @@ async function updateManifestFile(relPath, operation) {
|
|
|
1190
1195
|
const file = await readJsonFile(relPath, cwd);
|
|
1191
1196
|
if (isManifest(file.data) && file.data.version !== newVersion) {
|
|
1192
1197
|
file.data.version = newVersion;
|
|
1198
|
+
if (isPackageLockManifest(file.data)) {
|
|
1199
|
+
file.data.packages[""].version = newVersion;
|
|
1200
|
+
}
|
|
1193
1201
|
await writeJsonFile(file);
|
|
1194
1202
|
modified = true;
|
|
1195
1203
|
}
|
package/dist/cli/index.js
CHANGED
|
@@ -628,7 +628,7 @@ var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
|
628
628
|
var log_symbols_default = logSymbols;
|
|
629
629
|
|
|
630
630
|
// package.json
|
|
631
|
-
var version = "9.3.
|
|
631
|
+
var version = "9.3.1";
|
|
632
632
|
|
|
633
633
|
// src/version-bump.ts
|
|
634
634
|
var import_node_process5 = __toESM(require("process"));
|
|
@@ -907,6 +907,10 @@ function writeTextFile(file) {
|
|
|
907
907
|
function isManifest(obj) {
|
|
908
908
|
return obj && typeof obj === "object" && isOptionalString(obj.name) && isOptionalString(obj.version) && isOptionalString(obj.description);
|
|
909
909
|
}
|
|
910
|
+
function isPackageLockManifest(manifest) {
|
|
911
|
+
var _a, _b;
|
|
912
|
+
return typeof ((_b = (_a = manifest.packages) == null ? void 0 : _a[""]) == null ? void 0 : _b.version) === "string";
|
|
913
|
+
}
|
|
910
914
|
function isOptionalString(value) {
|
|
911
915
|
const type = typeof value;
|
|
912
916
|
return value === null || type === "undefined" || type === "string";
|
|
@@ -1028,7 +1032,7 @@ async function normalizeOptions(raw) {
|
|
|
1028
1032
|
else if (raw.commit || tag || push)
|
|
1029
1033
|
commit = { all, noVerify, message: "chore: release v" };
|
|
1030
1034
|
const files = await (0, import_fast_glob.default)(
|
|
1031
|
-
((_a = raw.files) == null ? void 0 : _a.length) ? raw.files : ["package.json", "package-lock.json"],
|
|
1035
|
+
((_a = raw.files) == null ? void 0 : _a.length) ? raw.files : ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc"],
|
|
1032
1036
|
{
|
|
1033
1037
|
cwd,
|
|
1034
1038
|
onlyFiles: true,
|
|
@@ -1171,6 +1175,7 @@ async function updateFile(relPath, operation) {
|
|
|
1171
1175
|
case "package-lock.json":
|
|
1172
1176
|
case "bower.json":
|
|
1173
1177
|
case "component.json":
|
|
1178
|
+
case "jsr.json":
|
|
1174
1179
|
return updateManifestFile(relPath, operation);
|
|
1175
1180
|
default:
|
|
1176
1181
|
return updateTextFile(relPath, operation);
|
|
@@ -1183,6 +1188,9 @@ async function updateManifestFile(relPath, operation) {
|
|
|
1183
1188
|
const file = await readJsonFile(relPath, cwd);
|
|
1184
1189
|
if (isManifest(file.data) && file.data.version !== newVersion) {
|
|
1185
1190
|
file.data.version = newVersion;
|
|
1191
|
+
if (isPackageLockManifest(file.data)) {
|
|
1192
|
+
file.data.packages[""].version = newVersion;
|
|
1193
|
+
}
|
|
1186
1194
|
await writeJsonFile(file);
|
|
1187
1195
|
modified = true;
|
|
1188
1196
|
}
|
|
@@ -1321,7 +1329,13 @@ async function parseArgs() {
|
|
|
1321
1329
|
if ((_a = parsedArgs.options.files) == null ? void 0 : _a.length) {
|
|
1322
1330
|
console.log(import_picocolors3.default.yellow("The --recursive option is ignored when files are specified"));
|
|
1323
1331
|
} else {
|
|
1324
|
-
parsedArgs.options.files = [
|
|
1332
|
+
parsedArgs.options.files = [
|
|
1333
|
+
"package.json",
|
|
1334
|
+
"package-lock.json",
|
|
1335
|
+
"packages/**/package.json",
|
|
1336
|
+
"jsr.json",
|
|
1337
|
+
"jsr.jsonc"
|
|
1338
|
+
];
|
|
1325
1339
|
if (import_node_fs2.default.existsSync("pnpm-workspace.yaml")) {
|
|
1326
1340
|
const pnpmWorkspace = await import_promises.default.readFile("pnpm-workspace.yaml", "utf8");
|
|
1327
1341
|
const workspaces = import_js_yaml.default.load(pnpmWorkspace);
|
package/dist/cli/index.mjs
CHANGED
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
log_symbols_default,
|
|
8
8
|
require_picocolors,
|
|
9
9
|
versionBump
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-2LHJGPFO.mjs";
|
|
11
11
|
|
|
12
12
|
// src/cli/index.ts
|
|
13
13
|
import process2 from "process";
|
|
14
14
|
|
|
15
15
|
// package.json
|
|
16
|
-
var version = "9.3.
|
|
16
|
+
var version = "9.3.1";
|
|
17
17
|
|
|
18
18
|
// src/cli/parse-args.ts
|
|
19
19
|
var import_picocolors = __toESM(require_picocolors());
|
|
@@ -59,7 +59,13 @@ async function parseArgs() {
|
|
|
59
59
|
if ((_a = parsedArgs.options.files) == null ? void 0 : _a.length) {
|
|
60
60
|
console.log(import_picocolors.default.yellow("The --recursive option is ignored when files are specified"));
|
|
61
61
|
} else {
|
|
62
|
-
parsedArgs.options.files = [
|
|
62
|
+
parsedArgs.options.files = [
|
|
63
|
+
"package.json",
|
|
64
|
+
"package-lock.json",
|
|
65
|
+
"packages/**/package.json",
|
|
66
|
+
"jsr.json",
|
|
67
|
+
"jsr.jsonc"
|
|
68
|
+
];
|
|
63
69
|
if (fsSync.existsSync("pnpm-workspace.yaml")) {
|
|
64
70
|
const pnpmWorkspace = await fs.readFile("pnpm-workspace.yaml", "utf8");
|
|
65
71
|
const workspaces = yaml.load(pnpmWorkspace);
|
package/dist/index.d.mts
CHANGED
|
@@ -137,7 +137,7 @@ interface VersionBumpOptions {
|
|
|
137
137
|
* (ReadMe files, config files, source code, etc.) it will simply do a global replacement
|
|
138
138
|
* of the old version number with the new version number.
|
|
139
139
|
*
|
|
140
|
-
* Defaults to ["package.json", "package-lock.json"]
|
|
140
|
+
* Defaults to ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc"]
|
|
141
141
|
*/
|
|
142
142
|
files?: string[];
|
|
143
143
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -137,7 +137,7 @@ interface VersionBumpOptions {
|
|
|
137
137
|
* (ReadMe files, config files, source code, etc.) it will simply do a global replacement
|
|
138
138
|
* of the old version number with the new version number.
|
|
139
139
|
*
|
|
140
|
-
* Defaults to ["package.json", "package-lock.json"]
|
|
140
|
+
* Defaults to ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc"]
|
|
141
141
|
*/
|
|
142
142
|
files?: string[];
|
|
143
143
|
/**
|
package/dist/index.js
CHANGED
|
@@ -912,6 +912,10 @@ function writeTextFile(file) {
|
|
|
912
912
|
function isManifest(obj) {
|
|
913
913
|
return obj && typeof obj === "object" && isOptionalString(obj.name) && isOptionalString(obj.version) && isOptionalString(obj.description);
|
|
914
914
|
}
|
|
915
|
+
function isPackageLockManifest(manifest) {
|
|
916
|
+
var _a, _b;
|
|
917
|
+
return typeof ((_b = (_a = manifest.packages) == null ? void 0 : _a[""]) == null ? void 0 : _b.version) === "string";
|
|
918
|
+
}
|
|
915
919
|
function isOptionalString(value) {
|
|
916
920
|
const type = typeof value;
|
|
917
921
|
return value === null || type === "undefined" || type === "string";
|
|
@@ -1052,7 +1056,7 @@ async function normalizeOptions(raw) {
|
|
|
1052
1056
|
else if (raw.commit || tag || push)
|
|
1053
1057
|
commit = { all, noVerify, message: "chore: release v" };
|
|
1054
1058
|
const files = await (0, import_fast_glob.default)(
|
|
1055
|
-
((_a = raw.files) == null ? void 0 : _a.length) ? raw.files : ["package.json", "package-lock.json"],
|
|
1059
|
+
((_a = raw.files) == null ? void 0 : _a.length) ? raw.files : ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc"],
|
|
1056
1060
|
{
|
|
1057
1061
|
cwd,
|
|
1058
1062
|
onlyFiles: true,
|
|
@@ -1195,6 +1199,7 @@ async function updateFile(relPath, operation) {
|
|
|
1195
1199
|
case "package-lock.json":
|
|
1196
1200
|
case "bower.json":
|
|
1197
1201
|
case "component.json":
|
|
1202
|
+
case "jsr.json":
|
|
1198
1203
|
return updateManifestFile(relPath, operation);
|
|
1199
1204
|
default:
|
|
1200
1205
|
return updateTextFile(relPath, operation);
|
|
@@ -1207,6 +1212,9 @@ async function updateManifestFile(relPath, operation) {
|
|
|
1207
1212
|
const file = await readJsonFile(relPath, cwd);
|
|
1208
1213
|
if (isManifest(file.data) && file.data.version !== newVersion) {
|
|
1209
1214
|
file.data.version = newVersion;
|
|
1215
|
+
if (isPackageLockManifest(file.data)) {
|
|
1216
|
+
file.data.packages[""].version = newVersion;
|
|
1217
|
+
}
|
|
1210
1218
|
await writeJsonFile(file);
|
|
1211
1219
|
modified = true;
|
|
1212
1220
|
}
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bumpp",
|
|
3
|
-
"version": "9.3.
|
|
4
|
-
"packageManager": "pnpm@8.
|
|
3
|
+
"version": "9.3.1",
|
|
4
|
+
"packageManager": "pnpm@8.15.4",
|
|
5
5
|
"description": "Bump version, commit changes, tag, and push to Git",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "James Messinger",
|
|
@@ -58,28 +58,28 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@jsdevtools/ez-spawn": "^3.0.4",
|
|
61
|
-
"c12": "^1.
|
|
61
|
+
"c12": "^1.9.0",
|
|
62
62
|
"cac": "^6.7.14",
|
|
63
63
|
"fast-glob": "^3.3.2",
|
|
64
64
|
"js-yaml": "^4.1.0",
|
|
65
65
|
"prompts": "^2.4.2",
|
|
66
|
-
"semver": "^7.
|
|
66
|
+
"semver": "^7.6.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@antfu/eslint-config": "^2.
|
|
69
|
+
"@antfu/eslint-config": "^2.7.0",
|
|
70
70
|
"@types/js-yaml": "^4.0.9",
|
|
71
|
-
"@types/node": "^20.11.
|
|
71
|
+
"@types/node": "^20.11.24",
|
|
72
72
|
"@types/prompts": "^2.4.9",
|
|
73
|
-
"@types/semver": "^7.5.
|
|
73
|
+
"@types/semver": "^7.5.8",
|
|
74
74
|
"detect-indent": "^7.0.1",
|
|
75
75
|
"detect-newline": "^4.0.1",
|
|
76
|
-
"eslint": "^8.
|
|
76
|
+
"eslint": "^8.57.0",
|
|
77
77
|
"esno": "^4.0.0",
|
|
78
78
|
"log-symbols": "^6.0.0",
|
|
79
79
|
"npm-check": "^6.0.1",
|
|
80
80
|
"picocolors": "^1.0.0",
|
|
81
81
|
"rimraf": "^5.0.5",
|
|
82
|
-
"tsup": "^8.0.
|
|
82
|
+
"tsup": "^8.0.2",
|
|
83
83
|
"typescript": "^5.3.3"
|
|
84
84
|
}
|
|
85
85
|
}
|