File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import defaultChangelogOpts from 'conventional-changelog-angular';
4
4
export default parse ;
5
5
6
6
async function parse ( message , parser = sync , parserOpts ) {
7
- if ( ! parserOpts ) {
7
+ if ( ! parserOpts || Object . keys ( parserOpts || { } ) . length === 0 ) {
8
8
const changelogOpts = await defaultChangelogOpts ;
9
9
parserOpts = changelogOpts . parserOpts ;
10
10
}
Original file line number Diff line number Diff line change @@ -105,6 +105,13 @@ test('supports scopes with /', async t => {
105
105
t . is ( actual . subject , 'subject' ) ;
106
106
} ) ;
107
107
108
+ test ( 'supports scopes with / and empty parserOpts' , async t => {
109
+ const message = 'type(some/scope): subject' ;
110
+ const actual = await parse ( message , undefined , { } ) ;
111
+ t . is ( actual . scope , 'some/scope' ) ;
112
+ t . is ( actual . subject , 'subject' ) ;
113
+ } ) ;
114
+
108
115
test ( 'ignores comments' , async t => {
109
116
const message = 'type(some/scope): subject\n# some comment' ;
110
117
const changelogOpts = await importFrom (
You can’t perform that action at this time.
0 commit comments