Repository navigation
Preserve typed URL checks with root dynamic routes - #852
Merged
Merged
Conversation
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://codex-typed-root-route-urls-void-cloud.voidzero-docs.workers.dev (commit 38d644d)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
yangshun
force-pushed
the
codex/typed-root-route-urls
branch
from
November 16, 2026 12:50
1ab0d09 to
38d644d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
I encountered this in my own app, where I had a root dynamic route and nothing was being typechecked. Then I realized why.
Issue
Root parameter and catch-all routes currently let every absolute path pass
routing.typedRoutes, so/abuotis accepted even when the intended route is/about.Exclude root
/[slug],/[...slug], and/[...]patterns from raw URL types while retaining them in the route maps. URLs handled only by these routes userouteUrl()with checked parameters. Ordinary links and scoped dynamic routes keep their existing syntax. Apply the same contract to generated and package declarations, and document the required URL construction.Regression coverage includes both route syntaxes, trailing slashes, navigation and stream clients, and links across all four adapters.
Validation
CI=true vpr test:allpassed: 17,433 tests, with 35 skipped; formatting, lint, package/playground builds, artifact checks, and typechecking passed.vp run build:docspassed.@cloudflare/vite-plugin@2.0.0-rc.0writes build output v1, while@cloudflare/build-output-utils@0.9.14expects v0. The workspace-locked toolchain passed the full verification above.