Skip to content

Commit e3f335c

Browse files
committed
Update version-bump.mjs
1 parent 7df75fc commit e3f335c

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

version-bump.mjs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,18 @@ function resolveNextVersion(currentVersion, arg) {
3636
return formatVersion({ major: current.major + 1, minor: 0, patch: 0 });
3737
}
3838
if (arg === "minor") {
39-
return formatVersion({ major: current.major, minor: current.minor + 1, patch: 0 });
39+
return formatVersion({
40+
major: current.major,
41+
minor: current.minor + 1,
42+
patch: 0,
43+
});
4044
}
4145
if (arg === "patch") {
42-
return formatVersion({ major: current.major, minor: current.minor, patch: current.patch + 1 });
46+
return formatVersion({
47+
major: current.major,
48+
minor: current.minor,
49+
patch: current.patch + 1,
50+
});
4351
}
4452

4553
parseVersion(arg);
@@ -56,9 +64,7 @@ function writeJson(filePath, value, indent = 2) {
5664

5765
const arg = process.argv[2];
5866
if (arg === undefined || !VERSION_ARG_REGEX.test(arg)) {
59-
console.error(
60-
"Usage: node version-bump.mjs <major|minor|patch|x.y.z>",
61-
);
67+
console.error("Usage: node version-bump.mjs <major|minor|patch|x.y.z>");
6268
process.exit(1);
6369
}
6470

0 commit comments

Comments
 (0)