-
Notifications
You must be signed in to change notification settings - Fork 0
chore!: next.js to v15.x (step towards v16) (#714) #758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7ec4991 to
ed2b352
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR modernizes the codebase by upgrading to React 19, Next.js 15, and related ecosystem packages, while refactoring all React imports to align with React 19's new JSX transform that no longer requires a default React import. The changes ensure compatibility with the latest React ecosystem and follow modern best practices.
Key changes include:
- Upgraded core dependencies (React 19, Next.js 15, rehype/remark packages, uuid 13)
- Replaced
import React from "react"with named imports (JSX,createElement,forwardRef, etc.) across all components - Updated Next.js Link usage from
legacyBehaviorpattern to the moderncomponentprop pattern
Reviewed changes
Copilot reviewed 299 out of 421 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated major versions of React (19.2.3), Next.js (15.5.9), TypeScript (5.9.3), and related ecosystem packages |
| src/components/common/Button/components/HelpIconButton/helpIconButton.tsx | Removed legacy Next.js Link wrapper, using component prop pattern |
| src/components/common/Button/components/CallToActionButton/callToActionButton.tsx | Removed legacy Next.js Link wrapper, using component prop pattern |
| src/components/Project/components/DataReleasePolicy/dataReleasePolicy.tsx | Updated external link to use MUI Link directly with proper attributes |
| src/components/Project/components/Contacts/contacts.tsx | Simplified email link rendering without legacy Link wrapper |
| src/components/Layout/components/Nav/nav.tsx | Updated navigation items to use component prop pattern |
| src/components/Export/components/ExportMethod/exportMethod.tsx | Simplified export button to use component prop pattern |
| src/components/Error/error.tsx | Updated homepage button to use component prop pattern |
| src/components/ComponentCreator/ComponentCreator.tsx | Changed from React.createElement to direct createElement import |
| src/components/MarkdownRenderer/markdownRenderer.tsx | Updated rehype-react configuration for React 19 JSX runtime |
| src/components/MarkdownRenderer/types.ts | Updated to use Components type from rehype-react v8 |
| src/components/Table/hooks/UseVirtualization/types.ts | Fixed RefObject type to properly handle null |
| src/components/Filter/components/SearchAllFilters/searchAllFilters.tsx | Changed React.forwardRef to direct forwardRef import |
| All component files | Replaced import React from "react" with named imports (JSX, createElement, forwardRef, etc.) |
src/components/common/Button/components/HelpIconButton/helpIconButton.tsx
Show resolved
Hide resolved
.../Filter/components/SearchAllFilters/components/VariableSizeListItem/variableSizeListItem.tsx
Outdated
Show resolved
Hide resolved
…ariableSizeListItem/variableSizeListItem.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* chore!: upgrade non-breaking dependencies compatible with next.js 14 and react 18 (#752) (#753) * chore!: update tanstack packages to latest (#752) * chore!: update isomorphic-dompurify to latest (#752) * chore!: update mui/material to latest (#752) * chore!: update copy-to-clipboard, react-dropzone, react-window, yup (#752) * chore!: update @commitlint/cli, @commitlint/config-conventional (#752) * chore!: updated @emotion/react, @emotion/styled, @emotion/jest to latest (#752) * chore: update @testing-library/react to latest (#742) * chore: update storybook (#752) * chore: update @typescript-eslint/eslint-plugin to latest (#752) * chore: update eslint and eslint-config-prettier (#752) * chore: update eslint-related packages (#752) * chore: minor bump prettier (#752) * chore!: update package-lock (#752) * chore: udpate package-lock (#752) --------- Co-authored-by: Fran McDade <18710366+frano-m@users.noreply.github.com> * chore!: migrate to prettier 3 and updated plugins (#754) (#755) * chore!: update tanstack packages to latest (#752) * chore!: update isomorphic-dompurify to latest (#752) * chore!: update mui/material to latest (#752) * chore!: update copy-to-clipboard, react-dropzone, react-window, yup (#752) * chore!: update @commitlint/cli, @commitlint/config-conventional (#752) * chore!: updated @emotion/react, @emotion/styled, @emotion/jest to latest (#752) * chore: update @testing-library/react to latest (#742) * chore: update storybook (#752) * chore: update @typescript-eslint/eslint-plugin to latest (#752) * chore: update eslint and eslint-config-prettier (#752) * chore: update eslint-related packages (#752) * chore: minor bump prettier (#752) * chore!: update package-lock (#752) * chore: udpate package-lock (#752) * chore: migrate to prettier 3 and updated plugins (#754) --------- Co-authored-by: Fran McDade <18710366+frano-m@users.noreply.github.com> * chore!: update jest v29 (#756) (#757) * chore: update jest v29 (#756) * chore!: rebased (#756) --------- Co-authored-by: Fran McDade <18710366+frano-m@users.noreply.github.com> * chore!: next.js to v15.x (step towards v16) (#714) (#758) * chore!: next.js to v15.x (step towards v16) (#714) * Update src/components/Filter/components/SearchAllFilters/components/VariableSizeListItem/variableSizeListItem.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Fran McDade <18710366+frano-m@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Fran McDade <18710366+frano-m@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Closes #714.
This pull request primarily updates dependencies to their latest major versions and refactors React imports throughout the codebase to align with React 19 best practices. The changes focus on ensuring compatibility with React 19, removing unnecessary default React imports, and updating related packages.
Dependency upgrades and compatibility:
react,react-dom,@types/react,@types/react-dom,next,next-mdx-remote,rehype-*,remark-*,unified, anduuidinpackage.json. This ensures the project is compatible with the latest ecosystem versions. [1] [2] [3]@next/eslint-plugin-next,eslint-config-next, andeslint-plugin-react-hooksto their latest versions for improved linting and compatibility.React import refactor:
import React from "react"with named imports (JSX,createElement,forwardRef, etc.) in all component files to follow the new React 19 convention, which no longer requires a default React import for JSX. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19]React.createElementto use the directcreateElementimport, further aligning with React 19 best practices.These changes collectively modernize the codebase, improve maintainability, and prepare the project for future development with the latest React ecosystem.