Skip to content

About

A project to generate the shell glob pattern to match semantic versioning

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Glob pattern for semver

TL;DR: here is the glob pattern: @(0|[1-9]*([0-9])).@(0|[1-9]*([0-9])).@(0|[1-9]*([0-9]))?(-@(*([0-9])[a-zA-Z-]*([a-zA-Z0-9-])|0|[1-9]*([0-9]))*(.@(*([0-9])[a-zA-Z-]*([a-zA-Z0-9-])|0|[1-9]*([0-9]))))?(++([a-zA-Z0-9-])*(.+([a-zA-Z0-9-])))

This project detects versions following SemVer 2.0. The generator is based on the Backus–Naur form grammar defined by SemVer 2.0.

Getting Started

In order to test locally, run the following commands:

npm install
npm test
npm run generate

npm test checks the generated pattern against the SemVer valid and invalid test vectors. npm run generate prints the pattern and its length. The current pattern is 204 characters long.

About

A project to generate the shell glob pattern to match semantic versioning

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages