-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fall back to conventional commit-parser settings for missing keys
BREAKING CHANGE This potentially changes implicit commitlint behaviour users may have relied on in earlier versions. Instead of falling back to the builtin commit-parser defaults we now default all keys to conventional-changelog-angular.
- Loading branch information
Showing
4 changed files
with
31 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
import {sync} from 'conventional-commits-parser'; | ||
import defaultChangelogOpts from 'conventional-changelog-angular'; | ||
import {merge} from 'lodash'; | ||
|
||
export default parse; | ||
|
||
async function parse(message, parser = sync, parserOpts) { | ||
if (!parserOpts || Object.keys(parserOpts || {}).length === 0) { | ||
const changelogOpts = await defaultChangelogOpts; | ||
parserOpts = changelogOpts.parserOpts; | ||
} | ||
|
||
const parsed = parser(message, parserOpts); | ||
const defaultOpts = (await defaultChangelogOpts).parserOpts; | ||
const parsed = parser(message, merge({}, defaultOpts, parserOpts)); | ||
parsed.raw = message; | ||
return parsed; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5995,7 +5995,7 @@ lodash.zip@^4.2.0: | |
version "4.2.0" | ||
resolved "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020" | ||
|
||
[email protected], lodash@^4.0.0, lodash@^4.17.10: | ||
[email protected], lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11: | ||
version "4.17.11" | ||
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" | ||
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== | ||
|