mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-11-05 08:53:34 +08:00
fix(extraction): a file-based router reads only its own app in a monorepo (#2129)
create-t3-turbo, tamagui's starter and react-native-reusables keep an Expo app beside a Next.js app. Expo Router read the Next app's `app/` folder as its own, so `layout.tsx` became a `/layout` screen, `page.tsx` a `/page` one, `_components/posts.tsx` and `api/auth/[...all]/route.ts` screens too, and a shared `packages/app/` library's files became screens as well. A resolver can now name `appDependencies`; its extractor runs on a file only when that file's package.json or an enclosing one declares one of them. When no manifest in the project declares any, detection found the framework by other evidence and it runs everywhere, as before. Expo Router names `expo-router`, Next.js `next`. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1ef1eb886c
commit
92e14eda40
@@ -713,6 +713,7 @@ function scoreMatch(href: string[], route: string[]): number | null {
|
||||
export const expoRouterResolver: FrameworkResolver = {
|
||||
name: 'expo-router',
|
||||
languages: [...ROUTE_LANGUAGES],
|
||||
appDependencies: ['expo-router'],
|
||||
|
||||
detect(context: ResolutionContext): boolean {
|
||||
if (dependsOn(context, 'expo-router')) return true;
|
||||
|
||||
@@ -222,6 +222,7 @@ export function nextNavVerb(name: string): string | null {
|
||||
export const nextjsResolver: FrameworkResolver = {
|
||||
name: 'nextjs',
|
||||
languages: [...ROUTE_LANGUAGES],
|
||||
appDependencies: ['next'],
|
||||
|
||||
detect(context: ResolutionContext): boolean {
|
||||
if (dependsOn(context, 'next')) return true;
|
||||
|
||||
Reference in New Issue
Block a user