renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
17.19k stars 2.25k forks source link

Loose versioning: support strings with digits #21759

Open rarkins opened 1 year ago

rarkins commented 1 year ago

What would you like Renovate to be able to do?

loose versioning should support strings like abc1 or abc1.2.3 - as long as it has at least one digit.

If you have any ideas on how this should be implemented, please tell us here.

Loosen our parsing requirements

Is this a feature you are interested in implementing yourself?

No

sams-gleb commented 1 year ago

I described here a use case when we wanted to have multiple versions treated as a single version object, is is something that might be possible with more loose versioning?

https://github.com/renovatebot/renovate/discussions/21797

rarkins commented 1 year ago

I think it's a different problem

j2L4e commented 1 year ago

Can you elaborate on why it would need at least one digit? Wouldn't -a.localeCompare(b) do the trick for any arbitrary string?

rarkins commented 1 year ago

Today loose versioning rejects any "version" which starts with letters. So I am proposing to make it looser to also allow versions starting with letters as long as they have at least one digit

roobre commented 10 months ago

I would pretty much love this. I think it is specially useful for docker tags, which are pretty much the wild west of versioning. Today I faced this one, for example:

DEBUG: Dependency jitsi/web has unsupported/unversioned value stable-8960-1 (versioning=loose) (repository=k8s-manifests/tenshi)
DEBUG: Dependency jitsi/jvb has unsupported/unversioned value stable-8960-1 (versioning=loose) (repository=k8s-manifests/tenshi)
DEBUG: Dependency jitsi/jicofo has unsupported/unversioned value stable-8960-1 (versioning=loose) (repository=k8s-manifests/tenshi)

The ability to tell renovate to "just sort", specially combined with the regex capabilities of allowedVersions, would be ✨ awesome ✨