Skip to content

Commit 90dc51d

Browse files
committed
fix(config): format whatBump logic for readability and maintainability
1 parent d99f6fc commit 90dc51d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.release-it.cjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,16 @@ module.exports = () => {
169169
},
170170

171171
recommendedBump: true,
172-
whatBump: (commits) => {
172+
whatBump: commits => {
173173
let isMajor = false;
174174
let isMinor = false;
175175
let isPatch = false;
176176

177177
for (const commit of commits) {
178-
const hasBreaking = Boolean(commit.breaking) || (commit.notes && commit.notes.some(n => /BREAKING[ -]CHANGE/i.test(n.title || n.text || "")));
178+
const hasBreaking =
179+
Boolean(commit.breaking) ||
180+
(commit.notes &&
181+
commit.notes.some(n => /BREAKING[ -]CHANGE/i.test(n.title || n.text || "")));
179182
if (hasBreaking) {
180183
isMajor = true;
181184
break;

0 commit comments

Comments
 (0)