Skip to content

test(app-route-graph): build the dot-directory expectation with canonical()#2601

Open
shulaoda wants to merge 1 commit into
cloudflare:mainfrom
shulaoda:07-12-test_app-route-graph_build_the_dot-directory_expectation_with_canonical_
Open

test(app-route-graph): build the dot-directory expectation with canonical()#2601
shulaoda wants to merge 1 commit into
cloudflare:mainfrom
shulaoda:07-12-test_app-route-graph_build_the_dot-directory_expectation_with_canonical_

Conversation

@shulaoda

Copy link
Copy Markdown
Contributor

What

One-line fixture conform: the dot-directory route-handler test (#2531) built its routePath expectation with path.posix.join(appDir, ...), which produces a mixed-separator value on Windows (C:\...\app/.well-known/...) because appDir comes from mkdtemp in native form. The route graph returns canonical forward-slash paths, so the expectation now goes through the file's existing canonical() helper like every other path assertion in this suite.

Why

No source change is needed for dot-directory scanning itself: the scanner's {**,**/.*/**} pattern is correct, and the only reason it misbehaved locally was Node's globstar bug (nodejs/node#56321, ** never descends into dot-directories; fixed by nodejs/node#61012). Current Node releases carry the fix — verified empirically on 26.4.0, where every pattern variant matches .well-known/... — so the resolution on dev machines is upgrading Node (pnpm env use --global latest) rather than adding a workaround for unfixed versions.

Testing

  • tests/app-route-graph.test.ts "discovers route handlers inside dot-directories like .well-known": red → green on Windows / Node 26.4.0.
  • tests/file-matcher.test.ts "scans route files inside dot-directories": green on Node 26.4.0 with no changes (was red on 24.12.0 purely due to the Node bug).
  • vp check clean on the changed file.
  • POSIX unaffected: canonical() is byte-identical to the previous expression there.

@pkg-pr-new

pkg-pr-new Bot commented Jul 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vinext/cloudflare@2601
npm i https://pkg.pr.new/create-vinext-app@2601
npm i https://pkg.pr.new/vinext@2601

commit: b8dc9fd

@github-actions

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared b8dc9fd against base 8d0a18d using alternating same-runner rounds. Next.js was unchanged and skipped.

0 improved · 0 regressed · 6 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 126.6 KB 126.6 KB ⚫ -0.0%
Client entry size (gzip) vinext 120.6 KB 120.6 KB ⚫ -0.0%
Dev server cold start vinext 2.88 s 2.87 s ⚫ -0.5%
Production build time vinext 3.23 s 3.21 s ⚫ -0.8%
RSC entry closure size (gzip) vinext 98.6 KB 98.6 KB ⚫ -0.0%
Server bundle size (gzip) vinext 165.3 KB 165.3 KB ⚫ +0.0%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

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.

1 participant