Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
feat(noteKeywords): make BREAKING CHANGE more forgiving
Browse files Browse the repository at this point in the history
People might type BREAKING CHANGES unintentionally. EG: angular/angular@098b461
  • Loading branch information
stevemao authored and Benjamin Coe committed Mar 5, 2017
1 parent 28427c6 commit 283b223
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var parserOpts = {
'scope',
'subject'
],
noteKeywords: 'BREAKING CHANGE',
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES'],
revertPattern: /^revert:\s([\s\S]*?)\s*This reverts commit (\w*)\./,
revertCorrespondence: ['header', 'hash']
};
Expand Down
19 changes: 18 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,24 @@ describe('angular preset', function() {
}));
});

it('should BREAKING CHANGES the same as BREAKING CHANGE', function(done) {
gitDummyCommit(['feat(deps): bump', 'BREAKING CHANGES: Also works :)']);

conventionalChangelogCore({
config: preset
})
.on('error', function(err) {
done(err);
})
.pipe(through(function(chunk) {
chunk = chunk.toString();

expect(chunk).to.include('Also works :)');

done();
}));
});

it('should work if there is a semver tag', function(done) {
var i = 0;

Expand Down Expand Up @@ -173,5 +191,4 @@ describe('angular preset', function() {
done();
}));
});

});

0 comments on commit 283b223

Please sign in to comment.