File tree 4 files changed +30
-14
lines changed
4 files changed +30
-14
lines changed Original file line number Diff line number Diff line change 82
82
"xo" : " 0.18.2"
83
83
},
84
84
"dependencies" : {
85
+ "@marionebl/conventional-commits-parser" : " ^3.0.0" ,
85
86
"@marionebl/git-raw-commits" : " ^1.2.0" ,
86
87
"@marionebl/sander" : " ^0.6.0" ,
87
88
"babel-runtime" : " ^6.23.0" ,
88
89
"chalk" : " ^2.0.1" ,
89
90
"conventional-changelog-angular" : " ^1.3.3" ,
90
- "conventional-commits-parser" : " ^1.3.0" ,
91
91
"cosmiconfig" : " ^3.0.1" ,
92
92
"find-up" : " ^2.1.0" ,
93
93
"lodash" : " ^4.17.4" ,
Original file line number Diff line number Diff line change 1
- import { sync } from 'conventional-commits-parser' ;
1
+ import { sync } from '@marionebl/ conventional-commits-parser' ;
2
2
import defaultChangelogOpts from 'conventional-changelog-angular' ;
3
3
4
4
export default parse ;
Original file line number Diff line number Diff line change @@ -104,3 +104,19 @@ test('supports scopes with /', async t => {
104
104
t . is ( actual . scope , 'some/scope' ) ;
105
105
t . is ( actual . subject , 'subject' ) ;
106
106
} ) ;
107
+
108
+ test ( 'ignores comments' , async t => {
109
+ const message = 'type(some/scope): subject\n# some comment' ;
110
+ const actual = await parse ( message ) ;
111
+ t . is ( actual . body , null ) ;
112
+ t . is ( actual . footer , null ) ;
113
+ t . is ( actual . subject , 'subject' ) ;
114
+ } ) ;
115
+
116
+ test ( 'registers inline #' , async t => {
117
+ const message =
118
+ 'type(some/scope): subject #reference\n# some comment\nthings #reference' ;
119
+ const actual = await parse ( message ) ;
120
+ t . is ( actual . subject , 'subject #reference' ) ;
121
+ t . is ( actual . body , 'things #reference' ) ;
122
+ } ) ;
Original file line number Diff line number Diff line change 59
59
dependencies :
60
60
arrify "^1.0.1"
61
61
62
+ " @marionebl/conventional-commits-parser@^3.0.0 " :
63
+ version "3.0.0"
64
+ resolved "https://registry.npmjs.org/@marionebl/conventional-commits-parser/-/conventional-commits-parser-3.0.0.tgz#9da29b4d2c8f05c0f9cdd02936713b8096c958d3"
65
+ dependencies :
66
+ JSONStream "^1.0.4"
67
+ is-text-path "^1.0.0"
68
+ lodash "^4.2.1"
69
+ meow "^3.3.0"
70
+ split2 "^2.0.0"
71
+ through2 "^2.0.0"
72
+ trim-off-newlines "^1.0.0"
73
+
62
74
" @marionebl/git-raw-commits@^1.2.0 " :
63
75
version "1.2.0"
64
76
resolved "https://registry.npmjs.org/@marionebl/git-raw-commits/-/git-raw-commits-1.2.0.tgz#7cd8a6dfc09a96df98d8fbe9175c5971cc07c82b"
@@ -1849,18 +1861,6 @@ conventional-commits-filter@^1.0.0:
1849
1861
is-subset "^0.1.1"
1850
1862
modify-values "^1.0.0"
1851
1863
1852
- conventional-commits-parser@^1.3.0 :
1853
- version "1.3.0"
1854
- resolved "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-1.3.0.tgz#e327b53194e1a7ad5dc63479ee9099a52b024865"
1855
- dependencies :
1856
- JSONStream "^1.0.4"
1857
- is-text-path "^1.0.0"
1858
- lodash "^4.2.1"
1859
- meow "^3.3.0"
1860
- split2 "^2.0.0"
1861
- through2 "^2.0.0"
1862
- trim-off-newlines "^1.0.0"
1863
-
1864
1864
conventional-commits-parser@^2.0.0 :
1865
1865
version "2.0.0"
1866
1866
resolved "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz#71d01910cb0a99aeb20c144e50f81f4df3178447"
You can’t perform that action at this time.
0 commit comments