[PR #90] [MERGED] fix: detect src/app App Router #300

Closed
opened 2026-05-06 12:39:03 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/90
Author: @toddLiao469469
Created: 2/26/2026
Status: Merged
Merged: 2/27/2026
Merged by: @FredKSchott

Base: mainHead: fix/src-appdir-detection


📝 Commits (1)

  • 9a022a6 fix: detect src/app App Router

📊 Changes

2 files changed (+22 additions, -1 deletions)

View changed files

📝 packages/vinext/src/utils/project.ts (+4 -1)
📝 tests/init.test.ts (+18 -0)

📄 Description

Summary

  • Align hasAppDir with Next.js behavior by checking both app/ and src/app/.
  • Fix vinext init misclassification for projects that use src/app.
  • Add a regression test in tests/init.test.ts to ensure src/app projects are treated as App Router projects and install App Router dependencies.

Why

Next.js supports both app/ and src/app/; matching this behavior improves compatibility and avoids incorrect setup during vinext init.

Testing

  • pnpm exec vitest run tests/init.test.ts

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/90 **Author:** [@toddLiao469469](https://github.com/toddLiao469469) **Created:** 2/26/2026 **Status:** ✅ Merged **Merged:** 2/27/2026 **Merged by:** [@FredKSchott](https://github.com/FredKSchott) **Base:** `main` ← **Head:** `fix/src-appdir-detection` --- ### 📝 Commits (1) - [`9a022a6`](https://github.com/cloudflare/vinext/commit/9a022a6e6a5a23e2bf6151d49d4939fc8ff61636) fix: detect src/app App Router ### 📊 Changes **2 files changed** (+22 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/utils/project.ts` (+4 -1) 📝 `tests/init.test.ts` (+18 -0) </details> ### 📄 Description ## Summary - Align `hasAppDir` with Next.js behavior by checking both `app/` and `src/app/`. - Fix `vinext init` misclassification for projects that use `src/app`. - Add a regression test in `tests/init.test.ts` to ensure `src/app` projects are treated as App Router projects and install App Router dependencies. ## Why Next.js supports both `app/` and `src/app/`; matching this behavior improves compatibility and avoids incorrect setup during `vinext init`. ## Testing - `pnpm exec vitest run tests/init.test.ts` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:39:03 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#300
No description provided.