Skip to content

leading zeroes can fail to be coerced #153

@maxnbk

Description

@maxnbk

There was an issue a long time ago with a feature merged for leading-zeroes support, even though it's not technically semver to do so (Though I think it's good to support): #89

However, it does not work in all situations.

Version.coerce("1.2.3") -> works fine
Version.coerce("1.2.000") -> works fine, gets interpreted as 1.2.0
Version.coerce("1.2.3.000") -> works fine, gets interpreted as 1.2.3+000
Version.coerce("1.2.3-000") -> breaks

It's difficult to know if this could called a bug or a feature-request, as leading-zeros aren't semver compliant, but since the original request was a feature, and ostensibly extends support for leading-zeroes, I would probably call this a bug with that feature. I could be misinterpreting something, though. In any case, it would be appreciated if this could be further supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions