Skip to content

composer-schema contains an invalid regexp for versionΒ #12436

@aeschli

Description

@aeschli

The version regexp pattern in the composer-schema is using the a possessive quantifier (*+) which is not supported by the Regular Expression specification from JavaScript.

However the JSON schema spec requires JavaScript expression syntax: https://json-schema.org/understanding-json-schema/reference/regular_expressions.

"pattern": "^[vV]?\\d+(?:[.-]\\d+){0,3}[._-]?(?:(?:[sS][tT][aA][bB][lL][eE]|[bB][eE][tT][aA]|[bB]|[rR][cC]|[aA][lL][pP][hH][aA]|[aA]|[pP][aA][tT][cC][hH]|[pP][lL]|[pP])(?:(?:[.-]?\\d+)*+)?)?(?:[.-]?[dD][eE][vV]|\\.x-dev)?(?:\\+.*)?$|^dev-.*$"

First reported by microsoft/vscode-json-languageservice#261

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions