Skip to content

chore(core): upgrade Next.js to 16#2907

Open
matthewvolk wants to merge 7 commits intocanaryfrom
CATALYST-1791-upgrade-next
Open

chore(core): upgrade Next.js to 16#2907
matthewvolk wants to merge 7 commits intocanaryfrom
CATALYST-1791-upgrade-next

Conversation

@matthewvolk
Copy link
Contributor

Warning

This PR is dependent on #2905. That PR must be merged first.

What/Why?

Upgrades Catalyst from Next.js 15 to Next.js 16. This PR contains the API migration and config changes needed to run on Next.js 16:

  • Bumps next to ^16.1.6, next-intl to ^4.6.1, @next/bundle-analyzer to ^16.1.6
  • Replaces unstable_expireTag with revalidateTag
  • Replaces unstable_expirePath with revalidatePath
  • Updates tsconfig for Next.js 16 compatibility

Testing

  • Run pnpm run dev in core/ and verify pages render without errors
  • Confirm cache invalidation still works (revalidateTag/revalidatePath)
  • Run pnpm run build in core/ and verify build completes

Migration

No migration needed. unstable_expireTag and unstable_expirePath are direct replacements — the API signatures are identical.

@changeset-bot
Copy link

changeset-bot bot commented Mar 3, 2026

🦋 Changeset detected

Latest commit: ccf427c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Minor

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

@vercel
Copy link

vercel bot commented Mar 3, 2026

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

Project Deployment Actions Updated (UTC)
catalyst Ready Ready Preview, Comment Mar 4, 2026 7:53pm

Request Review

@matthewvolk matthewvolk marked this pull request as ready for review March 3, 2026 23:45
@matthewvolk matthewvolk requested a review from a team as a code owner March 3, 2026 23:45
…age poisoning

Replace static imports of next/headers, next/navigation, and next-intl/server
with dynamic import() calls inside the hooks that use them. Static imports
cause these modules to be evaluated during module graph resolution when
next.config.ts imports this file, poisoning the process-wide AsyncLocalStorage
context. Dynamic imports defer module loading to call time, after Next.js has
fully initialized.
Upgrade next, @next/bundle-analyzer, eslint-config-next to ^16.1.0 and
@next/eslint-plugin-next to ^16.1.0. React 19.1.5 is already compatible.
Change jsx from "preserve" to "react-jsx" and add .next/dev/types to
the include array for generated dev types.
Replace `NextMiddleware` with `NextProxy` and `priority` with `preload`
on Image components per Next.js 16 API changes.
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.

3 participants