Skip to content

docs: upgrade documentation apps to Next.js 16 - #17395

Merged
shahednasser merged 3 commits into
developfrom
docs/upgrade-next-16
Oct 21, 2026
Merged

shahednasser merged 3 commits into
developfrom
docs/upgrade-next-16

Conversation

@shahednasser

Copy link
Copy Markdown
Member

Summary

What — Upgrades all documentation apps under www/ (book, resources, api-reference, ui, user-guide, cloud) to Next.js 16.4.2, and removes the temporary --dangerouslyUseUnsupportedNextVersion flag added in #17386.

Why — @opennextjs/cloudflare now supports Next.js >=16.4.1, so we can move off 15.x and deploy to Cloudflare without the unsupported-version escape hatch.

How

  • Bumped next, @next/mdx, @next/third-parties, @next/bundle-analyzer, and eslint-config-next to 16.4.2; @opennextjs/cloudflare to ^1.20.12; wrangler to ^4.151.3 (OpenNext's new peer minimum). Node engine is now >=20.9.0 (Next 16 minimum; CI already uses Node 22).
  • Kept webpack (next dev/build --webpack): Turbopack is Next 16's default, but it can't take our MDX remark/rehype/recma plugins, which are JS functions with non-serializable options. OpenNext supports webpack builds.
  • Added withMdxWebpackLayers in build-scripts and wrapped each app's config with it. It works around MDX export const metadata fails to build with webpack in 16.2.0 (regression from 16.1.6) vercel/next.js#91735: since 16.2, @next/mdx under webpack compiles MDX with a layer-less SWC loader, so every MDX page is treated as a client component and export const metadata fails the build. The helper routes .mdx through Next's layer-aware SWC rules instead. Remove it once the upstream issue is fixed.
  • Replaced the removed next lint with eslint scoped to the same default directories (app pages components lib src) so --fix doesn't touch generated specs. Switched to plugin:@next/next/recommended-legacy, because the plugin's recommended preset is now flat-config only and breaks under FlatCompat.
  • api-reference: removed a misused "use server" from MDXContent/Server. It's a component, not a Server Action, and Next 16 now rejects non-async functions in "use server" files.
  • book: fixed missing commas in two highlights arrays (scheduled-jobs, extend-create-product). The typo turned [...]["6", ...] into an index lookup that yields undefined, and this crashed prerendering. Also fixed the now-validated highlight text ("link" → LINK).

Testing

  • turbo run build passes for all apps and packages.
  • yarn build:cloudflare (OpenNext) passes for all 6 apps.
  • opennextjs-cloudflare preview for book: pages, the two fixed pages, and 404 render correctly. .md routes return 500 locally, and they do the same on the existing Next 15 build, because they fetch remote assets.
  • yarn test passes (docs-ui 1366, docs-utils 36). One docs-ui run hit an existing flaky timer leak in the AiAssistant test, and it passed on rerun.
  • Lint output matches develop (clean; 4 existing warnings in api-reference).

Checklist

  • I have added a changeset for this PR — N/A, www/ packages are private
  • The changes are covered by relevant tests
  • I have verified the code works as intended locally

ðŸĪ– Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@shahednasser
shahednasser requested a review from a team as a code owner October 21, 2026 11:20
@changeset-bot

changeset-bot Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

⚠ïļ No Changeset found

Latest commit: f2eabcb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
medusa-docs-user-guide f2eabcb Commit Preview URL

Branch Preview URL
Oct 21 2026, 12:06 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
medusa-docs-book f2eabcb Commit Preview URL

Branch Preview URL
Oct 21 2026, 12:08 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
medusa-docs-ui f2eabcb Commit Preview URL

Branch Preview URL
Oct 21 2026, 12:05 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
medusa-docs-resources f2eabcb Commit Preview URL

Branch Preview URL
Oct 21 2026, 12:09 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
medusa-docs-api-reference f2eabcb Commit Preview URL

Branch Preview URL
Oct 21 2026, 12:06 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
medusa-docs-cloud f2eabcb Commit Preview URL

Branch Preview URL
Oct 21 2026, 12:05 PM

shahednasser and others added 2 commits October 21, 2026 14:46
# Conflicts:
#	www/apps/api-reference/package.json
#	www/apps/book/package.json
#	www/apps/cloud/package.json
#	www/apps/resources/package.json
#	www/apps/ui/package.json
#	www/apps/user-guide/package.json
#	www/packages/docs-ui/package.json
#	www/yarn.lock
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@shahednasser
shahednasser merged commit 05f8539 into develop Oct 21, 2026
49 of 50 checks passed
@shahednasser
shahednasser deleted the docs/upgrade-next-16 branch October 21, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant