mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #322] [MERGED] refactor(routing): extract shared compareRoutes comparator to utils #476
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#476
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/322
Author: @james-elicx
Created: 3/7/2026
Status: ✅ Merged
Merged: 3/7/2026
Merged by: @james-elicx
Base:
main← Head:refactor/shared-route-sort-comparator📝 Commits (1)
1b8beb1refactor(routing): extract shared compareRoutes comparator to utils📊 Changes
3 files changed (+16 additions, -14 deletions)
View changed files
📝
packages/vinext/src/routing/app-router.ts(+2 -5)📝
packages/vinext/src/routing/pages-router.ts(+3 -9)📝
packages/vinext/src/routing/utils.ts(+11 -0)📄 Description
Summary
compareRoutes<T extends { pattern: string }>()function inrouting/utils.ts, which already exportsroutePrecedencescanPageRoutesandscanApiRoutesinpages-router.ts, andappRouterinapp-router.tsTesting
pnpm test tests/routing.test.ts tests/route-sorting.test.ts— 75 tests pass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.