Skip to content

Commit 7a382b0

Browse files
authored
Upgrade the next version to 16.0.7 and react to 19.2.7 to fix the CVE-2025-55182 issue (#110)
1 parent 8547981 commit 7a382b0

5 files changed

Lines changed: 1372 additions & 1033 deletions

File tree

.github/workflows/docker-build-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145
body += `| Build Status | ${buildSuccess ? '✅ Passed' : '❌ Failed'} |\n`;
146146
body += `| Platforms | linux/amd64 (PR validation) |\n`;
147147
body += `| Push to Registry | ⚠️ No (PR build only) |\n`;
148-
body += `| Framework | Next.js 15 + Prisma |\n`;
148+
body += `| Framework | Next.js 16 + Prisma |\n`;
149149
body += `| Base Image | node:current-alpine |\n\n`;
150150
151151
if (buildSuccess) {

eslint.config.mjs

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,74 @@
1-
import { FlatCompat } from "@eslint/eslintrc"
1+
import { defineConfig, globalIgnores } from "eslint/config"
2+
import nextVitals from "eslint-config-next/core-web-vitals"
3+
import nextTs from "eslint-config-next/typescript"
4+
import eslintConfigPrettier from "eslint-config-prettier"
25
import simpleImportSort from "eslint-plugin-simple-import-sort"
3-
import { dirname } from "path"
4-
import { fileURLToPath } from "url"
56

6-
const __filename = fileURLToPath(import.meta.url)
7-
const __dirname = dirname(__filename)
7+
const eslintConfig = defineConfig([
8+
...nextVitals,
9+
...nextTs,
10+
// Override default ignores of eslint-config-next.
811

9-
const compat = new FlatCompat({
10-
baseDirectory: __dirname,
11-
})
12-
13-
const eslintConfig = [
14-
...compat.extends("next/core-web-vitals", "next/typescript", "prettier"),
12+
// Custom plugins and rules
1513
{
1614
plugins: {
1715
"simple-import-sort": simpleImportSort,
1816
},
1917
rules: {
18+
// Simple import sort rules
2019
"simple-import-sort/imports": [
2120
"error",
2221
{
2322
groups: [
23+
// React and external packages
2424
["^react", "^@?\\w"],
25+
// Internal packages
2526
["^(@|components)(/.*|$)"],
27+
// Side effect imports
2628
["^\\u0000"],
29+
// Parent imports
2730
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
31+
// Other relative imports
2832
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
33+
// Style imports
2934
["^.+\\.?(css)$"],
3035
],
3136
},
3237
],
3338
"simple-import-sort/exports": "error",
39+
40+
// TypeScript rule adjustments
41+
"@typescript-eslint/no-explicit-any": "off",
42+
"@typescript-eslint/no-unused-vars": [
43+
"warn",
44+
{
45+
argsIgnorePattern: "^_",
46+
varsIgnorePattern: "^_",
47+
caughtErrorsIgnorePattern: "^_",
48+
},
49+
],
50+
51+
// React hooks rules adjustments
52+
"react-hooks/set-state-in-effect": "warn", // Downgrade from error to warning
3453
},
3554
},
36-
{
37-
ignores: [
38-
"node_modules/**",
39-
".next/**",
40-
"out/**",
41-
"build/**",
42-
"next-env.d.ts",
43-
"components/ui/**",
44-
],
45-
},
46-
]
55+
56+
// Prettier config should be last to override conflicting rules
57+
eslintConfigPrettier,
58+
59+
globalIgnores([
60+
// Default ignores of eslint-config-next:
61+
"node_modules/**",
62+
".next/**",
63+
"out/**",
64+
"build/**",
65+
"next-env.d.ts",
66+
"components/ui/**",
67+
"components/animate-ui/**",
68+
"lib/api-client.examples.ts",
69+
"lib/api-usage-examples.ts"
70+
]),
71+
])
4772

4873
export default eslintConfig
74+

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"name": "Fulling",
2+
"name": "fulling",
33
"version": "0.4.1",
44
"private": true,
55
"scripts": {
66
"prepare": "prisma generate",
7-
"dev": "next dev -H 0.0.0.0 -p 3000 --turbo",
7+
"dev": "next dev -H 0.0.0.0 -p 3000",
88
"build": "prisma generate && next build",
99
"start": "next start -H 0.0.0.0 -p 3000",
1010
"lint": "eslint .",
@@ -40,38 +40,38 @@
4040
"jsonwebtoken": "^9.0.2",
4141
"lucide-react": "^0.545.0",
4242
"nanoid": "^5.1.6",
43-
"next": "15.5.4",
43+
"next": "16.0.7",
4444
"next-auth": "^5.0.0-beta.29",
4545
"next-themes": "^0.4.6",
4646
"pino": "^10.1.0",
4747
"prisma": "^6.17.1",
48-
"react": "19.1.0",
49-
"react-dom": "19.1.0",
48+
"react": "19.2.1",
49+
"react-dom": "19.2.1",
5050
"sonner": "^2.0.7",
5151
"tailwind-merge": "^3.3.1",
5252
"tus-js-client": "^4.3.1",
5353
"zod": "^4.1.12"
5454
},
5555
"devDependencies": {
56-
"@eslint/eslintrc": "^3.3.1",
5756
"@tailwindcss/postcss": "^4",
5857
"@types/jsonwebtoken": "^9.0.10",
5958
"@types/node": "^20",
60-
"@types/react": "^19",
61-
"@types/react-dom": "^19",
59+
"@types/react": "19.2.7",
60+
"@types/react-dom": "19.2.3",
6261
"eslint": "^9",
63-
"eslint-config-next": "15.5.4",
62+
"eslint-config-next": "16.0.7",
6463
"eslint-config-prettier": "^10.1.8",
6564
"eslint-plugin-simple-import-sort": "^12.1.1",
66-
"prettier": "^3.6.2",
6765
"tailwindcss": "^4",
6866
"tw-animate-css": "^1.4.0",
6967
"typescript": "^5"
7068
},
7169
"pnpm": {
7270
"overrides": {
7371
"whatwg-url": "^13.0.0",
74-
"tr46": "^4.1.1"
72+
"tr46": "^4.1.1",
73+
"@types/react": "19.2.7",
74+
"@types/react-dom": "19.2.3"
7575
}
7676
},
7777
"packageManager": "pnpm@10.20.0",

0 commit comments

Comments
 (0)