mirror of
https://github.com/openshiporg/openship.git
synced 2026-06-19 07:35:55 +00:00
build(deps): upgrade Next.js to v16 and enable React Compiler
- Upgrade Next.js from 15.3.2 to 16.0.3 - Enable React Compiler with babel-plugin-react-compiler - Update tsconfig.json to use react-jsx for compiler compatibility - Remove turbopack from dev script - Remove eslint.ignoreDuringBuilds configuration - Refactor auth cookie handling to avoid double await
This commit is contained in:
@@ -68,7 +68,8 @@ export async function signIn(prevState: { message: string | null, formData: { em
|
||||
}
|
||||
|
||||
// Set the auth token cookie
|
||||
await (await cookies()).set('keystonejs-session', response.data.authenticate.sessionToken, {
|
||||
const cookieStore = await cookies();
|
||||
cookieStore.set('keystonejs-session', response.data.authenticate.sessionToken, {
|
||||
secure: process.env.NODE_ENV === 'production',
|
||||
sameSite: 'lax',
|
||||
path: '/',
|
||||
|
||||
+1
-3
@@ -1,10 +1,8 @@
|
||||
import type { NextConfig } from 'next';
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
reactCompiler: true,
|
||||
serverExternalPackages: ['graphql'],
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
// Workaround since we diverged from Keystone reltionship and document views
|
||||
// typescript: {
|
||||
// ignoreBuildErrors: true,
|
||||
|
||||
Generated
+678
-331
File diff suppressed because it is too large
Load Diff
+4
-3
@@ -3,7 +3,7 @@
|
||||
"version": "3.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "keystone build --no-ui && npm run migrate && next dev --turbopack",
|
||||
"dev": "keystone build --no-ui && npm run migrate && next dev",
|
||||
"build": "keystone build --no-ui && npm run migrate && next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
@@ -71,7 +71,7 @@
|
||||
"graphql-yoga": "^3.1.0",
|
||||
"input-otp": "^1.4.2",
|
||||
"lucide-react": "^0.511.0",
|
||||
"next": "15.3.2",
|
||||
"next": "16.0.3",
|
||||
"next-themes": "^0.4.6",
|
||||
"nodemailer": "^7.0.5",
|
||||
"pluralize": "^8.0.0",
|
||||
@@ -105,8 +105,9 @@
|
||||
"@types/pluralize": "^0.0.33",
|
||||
"@types/react": "^19",
|
||||
"@types/react-dom": "^19",
|
||||
"babel-plugin-react-compiler": "^1.0.0",
|
||||
"eslint": "^9",
|
||||
"eslint-config-next": "15.3.2",
|
||||
"eslint-config-next": "16.0.3",
|
||||
"jsdom": "^26.1.0",
|
||||
"node-fetch": "^3.3.2",
|
||||
"prisma": "6.5.0",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { handleDashboardRoutes, getAuthenticatedUser } from '@/features/dashboard/middleware';
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
|
||||
export async function middleware(request: NextRequest) {
|
||||
export async function proxy(request: NextRequest) {
|
||||
// Get authenticated user once
|
||||
const { user, redirectToInit } = await getAuthenticatedUser(request);
|
||||
|
||||
+19
-5
@@ -1,7 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2017",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
@@ -11,7 +15,7 @@
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"jsx": "react-jsx",
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
@@ -19,9 +23,19 @@
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"@/*": ["./*"]
|
||||
"@/*": [
|
||||
"./*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
".next/types/**/*.ts",
|
||||
".next/dev/types/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user