Skip to content

Excludes pre-release versions from `~latest` tag and shorthand fetching

Laura Montemayor requested to merge remove-prerelease-latest-shorthand into master

What does this MR do and why?

Excludes pre-release versions from ~latest tag and from fetching with shorthand.

Changelog: changed

Screenshots or screen recordings

Assume there are two versions: 8.0.0-pre and 7.1.0

When requesting the ~latest version of a component:

Screenshot 2024-05-13 at 14.04.02.png

prerelease should be excluded:

Before After
Screenshot 2024-05-13 at 14.08.52.png Screenshot 2024-05-13 at 14.04.08.png

When fetching a version via shorthand -

Before After

Screenshot 2024-05-13 at 16.44.38.png

It won't find the version by shorthand:

Screenshot 2024-05-13 at 16.35.39.png

But it will find it if specified directly:

Screenshot 2024-05-13 at 16.35.50.png

How to set up and validate locally

In a project marked as a catalog resource, create two versions if you don't have any:

  1. First, create a minor or major version - 1.0.0
  2. Then, create a higher version but mark it as prerelease - 2.0.0-pre - the "higher version" is just to test that it won't return the pre-release, even if it is technically a "latest" version

~latest should return the latest NON pre-release version - in this case 1.0.0

#460873 (closed)

Edited by Laura Montemayor

Merge request reports