File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 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';
44export default parse ;
55
66async function parse ( message , parser = sync , parserOpts ) {
7- if ( ! parserOpts ) {
7+ if ( ! parserOpts || Object . keys ( parserOpts || { } ) . length === 0 ) {
88 const changelogOpts = await defaultChangelogOpts ;
99 parserOpts = changelogOpts . parserOpts ;
1010 }
Original file line number Diff line number Diff line change @@ -105,6 +105,13 @@ test('supports scopes with /', async t => {
105105 t . is ( actual . subject , 'subject' ) ;
106106} ) ;
107107
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+
108115test ( 'ignores comments' , async t => {
109116 const message = 'type(some/scope): subject\n# some comment' ;
110117 const changelogOpts = await importFrom (
You can’t perform that action at this time.
0 commit comments