Skip to content

Conversation

@LeahMarieBush
Copy link
Contributor

@LeahMarieBush LeahMarieBush commented Dec 2, 2025

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:

  • Use coerce function 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.
  • Add short version regex to vault content exclusion
  • Adds tests for the changes above

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:

  1. Checkout leah/feat/short-version
  2. Go to vault and create a few new versions. You can do this by copying the latest version folder and pasting it and then changing the name. For testing the sorting, use a variety of version names (ex. v2.x, v3.x, v4.x (rc), v5.x (beta))
  3. Run npm run prebuild
  4. After that finishes, run npm run dev

Then do the steps in dev-portal:
Dev-portal:

  1. Checkout leah/feat/short-version
  2. In the .env file, change the UNIFIED_DOCS_API to http://localhost:8080
  3. Run npm start
  4. Go to http://localhost:3000 and click through the vault docs. Verify the new short versions are sorted properly with the existing versions and look as expected

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Vercel Previews Deployed

Name Status Preview Updated (UTC)
Dev Portal ✅ Ready (Inspect) Visit Preview Tue Dec 2 22:01:09 UTC 2025
Unified Docs API ✅ Ready (Inspect) Visit Preview Tue Dec 2 21:55:06 UTC 2025

@LeahMarieBush LeahMarieBush marked this pull request as ready for review December 2, 2025 22:03
@LeahMarieBush LeahMarieBush requested a review from a team as a code owner December 2, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant