Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next 15 + React 19 #1233

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f4c756e
Next 15 + React 19
ahkhanjani Oct 25, 2024
8d75f50
downgrade turbo
ahkhanjani Oct 25, 2024
12b003c
fix ui package exports for turbopack
ahkhanjani Oct 25, 2024
f607ca9
update some packages
ahkhanjani Oct 25, 2024
bb7468d
fix expo react types
ahkhanjani Oct 25, 2024
e588b04
add a new line
ahkhanjani Oct 25, 2024
8ff52ae
Revert "add a new line"
ahkhanjani Oct 25, 2024
f19fb01
revert next.config.ts + bring back jiti v1
ahkhanjani Oct 28, 2024
4e77873
pnpm and node up
ahkhanjani Oct 28, 2024
ec0da7f
expo: revert hoisting and custom path behaviors
ahkhanjani Oct 29, 2024
aed485b
update
ahkhanjani Oct 29, 2024
5df3249
dedupe deps
ahkhanjani Oct 29, 2024
3475c8a
update deps
ahkhanjani Nov 2, 2024
7d0fd02
Merge branch 'main' into next15
ahkhanjani Nov 4, 2024
3d44450
update
ahkhanjani Nov 4, 2024
2ffef7c
revert @auth/core update
ahkhanjani Nov 5, 2024
399af1a
disable react-hooks/exhaustive-deps eslint rule
ahkhanjani Nov 11, 2024
19939fb
Revert "disable react-hooks/exhaustive-deps eslint rule"
ahkhanjani Nov 11, 2024
8193e6c
update deps
ahkhanjani Nov 21, 2024
6c95116
update node patch version
ahkhanjani Nov 21, 2024
9508d3d
Merge branch 'main' into next15
juliusmarminge Nov 23, 2024
f0c8da2
r18 types??
juliusmarminge Nov 23, 2024
d796f59
Merge branch 'main' into next15
juliusmarminge Nov 23, 2024
ede820e
Merge branch 'main' into next15
juliusmarminge Nov 23, 2024
b54db70
cookie jag
juliusmarminge Nov 23, 2024
245fff0
reorder workspace
juliusmarminge Nov 23, 2024
4c15022
node 22
ahkhanjani Nov 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.18
22.11
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node v22 causes prettier plugin warnings:
image

Prettier v3.4 solves this issue. Could you bump the prettier version?

