Skip to content

docs: document accepted range whitespace - #895

Open
vibhor-aggr wants to merge 1 commit into
npm:mainfrom
vibhor-aggr:docs/range-bnf-whitespace
Open

docs: document accepted range whitespace#895
vibhor-aggr wants to merge 1 commit into
npm:mainfrom
vibhor-aggr:docs/range-bnf-whitespace

Conversation

@vibhor-aggr

Copy link
Copy Markdown

Summary

  • document whitespace accepted before partial versions in the range BNF
  • document the accepted ~> tilde form
  • allow one or more spaces between simple range expressions in the grammar

The README and standalone range.bnf now describe the same forms already accepted by the strict parser. This does not change runtime behavior.

Fixes #392.

Verification

  • strict-mode smoke checks for >= 1.2.3 < 1.6.0, ^ 1.2.3 || ^ 2.4.6, ~ > 1.2.3, and ~> 1.2.3
  • ./node_modules/.bin/tap test/ranges/valid.js
  • npm test
  • git diff --check

@vibhor-aggr
vibhor-aggr requested a review from a team as a code owner August 7, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] range.bnf incomplete regarding whitespace and "spermies"

1 participant