mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #120] [CLOSED] fix(routing): pass exclude as function to node:fs/promises.glob #327
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#327
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/120
Author: @harrisrobin
Created: 2/26/2026
Status: ❌ Closed
Base:
main← Head:fix/glob-exclude-function📝 Commits (3)
dd656fechore: add .worktrees/ to .gitignorebf3a90efix(deploy): detect bun.lock text format and walk up to monorepo rootaceb83cfix(routing): pass exclude as function to node:fs/promises.glob📊 Changes
5 files changed (+118 additions, -12 deletions)
View changed files
📝
.gitignore(+3 -0)📝
packages/vinext/src/routing/app-router.ts(+7 -3)📝
packages/vinext/src/routing/pages-router.ts(+7 -1)📝
packages/vinext/src/utils/project.ts(+42 -8)📝
tests/deploy.test.ts(+59 -0)📄 Description
Problem
PR #52 migrated
app-router.tsandpages-router.tsfrom theglobnpm package to the Node.js built-innode:fs/promises.glob, but left array literals in theexcludeoption:The Node.js
globAPI has always requiredexcludeto be a function. Passing an array throws on Node.js v23:This breaks
vinext buildandvinext deployentirely for any project on Node.js v23.Fix
Convert both array literals to equivalent predicate functions:
Behaviour is identical —
@slotdirectories and_app/_document/etc. are still excluded from route scanning.Verification
tests/app-router.test.ts— previously failing with theTypeError, now passestests/pages-router.test.ts— 269 tests passingpnpm run typecheckandpnpm run lintclean/bonk
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.