-
Notifications
You must be signed in to change notification settings - Fork 107
fix: prebuild script adds release stage to versions in nav-data files and internal links #901
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
Conversation
Vercel Previews Deployed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
But we really should add some tests to this file in the future. 🤔
Edit: Right after I wrote this I wanted to test inline links and discovered an issue: #901 (review).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I just discovered another problem, that likely already existed, inline links have the release stage in them too:
- go to: https://unified-docs-frontend-preview-91j9uuugd-hashicorp.vercel.app/terraform/language/v1.14.x/syntax/json
- click on the link "the native Terraform language syntax"
- The URL still has the release stage in it, so it 404s
So I think we are missing another transform as well. 😢
| expect(result).toBe(expectedOutput) | ||
| }) | ||
|
|
||
| it('should remove release stage in parentheses from version', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work!
I even checked an image in an alpha release just in case: https://unified-docs-frontend-preview-g9nr4t65d-hashicorp.vercel.app/terraform/cli/v1.14.x/commands/graph, and that worked. 😌
Description
Asana task 🎟️
This PR fixes the prebuild nav data and internal links transforms. Currently, it gets the version from the folder name and appends that version for the sidebar and internal links. For versions with a release stage (ex. alpha, beta), we want to remove the stage from the version before appending the version for the links.
Testing