absolute-version / commit-and-tag-version

Fork of the excellent standard-version. Automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org :trophy:
ISC License
421 stars 40 forks source link

fix: Combining both release-as and prerelease now doesn't break package #8

Closed TimothyJones closed 2 years ago

TimothyJones commented 2 years ago

Copy of https://github.com/conventional-changelog/standard-version/pull/767 , fixes https://github.com/conventional-changelog/standard-version/issues/542

BEGIN_COMMIT_OVERRIDE fix: Combining both release-as and prerelease now doesn't break package END_COMMIT_OVERRIDE


Previously, as shown in #542, using both options at the same time resulted in the bump file's version being set to null.

This was validated in the first of the new unit tests. The other unit tests simply check that the rest of the behavior is correct in this case.

With this combination the user can override the version, the purpose of release-as, while still starting or continuing a pre-release, the purpose of of the prerelease.

Fixes #542