question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: Conventional commits do not respect '!' or "BREAKING CHANGE"

See original GitHub issue

Lerna 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:open
  • Created 3 years ago
  • Reactions:11
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
privatenumbercommented, Sep 6, 2021

If your package is in major version zero (eg. v0.x.y), the semver rules are shifted over, so breaking changes happen in v0.x.0, and features & patches happen in v0.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:

^1.2.3 := >=1.2.3 <2.0.0 ^0.2.3 := >=0.2.3 <0.3.0 ^0.0.3 := >=0.0.3 <0.0.4


Requested for improved documentation around this here.

4reactions
qrosmelicommented, Sep 9, 2021

@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 the conventional-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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conventional Commits
The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING...
Read more >
feat(conventional_commits): signal breaking changes in ...
Conventional Commits miss an important opportunity to signal the breakingness of change in the title rather than just the body of a commit ......
Read more >
What would be a good commit message for updating package ...
Notice these types are not mandated by the conventional commits ... may or may not incur breaking changes which may result in a...
Read more >
General — Curve 1.0.0 documentation - Read the Docs
Conventional Commits · fix: a commit of the type fix patches a bug in your codebase (this correlates with PATCH in semantic versioning)....
Read more >
New git guidelines: We have switched to Conventional Commits
No, the commit message should say why this change was made. Because a client (what client?) asked, because a bug was fixed (reference...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found