Open Cohen-Carlisle opened 7 months ago
Thank you for opening your first issue here :+1:. Be sure to follow the issue template if you chose one.
Hi @Cohen-Carlisle, I don't know if it applies to react, but we try to follow how particular releases are supported by the product vendor. So this type of inconsistency can happen if the vendor changed the way the product is supported (for example if the support was in the past on major
, but is now on major.minor
).
Having said that, for React I can think of two cases:
major.minor
: in this case the product must be updated to reflect that and it will fix the issue you are facing.For the second point, I think it would be hard to specialize the documented releases from major
to major.minor
. Generalizing major.minor
to just major
may be a bit simpler, but this must be done only for the latest major.minor
. Another solution could be to respond to each specific version (major.minor.patch
), but this would require to have an up-to-date list of all versions.
So I agree this would be nice to "normalize" the version number, but except if it's an error in the way the product is documented (case 1) it won't be easy to implement.
Is your feature request related to a problem? Please describe. Yes. Currently, the API is inconsistent (e.g., for React) in that it sometimes requires major.minor and sometimes requires only major in the URL. E.g., React requires major.minor for 18+ but requires only Major for < 18.
Describe the solution you'd like It would be very nice from an api perspective if the API was able to discard overly specific version information. For example, if I call
https://endoflife.date/api/react/16.14.json
it would be nice to get the response athttps://endoflife.date/api/react/16.json
instead of a 404. This would let me call with major.minor at all times (e.g.,https://endoflife.date/api/react/18.2.json
orhttps://endoflife.date/api/react/16.14.json
) and get a valid response instead of having to know the exact cycles (which seems like it may change after a major version release).Describe alternatives you've considered None of these are currently supported by our tooling, but in theory there are several workarounds (if you completely control the code calling the API)
https://endoflife.date/api/${product}.json
and do some string comparisons with our version strings to figure out which api path to call.Additional context We are using https://github.com/natecox/corrator to extract software versions from containers and get currency info for them from eol.date. We are not the maintainers and it currently only supports a static regex to extract the version string used to call eol.date.