Skip to content
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

minor version bumps in preMajor packages #714

Open
dptoot opened this issue Feb 11, 2021 · 7 comments
Open

minor version bumps in preMajor packages #714

dptoot opened this issue Feb 11, 2021 · 7 comments
Labels

Comments

@dptoot
Copy link

dptoot commented Feb 11, 2021

After some head banging and source code debugging about why any release of our preMajor package was only bumping to 'patch' versions we discovered that anything below 1.0.0 is forced into a patch release regardless of whether a "feature" is detected by a "feat" prefix.

preMajor option being forced to true

if (semver.lt(currentVersion, '1.0.0')) presetOptions.preMajor = true

forces a level 2 bump which equates to a forced patch

https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-conventionalcommits/conventional-recommended-bump.js#L31

Perhaps there is sound reasoning as to why but is there anyway to allow minor bumps before a v1 major release?

@bthdimension
Copy link

I think, this has been discussed in #308, #310, #347 and #454 (among others). However, this not being configurable makes the whole tool unusable for me.
I've seen similar questions to this one, so I think there is a demand for making this configurable. A simple flag would be enough. Is there anything like this yet?

@m-radzikowski
Copy link

You basically have to make commits with feat!: ... (like a breaking change) when on pre-major version to have the minor version bumped.

I agree it would be nice to have a flag to override this behavior.

@jakobrosenberg
Copy link

This feels like driving on the opposite side of the road. The theoretical advantages may be irrefutable, but if only some people do it, it'll still cause more harm than good.

@andrei9669
Copy link

andrei9669 commented Nov 2, 2021

I also noticed this and started digging around what might cause it. would be nice if this thing had a flag or something.

after some more digging, I came to this comment and it clicked for me: conventional-changelog/conventional-changelog#452 (comment)

and to create a minor release during 0.x.x, you have to create a breaking change, but since it is pre-major, it will just bump the minor.

@gastonsilva
Copy link

I work with something different to "npm", thought this was the right tool for that...
We need a flag to disable this "preMajor" feature!!!

@msimerson
Copy link

This "preMajor" feature is a POLA violation and should be fixed.

From your README:

How It Works:

Follow the Conventional Commits Specification in your repository.

From Conventional Commits Specification:

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

What part of that isn't clear? For anyone that wants this preMajor behavior, fine, let them ask for it. For everyone else, especially new users who are thinking they might want to adopt this tool, make the behavior match the docs.

@samson-sham
Copy link

samson-sham commented Oct 11, 2022

Definitely the documentation is unclear, or even a Conventional Commit Spec change is required for this.
No where I can know that preMajor doesn't allow a minor release, I'm searching the code for the same reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

8 participants