mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #1058] [MERGED] refactor(routing): dedupe param decoding into shared helper #1056
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#1056
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/1058
Author: @james-elicx
Created: 5/4/2026
Status: ✅ Merged
Merged: 5/4/2026
Merged by: @james-elicx
Base:
main← Head:fix/dedupe-decode-params📝 Commits (1)
db2204erefactor(routing): dedupe param decoding into shared helper📊 Changes
3 files changed (+31 additions, -40 deletions)
View changed files
📝
packages/vinext/src/routing/route-pattern.ts(+3 -20)📝
packages/vinext/src/routing/route-trie.ts(+3 -20)📝
packages/vinext/src/routing/utils.ts(+25 -0)📄 Description
Summary
decodeParam/decodeParamsanddecodePatternParam/decodePatternParamshelpers fromroute-trie.tsandroute-pattern.tsinto a singledecodeMatchedParamsinrouting/utils.ts.trieMatch,matchRoutePattern) now share the same implementation.Context
Follows up on review feedback from #1049:
Pure refactor — no behavior change. The shared helper preserves the same try/catch fallback for malformed escapes and the same in-place mutation semantics.
Test plan
vp test run tests/route-trie.test.ts tests/route-pattern.test.ts— 73 tests passvp test run tests/routing.test.ts tests/route-sorting.test.ts tests/app-router.test.ts tests/pages-router.test.ts— all 716 routing-adjacent tests passvp fmt --checkon touched files — clean🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.