Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 10, 2025

Upgrades Next.js from 14.2.11 to 15.5.6 and React from 18.3.1 to 19.2.0.

Dependency Updates

  • next: 14.2.11 → 15.5.6
  • react & react-dom: 18.3.1 → 19.2.0
  • @types/react & @types/react-dom: 18.x → 19.2.2
  • eslint-config-next: 14.2.11 → 15.5.6
  • Added overrides for React types to resolve peer dependency conflicts

Breaking Changes

Async params (Next.js 15)

Route params are now Promise-based and must be awaited:

// Before
export type Props = {
  params: { slug: string[] }
}
export default async function Page({ params }: Props) {
  const slug = params.slug
}

// After
export type Props = {
  params: Promise<{ slug: string[] }>
}
export default async function Page({ params }: Props) {
  const { slug } = await params
}

Files updated:

  • src/app/[...slug]/layout.tsx
  • src/app/[...slug]/page.tsx

React 19 Type Safety

Fixed stricter TypeScript checks:

  • src/components/mdx/Code/Code.tsx - Type assertion for children.props
  • src/components/mdx/Img/Img.tsx - Type guard for src parameter

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /usr/local/bin/node /home/REDACTED/work/docs/docs/node_modules/next/dist/compiled/jest-worker/processChild.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This pull request migrates the repository to Next.js 15.

Based on the official Next.js 15 migration guide, the following changes are included:

1. Dependency Upgrades

  • next has been upgraded to the latest version (15.x.x).
  • react and react-dom have been upgraded to the latest version (19.x.x).
  • @types/react and @types/react-dom have been upgraded for TypeScript compatibility.
  • eslint-config-next has been upgraded to the latest version.

2. Codemod Execution

The npx @next/codemod@canary upgrade latest command was run to automate most of the migration.

3. Breaking Changes Addressed

  • Async APIs: Updated usage of cookies, headers, draftMode, params, and searchParams to be asynchronous, as they are no longer synchronous.
  • React 19 Changes:
    • Replaced useFormState with useActionState.
    • Updated usages of useFormStatus to account for new keys.
  • Caching Defaults: Reviewed and updated caching behavior, as the default is now 'uncached' for Route Handlers and the Client Router Cache.

4. Configuration

  • next.config.js has been reviewed and updated for compatibility with Next.js 15.

This migration aims to bring the project up-to-date with the latest features and improvements in Next.js.

This pull request was created as a result of the following prompt from Copilot chat.

This pull request migrates the repository to Next.js 15.

Based on the official Next.js 15 migration guide, the following changes are included:

1. Dependency Upgrades

  • next has been upgraded to the latest version (15.x.x).
  • react and react-dom have been upgraded to the latest version (19.x.x).
  • @types/react and @types/react-dom have been upgraded for TypeScript compatibility.
  • eslint-config-next has been upgraded to the latest version.

2. Codemod Execution

The npx @next/codemod@canary upgrade latest command was run to automate most of the migration.

3. Breaking Changes Addressed

  • Async APIs: Updated usage of cookies, headers, draftMode, params, and searchParams to be asynchronous, as they are no longer synchronous.
  • React 19 Changes:
    • Replaced useFormState with useActionState.
    • Updated usages of useFormStatus to account for new keys.
  • Caching Defaults: Reviewed and updated caching behavior, as the default is now 'uncached' for Route Handlers and the Client Router Cache.

4. Configuration

  • next.config.js has been reviewed and updated for compatibility with Next.js 15.

This migration aims to bring the project up-to-date with the latest features and improvements in Next.js.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Migrate repository to Next.js 15 Migrate to Next.js 15 and React 19 Nov 10, 2025
Copilot AI requested a review from abernier November 10, 2025 04:27
Copilot finished work on behalf of abernier November 10, 2025 04:27
@abernier abernier force-pushed the copilot/migrate-to-nextjs-15 branch from 3c0b3a9 to 9f81138 Compare November 10, 2025 05:14
@abernier abernier changed the title Migrate to Next.js 15 and React 19 fix: migrate to Next.js 15 Nov 10, 2025
@abernier abernier marked this pull request as ready for review November 10, 2025 05:17
@abernier abernier merged commit 3f83264 into main Nov 10, 2025
2 checks passed
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