feat: add support for short versions #1430
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Asana task
This PR adds support for short versions in UDR. There is a partner PR that will be merged around the same time as this one for dev portal here.
The main changes in this PR are as follows:
coercefunction from semver to coerce the short versions into semantic versions (ex. v2.x -> 2.0.0). This allows these versions to be properly sorted and compared to other versions for content exclusion.Testing
This PR needs to be tested with the changes for dev-portal. Without those changes, the ones in this PR will not work. You will need to locally run UDR and dev-portal to see these changes reflected.
First, do the steps in UDR:
UDR:
leah/feat/short-versionnpm run prebuildnpm run devThen do the steps in dev-portal:
Dev-portal:
leah/feat/short-versionUNIFIED_DOCS_APItohttp://localhost:8080npm starthttp://localhost:3000and click through the vault docs. Verify the new short versions are sorted properly with the existing versions and look as expected