Skip to content

Commit

Permalink
fix(package): update conventional-commits-parser to version 3.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Nov 7, 2019
1 parent 76537cc commit 4a929ca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dependencies": {
"conventional-changelog-angular": "^5.0.0",
"conventional-commits-filter": "^2.0.0",
"conventional-commits-parser": "^3.0.0",
"conventional-commits-parser": "^3.0.7",
"debug": "^4.0.0",
"import-from": "^3.0.0",
"lodash": "^4.17.4"
Expand Down
12 changes: 12 additions & 0 deletions test/integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,18 @@ test('Return "major" if there is a breaking change, using default releaseRules',
t.true(t.context.log.calledWith('Analysis of %s commits complete: %s release', 2, 'major'));
});

test('Return "major" if there is a "conventionalcommits" breaking change, using default releaseRules', async t => {
const commits = [{hash: '123', message: 'fix: First fix'}, {hash: '456', message: 'feat!: Breaking change feature'}];
const releaseType = await analyzeCommits({preset: 'conventionalcommits'}, {cwd, commits, logger: t.context.logger});

t.is(releaseType, 'major');
t.true(t.context.log.calledWith('Analyzing commit: %s', commits[0].message));
t.true(t.context.log.calledWith('The release type for the commit is %s', 'patch'));
t.true(t.context.log.calledWith('Analyzing commit: %s', commits[1].message));
t.true(t.context.log.calledWith('The release type for the commit is %s', 'major'));
t.true(t.context.log.calledWith('Analysis of %s commits complete: %s release', 2, 'major'));
});

test('Return "patch" if there is only types set to "patch", using default releaseRules', async t => {
const commits = [
{hash: '123', message: 'fix: First fix (fixes #123)'},
Expand Down

0 comments on commit 4a929ca

Please sign in to comment.