Skip to content

Commit 9f22d6b

Browse files
authored
Upgrade next 14 to 15 (#64)
* upgrade next to 15 * remove sentry * fix menu * fix lint
1 parent 618b3b8 commit 9f22d6b

33 files changed

+1342
-3438
lines changed

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const eslintConfig = [
3737

3838
rules: {
3939
// 'require-await': 'error',
40-
'no-console': 'warn',
40+
'no-console': 'off',
4141

4242
'no-return-await': 'error',
4343
'@typescript-eslint/no-unused-vars': 'warn',

next.config.mjs

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import {withSentryConfig} from '@sentry/nextjs';
21
/** @type {import('next').NextConfig} */
32
const nextConfig = {
43
images: {
@@ -11,49 +10,9 @@ const nextConfig = {
1110
},
1211
],
1312
},
14-
async rewrites() {
15-
return {
16-
fallback: [
17-
{
18-
source: '/lingq/:path*',
19-
destination: 'https://www.lingq.com/:path*',
20-
},
21-
],
22-
};
23-
},
2413
compiler: {
2514
removeConsole: process.env.NODE_ENV === 'production',
2615
},
27-
};
28-
export default withSentryConfig(nextConfig, {
29-
// For all available options, see:
30-
// https://www.npmjs.com/package/@sentry/webpack-plugin#options
31-
32-
org: "ishiko",
33-
project: "ts-fsrs-demo",
34-
35-
// Only print logs for uploading source maps in CI
36-
silent: !process.env.CI,
37-
38-
// For all available options, see:
39-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
40-
41-
// Upload a larger set of source maps for prettier stack traces (increases build time)
42-
widenClientFileUpload: true,
43-
44-
// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
45-
// This can increase your server load as well as your hosting bill.
46-
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
47-
// side errors will fail.
48-
tunnelRoute: "/monitoring",
49-
50-
// Automatically tree-shake Sentry logger statements to reduce bundle size
51-
disableLogger: true,
16+
}
5217

53-
// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
54-
// See the following for more information:
55-
// https://docs.sentry.io/product/crons/
56-
// https://vercel.com/docs/cron-jobs
57-
automaticVercelMonitors: true,
58-
disable: process.env.NODE_ENV === 'development',
59-
});
18+
export default nextConfig

package.json

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "3.0.0",
44
"private": true,
55
"scripts": {
6-
"dev": "next dev",
6+
"dev": "next dev --turbopack",
77
"build": "next build",
88
"start": "next start",
99
"lint": "eslint .",
@@ -14,6 +14,9 @@
1414
"@auth/core": "^0.38.0",
1515
"@hono/zod-validator": "^0.4.3",
1616
"@hookform/resolvers": "^3.6.0",
17+
"@opentelemetry/api-logs": "^0.200.0",
18+
"@opentelemetry/instrumentation": "^0.200.0",
19+
"@opentelemetry/sdk-logs": "^0.200.0",
1720
"@radix-ui/react-alert-dialog": "^1.1.1",
1821
"@radix-ui/react-avatar": "^1.1.0",
1922
"@radix-ui/react-checkbox": "^1.1.0",
@@ -31,11 +34,11 @@
3134
"@radix-ui/react-toast": "^1.2.1",
3235
"@radix-ui/react-tooltip": "^1.1.1",
3336
"@react-hookz/web": "^24.0.4",
34-
"@sentry/nextjs": "^9.3.0",
3537
"@tanstack/react-table": "^8.17.3",
3638
"@vercel/analytics": "^1.3.1",
3739
"@vercel/functions": "^2.0.0",
3840
"@vercel/kv": "^1.0.1",
41+
"@vercel/otel": "^1.10.4",
3942
"@vercel/speed-insights": "^1.0.12",
4043
"bcrypt": "^5.1.1",
4144
"class-variance-authority": "^0.7.0",
@@ -44,12 +47,12 @@
4447
"hono": "^4.7.4",
4548
"kysely": "^0.27.6",
4649
"lucide-react": "^0.395.0",
47-
"next": "14.2.25",
50+
"next": "15.2.4",
4851
"next-auth": "5.0.0-beta.25",
4952
"next-themes": "^0.2.1",
5053
"pg": "^8.13.3",
51-
"react": "^18.3.1",
52-
"react-dom": "^18.3.1",
54+
"react": "19.1.0",
55+
"react-dom": "19.1.0",
5356
"react-hook-form": "^7.52.0",
5457
"react-resizable-panels": "^2.0.19",
5558
"sharp": "^0.33.4",
@@ -62,15 +65,15 @@
6265
},
6366
"devDependencies": {
6467
"@eslint/eslintrc": "^3.3.0",
65-
"@next/eslint-plugin-next": "^15.2.1",
68+
"@next/eslint-plugin-next": "15.2.4",
6669
"@types/bcrypt": "^5.0.2",
6770
"@types/node": "^20.14.8",
6871
"@types/pg": "^8.11.11",
69-
"@types/react": "18.2.23",
70-
"@types/react-dom": "18.2.13",
72+
"@types/react": "19.0.12",
73+
"@types/react-dom": "19.0.4",
7174
"autoprefixer": "^10.4.19",
7275
"eslint": "9.21.0",
73-
"eslint-config-next": "15.2.1",
76+
"eslint-config-next": "15.2.4",
7477
"eslint-config-prettier": "^10.0.2",
7578
"eslint-plugin-react-hooks": "^5.2.0",
7679
"eslint-plugin-simple-import-sort": "^12.1.1",
@@ -84,6 +87,10 @@
8487
"pnpm": {
8588
"onlyBuiltDependencies": [
8689
"bcrypt"
87-
]
90+
],
91+
"overrides": {
92+
"@types/react": "19.0.12",
93+
"@types/react-dom": "19.0.4"
94+
}
8895
}
89-
}
96+
}

0 commit comments

Comments
 (0)