Skip to content

Upgrade to Next.js 16#253

Merged
yamcodes merged 16 commits intomainfrom
next16
Nov 1, 2025
Merged

Upgrade to Next.js 16#253
yamcodes merged 16 commits intomainfrom
next16

Conversation

@yamcodes
Copy link
Owner

@yamcodes yamcodes commented Oct 31, 2025

  • Upgraded Next.js from version 15.5.6 to 16.0.1 in package.json and pnpm-lock.yaml.
  • Adjusted TypeScript configuration to use "react-jsx" for JSX transformation.
  • Removed ESLint configuration from next.config.ts as it is not used.
  • Simplified development command in package.json by removing the turbopack flag.
  • Updated various dependencies to ensure compatibility with the new Next.js version.

Note

Upgrades Next.js to 16 and aligns dependencies, updates TS JSX config, removes ESLint build override, and simplifies the dev script; bumps pnpm.

  • Dependencies:
    • Upgrade next to ^16.0.0 with lockfile updates and SWC binaries.
    • Bump fumadocs-ui to 16.0.6 and align fumadocs-* packages with Next 16.
    • Update workspace package manager to pnpm@10.20.0.
  • Config:
    • In apps/www/tsconfig.json: switch jsx to react-jsx; add .next/dev/types/**/*.ts to include.
    • In apps/www/next.config.ts: remove eslint.ignoreDuringBuilds; add commented cacheComponents TODO.
  • DX:
    • In apps/www/package.json: simplify dev script to next dev (remove --turbopack).

Written by Cursor Bugbot for commit 008e1c9. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Chores

    • Upgraded Next.js to 16.0.0
    • Updated package manager to pnpm 10.20.0
    • Removed ESLint build-time override
  • New Features

    • Enabled component caching to improve runtime performance
  • Refactor

    • Updated TypeScript JSX runtime and expanded included type paths
    • Simplified local development start command and server behavior

- Upgraded Next.js from version 15.5.6 to 16.0.1 in package.json and pnpm-lock.yaml.
- Adjusted TypeScript configuration to use "react-jsx" for JSX transformation.
- Removed ESLint configuration from next.config.ts as it is not used.
- Simplified development command in package.json by removing the turbopack flag.
- Updated various dependencies to ensure compatibility with the new Next.js version.
- Added cacheComponents option to next.config.ts to improve performance by caching components.
@changeset-bot
Copy link

changeset-bot bot commented Oct 31, 2025

⚠️ No Changeset found

Latest commit: 008e1c9

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

@vercel
Copy link

vercel bot commented Oct 31, 2025

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

Project Deployment Preview Comments Updated (UTC)
arkenv Ready Ready Preview Comment Nov 1, 2025 0:25am

@github-actions github-actions bot added the www Improvements or additions to arkenv.js.org label Oct 31, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 31, 2025

Walkthrough

Upgrades Next.js to v16, enables component caching and removes the eslint build-ignore option in Next config, updates TypeScript JSX runtime and includes, changes the dev script and Next dependency, adds a Suspense boundary around EditOnGithub, and bumps the root pnpm version.

Changes

Cohort / File(s) Summary
Next.js config & TS config
apps/www/next.config.ts, apps/www/tsconfig.json
Added cacheComponents: true to Next config and removed the eslint block; changed TSX runtime from "preserve" to "react-jsx" and expanded include patterns to add .next/dev/types/**/*.ts.
App page (UI)
apps/www/app/docs/[[...slug]]/page.tsx
Imported Suspense from React and wrapped EditOnGithub with <Suspense fallback={null}>.
www package & root package
apps/www/package.json, package.json
Updated next^16.0.0; changed dev script from "next dev --turbopack" to "next dev"; bumped root packageManager pnpm version to 10.20.0.

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant NextApp as Next App (page.tsx)
  participant Suspense as Suspense Boundary
  participant Edit as EditOnGithub (async)

  Browser->>NextApp: Request docs page
  NextApp->>Suspense: Render (wrap EditOnGithub)
  Suspense->>Edit: Resolve async component
  Edit-->>Suspense: Component content
  Suspense-->>NextApp: Resolved content
  NextApp-->>Browser: HTML/streamed response
  Note over Suspense,Edit: New: Suspense boundary around EditOnGithub (fallback={null})
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Pay attention to Next.js v16 breaking changes and config compatibility.
  • Verify TSX runtime change doesn't affect JSX emit/typing.
  • Confirm removing eslint.ignoreDuringBuilds doesn't alter CI/build behavior.
  • Validate Suspense usage for EditOnGithub (server vs client component boundaries).

Possibly related PRs

Suggested labels

docs

