conventional-commits / conventionalcommits.org

The conventional commits specification
https://conventionalcommits.org
MIT License
6.72k stars 520 forks source link

What type should be used for small improvements? #496

Open goveo opened 1 year ago

goveo commented 1 year ago

Sometimes I have changes that are not a new feature itself, but a small addition to current functionality. feat: and fix: seems like not the best types for this case.

I think something like imp: (an abbreviation of improvement:) should fit great in cases like this. CHANGELOGs can generate the improvements section based on these commits.

What do you think?

prenaissance commented 1 year ago

I think scoping the commit type would be the solution to that with the current convention Example: feat(loading-button): made button disabled while loading

goveo commented 1 year ago

Scoped feat type can be used in this case, but it will force a new minor release according to the docs:

feat: a commit of the type feat introduces a new feature to the codebase (this correlates with MINOR in Semantic Versioning).

damianopetrungaro commented 1 year ago

It depends what you are improving @goveo :D If the improve is a performance issue, fix should be the type since also reflects the minor release in SemVer.

If the improve you're doing is building a functionality (example changing the color of a button while loading), then it is a feat :)

javier-godoy commented 1 year ago

Sometimes it can be argued that the change in question is a fix: if users can open the same file multiple times by clicking the load button repeatedly (because it is not disabled), which is a behavior that does not provide any value to the users and should not be allowed by the application, then disabling the button while loading can be considered more of fix than a feat.

I've been using conventional-commits mostly with reusable components, and found that the difference between fix and feat is clear-cut, and aligns well with SemVer. With applications/products, however, it's a different story: