-
Notifications
You must be signed in to change notification settings - Fork 1
[DEV-2561] upgrade to nextjs 15 react 19 #1691
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: marcobottaro <[email protected]>
…ade-nextjs-15-react-19
🦋 Changeset detectedLatest commit: 82af7c8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Jira Pull Request LinkThis Pull Request refers to the following Jira issue DEV-2561 |
Branch is not up to date with base branch@tommaso1 it seems this Pull Request is not updated with base branch. |
This PR exceeds the recommended size of 800 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
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 pull request upgrades the project from Next.js 14/React 18 to Next.js 15/React 19, with Material-UI upgraded to v7, ESLint migrated to v9 with flat config, and TypeScript upgraded to v5.9.2. The changes primarily involve automatic formatting/linting updates to comply with new ESLint rules, dependency version updates, and necessary code adaptations for framework compatibility.
Key changes include:
- Core framework upgrades (Next.js 15.5.3, React 19.1.1, TypeScript 5.9.2)
- Material-UI ecosystem upgrade to v7 with new Grid API usage
- ESLint migration to flat config with new plugins
- API viewer replacement from Stoplight Elements to RapidOC
Reviewed Changes
Copilot reviewed 243 out of 245 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
package.json | Adds rapidoc dependency for new API viewer |
tsconfig.json | Adds lib configuration for TypeScript 5.9.2 compatibility |
convertEmojiToUnicode.ts | Type annotation fix for tag parameter |
Various component files | Migration to new MUI Grid API and component prop updates |
Route handlers | Adaptation to Next.js 15 async params API |
ESLint-related files | Mass formatting changes for new ESLint rules compliance |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
} | ||
const fallbackResult = emojiData.find(({ tags }) => | ||
tags?.some((tag) => tag === emojiName) | ||
tags?.some((tag: any) => tag === emojiName) |
Copilot
AI
Sep 23, 2025
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.
Using any
type defeats the purpose of TypeScript's type safety. Consider defining a proper type for the tag
parameter or using a more specific type annotation.
tags?.some((tag: any) => tag === emojiName) | |
tags?.some((tag: string) => tag === emojiName) |
Copilot uses AI. Check for mistakes.
// Use regex-based approach for server-side compatibility | ||
const headingRegex = /<(h[1-4])[^>]*>(.*?)<\/\1>/gi; | ||
let processedContent = content; | ||
let match; |
Copilot
AI
Sep 23, 2025
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.
Using let
for the match variable and assignment in while condition can be error-prone. Consider using a more functional approach or at least declare the variable with proper typing: let match: RegExpExecArray | null;
let match; | |
let match: RegExpExecArray | null; |
Copilot uses AI. Check for mistakes.
declare global { | ||
namespace React.JSX { | ||
interface IntrinsicElements { | ||
'rapi-doc': React.DetailedHTMLProps< | ||
React.HTMLAttributes<HTMLElement>, | ||
HTMLElement | ||
> & { |
Copilot
AI
Sep 23, 2025
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.
Global type declarations should be moved to a dedicated types file (e.g., types/rapidoc.d.ts
) rather than being declared inline in component files for better maintainability and reusability.
Copilot uses AI. Check for mistakes.
xs: (cardSize?.xs as any) || 12, | ||
md: (cardSize?.md as any) || 6, |
Copilot
AI
Sep 23, 2025
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.
Using as any
type assertion should be avoided. Consider properly typing the cardSize
object or using a type guard to ensure type safety.
xs: (cardSize?.xs as any) || 12, | |
md: (cardSize?.md as any) || 6, | |
xs: cardSize?.xs ?? 12, | |
md: cardSize?.md ?? 6, |
Copilot uses AI. Check for mistakes.
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.
Or maybe better:
xs: (cardSize?.xs as any) || 12, | |
md: (cardSize?.md as any) || 6, | |
xs: cardSize?.xs || 12, | |
md: cardSize?.md || 6, |
apps/nextjs-website/src/components/molecules/PartRendererMenu/PartRendererMenu.tsx
Show resolved
Hide resolved
This pull request is stale because it has been open for 14 days with no activity. If the pull request is still valid, please update it within 21 days to keep it open or merge it, otherwise it will be closed automatically. |
Core Dependencies Upgraded
Material-UI Upgraded to v7
ESLint Migration
Configuration Updates
Dependencies Removed
Dependencies Added
Code Changes
List of Changes
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: