-
Notifications
You must be signed in to change notification settings - Fork 517
Description
OK, first allow me to lay out the scenario:
We are using a JS app to parse PHP composer.json
files and wish to use this library to compare a version number with that constraint.
Currently: What is considered a valid constraint for composer >=5.6,<=8.1.99
will not parse with this library.
The Hopeful Ideal: That we can use this library to parse this constraint with the ,
being considered the same as a
.
For background, there is an issue that pertains to this, however I will try to lay out the argument here.
I tried to lookup whether the semver specification says anything regarding specifying version ranges but came up empty handed. As I understand it PHP's composer may not be the only library which parses a version range constraint in this way, some examples:
https://docs.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#multiple-requirements
https://golang.github.io/dep/docs/Gopkg.toml.html#version (deprecated I believe with the new approach being specific versions not ranges)
I'm sure there are more, so my request is if either, a comma could be considered a valid alternative to a space within this package, or if the .coerce()
or .clean()
methods could be modified for use in these instances? Or maybe there already exists a way and this is all for naught. Thanks for considering this either way.