Giter Site home page Giter Site logo

Comments (5)

krader1961 avatar krader1961 commented on July 21, 2024

There is also the question of how blatantly invalid semvers are handled; e.g., "x.y.z". IMHO all such cases should throw an exception by default and the user should have to explicitly use a &nonstrict option if they want to be lenient. The exception being a "v" (or "V") prefix since far too many otherwise valid semantic version strings include that invalid prefix.

from elvish-modules.

zzamboni avatar zzamboni commented on July 21, 2024

I think I'm going to do some work on the module adding the official regular expression to check for validity. A &nonstrict option would allow a [Vv] at the beginning, but probably no more.

from elvish-modules.

krader1961 avatar krader1961 commented on July 21, 2024

I think I'm going to do some work on the module adding the official regular expression....

I think that is a good idea. Note that a leading "v" was valid in SemVer 1.0.0 but is invalid in the 2.0.0 spec. No idea why that change was made but even if it is a good idea for the SemVer spec I think a "v" prefix should be silently ignored if the string is otherwise valid. That is, always preface the official regexp with [vV]?. Obviously that's just my opinion and opinions are like assholes: everyone has one. 😄 It is perfectly reasonable to make the default behavior strictly conforming and require a &nonstrict option if the user wants to be lenient on this point. I've created PR elves/elvish#1348 that incidentally removes the leading "v" from the Elvish semver string.

from elvish-modules.

zzamboni avatar zzamboni commented on July 21, 2024

@krader1961 please check out #18.

from elvish-modules.

zzamboni avatar zzamboni commented on July 21, 2024

I think #18 addresses this issue, so I'm closing it. @krader1961 feel free to reopen if there's something still missing.

from elvish-modules.

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.