Skip to content

Valid prerelease versions rejected as "version looks like a range" #1855

Open

Description

@sholub-dev

Publishing a server with a version like 19.0.0-experimental.1, 2.1.0-hotfix.1 or 1.4.0-linux-x64 fails with version-looks-like-range.

Cause: looksLikeVersionRange (internal/validators/validators.go) treats any dotted version containing x, X or * as a wildcard, including inside the prerelease tag after -. The "x" in "experimental", "hotfix" and "linux-x64" triggers it.

Repro: set "version": "2.1.0-hotfix.1" in server.json and validate/publish.
Expected: accepted (it's a specific version).
Actual: error version-looks-like-range.
Still rejected as intended: 1.x, 1.*, 1.2.x.

Seen on main at 115f852. I have a fix in #1856.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions