Skip to content

[BUG] BNF does not match the implementation #665

@ShuiRuTian

Description

@ShuiRuTian

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

semver.valid('1.2.3-00') // 'null'
semver.valid('1.2.3+00') // '1.2.3'

However, according to the BNF

qualifier  ::= ( '-' pre )? ( '+' build )?
pre        ::= parts
build      ::= parts
parts      ::= part ( '.' part ) *
part       ::= nr | [-0-9A-Za-z]+

pre and build are just the same.

Expected Behavior

The behavior of program is correct, but BNF is not.

We need to update the BNF form.

Steps To Reproduce

No response

Environment

  • npm: 9.9.1
  • Node: v18.17.0
  • OS: windows

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