Skip to content

Implement the ability to use shorthand for semantic versions

Laura Montemayor requested to merge shorthand-semver-include into master

What does this MR do and why?

Implement the ability to use shorthand for semantic versions - @1 or @1.2

This will be used for includeing a component and it supports eitherone or two digit shorthand. For both cases it will return the latest version for the closest match.

Changelog: added

Screenshots or screen recordings

With the following releases, created in this order: 3.2.0, 3.1.2, 5.0.1

5.0.1

we can use 5 :

Screenshot_2024-03-26_at_14.02.51

or 5.0 to narrow it down:

Screenshot_2024-03-26_at_14.03.07

For 3.1.2 and 3.3.0

Since 3 will bring us the latest, this means 3.3.0, even though 3.1.2 was released after, since we're returning the latest semantic version.

Screenshot 2024-03-26 at 14.36.17.png

Screenshot 2024-03-26 at 14.36.23.png

If we narrow it down to 3.1 it will bring us the patch 3.1.2

Screenshot 2024-03-26 at 14.38.10.png

Screenshot 2024-03-26 at 14.38.16.png

And then 3.1 it will bring us the patch 3.1.1

Screenshot 2024-03-26 at 14.38.29.png

How to set up and validate locally

For this to be tested, you must have a project set up as a catalog resource and a few versions associated with it. From there you can try including the component in the editor and see it work like the screenshots above.

#450835 (closed)

Edited by Laura Montemayor

Merge request reports