-
Notifications
You must be signed in to change notification settings - Fork 91
perf: use vue router to parse package page paths #158
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
serhalp
left a comment
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.
Very cool!
app/pages/[...package].vue
Outdated
| path: '/:org(@[^/]+/)?:name([^@/]+):version()?', | ||
| alias: [ | ||
| '/:org(@[^/]+/)?:name([^@/]+)/v/:version()?', | ||
| '/package/:org(@[^/]+/)?:name([^@/]+):version()?', | ||
| '/package/:org(@[^/]+/)?:name([^@/]+)/v/:version()?', | ||
| ], |
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.
I'm learning so much!
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.
it's not quite working - I want to render the version conditionally, and only if there is one 😞 - optionality of version is killing me here....
I'll have to implement slightly differently I fear.
in the next vue-router version we'll get proper matching
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.
As mentioned on Discord, here is a version that handles a few extra things:
- https://paths.esm.dev/?p=AAMeJbiAQB8CHASWMTCsgXOQmAKAElD8YA-mE-nzADwNCB6gArgN6A5A4K4AGUh2bQsDnsxq5FoNgAnbzgAsAfCIGqn8pAHwtdNAwAQUCRiik5DHUqQo5WbQlyN9Sg8HNarphBdzrix4ErYGPocAkA..&t=/package/@vue/core/v/5.4.7
- https://paths.esm.dev/?p=AAMeJbiAwB4cnBTA5AcAom0g6wG6gFADoAM4JaAmgB0ChgrYjmjg65BJ7wYDbAk4Em1IijvoQCSYDgqJoADAICNMVg7JpahTq9lddgp4nBpwB6bikZMDAAC1AcarraXHEg4rVBdyUlEGDWwmQhZuPUF-UWFpcxArW3BnR0VXNA9vLA1pLX-QIE62w3ATYUkz5FggWQAA&t=/package/@vue/core/v/5.4.7 (more aliases)
Resolved conflicts in: - app/composables/usePackageRoute.ts: Combined getPackageRoute() helper with usePackageRoute() composable - app/components/PackageDependencies.vue: Kept vulnerability display with getPackageRoute() helper - app/pages/[[org]]/[name].vue: Used usePackageRoute() composable for route parsing
No description provided.