Skip to content
This repository was archived by the owner on Feb 5, 2018. It is now read-only.

Commit 7dce559

Browse files
committed
feat(noteKeywords): make BREAKING CHANGE more forgiving
People might type BREAKING CHANGES unintentionally. EG: angular/angular@098b461
1 parent 435309d commit 7dce559

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var parserOpts = {
2222
'scope',
2323
'subject'
2424
],
25-
noteKeywords: 'BREAKING CHANGE',
25+
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES'],
2626
revertPattern: /^revert:\s([\s\S]*?)\s*This reverts commit (\w*)\./,
2727
revertCorrespondence: ['header', 'hash']
2828
};

test/test.js

+18-1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,24 @@ describe('angular preset', function() {
121121
}));
122122
});
123123

124+
it('should BREAKING CHANGES the same as BREAKING CHANGE', function(done) {
125+
gitDummyCommit(['feat(deps): bump', 'BREAKING CHANGES: Also works :)']);
126+
127+
conventionalChangelogCore({
128+
config: preset
129+
})
130+
.on('error', function(err) {
131+
done(err);
132+
})
133+
.pipe(through(function(chunk) {
134+
chunk = chunk.toString();
135+
136+
expect(chunk).to.include('Also works :)');
137+
138+
done();
139+
}));
140+
});
141+
124142
it('should work if there is a semver tag', function(done) {
125143
var i = 0;
126144

@@ -173,5 +191,4 @@ describe('angular preset', function() {
173191
done();
174192
}));
175193
});
176-
177194
});

0 commit comments

Comments
 (0)