-
Notifications
You must be signed in to change notification settings - Fork 641
Show latest stable version on search result page #654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you! This is related to, but slightly different from, #510. |
Not sure if this is the same thing, but pages like https://crates.io/categories/cryptography also show prerelease (e.g. alpha) versions instead of showing the latest stable version. |
I just had a quick look at this as it was labeled "A-ember". The problem is that from the API we only get |
EncodableCrate: Add `max_stable_version` field This PR resolves the API part of #654 by adding a `max_stable_version` field for the `krate` resource. Since naming is hard, it is called `highest_stable` internally on the `TopVersions` struct. Contrary to `newest_version` and `max_version` this field will be `null` (not `"0.0.0"`) if all available versions have been yanked. r? `@jtgeibel`
Simplify `crate.version` route implementation This PR adds a `defaultVersion` property on the `crate` model and uses it in the `crate.version` (and `crate.index`) route to determine which version to display by default. This lets us get rid of the `semver` dependency in that route and puts the backend in charge of telling us what to display by default. This will allow us to address #654 in the near future, since the new `defaultVersion` property can be used in the search results too. This is probably best reviewed commit-by-commit :) r? `@pichfl`
Currently it seems to show the latest released version, even if it is a pre-release.
Example: https://crates.io/search?q=bincode
I see: bincode v1.0.0-alpha6
Following the link I get to
bincode v0.6.1
It should show v0.6.1 on the search page as well.
The text was updated successfully, but these errors were encountered: