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.

"feat:" commits causing PATCH instead of MINOR

See original GitHub issue

We are using version 7.0.0.

Expected behavior: feat: commit messages should result in a MINOR bump.

Actual behavior: feat: commit messages result in a PATCH bump.

Details: We have our pipeline set up to release on every commit to master, notice how both fix and feat result in patches: image

Here is the output from standard-version on a feat: release:

$ npx standard-version --infile docs/CHANGELOG.md
✔ bumping version in package.json from 0.14.6 to 0.14.7
✔ outputting changes to docs/CHANGELOG.md
✔ committing package.json and docs/CHANGELOG.md
✔ tagging release v0.14.7
ℹ Run `git push --follow-tags origin master && npm publish` to publish

Here is the resulting commit: image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
JVMartincommented, Sep 13, 2019

Hey @jbottigliero , thanks for the details!

IMO, the behavior of standard-version should not be different for pre-1.0.0 versions. Let me explain why…

We run standard-version automatically in a CI script, and we really need a way for it to do both MINORs and PATCHes based on commit messages, even in < 1.0.0. We obviously can’t add the --release-as=minor flag to the CI script, because then every release would be MINOR, which is just as bad as every release being PATCH.

So it seems like our only options for pre-1.0.0, is to have every release be a PATCH, or every release be a MINOR, which is not great.

If the functionality for pre-1.0.0 were exactly the same as for post-1.0.0, then both automated and non-automated workflows would be supported completely.

Everyone could do a BREAKING CHANGE: for major, a feat: for minor, and a fix: for patch. And the world would live in perfect harmony, supporting both automated and non-automated workflows, for both pre-1.0.0 and post-1.0.0.

Thoughts?

0reactions
coreyfarrellcommented, Sep 13, 2019

https://github.com/conventional-changelog/conventional-changelog/pull/452#issuecomment-512641237 explains the reasoning for the behavior. The intent is to work well with npm by allowing caret semver ranges to install all non-breaking updates.

Read more comments on GitHub >

github_iconTop Results From Across the Web

conventional commit messaging - Conventional Commits
fix type commits should be translated to PATCH releases. feat type commits should be translated to MINOR releases. Commits with BREAKING CHANGE in...
Read more >
Generating changelog automatically with Standard Version
Creating a “feat” commit means introducing a new feature. Therefore, it increases the minor version. A commit marked as a breaking change ...
Read more >
Understanding Semantic Commit Messages Using Git and ...
Let's explain the Semantic Commits term and demonstrate practical examples of commit messages, inspired by the Conventional Commit ...
Read more >
Version Incrementing - GitVersion
Commit messages​​ Adding +semver: breaking or +semver: major will cause the major version to be increased, +semver: feature or +semver: minor will bump...
Read more >
How are you writing a commit message? - DEV Community ‍ ‍
fix : a commit of the (bug)fix type is equal to PATCH in the SemVer. feat : a commit of type feature is...
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