When Maven versions include pre-releases, find-versions
seems to sort correctly:
> clojure -X:deps find-versions :lib hiccup/hiccup
Downloading: hiccup/hiccup/maven-metadata.xml from clojars
{:mvn/version "2.0.0-alpha1"}
{:mvn/version "2.0.0-alpha2"}
{:mvn/version "2.0.0-RC1"}
{:mvn/version "2.0.0-RC2"}
{:mvn/version "2.0.0-RC3"}
{:mvn/version "2.0.0-RC4"}
{:mvn/version "2.0.0-RC5"}
{:mvn/version "2.0.0"}
However, when a library is git-only with tags and pre-releases exist, they seem to be alpha-sorted instead:
> clojure -X:deps find-versions :lib io.github.seancorfield/deps-new
{:git/tag "v0.7.1-rc", :git/sha "5a6168d"}
{:git/tag "v0.8.0", :git/sha "2f96530"}
{:git/tag "v0.8.1", :git/sha "2859baf"}
{:git/tag "v0.9.0", :git/sha "da2f764"}
{:git/tag "v0.9.0-rc", :git/sha "b32e0f2"}
{:git/tag "v0.10.0", :git/sha "20e82f8"}
{:git/tag "v0.10.1", :git/sha "a90029c"}
{:git/tag "v0.10.1-rc", :git/sha "35159b5"}
Those -rc
versions should sort before the full release.