Skip to content

Commit

Permalink
chore: update type for conventionalCommitsParser
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban committed Feb 23, 2024
1 parent dc269d7 commit aca626f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"devDependencies": {
"@release-it/conventional-changelog": "^8.0.0",
"@types/conventional-commits-parser": "^3.0.4",
"@types/conventional-commits-parser": "^5.0.0",
"@types/eslint": "^8.44.3",
"@types/pkgjs__parseargs": "^0.10.1",
"@typescript-eslint/eslint-plugin": "^7.0.0",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions src/getCommitMeaning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ const releaseCommitTester =

export function getCommitMeaning(message: string) {
// Some types are always meaningful or ignored, regardless of potentially release-like messages
// options from https://github.com/conventional-changelog/conventional-changelog/issues/648#issuecomment-704867077
// https://github.com/JoshuaKGoldberg/should-semantic-release/issues/174
const { notes, type } = conventionalCommitsParser.sync(message, {
breakingHeaderPattern: /^(\w*)(?:\((.*)\))?!: (.*)$/,
} as object);
});
if (notes.some((note) => note.title.match(/^BREAKING[ -]CHANGE$/))) {
return "meaningful";
}
Expand Down

0 comments on commit aca626f

Please sign in to comment.