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 9 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
4 changes: 3 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node-linker=hoisted
link-workspace-packages=true
link-workspace-packages=true
# Until all packages use the same React version.
hoist-pattern[]=!@types/react
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.16
20.18
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.34.2"
"@auth/core": "0.37.2"
ahkhanjani marked this conversation as resolved.
Show resolved Hide resolved
},
"devDependencies": {
"@acme/eslint-config": "workspace:*",
"@acme/prettier-config": "workspace:*",
"@acme/tailwind-config": "workspace:*",
"@acme/tsconfig": "workspace:*",
"@types/node": "^20.16.11",
"@types/node": "^20.17.1",
"eslint": "catalog:",
"h3": "^1.13.0",
"nitropack": "^2.9.7",
Expand Down
10 changes: 5 additions & 5 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
"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 All @@ -48,9 +48,9 @@
"@acme/prettier-config": "workspace:*",
"@acme/tailwind-config": "workspace:*",
"@acme/tsconfig": "workspace:*",
"@babel/core": "^7.25.8",
"@babel/preset-env": "^7.25.8",
"@babel/runtime": "^7.25.7",
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/runtime": "^7.26.0",
"@types/babel__core": "^7.20.5",
"@types/react": "catalog:react18",
"eslint": "catalog:",
Expand Down
3 changes: 2 additions & 1 deletion apps/expo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["./src/*"]
"~/*": ["./src/*"],
"react": ["./node_modules/@types/react"]
ahkhanjani marked this conversation as resolved.
Show resolved Hide resolved
},
"jsx": "react-native",
"types": ["nativewind/types"],
Expand Down
7 changes: 2 additions & 5 deletions apps/nextjs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { fileURLToPath } from "url";
import { createJiti } from "jiti";
import createJiti from "jiti";

// Import env files to validate at build time. Use jiti so we can load .ts files in here.
await createJiti(fileURLToPath(import.meta.url)).import("./src/env");
createJiti(fileURLToPath(import.meta.url))("./src/env");
juliusmarminge marked this conversation as resolved.
Show resolved Hide resolved

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

/** Enables hot reloading for local packages without a build step */
transpilePackages: [
"@acme/api",
Expand Down
16 changes: 8 additions & 8 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.1",
"react": "catalog:react19",
"react-dom": "catalog:react19",
"superjson": "2.2.1",
"zod": "catalog:"
},
Expand All @@ -36,12 +36,12 @@
"@acme/prettier-config": "workspace:*",
"@acme/tailwind-config": "workspace:*",
"@acme/tsconfig": "workspace:*",
"@types/node": "^20.16.11",
"@types/react": "catalog:react18",
"@types/react-dom": "catalog:react18",
"@types/node": "^20.17.1",
"@types/react": "catalog:react19",
"@types/react-dom": "catalog:react19",
"dotenv-cli": "^7.4.2",
"eslint": "catalog:",
"jiti": "^2.3.3",
"jiti": "^1.21.6",
"prettier": "catalog:",
"tailwindcss": "catalog:",
"typescript": "catalog:"
Expand Down
10 changes: 5 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,19 @@ 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 nextauthAction = (await props.params).nextauth[0];
const isExpoSignIn = req.nextUrl.searchParams.get("expo-redirect");
const isExpoCallback = cookies().get(EXPO_COOKIE_NAME);
const isExpoCallback = (await cookies()).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({
(await cookies()).set({
name: EXPO_COOKIE_NAME,
value: isExpoSignIn,
maxAge: 60 * 10, // 10 min
Expand All @@ -54,7 +54,7 @@ export const GET = async (
}

if (nextauthAction === "callback" && !!isExpoCallback) {
cookies().delete(EXPO_COOKIE_NAME);
(await cookies()).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
8 changes: 4 additions & 4 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.16.0",
"node": ">=20.18.0",
"pnpm": "^9.6.0"
},
"packageManager": "[email protected].1",
"packageManager": "[email protected].3",
"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.1.3",
"@turbo/gen": "~2.1.3",
"prettier": "catalog:",
"turbo": "^2.1.3",
"turbo": "~2.1.3",
ahkhanjani marked this conversation as resolved.
Show resolved Hide resolved
"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.34.2",
"@auth/drizzle-adapter": "1.4.2",
"@auth/core": "0.37.2",
"@auth/drizzle-adapter": "1.7.2",
"@t3-oss/env-nextjs": "^0.11.1",
"next": "^14.2.15",
"next-auth": "5.0.0-beta.20",
"react": "catalog:react18",
"react-dom": "catalog:react18",
"next": "^15.0.1",
"next-auth": "5.0.0-beta.25",
"react": "catalog:react19",
"react-dom": "catalog:react19",
"zod": "catalog:"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@vercel/postgres": "^0.10.0",
"drizzle-orm": "^0.35.1",
"drizzle-orm": "^0.35.3",
"drizzle-zod": "^0.5.1",
"zod": "catalog:"
},
Expand Down
29 changes: 12 additions & 17 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 @@ -34,7 +29,7 @@
"@radix-ui/react-slot": "^1.1.0",
"class-variance-authority": "^0.7.0",
"next-themes": "^0.3.0",
"react-hook-form": "^7.53.0",
"react-hook-form": "^7.53.1",
"sonner": "^1.5.0",
"tailwind-merge": "^2.5.4"
},
Expand All @@ -43,15 +38,15 @@
"@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