Skip to content

fix(routing): normalize Windows route paths#1745

Draft
skyswordw wants to merge 1 commit into
cloudflare:mainfrom
skyswordw:fix/windows-route-path-normalization
Draft

fix(routing): normalize Windows route paths#1745
skyswordw wants to merge 1 commit into
cloudflare:mainfrom
skyswordw:fix/windows-route-path-normalization

Conversation

@skyswordw
Copy link
Copy Markdown

Summary

  • Normalize fs.glob route discovery results to forward slashes before Pages/App Router parsing.
  • Keep scanner-derived route paths normalized when storing route metadata and deriving app route segments.
  • Add regression coverage that simulates Windows-style backslash glob output for both Pages Router and App Router route discovery.

Closes #1605.

Testing

  • pnpm test tests/routing-windows-paths.test.ts
  • pnpm test tests/routing.test.ts tests/app-route-graph.test.ts
  • pnpm test tests/routing-windows-paths.test.ts tests/routing.test.ts tests/app-route-graph.test.ts
  • pnpm run check
  • pnpm run build
  • git diff --check

Notes

Local command execution used the repository's pinned pnpm@11.1.1 with Node 24.14.0 because the machine's Homebrew Node 26 caused native dependency install failures for better-sqlite3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalize internal paths to forward slashes for Windows support

1 participant