Repository navigation
fix package json vul - #639
Conversation
WalkthroughUpdate of multiple package.json files across the monorepo: Next.js bumped 15.1.7 → 16.0.8, React and React-DOM bumped 19.0.0 → 19.2.1; Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/pwa/package.json (1)
105-106: Fix dev dependencies version mismatch with production React versions.The devDependencies still specify React 19.0.0 and React-DOM 19.0.0 while the main dependencies specify 19.2.1. This inconsistency will cause the development environment and tests to use a different React version than production, potentially masking or introducing bugs.
Update devDependencies to match the production versions:
"devDependencies": { ... - "react": "19.0.0", - "react-dom": "19.0.0", + "react": "19.2.1", + "react-dom": "19.2.1", ... }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/pwa/package.json(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: check-app
- GitHub Check: check-app
🔇 Additional comments (2)
apps/pwa/package.json (2)
90-90: Verify codebase compatibility with Next.js 16 major version upgrade.Next.js 15.1.7 → 16.0.8 introduces breaking changes including asynchronous request APIs (cookies(), headers(), draftMode, params, searchParams now require await) and caching semantic changes. Manual inspection of the codebase is needed to ensure:
- All request API calls have been updated to use await
- Route handlers are configured with appropriate caching directives
- Other breaking changes have been addressed per the Next.js 16 migration guide
13-13: The--webpackflag is supported in Next.js 16.0.8 — no action needed for this flag.The
--webpackbuild flag remains the official opt-out mechanism in Next.js 16 to continue using Webpack instead of the new default Turbopack bundler. This flag is explicitly documented and supported. However, verify that any custom webpack configuration innext.config.js(loaders, plugins, aliases, etc.) will be ignored by Turbopack if the flag is not used; if custom webpack behavior is required, the--webpackflag ensures those settings are respected.Likely an incorrect or invalid review comment.
| "qs": "^6.12.3", | ||
| "quill": "2.0.3", | ||
| "react": "19.0.0", | ||
| "react": "19.2.1", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check for eslint-plugin-react-hooks in package.json files
echo "=== Checking apps/pwa/package.json ==="
if [ -f apps/pwa/package.json ]; then
cat apps/pwa/package.json | jq '.devDependencies["eslint-plugin-react-hooks"], .dependencies["eslint-plugin-react-hooks"]' 2>/dev/null
fi
echo "=== Checking root package.json ==="
if [ -f package.json ]; then
cat package.json | jq '.devDependencies["eslint-plugin-react-hooks"], .dependencies["eslint-plugin-react-hooks"]' 2>/dev/null
fi
echo "=== All references to eslint-plugin-react-hooks ==="
rg 'eslint-plugin-react-hooks' --type json -A 1Repository: AFK-AlignedFamKernel/afk_monorepo
Length of output: 210
🌐 Web query:
React 19.2 eslint-plugin-react-hooks version requirements compatibility
💡 Result:
Short answer: React 19.2 expects/ships eslint-plugin-react-hooks v6 (the React 19.2 blog calls out "eslint-plugin-react-hooks v6"). Use the plugin v6 (or the plugin version recommended in the React 19.2 docs) with React 19.2. [1][2]
Notes/compatibility caveats:
- There have been peer-dependency / ESLint-version issues reported for older plugin releases (and users saw conflicts when mixing older eslint-plugin-react-hooks versions with newer ESLint 9). If you hit install/peer errors, upgrade eslint-plugin-react-hooks to the v6-series recommended for React 19.2 and ensure your ESLint version meets the plugin's peerDependency requirements. See the GitHub discussion about ESLint 9/peer-dep conflicts for background. [3][2]
Sources:
- React 19.2 release notes (mentions eslint-plugin-react-hooks v6). [1]
- eslint-plugin-react-hooks npm package / install notes. [2]
- React GitHub issues on eslint-plugin-react-hooks / ESLint compatibility. [3]
Verify eslint-plugin-react-hooks version meets React 19.2.1 requirements.
React 19.2 requires eslint-plugin-react-hooks v6 or newer. Check that the current version in your dependencies satisfies this requirement, as older versions are incompatible with React 19.2.
🤖 Prompt for AI Agents
In apps/pwa/package.json around line 71, React is bumped to 19.2.1 but the
eslint-plugin-react-hooks version must be v6+ for compatibility; verify the
plugin entry in dependencies or devDependencies and if it is older than 6.x
update it to "eslint-plugin-react-hooks": "^6.0.0" (or the latest v6+), run your
package manager to install and update the lockfile, and then run your linter/CI
to confirm no rule or compatibility errors remain.
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/afk_nostr_sdk/package.json (1)
64-65: Update TypeScript type definitions to React 19.The package is running React 19.2.1 in devDependencies (lines 76–77), but the TypeScript type definitions are still pinned to React 18. This will cause type mismatches and TypeScript compilation errors.
Per the React 19 upgrade guide, you must update type definitions to match the runtime version.
Apply this diff to update the type definitions:
- "@types/react": "^18.3.1", - "@types/react-dom": "^18.3.0", + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0",
🧹 Nitpick comments (1)
packages/common/package.json (1)
35-35: Remove the blank line left after eslint-plugin-react-hooks removal.Line 35 contains an unnecessary blank line where the dependency was removed. Clean up the formatting by removing this empty line.
Apply this diff:
"eslint-plugin-react": "^7.34.1", - "prettier": "^3.2.5"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
packages/afk_nostr_sdk/package copy.json(0 hunks)packages/afk_nostr_sdk/package.json(1 hunks)packages/common/package.json(1 hunks)
💤 Files with no reviewable changes (1)
- packages/afk_nostr_sdk/package copy.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: check-app
- GitHub Check: check-app
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.