Skip to content

[BUG] Inc function give incorrect version when bumping subsequent pre versions  #644

Closed
@fjcasternao

Description

@fjcasternao

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

We have found that trying to increment any preversion (premajor, preminor, prepatch) results in wrong version calculation

Expected Behavior

The expected behavior will be the prerelease number to bump on subsequent prereleases

Steps To Reproduce

You can check any of the following test, all failing in increment.js
['1.2.0-dev.2', 'preminor', '1.2.0-dev.3', false, 'dev', false],
['2.0.0-dev.2', 'premajor', '2.0.0-dev.3', false, 'dev', false],
['1.2.1-dev.2', 'prepatch', '1.2.1-dev.3', false, 'dev', false],

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds an initial review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions