fix TanStack Start detection (#7601)

* fix tanstack start detection

* chore: changeset

---------

Co-authored-by: shadcn <m@shadcn.com>
This commit is contained in:
Manuel Schiller
2025-06-16 13:24:41 +02:00
committed by GitHub
parent 8847126c65
commit c86c27a2ff
2 changed files with 6 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
"shadcn": patch
---
fix tanstack start detection

View File

@@ -121,11 +121,10 @@ export async function getProjectInfo(cwd: string): Promise<ProjectInfo | null> {
// TanStack Start.
if (
configFiles.find((file) => file.startsWith("app.config."))?.length &&
[
...Object.keys(packageJson?.dependencies ?? {}),
...Object.keys(packageJson?.devDependencies ?? {}),
].find((dep) => dep.startsWith("@tanstack/start"))
].find((dep) => dep.startsWith("@tanstack/react-start"))
) {
type.framework = FRAMEWORKS["tanstack-start"]
return type