GithubHelp home page GithubHelp logo

Comments (2)

d0x7 avatar d0x7 commented on August 23, 2024

In my opinion, no, it should not be the same. As stated in the README, there is a StrictNewVersion and the more permissive NewVersion, which also allows things like v1 or v1.2 which are not strictly SemVer, but still ocurr often "in the wild".

In fact, I am very glad this library supports the more permissive one, as that's pretty much exactly what I need for a project. Now I only need to go from interval notations to this librarys format for comparing/validating versions and the more permissive NewVersion can handle the parsing and comparing :)

from semver.

oshirohugo avatar oshirohugo commented on August 23, 2024

Tks for your answer @d0x7 . Indeed StrictNewVersion is more restrictive, but still the following invalid versions are parsed without any errors:

1.1.2+.123
1.0.0-alpha..
1.0.0-alpha..1
1.0.0-alpha...1
1.0.0-alpha....1
1.0.0-alpha.....1
1.0.0-alpha......1
1.0.0-alpha.......1

For more details: Simple tests
All of them are not valid according to the official regex test.
So, I believe at least StrictNewVersion should reject these cases

from semver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.