-
Notifications
You must be signed in to change notification settings - Fork 8
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
Permit refactor/docs to be versionable #30
Comments
Hi @rpocklin , the use of fix|feat to trigger builds is a pretty core concept to the "conventional commits" convention. It's baked into most of the semantic-release tooling that I've come across. If this is a problem for you, there may be another convention which suits your workflow better? While I understand that a refactor or docs may produce benefits, I would argue that if those benefits are significant to the consumers of your component then you should use "feat" to describe the change. So while you produced the benefits via the mechanism of refactoring or changing docs, a significant benefit (feature) was the end result. If the result of refactoring was of smaller significance to a consumer, then it would rightfully be deemed a refactor (or docs, as the case may be). |
If you look through the issues others have raised in semver/semver#146 This sums up the defaults I am suggesting:
Semver itself advocates releasing on each commit - (see https://github.com/semantic-release/semantic-release#is-it-really-a-good-idea-to-release-on-every-push) Also consider the fact that it is quite possible a refactor can introduce bugs, even if the developer doesn't mark it as a Imagine 10 Here is a PR I wish was merged into Perhaps, in my case all we need is a process to do a manual patch bump the version, but that kind of defeats the purpose! |
Thanks for sending through supporting doc. I'm not against allowing people to use their own configuration, but I do think the current defaults should remain the current defaults. In https://github.com/BublTechnology/customizable-commit-analyzer, the defaults have been changed. This would be a breaking change for this module if we adopted it.
I happen to like the fact that I can change documentation and code formatting AND do some minor refactoring without the version changing. I write tests. My tests are not perfect, but they give me a level of confidence that I'll know when I've broken something before I push my code. But if I didn't have great tests, or lacked confidence in them, then perhaps I would rather rely on semver to bump every time I push, "just in case". Personally, I don't think semver should be used in this way - as a safety net in case I've broken the code. If we take "the possibility of producing bugs" argument to the extreme, why not configure semver to change the MAJOR version everytime, "just in case"? What this would do is break the meaning of semver for your consumers, as in most cases the version number would be "crying "Wolf!"". If can conceive a method of supporting your needs without changing this module's defaults, I think that would be doable. @leonardoanalista thoughts? |
Yep i'd be happy with that - it should be easy to push out to a config file. You could even define if it is changelog-worthy or not at the same time ie.
|
We need to separate two aspects and consequences of a code modification.
Corp-semantic-release API has been implemented similar to semantic-release. Yesterday I saw a twitter message asking for people to help with semantic-release. This may explain pull requests not being merged. In summary, I m ok if refactor triggers a release. Imagine this scenario:
Leonardo |
Currently, adding a refactor commit will not allow for a release. I don't like this behaviour, as it makes the assumption there are no bugs or other benefits in the refactor, which may be true, but you may need or want to bump the version.
This should be customisable so that the user can release a version even though it only has a 'refactor' commit in it.
I don't think these commits should make it into the changelog, as they are not real
features
.The text was updated successfully, but these errors were encountered: