Skip to content

Is there a reason that we're not using the regex from [semver](https://semver.org/)? #246

Closed as not planned
@grokspawn

Description

@grokspawn

Is there a reason that we're not using the regex from semver?
here:

"([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$"

there:

"^(0|[1-9]\d*).(0|[1-9]\d*).(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-])(?:.(?:0|[1-9]\d|\d*[a-zA-Z-][0-9a-zA-Z-]))))?(?:+([0-9a-zA-Z-]+(?:.[0-9a-zA-Z-]+)*))?$"

This one does not work for prerelease versions, right?

I realize that this PR is just moving this functionality, but I'm wondering if we need another PR to handle prerelease versioning in the checker. This question should in no way hold up this PR.

Originally posted by @grokspawn in #238 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions