conventional-changelog / conventional-changelog-config-spec

a spec describing the config options supported by conventional-config for upstream tooling
109 stars 32 forks source link

Why is preMajor=true treating minor updates as patch updates? #76

Open MikeDabrowski opened 2 years ago

MikeDabrowski commented 2 years ago

Im working on a project still in 0.y.z version. For bugfixes we want to bump patch and for new features or changes - minor. Im following conventional commits and using standard-verstion to cut a release. I noticed it always bumps patch version even if only feat commits have been made. I debugged the code and turns out config.preMajor is set to true. Before I overwrite it I want to know why such behaviour seems to be intended ?

In other words - why in 0.y.z any major or minor change is disregarded and only patch is incremented?

if (config.preMajor && level < 2) {
        level++
      }
      ...
VERSIONS[2] //patch