mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #1076] [MERGED] refactor(routing): dedupe findFileWithExtensions helper #1073
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#1073
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/1076
Author: @james-elicx
Created: 5/5/2026
Status: ✅ Merged
Merged: 5/5/2026
Merged by: @james-elicx
Base:
main← Head:refactor/dedupe-find-file-with-extensions📝 Commits (2)
db6277crefactor(routing): dedupe findFileWithExtensions helper4830e17fix(build): drop stale ValidFileMatcher type import📊 Changes
3 files changed (+12 additions, -12 deletions)
View changed files
📝
packages/vinext/src/build/prerender.ts(+1 -5)📝
packages/vinext/src/routing/file-matcher.ts(+6 -0)📝
packages/vinext/src/server/dev-server.ts(+5 -7)📄 Description
Summary
matcher.dottedExtensions.some((ext) => existsSync(basePath + ext))one-liner into a single shared helper inrouting/file-matcher.ts.build/prerender.tsandserver/dev-server.tswith the shared export.Files changed
packages/vinext/src/routing/file-matcher.ts— addfindFileWithExtensionsexport (+existsSyncimport).packages/vinext/src/build/prerender.ts— drop local helper, import shared one.packages/vinext/src/server/dev-server.ts— drop local helper, import shared one. Removed now-unusedimport fs from "node:fs".Test plan
pnpm vp test run tests/app-router.test.ts tests/pages-router.test.ts(508 tests pass)pnpm fmt --writeon touched filespnpm knip(clean)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.