Upgrade backend to Next.js 16

This commit is contained in:
Konstantin Wohlwend 2025-12-12 16:59:07 -08:00
parent f8cd3a01f9
commit 9c9a370d47
6 changed files with 714 additions and 524 deletions

View File

@ -8,7 +8,7 @@
"typecheck": "tsc --noEmit",
"with-env": "dotenv -c development --",
"with-env:prod": "dotenv -c --",
"dev": "concurrently -n \"dev,codegen,prisma-studio,email-queue\" -k \"next dev --turbopack --port ${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}02\" \"pnpm run codegen:watch\" \"pnpm run prisma-studio\" \"pnpm run run-email-queue\"",
"dev": "concurrently -n \"dev,codegen,prisma-studio,email-queue\" -k \"next dev --port ${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}02\" \"pnpm run codegen:watch\" \"pnpm run prisma-studio\" \"pnpm run run-email-queue\"",
"build": "pnpm run codegen && next build",
"docker-build": "pnpm run codegen && next build --experimental-build-mode compile",
"build-self-host-migration-script": "tsup --config scripts/db-migrations.tsup.config.ts",
@ -45,7 +45,7 @@
"dependencies": {
"@ai-sdk/openai": "^1.3.23",
"@aws-sdk/client-s3": "^3.855.0",
"@next/bundle-analyzer": "15.2.3",
"@next/bundle-analyzer": "16.0.10",
"@node-oauth/oauth2-server": "^5.1.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/api-logs": "^0.53.0",
@ -79,15 +79,15 @@
"freestyle-sandboxes": "^0.0.92",
"jose": "^5.2.2",
"json-diff": "^1.0.6",
"next": "15.4.9",
"next": "16.0.10",
"nodemailer": "^6.9.10",
"oidc-provider": "^8.5.1",
"openid-client": "5.6.4",
"pg": "^8.16.3",
"postgres": "^3.4.5",
"posthog-node": "^4.1.0",
"react": "19.0.1",
"react-dom": "19.0.1",
"react": "19.2.3",
"react-dom": "19.2.3",
"resend": "^6.0.1",
"semver": "^7.6.3",
"sharp": "^0.34.4",
@ -104,8 +104,8 @@
"@types/node": "20.17.6",
"@types/nodemailer": "^6.4.14",
"@types/oidc-provider": "^8.5.1",
"@types/react": "19.0.12",
"@types/react-dom": "19.0.4",
"@types/react": "19.2.7",
"@types/react-dom": "19.2.3",
"@types/semver": "^7.5.8",
"concurrently": "^8.2.2",
"glob": "^10.4.1",
@ -118,8 +118,8 @@
},
"pnpm": {
"overrides": {
"@types/react": "19.0.12",
"@types/react-dom": "19.0.4"
"@types/react": "19.2.7",
"@types/react-dom": "19.2.3"
}
},
"packageManager": "pnpm@10.23.0"

View File

@ -54,7 +54,7 @@ const corsAllowedResponseHeaders = [
];
// This function can be marked `async` if using `await` inside
export async function middleware(request: NextRequest) {
export async function proxy(request: NextRequest) {
const delay = +getEnvVariable('STACK_ARTIFICIAL_DEVELOPMENT_DELAY_MS', '0');
if (delay) {
if (getNodeEnvironment().includes('production')) {

View File

@ -14,7 +14,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"jsx": "react-jsx",
"incremental": true,
"noErrorTruncation": true,
"plugins": [
@ -38,7 +38,8 @@
"**/*.tsx",
"**/*.?ts",
"**/*.?tsx",
".next/types/**/*.ts"
".next/types/**/*.ts",
".next/dev/types/**/*.ts"
],
"exclude": [
"node_modules"

View File

@ -79,7 +79,7 @@ export const SettingSwitch = React.memo(function SettingSwitch(props: {
disabled={props.disabled}
/>
<Label className="cursor-pointer" htmlFor={id}>
<Typography className="text-sm font-medium leading-none">
<Typography type="div" className="text-sm font-medium leading-none">
{props.label}
</Typography>
</Label>

File diff suppressed because it is too large Load Diff