Skip to content

Commit 3020622

Browse files
committed
fix: escape regex backslashes in release-it config for scoped commits
1 parent 774d086 commit 3020622

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.release-it.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function groupCommitsByCategory(logs) {
2222
// Loop through each prefix to find conventional commit pattern ex. feat: , feat(card):, feat(card)! including some edge cases
2323
Object.entries(prefixes).forEach(([prefix, category]) => {
2424
const regex = new RegExp(
25-
`^(${prefix}(\([\w\-]+\))?!?: [^\r\n]+((\s)((\s)[^\r\n]+)+)*)(\s?)$`
25+
`^(${prefix}(\\([\\w\\-]+\\))?!?: [^\\r\\n]+((\\s)((\\s)[^\\r\\n]+)+)*)(\\s?)$`
2626
);
2727
const matches = logs.filter((l) => l.match(regex));
2828
grouped[category] = [...matches, ...grouped[category]];

0 commit comments

Comments
 (0)