4 changes: 2 additions & 2 deletions apps/auth-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@auth/core": "0.37.2"
"@auth/core": "catalog:"
},
"devDependencies": {
"@acme/eslint-config": "workspace:*",
"@acme/prettier-config": "workspace:*",
"@acme/tailwind-config": "workspace:*",
"@acme/tsconfig": "workspace:*",
"@types/node": "^20.17.7",
"@types/node": "^22.10.1",
"eslint": "catalog:",
"h3": "^1.13.0",
"nitropack": "^2.10.4",
Expand Down
12 changes: 6 additions & 6 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@
"@trpc/client": "catalog:",
"@trpc/react-query": "catalog:",
"@trpc/server": "catalog:",
"expo": "~51.0.38",
"expo": "~51.0.39",
"expo-constants": "~16.0.2",
"expo-dev-client": "~4.0.28",
"expo-dev-client": "~4.0.29",
"expo-linking": "~6.3.1",
"expo-router": "~3.5.23",
"expo-router": "~3.5.24",
"expo-secure-store": "^13.0.2",
"expo-splash-screen": "~0.27.6",
"expo-splash-screen": "~0.27.7",
"expo-status-bar": "~1.12.1",
"expo-web-browser": "^13.0.3",
"nativewind": "~4.0.36",
"react": "catalog:react18",
"react-dom": "catalog:react18",
"react-native": "~0.74.6",
"react-native-css-interop": "~0.0.36",
"react-native-gesture-handler": "~2.20.0",
"react-native-gesture-handler": "~2.20.2",
"react-native-reanimated": "~3.15.5",
"react-native-safe-area-context": "~4.11.1",
"react-native-screens": "~3.34.0",
"react-native-screens": "~3.34.1",
"superjson": "2.2.1"
},
"devDependencies": {
Expand Down
2 changes: 0 additions & 2 deletions apps/nextjs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ createJiti(fileURLToPath(import.meta.url))("./src/env");

/** @type {import("next").NextConfig} */
const config = {
reactStrictMode: true,

/** Enables hot reloading for local packages without a build step */
transpilePackages: [
"@acme/api",
Expand Down
14 changes: 7 additions & 7 deletions apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"build": "pnpm with-env next build",
"clean": "git clean -xdf .cache .next .turbo node_modules",
"dev": "pnpm with-env next dev",
"dev": "pnpm with-env next dev --turbopack",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"start": "pnpm with-env next start",
Expand All @@ -25,9 +25,9 @@
"@trpc/react-query": "catalog:",
"@trpc/server": "catalog:",
"geist": "^1.3.1",
"next": "^14.2.15",
"react": "catalog:react18",
"react-dom": "catalog:react18",
"next": "^15.0.3",
"react": "catalog:react19",
"react-dom": "catalog:react19",
"superjson": "2.2.1",
"zod": "catalog:"
},
Expand All @@ -36,9 +36,9 @@
"@acme/prettier-config": "workspace:*",
"@acme/tailwind-config": "workspace:*",
"@acme/tsconfig": "workspace:*",
"@types/node": "^20.17.7",
"@types/react": "catalog:react18",
"@types/react-dom": "catalog:react18",
"@types/node": "^22.10.1",
"@types/react": "catalog:react19",
"@types/react-dom": "catalog:react19",
"dotenv-cli": "^7.4.4",
"eslint": "catalog:",
"jiti": "^1.21.6",
Expand Down
13 changes: 8 additions & 5 deletions apps/nextjs/src/app/api/auth/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,22 @@ export const POST = async (_req: NextRequest) => {

export const GET = async (
_req: NextRequest,
props: { params: { nextauth: string[] } },
props: { params: Promise<{ nextauth: string[] }> },
) => {
// First step must be to correct the request URL.
const req = rewriteRequestUrlInDevelopment(_req);

const nextauthAction = props.params.nextauth[0];
const params = await props.params;
const jar = await cookies();

const nextauthAction = params.nextauth[0];
const isExpoSignIn = req.nextUrl.searchParams.get("expo-redirect");
const isExpoCallback = cookies().get(EXPO_COOKIE_NAME);
const isExpoCallback = jar.get(EXPO_COOKIE_NAME);

if (nextauthAction === "signin" && !!isExpoSignIn) {
// set a cookie we can read in the callback
// to know to send the user back to expo
cookies().set({
jar.set({
name: EXPO_COOKIE_NAME,
value: isExpoSignIn,
maxAge: 60 * 10, // 10 min
Expand All @@ -54,7 +57,7 @@ export const GET = async (
}

if (nextauthAction === "callback" && !!isExpoCallback) {
cookies().delete(EXPO_COOKIE_NAME);
jar.delete(EXPO_COOKIE_NAME);

// Run original handler, then extract the session token from the response
// Send it back via a query param in the Expo deep link. The Expo app
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/trpc/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { createQueryClient } from "./query-client";
* handling a tRPC call from a React Server Component.
*/
const createContext = cache(async () => {
const heads = new Headers(headers());
const heads = new Headers(await headers());
heads.set("x-trpc-source", "rsc");

return createTRPCContext({
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "create-t3-turbo",
"private": true,
"engines": {
"node": ">=20.18.1",
"pnpm": "^9.14.2"
"node": ">=22.11.0",
"pnpm": "^9.14.4"
},
"packageManager": "[email protected].2",
"packageManager": "[email protected].4",
"scripts": {
"build": "turbo run build",
"clean": "git clean -xdf node_modules",
Expand All @@ -25,9 +25,9 @@
},
"devDependencies": {
"@acme/prettier-config": "workspace:*",
"@turbo/gen": "^2.3.1",
"@turbo/gen": "^2.3.3",
"prettier": "catalog:",
"turbo": "^2.3.1",
"turbo": "^2.3.3",
"typescript": "catalog:"
},
"prettier": "@acme/prettier-config"
Expand Down
12 changes: 6 additions & 6 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
},
"dependencies": {
"@acme/db": "workspace:*",
"@auth/core": "0.37.2",
"@auth/drizzle-adapter": "1.7.4",
"@auth/core": "catalog:",
"@auth/drizzle-adapter": "catalog:",
"@t3-oss/env-nextjs": "^0.11.1",
"next": "^14.2.15",
"next-auth": "5.0.0-beta.25",
"react": "catalog:react18",
"react-dom": "catalog:react18",
"next": "^15.0.3",
"next-auth": "catalog:",
"react": "catalog:react19",
"react-dom": "catalog:react19",
"zod": "catalog:"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const authConfig = {
// In development, we need to skip checks to allow Expo to work
...(!isSecureContext
? {
skipCSRFCheck: skipCSRFCheck,
skipCSRFCheck,
trustHost: true,
}
: {}),
Expand Down
31 changes: 13 additions & 18 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,18 @@
"version": "0.1.0",
"type": "module",
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"default": "./src/index.ts"
},
"./*": {
"types": "./dist/src/*.d.ts",
"default": [
"./src/*.ts",
"./src/*.tsx"
]
}
".": "./src/index.ts",
"./button": "./src/button.tsx",
"./dropdown-menu": "./src/dropdown-menu.tsx",
"./form": "./src/form.tsx",
"./input": "./src/input.tsx",
"./label": "./src/label.tsx",
"./theme": "./src/theme.tsx",
"./toast": "./src/toast.tsx"
},
"license": "MIT",
"scripts": {
"build": "tsc",
"clean": "git clean -xdf .cache .turbo dist node_modules",
"dev": "tsc",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"typecheck": "tsc --noEmit --emitDeclarationOnly false",
Expand All @@ -32,26 +27,26 @@
"@radix-ui/react-icons": "^1.3.2",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-slot": "^1.1.0",
"class-variance-authority": "^0.7.0",
"class-variance-authority": "^0.7.1",
"next-themes": "^0.4.3",
"react-hook-form": "^7.53.2",
"sonner": "^1.7.0",
"tailwind-merge": "^2.5.4"
"tailwind-merge": "^2.5.5"
},
"devDependencies": {
"@acme/eslint-config": "workspace:*",
"@acme/prettier-config": "workspace:*",
"@acme/tailwind-config": "workspace:*",
"@acme/tsconfig": "workspace:*",
"@types/react": "catalog:react18",
"@types/react": "catalog:react19",
"eslint": "catalog:",
"prettier": "catalog:",
"react": "catalog:react18",
"react": "catalog:react19",
"typescript": "catalog:",
"zod": "catalog:"
},
"peerDependencies": {
"react": "catalog:react18",
"react": "catalog:react19",
"zod": "catalog:"
},
"prettier": "@acme/prettier-config"
Expand Down
Loading