Bug: Conventional commits do not respect '!' or "BREAKING CHANGE"
See original GitHub issueLerna conventional commits do not respect ‘!’ as denoting a breaking change when part of the ‘types’ on a conventional commit. Additionally, It seems like including the ‘!’ may make lerna not recognize that commit as a valid conventional commit in some cases. This repo also highlights this problem.
EDIT: Looks like “BREAKING CHANGE:” is also not being respected.
Repro repo: https://github.com/alexforsyth/lerna-conventional-commits
Expected Behavior
The generated changelog should list breaking changes, when a ‘!’ is included on a type.
ex. 2 from conventional commits
refactor!: drop support for Node 6
Should be equal to using the BREAKING CHANGE:
phrase in the footer.
Current Behavior
The generated changelog does not include the change when ‘!’ is included on a type.
ex.
refactor!: drop support for Node 6
Possible Solution
Steps to Reproduce (for bugs)
This repo is a live example that highlights this problem.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:15 (4 by maintainers)
Top GitHub Comments
If your package is in major version zero (eg.
v0.x.y
), the semver rules are shifted over, so breaking changes happen inv0.x.0
, and features & patches happen inv0.0.y
.Therefore, a breaking change in a package that is in 0.x.y, will only bump x.
I wish this was better documented, but it’s in the npm docs:
Requested for improved documentation around this here.
@richardkazuomiller your comment really help me. I was trying to get a major bump with a commit on a shared folder for all packages. As soon I did a silly change with a commit inside a package it recognized as a major change.
Commit:
git commit -a -m 'feat!: Dummy breaking change'
Command:lerna version --no-push --conventional-commits --changelog-preset conventionalcommits --no-changelog
(We do not want the Angular preset, to be able to use the
conventionalcommits
preset you need to install theconventional-changelog-conventionalcommits
package)This has been the ONLY way I have been able to get a Major bump. I have been struggling with this for hours.