Skip to content

Default prerelease-type: "pre.0" does not bump on already-prerelease versions #564

Description

@owlstronaut

Ran into this on npm/cli#9387. Release-please kept producing the same version on every push and I could not figure out why. Turns out the default prerelease-type we set in release-please-config-json.hbs is "pre.0", and semver.inc(version, "prerelease", "pre.0") is a no-op when the version is already a prerelease (e.g. 12.0.0-pre.0.0 stays 12.0.0-pre.0.0 forever). It works fine to bootstrap a clean version into prerelease, but once you are in prerelease land nothing advances. Switching the default to the single identifier "pre" fixes it, and SemverVersioningStrategy.bump could also prefer the implicit preid parsed from the existing version so dotted preids do not silently break things for anyone who configures one explicitly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions