Skip to content

Upgrade Next.js to v16 and update dependencies#241

Merged
mirhamasala merged 4 commits intomainfrom
mm/upgrade-nextjs
Feb 16, 2026
Merged

Upgrade Next.js to v16 and update dependencies#241
mirhamasala merged 4 commits intomainfrom
mm/upgrade-nextjs

Conversation

@mirhamasala
Copy link
Collaborator

@mirhamasala mirhamasala commented Feb 13, 2026

📝 Description

This PR upgrades the project from Next.js 15 to Next.js 16, along with related dependency updates and TypeScript configuration improvements to ensure compatibility with the latest framework version.

  • Type: Refactor / Dependency Update

🛠️ Key Changes

  • Upgraded Next.js from ^15.5.9 to 16.1.6 (major version)
  • Updated React from ^19.2.1 to 19.2.4
  • Updated React-DOM from ^19.2.1 to 19.2.4
  • Updated TypeScript types for React and React-DOM
  • Updated @filecoin-foundation/ui-filecoin from ^0.7.4 to ^0.7.5
  • Added --webpack flag to dev and build scripts for compatibility
  • Changed TypeScript jsx compiler option from "preserve" to "react-jsx"
  • Added .next/dev/types/**/*.ts to TypeScript include paths
  • Removed ignored dependencies from dependabot configuration

🔖 Resources

Note

Next 16 introduces Turbopack as the default bundler for Next.js. While some webpack plugins are compatible with Turbopack, frontmatter-markdown-loader may not be. For now, we're opting to use webpack as a bundler using the --webpack flag. We'll look into transitioning to Turbopack in a following PR.

Note

Dual Initialization Required

Unlike filecoin-site, this app requires setUIConfig to be called in two places:

  1. SiteLayout.tsx (server component) - Initializes for server-side rendering
  2. Providers.tsx (client component) - Initializes for client-side bundle

Why both are needed:

The Providers component is marked with 'use client' because it uses useState for the QueryClient. This creates a client bundle boundary where the server and client bundles are separate.

  • Server bundle components need the config initialized on the server (SiteLayout)
  • Client bundle components need the config initialized in the client (Providers)
  • The server-side initialization doesn't carry over to the client bundle

Why we can't consolidate:

  • If we merged Providers into SiteLayout, the entire SiteLayout would need 'use client' (due to useState), increasing the client bundle size
  • The current separation keeps the layout structure (html, fonts, etc.) as a server component for better performance
  • filecoin-site doesn't have this issue because it doesn't use a separate client Providers component with state

Updated the dependabot.yml file to remove the ignored dependencies for "next" and "@types/node", streamlining the dependency update process.
Updated various dependencies in package.json and package-lock.json, including upgrading "next" to version 16.1.6 and "@filecoin-foundation/ui-filecoin" to version 0.7.5. Modified TypeScript configuration to change JSX setting from "preserve" to "react-jsx" and included additional type definitions for better development support.
@FilOzzy FilOzzy added this to FOC Feb 13, 2026
@vercel
Copy link

vercel bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
filecoin-cloud Ready Ready Preview, Comment Feb 16, 2026 8:11am

Request Review

Copy link
Contributor

Copilot AI left a 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 upgrades the project’s Next.js framework version (15 → 16) and aligns related tooling/configuration (React, TypeScript, scripts, dependency automation) to keep the app compatible with the new major release.

Changes:

  • Upgraded next to 16.1.6 and updated React/React DOM and their type packages.
  • Updated Next.js scripts to force Webpack and adjusted TypeScript JSX/include settings for Next-generated types.
  • Simplified Dependabot config by removing ignored dependencies and refreshed the lockfile.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 3 comments.

File Description
tsconfig.json Updates JSX mode and expands TS include globs to cover additional Next-generated types.
package.json Bumps Next/React versions and modifies build/dev scripts for Webpack compatibility.
package-lock.json Updates resolved dependency graph for the Next 16 / dependency bumps.
.github/dependabot.yml Removes previously ignored dependencies so Dependabot will update them again.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Initialize setUIConfig directly in SiteLayout and Providers components to eliminate the separate config-initializer file.
@mirhamasala
Copy link
Collaborator Author

FYI @barbaraperic @CharlyMartin

@mirhamasala mirhamasala requested a review from Copilot February 16, 2026 08:19
@rjan90 rjan90 added this to the M4.1: mainnet ready milestone Feb 16, 2026
@rjan90 rjan90 moved this from 📌 Triage to 🔎 Awaiting review in FOC Feb 16, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 8 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mirhamasala mirhamasala merged commit d0deb36 into main Feb 16, 2026
12 checks passed
@mirhamasala mirhamasala deleted the mm/upgrade-nextjs branch February 16, 2026 08:23
@github-project-automation github-project-automation bot moved this from 🔎 Awaiting review to 🎉 Done in FOC Feb 16, 2026
@github-actions github-actions bot removed the size/L label Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

3 participants