Skip to content

[Snyk] Fix for 2 vulnerabilities - #506

Open
riddhi-desai wants to merge 1 commit into
developfrom
snyk-fix-95e9b1b7e6fb1d0d7c357dfcfed6ca87
Open

[Snyk] Fix for 2 vulnerabilities#506
riddhi-desai wants to merge 1 commit into
developfrom
snyk-fix-95e9b1b7e6fb1d0d7c357dfcfed6ca87

Conversation

@riddhi-desai

Copy link
Copy Markdown
Contributor

snyk-top-banner

Snyk has created this PR to fix 2 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • package.json
  • package-lock.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
high severity Open Redirect
SNYK-JS-REACTROUTER-18313144
  128  
medium severity Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
SNYK-JS-REACTROUTER-18313130
  111  

Breaking Change Risk

Merge Risk: High

Notice: This assessment is enhanced by AI.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Open Redirect

@riddhi-desai

Copy link
Copy Markdown
Contributor Author

Merge Risk: High

The upgrade from react-router and react-router-dom v6 to v7 is a major transition that introduces significant architectural changes and new features, moving towards a paradigm similar to the Remix framework. While some changes can be adopted incrementally using future flags, the core update requires substantial code modifications.

Key Breaking Changes & New Concepts:

  • Data Routers as Core Paradigm: Version 7 heavily emphasizes "Data Routers" (createBrowserRouter, createHashRouter), which integrate data loading and mutations directly into route definitions using loader and action functions. This is a major shift from the v6 component-based data fetching (e.g., using useEffect).
  • Environment Requirements: React Router v7 requires Node.js v20+, React v18+, and react-dom v18+.
  • Package Consolidation: The react-router-dom package is being deprecated. Its APIs have been merged into react-router, and imports will need to be updated accordingly. The official changelog for v8 (which finalizes the v7 transition) notes that react-router-dom is removed.
  • Route Definition: While component-based routes (<Routes> and <Route>) are still supported, the primary and more powerful way to define routes is now through JavaScript objects passed to the data router creation functions.
  • New Hooks and APIs: The introduction of data routers brings new hooks like useLoaderData(), useNavigation(), and useFetcher() for managing data and navigation state.

Recommendation:

This is a high-impact upgrade that requires a significant refactoring effort. It is not a simple version bump. Developers must migrate from component-based data fetching to using loader and action functions on their routes. All package imports from react-router-dom must be changed to react-router. Due to the scale of these changes, it is strongly recommended to handle this migration in a separate, dedicated effort before merging.

Notice 🤖: This content was augmented using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.

@riddhi-desai
riddhi-desai requested a review from a team as a code owner July 31, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants