-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat(docs-page): strip tfe version from pathparams #631
Conversation
π¦ Changeset detectedLatest commit: d969f46 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
π¦ Canary Packages PublishedLatest commit: d969f46 Published 1 packages@hashicorp/react-docs-page@17.1.0-canary-20220630150904
|
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.
This looks good to me!
Full transparency: I'm definitely leaning on the presence of tests for stripVersionFromPathParams
in this review. The revised REGEX
and TFE_REGEX
both make sense to me, but can't say I understand the previous REGEX
very well π¬
@@ -1,5 +1,5 @@ | |||
const REGEX = | |||
/^v([0-9]+)\.([0-9]+)\.(x|[0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/i |
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.
Are we potentially losing anything by simplifying this regex? π
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.
Makes sense! Just a future thought, if/when we support pre-releases we might have to bring this back (no action needed now)
ποΈ Asana Task
π Preview Link
Description
This fixes a bug where a frontend URL was being converted to an incorrect content API url
PR Checklist π
Items in this checklist may not may not apply to your PR, but please consider each item carefully.