@@ -2,9 +2,9 @@ import { format } from "url";
2
2
import { find , merge } from "lodash-es" ;
3
3
import getStream from "get-stream" ;
4
4
import intoStream from "into-stream" ;
5
- import { sync as parser } from "conventional-commits-parser" ;
5
+ import { CommitParser } from "conventional-commits-parser" ;
6
6
import writer from "./wrappers/conventional-changelog-writer.js" ;
7
- import filter from "conventional-commits-filter" ;
7
+ import { filterRevertedCommitsSync } from "conventional-commits-filter" ;
8
8
import { readPackageUp } from "read-pkg-up" ;
9
9
import debugFactory from "debug" ;
10
10
import loadChangelogConfig from "./lib/load-changelog-config.js" ;
@@ -43,7 +43,8 @@ export async function generateNotes(pluginConfig, context) {
43
43
44
44
const { issue, commit, referenceActions, issuePrefixes } =
45
45
find ( HOSTS_CONFIG , ( conf ) => conf . hostname === hostname ) || HOSTS_CONFIG . default ;
46
- const parsedCommits = filter (
46
+ const parser = new CommitParser ( { referenceActions, issuePrefixes, ...parserOpts } ) ;
47
+ const parsedCommits = filterRevertedCommitsSync (
47
48
commits
48
49
. filter ( ( { message, hash } ) => {
49
50
if ( ! message . trim ( ) ) {
@@ -55,7 +56,7 @@ export async function generateNotes(pluginConfig, context) {
55
56
} )
56
57
. map ( ( rawCommit ) => ( {
57
58
...rawCommit ,
58
- ...parser ( rawCommit . message , { referenceActions , issuePrefixes , ... parserOpts } ) ,
59
+ ...parser . parse ( rawCommit . message ) ,
59
60
} ) )
60
61
) ;
61
62
const previousTag = lastRelease . gitTag || lastRelease . gitHead ;
0 commit comments