Poem

🐰 Hopped into a newer frame,

Cached components, changed the name,
Suspense sits quiet, waits to show,
Turbopack waved: "It's time to go,"
pnpm leaps — onward we flow. 🎋

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Upgrade to Next.js 16" directly and clearly summarizes the primary change across the entire changeset. All modifications in the pull request—including the Next.js dependency version bump from 15.5.6 to 16.0.0, TypeScript configuration updates, next.config.ts changes, dev script updates, and Suspense wrapper additions—are directly aligned with and required by this upgrade. The title is specific (mentions the tool and version), concise, and contains no vague or generic language that would obscure the change's intent.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch next16

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…ndling

- Added Suspense around the EditOnGithub component to manage loading states more effectively.
- Imported headers from next/headers to enable dynamic routing capabilities.
- Called headers() in the Page component to allow the use of crypto.randomUUID().
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f882754 and f283f6d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • apps/www/app/docs/[[...slug]]/page.tsx (2 hunks)
  • apps/www/components/page/edit-on-github.tsx (3 hunks)
  • apps/www/next.config.ts (1 hunks)
  • apps/www/package.json (2 hunks)
  • apps/www/tsconfig.json (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-12T06:23:45.463Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-12T06:23:45.463Z
Learning: Applies to **/*.test.ts : Place tests alongside source files and use the .test.ts suffix (e.g., create-env.test.ts, types.test.ts, errors.test.ts, utils.test.ts)

Applied to files:

  • apps/www/tsconfig.json
📚 Learning: 2025-09-12T06:23:45.463Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-12T06:23:45.463Z
Learning: Applies to **/*.test.ts : Mock process.env to cover different environment scenarios in tests

Applied to files:

  • apps/www/tsconfig.json
🧬 Code graph analysis (1)
apps/www/app/docs/[[...slug]]/page.tsx (1)
apps/www/lib/source.tsx (1)
  • source (10-22)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test-e2e
🔇 Additional comments (7)
apps/www/tsconfig.json (2)

16-16: LGTM! Correct JSX transform for React 19.

The change to "react-jsx" aligns with Next.js 15+ requirements for the modern JSX transform when using React 19. This is necessary for the upgrade.


28-34: LGTM! Includes Next.js generated types.

Adding .next/dev/types/**/*.ts to the include array is appropriate for Next.js 15+ as it ensures TypeScript can access generated type definitions during development.

apps/www/package.json (2)

36-36: LGTM! Next.js upgraded to v16.

The Next.js version upgrade from 15.5.6 to ^16.0.0 is the primary objective of this PR.


7-7: No action required — the change is correct for Next.js 16.

The project uses Next.js 16, where Turbopack is the default dev bundler and the --turbopack flag is no longer required (though still accepted). Removing the flag aligns with Next.js 16 best practices; the dev script will use Turbopack by default without the explicit flag.

apps/www/next.config.ts (2)

10-13: Verify ESLint passes without ignoreDuringBuilds.

The eslint configuration block with ignoreDuringBuilds: true has been removed (per PR summary). This means ESLint will now run during builds and could fail the build if there are any linting errors. Please ensure that:

  • All ESLint rules pass in the codebase
  • This removal is intentional and builds complete successfully

Note: TypeScript errors are still being ignored via ignoreBuildErrors: true, which appears intentional for CI type checking.


9-9: Valid Next.js 16 configuration option confirmed.

The cacheComponents: true option is a valid Next.js 16 configuration that enables opt-in "Cache Components" behavior (Partial Prerendering). By default, dynamic code runs at request time; caching is opt-in via the "use cache" directive and related APIs. This unifies flags formerly named ppr/useCache/dynamicIO. The implementation in the PR is correct.

apps/www/components/page/edit-on-github.tsx (1)

22-47: LGTM: Internal component implementation is correct.

The extraction of the rendering logic into EditOnGithubClient is well done. Error handling with Sentry integration is appropriate, and keeping this component internal (non-exported) is the right approach.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/www/components/page/edit-on-github.tsx (1)

48-50: Consider removing the unnecessary wrapper layer.

The EditOnGithub wrapper adds no functionality—it simply forwards props to EditOnGithubClient. This creates an extra component in the React tree without clear benefit. Consider renaming EditOnGithubClient back to EditOnGithub and exporting it directly.

Apply this diff to simplify:

-const EditOnGithubClient = ({ path }: EditOnGithubProps) => {
+export const EditOnGithub = ({ path }: EditOnGithubProps) => {
 	try {
 		return (
 			<Button asChild variant="link" className="p-0">
 				// ... rest of implementation
 			</Button>
 		);
 	} catch (error) {
 		captureMessage("Could not render GitHub edit button", {
 			level: "warning",
 			extra: {
 				error: error instanceof Error ? error.message : String(error),
 			},
 		});
 		return null;
 	}
 };
-
-export const EditOnGithub = (props: EditOnGithubProps) => {
-	return <EditOnGithubClient {...props} />;
-};
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1ca2cc3 and f1eb9b9.

📒 Files selected for processing (2)
  • apps/www/app/docs/[[...slug]]/page.tsx (2 hunks)
  • apps/www/components/page/edit-on-github.tsx (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/www/components/page/edit-on-github.tsx (2)
apps/www/components/page/edit-on-github.test.tsx (8)
  • process (115-127)
  • props (17-23)
  • process (101-113)
  • props (27-40)
  • default (16-24)
  • mockGetLinkTitleAndHref (221-234)
  • Button (26-41)
  • mockGetLinkTitleAndHref (60-73)
apps/www/lib/utils/github.ts (1)
  • path (25-32)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test-e2e
🔇 Additional comments (2)
apps/www/app/docs/[[...slug]]/page.tsx (1)

26-27: LGTM! The await headers() call correctly addresses the previous review.

The addition of await headers() properly marks the route as dynamic in Next.js 16 and enables the use of crypto.randomUUID(). The async call is correctly awaited within the async function.

apps/www/components/page/edit-on-github.tsx (1)

21-21: The Suspense wrapper was correctly removed per previous review.

The unnecessary Suspense boundary mentioned in the previous review has been removed, which is the correct approach for this client component.

The headers() call was making the route dynamic which conflicted with
static generation via generateStaticParams(). Since crypto.randomUUID()
is not actually used in the codebase, this call is unnecessary.
Wrap EditOnGithub component in Suspense boundary in the server component
to fix Next.js 16 static generation error. Client components that access
dynamic data must be wrapped in Suspense during static generation.
Remove EditOnGithubClient wrapper and export EditOnGithub directly.
This simplifies the component by eliminating an unnecessary layer in
the React tree that was just forwarding props.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f1eb9b9 and 253183a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • apps/www/app/docs/[[...slug]]/page.tsx (2 hunks)
  • apps/www/package.json (2 hunks)
  • package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/www/app/docs/[[...slug]]/page.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test-e2e
🔇 Additional comments (3)
apps/www/package.json (2)

36-36: Confirm caret constraint ^16.0.0 aligns with stability expectations.

The Next.js dependency uses a caret constraint, allowing any 16.x.y release up to 17.0.0. This is standard semver, but given Next.js 16 is a major version release, confirm the team is comfortable with potential minor/patch releases pulled automatically. Consider whether pinning to 16.0.1 (or the specific tested version) would be safer for production stability if this is a critical application.


7-7: Turbopack removal is correct for Next.js 16.

Turbopack is the default dev bundler in Next.js 16 and requires no extra flags for next dev. The removal of the --turbopack flag from the dev script aligns with this default behavior. The simplified command is now the correct and canonical form.

package.json (1)

36-36: ---

pnpm@10.20.0 is a safe patch update with no new breaking changes.

pnpm v10.20.0 contains only minor and patch fixes and introduces no breaking changes. The version bump from 10.18.3 to 10.20.0 is safe for your monorepo setup and lock file generation.

- Imported headers from next/headers to enable the use of crypto.randomUUID() for Sentry instrumentation.
- Awaited headers() call in the generateMetadata function to ensure proper functionality.
@yamcodes
Copy link
Owner Author

yamcodes commented Nov 1, 2025

Due to getsentry/sentry-javascript#17895, we cannot use Cached Components yet. I've added a TODO to get back to it.

- Updated the Sentry configuration to enable automatic annotation of React components, allowing for better tracking in breadcrumbs and session replay.
- Removed the previous disabling of the feature to resolve issues with crypto.randomUUID() during static generation.
Eliminated the Suspense component wrapping EditOnGithub to simplify the rendering process, as it is no longer necessary for static generation. This change improves the component's performance and clarity.
- Upgraded `fumadocs-ui` from `15.8.5` to `16.0.6` in `apps/www/package.json`.
- Updated related dependencies in the pnpm lockfile, including `rolldown-vite` to `7.1.20` and `rolldown` to `1.0.0-beta.45`, along with various transitive updates.
@yamcodes yamcodes merged commit 8d4f05c into main Nov 1, 2025
16 checks passed
@yamcodes yamcodes deleted the next16 branch November 1, 2025 00:36
@yamcodes yamcodes linked an issue Nov 1, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

www Improvements or additions to arkenv.js.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump Next.js to v16

1 participant