Skip to content

Commit 0ffaedd

Browse files
upgrade to tanstack start alpha devinxi
1 parent 1dc9222 commit 0ffaedd

File tree

12 files changed

+44
-76
lines changed

12 files changed

+44
-76
lines changed

.changeset/empty-clocks-cut.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-better-t-stack": minor
3+
---
4+
5+
Upgrade to Tanstack start devinxi

apps/cli/src/constants.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export const DEFAULT_CONFIG: ProjectConfig = {
2727
};
2828

2929
export const dependencyVersionMap = {
30-
"better-auth": "^1.2.8",
31-
"@better-auth/expo": "^1.2.8",
30+
"better-auth": "^1.2.9",
31+
"@better-auth/expo": "^1.2.9",
3232

3333
"drizzle-orm": "^0.38.4",
3434
"drizzle-kit": "^0.30.5",
@@ -87,9 +87,9 @@ export const dependencyVersionMap = {
8787

8888
"@prisma/extension-accelerate": "^1.3.0",
8989

90-
"@orpc/server": "^1.4.1",
91-
"@orpc/client": "^1.4.1",
92-
"@orpc/tanstack-query": "^1.4.1",
90+
"@orpc/server": "^1.5.0",
91+
"@orpc/client": "^1.5.0",
92+
"@orpc/tanstack-query": "^1.5.0",
9393

9494
"@trpc/tanstack-react-query": "^11.0.0",
9595
"@trpc/server": "^11.0.0",

apps/cli/src/prompts/frontend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export async function getFrontendChoice(
6868
},
6969
{
7070
value: "tanstack-start" as const,
71-
label: "TanStack Start (beta)",
71+
label: "TanStack Start (devinxi)",
7272
hint: "SSR, Server Functions, API Routes and more with TanStack Router",
7373
},
7474
];

apps/cli/templates/auth/server/base/src/lib/auth.ts.hbs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{#if (eq orm "prisma")}}
22
import { betterAuth } from "better-auth";
33
import { prismaAdapter } from "better-auth/adapters/prisma";
4-
{{#if (includes frontend "native")}}
4+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
55
import { expo } from "@better-auth/expo";
66
{{/if}}
77
import prisma from "../../prisma";
@@ -14,14 +14,14 @@ export const auth = betterAuth({
1414
{{#if (eq database "mongodb")}}provider: "mongodb"{{/if}}
1515
}),
1616
trustedOrigins: [
17-
process.env.CORS_ORIGIN || "",{{#if (includes frontend "native")}}
17+
process.env.CORS_ORIGIN || "",{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
1818
"my-better-t-app://",{{/if}}
1919
],
2020
emailAndPassword: {
2121
enabled: true,
2222
}
2323

24-
{{#if (includes frontend "native")}}
24+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
2525
,
2626
plugins: [expo()]
2727
{{/if}}
@@ -31,7 +31,7 @@ export const auth = betterAuth({
3131
{{#if (eq orm "drizzle")}}
3232
import { betterAuth } from "better-auth";
3333
import { drizzleAdapter } from "better-auth/adapters/drizzle";
34-
{{#if (includes frontend "native")}}
34+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
3535
import { expo } from "@better-auth/expo";
3636
{{/if}}
3737
import { db } from "../db";
@@ -45,14 +45,14 @@ export const auth = betterAuth({
4545
schema: schema,
4646
}),
4747
trustedOrigins: [
48-
process.env.CORS_ORIGIN || "",{{#if (includes frontend "native")}}
48+
process.env.CORS_ORIGIN || "",{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
4949
"my-better-t-app://",{{/if}}
5050
],
5151
emailAndPassword: {
5252
enabled: true,
5353
}
5454

55-
{{#if (includes frontend "native")}}
55+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
5656
,
5757
plugins: [expo()]
5858
{{/if}}
@@ -62,22 +62,22 @@ export const auth = betterAuth({
6262
{{#if (eq orm "mongoose")}}
6363
import { betterAuth } from "better-auth";
6464
import { mongodbAdapter } from "better-auth/adapters/mongodb";
65-
{{#if (includes frontend "native")}}
65+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
6666
import { expo } from "@better-auth/expo";
6767
{{/if}}
6868
import { client } from "../db";
6969

7070
export const auth = betterAuth({
7171
database: mongodbAdapter(client),
7272
trustedOrigins: [
73-
process.env.CORS_ORIGIN || "",{{#if (includes frontend "native")}}
73+
process.env.CORS_ORIGIN || "",{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
7474
"my-better-t-app://",{{/if}}
7575
],
7676
emailAndPassword: {
7777
enabled: true,
7878
}
7979

80-
{{#if (includes frontend "native")}}
80+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
8181
,
8282
plugins: [expo()]
8383
{{/if}}
@@ -86,21 +86,21 @@ export const auth = betterAuth({
8686

8787
{{#if (eq orm "none")}}
8888
import { betterAuth } from "better-auth";
89-
{{#if (includes frontend "native")}}
89+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
9090
import { expo } from "@better-auth/expo";
9191
{{/if}}
9292

9393
export const auth = betterAuth({
9494
database: "", // Invalid configuration
9595
trustedOrigins: [
96-
process.env.CORS_ORIGIN || "",{{#if (includes frontend "native")}}
96+
process.env.CORS_ORIGIN || "",{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
9797
"my-better-t-app://",{{/if}}
9898
],
9999
emailAndPassword: {
100100
enabled: true,
101101
}
102102

103-
{{#if (includes frontend "native")}}
103+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
104104
,
105105
plugins: [expo()]
106106
{{/if}}

apps/cli/templates/frontend/react/tanstack-start/app.config.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

apps/cli/templates/frontend/react/tanstack-start/package.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
"private": true,
44
"type": "module",
55
"scripts": {
6-
"start": "vinxi start",
7-
"build": "vinxi build",
6+
"build": "vite build",
87
"serve": "vite preview",
9-
"dev": "vinxi dev --port=3001"
8+
"dev": "vite dev --port=3001"
109
},
1110
"dependencies": {
1211
"@radix-ui/react-checkbox": "^1.1.4",
@@ -15,11 +14,11 @@
1514
"@radix-ui/react-slot": "^1.1.2",
1615
"@tanstack/react-form": "^1.0.5",
1716
"@tailwindcss/vite": "^4.1.8",
18-
"@tanstack/react-query": "^5.80.5",
19-
"@tanstack/react-router": "^1.120.15",
20-
"@tanstack/react-router-with-query": "^1.120.15",
21-
"@tanstack/react-start": "^1.120.15",
22-
"@tanstack/router-plugin": "^1.120.15",
17+
"@tanstack/react-query": "^5.80.6",
18+
"@tanstack/react-router": "^1.121.0-alpha.27",
19+
"@tanstack/react-router-with-query": "^1.121.0",
20+
"@tanstack/react-start": "^1.121.0-alpha.27",
21+
"@tanstack/router-plugin": "^1.121.0",
2322
"class-variance-authority": "^0.7.1",
2423
"clsx": "^2.1.1",
2524
"lucide-react": "^0.473.0",
@@ -30,17 +29,16 @@
3029
"tailwindcss": "^4.1.3",
3130
"tailwind-merge": "^2.6.0",
3231
"tw-animate-css": "^1.2.5",
33-
"vinxi": "^0.5.3",
3432
"vite-tsconfig-paths": "^5.1.4",
3533
"zod": "^3.25.16"
3634
},
3735
"devDependencies": {
38-
"@tanstack/react-router-devtools": "^1.120.15",
36+
"@tanstack/react-router-devtools": "^1.121.0-alpha.27",
3937
"@testing-library/dom": "^10.4.0",
4038
"@testing-library/react": "^16.2.0",
4139
"@types/react": "^19.0.12",
4240
"@types/react-dom": "^19.0.4",
43-
"@vitejs/plugin-react": "^4.3.4",
41+
"@vitejs/plugin-react": "^4.5.2",
4442
"jsdom": "^26.0.0",
4543
"typescript": "^5.7.2",
4644
"vite": "^6.3.5",

apps/cli/templates/frontend/react/tanstack-start/src/api.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

apps/cli/templates/frontend/react/tanstack-start/src/client.tsx

Lines changed: 0 additions & 8 deletions
This file was deleted.

apps/cli/templates/frontend/react/tanstack-start/src/router.tsx.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { routeTree } from "./routeTree.gen";
88
import Loader from "./components/loader";
99
import "./index.css";
1010
{{else}}
11-
import { createRouter as createTanstackRouter } from "@tanstack/react-router";
11+
import { createRouter as createTanStackRouter } from "@tanstack/react-router";
1212
import Loader from "./components/loader";
1313
import "./index.css";
1414
import { routeTree } from "./routeTree.gen";
@@ -102,7 +102,7 @@ const trpc = createTRPCOptionsProxy({
102102
{{/if}}
103103

104104
export const createRouter = () => {
105-
const router = createTanstackRouter({
105+
const router = createTanStackRouter({
106106
routeTree,
107107
scrollRestoration: true,
108108
defaultPreloadStaleTime: 0,
@@ -111,7 +111,7 @@ export const createRouter = () => {
111111
{{else if (eq api "orpc")}}
112112
context: { orpc, queryClient },
113113
{{else}}
114-
context: { },
114+
context: {},
115115
{{/if}}
116116
defaultPendingComponent: () => <Loader />,
117117
defaultNotFoundComponent: () => <div>Not Found</div>,

apps/cli/templates/frontend/react/tanstack-start/src/ssr.tsx

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)