Closed zto-sbenning closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
next-roots-wcmb | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 24, 2024 11:00am |
Hi @zto-sbenning,
thank you for your initial implementation. Good job 👍
As sorting mechanism is not trivial now it makes sense to do the sorting only once (in router constructor). Also second thought on my initial naming idea called "route weight" brought me to the conclusion that "route priority" would be more clear.
To make it smoother I pushed my own commit where I address that. What I did:
Could you please check my commit if makes sense to you https://github.com/svobik7/next-roots/pull/257/commits/3a164157137dc0b7c51fb8412a09e1e8fbf2b15c?
:tada: This issue has been resolved in version 3.10.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
The router has an issue where it fails to prioritize dynamic segment over catchAll ones. We now create a route-weight map on router creation. This map is used by the sorting function to prioritize static > dynamic > catchAll
fix #248
Note: A test is added for the previous failing case in
src/router/router.test.ts