fix: Pin Next.js version to mitigate CVE risk#135
Conversation
|
If you're new to commit signing, there are different ways to set it up: Sign commits with
|
There was a problem hiding this comment.
Code Review
This pull request updates the next and eslint-config-next dependencies to version 16.1.7. However, the package.json file was corrupted during the update, as the entire file content was replaced with a diff snippet instead of being properly edited. A critical review comment identifies this invalid JSON structure and provides a full code suggestion to restore the file and apply the version updates correctly.
| - "next": "^16.1.1", | ||
| + "next": "16.1.7", | ||
| + "eslint-config-next": "16.1.7" No newline at end of file |
There was a problem hiding this comment.
The package.json file has been corrupted. It appears the entire file content was replaced with a diff snippet instead of updating the specific version strings within the JSON structure. This results in an invalid JSON file that will break the build and dependency installation. Please restore the full JSON structure and only update the next and eslint-config-next versions.
{
"name": "wxtm-bridge-frontend",
"version": "0.4.1",
"private": true,
"type": "module",
"scripts": {
"dev": "next dev",
"build": "next build --debug",
"start": "next start",
"lint": "eslint .",
"typecheck": "tsc --noEmit",
"translate": "node ./scripts/translator.js"
},
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@mui/material": "^7.3.7",
"@tanstack/react-query": "^5.90.17",
"@tari-project/wxtm-bridge-backend-api": "^0.1.63",
"@tari-project/wxtm-bridge-contracts": "0.1.12",
"ethers": "^5.8.0",
"i18next": "^24.2.3",
"i18next-http-backend": "^3.0.2",
"motion": "^12.26.2",
"next": "16.1.7",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"react-hook-form": "^7.71.1",
"react-i18next": "^15.7.4",
"react-icons": "^5.5.0",
"styled-components": "^6.3.6",
"viem": "^2.44.2",
"wagmi": "^3.3.2",
"zustand": "^5.0.10"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.1.18",
"@types/node": "^25.0.8",
"@types/react": "^19.2.8",
"@types/react-dom": "^19.2.3",
"@walletconnect/ethereum-provider": "^2.23.2",
"eslint": "^9.39.2",
"eslint-config-next": "16.1.7",
"eslint-plugin-i18next": "^6.1.3",
"tailwindcss": "^4",
"typescript": "^5.9.3"
}
}
Fixes #103
16.1.7in package.json.eslint-config-nextto match the exact version.package-lock.json/yarn.lockwith the pinned versions.