File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { isArray , mergeWith } from 'lodash' ;
2
- import { Commit } from './types' ;
2
+ import { Commit , ParserOptions } from './types' ;
3
3
4
4
const { sync} = require ( 'conventional-commits-parser' ) ;
5
5
const defaultChangelogOpts = require ( 'conventional-changelog-angular' ) ;
@@ -8,9 +8,9 @@ export default parse;
8
8
export * from './types' ;
9
9
10
10
async function parse (
11
- message ?: any ,
11
+ message ?: string ,
12
12
parser : any = sync ,
13
- parserOpts : any = undefined
13
+ parserOpts ?: ParserOptions
14
14
) : Promise < Commit > {
15
15
const defaultOpts = ( await defaultChangelogOpts ) . parserOpts ;
16
16
const parsed = parser (
Original file line number Diff line number Diff line change @@ -26,3 +26,13 @@ export interface CommitReference {
26
26
repository : string | null ;
27
27
issue : string | null ;
28
28
}
29
+
30
+ export interface ParserOptions {
31
+ headerCorrespondence ?: string [ ] ;
32
+ headerPattern ?: RegExp ;
33
+ mergeCorrespondence ?: string [ ] ;
34
+ mergePattern ?: RegExp ;
35
+ noteKeywords ?: string [ ] ;
36
+ revertCorrespondence ?: string [ ] ;
37
+ revertPattern ?: RegExp ;
38
+ }
You can’t perform that action at this time.
0 commit comments