Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(conventional-changelog-conventionalcommits): optional config #1120

Conversation

lvjiaxuan
Copy link
Contributor

It throws error, when the preset option is set to the string conventionalcommits.

image

Copy link
Member

@dangreen dangreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. Thanks for the PR!

@@ -27,7 +27,7 @@ function createConventionalRecommendedBumpOpts (config, parserOpts) {
}
})

if (config.preMajor && level < 2) {
if (config?.preMajor && level < 2) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add test case for that.

Comment on lines 80 to 81
preset: {
name: 'conventionalcommits'
}
preset: 'conventionalcommits'
}, {})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change it?

This comment was marked as resolved.

Comment on lines +74 to +82
it('should allow the string `conventionalcommits` as the preset option', async () => {
preparing(2)

await expect(() => conventionalRecommendedBump({
cwd: testTools.cwd,
preset: 'conventionalcommits'
}, {})).not.toThrowError()
})

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally, I decided to add a test case. 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants