Skip to content

Commit 22ff44f

Browse files
Copilotwalaszczykm
andcommitted
Upgrade Next.js to 14.2.35 and React to 18.3.1 to resolve CVE-2025-55184
Co-authored-by: walaszczykm <[email protected]>
1 parent 7361384 commit 22ff44f

File tree

8 files changed

+2558
-1398
lines changed

8 files changed

+2558
-1398
lines changed

next-env.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
/// <reference types="next" />
2-
/// <reference types="next/types/global" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
"db:print": "node ./database/scripts/print.js"
1313
},
1414
"dependencies": {
15-
"@chakra-ui/react": "^1.6.3",
15+
"@chakra-ui/react": "^1.8.8",
1616
"@emotion/react": "^11",
1717
"@emotion/styled": "^11",
1818
"bcrypt": "^5.0.1",
1919
"cookie": "^0.4.1",
20-
"formik": "^2.2.9",
20+
"formik": "^2.4.9",
2121
"framer-motion": "^4",
2222
"isomorphic-fetch": "^3.0.0",
2323
"jsonwebtoken": "^9.0.0",
24-
"next": "13.5.0",
25-
"react": "17.0.2",
26-
"react-dom": "17.0.2",
24+
"next": "14.2.35",
25+
"react": "^18.2.0",
26+
"react-dom": "^18.2.0",
2727
"set-cookie-parser": "^2.4.8",
2828
"sqlite": "^4.0.23",
2929
"sqlite3": "^5.1.5",
@@ -36,12 +36,13 @@
3636
"@types/cookie": "^0.4.0",
3737
"@types/isomorphic-fetch": "^0.0.35",
3838
"@types/jsonwebtoken": "^8.5.1",
39-
"@types/react": "17.0.8",
39+
"@types/react": "^18",
40+
"@types/react-dom": "^18",
4041
"@types/set-cookie-parser": "^2.4.0",
4142
"@types/sqlite3": "^3.1.7",
4243
"@types/uuid": "^8.3.0",
43-
"eslint": "^7.28.0",
44-
"eslint-config-next": "^11.0.0",
45-
"typescript": "4.3.2"
44+
"eslint": "^8",
45+
"eslint-config-next": "14.2.35",
46+
"typescript": "4.9.5"
4647
}
4748
}

pages/api/auth/me.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async function me(req: NextApiRequest, res: NextApiResponse<ResponseBody>) {
3636
lastname: user.lastname,
3737
})
3838
} catch (error) {
39-
console.log(`\nError: POST /api/me\n${error.message}\n`)
39+
console.log(`\nError: POST /api/me\n${error instanceof Error ? error.message : String(error)}\n`)
4040
res.status(401).end()
4141
}
4242
}

pages/api/auth/signin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async function signin(req: NextApiRequest, res: NextApiResponse<ResponseBody>) {
5555
lastname: user.lastname,
5656
})
5757
} catch (error) {
58-
console.log(`\nError: POST /api/signin\n${error.message}\n`)
58+
console.log(`\nError: POST /api/signin\n${error instanceof Error ? error.message : String(error)}\n`)
5959
res.status(500).end()
6060
}
6161
}

pages/api/auth/signup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ async function signup(req: NextApiRequest, res: NextApiResponse<ResponseBody>) {
8181
lastname: user.lastname,
8282
})
8383
} catch (error) {
84-
console.log(`\nError: POST /api/signup\n${error.message}\n`)
84+
console.log(`\nError: POST /api/signup\n${error instanceof Error ? error.message : String(error)}\n`)
8585
res.status(500).end()
8686
}
8787
}

pages/api/lc/token.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async function token(req: NextApiRequest, res: NextApiResponse<ResponseBody>) {
6565
licenseId: Number(process.env.NEXT_PUBLIC_LC_LICENSE_ID!),
6666
})
6767
} catch (error) {
68-
console.log(`\nError: GET /api/token\n${error.message}\n`)
68+
console.log(`\nError: GET /api/token\n${error instanceof Error ? error.message : String(error)}\n`)
6969
res.status(401).end()
7070
}
7171
}

tsconfig.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
59
"allowJs": true,
610
"skipLibCheck": true,
711
"strict": true,
@@ -13,8 +17,16 @@
1317
"resolveJsonModule": true,
1418
"isolatedModules": true,
1519
"jsx": "preserve",
16-
"baseUrl": "."
20+
"baseUrl": ".",
21+
"incremental": true
1722
},
18-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
19-
"exclude": ["node_modules", "database/scripts/*"]
23+
"include": [
24+
"next-env.d.ts",
25+
"**/*.ts",
26+
"**/*.tsx"
27+
],
28+
"exclude": [
29+
"node_modules",
30+
"database/scripts/*"
31+
]
2032
}

0 commit comments

Comments
 (0)