-
Notifications
You must be signed in to change notification settings - Fork 7
chore(deps): update dependencies for next and fumadocs #461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- fixes recursion error
…ops` and use `createAPIPage`
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
API Reference Pages content/api-reference/auth/*, content/api-reference/boards/*, content/api-reference/posts/*, content/api-reference/votes/*, content/api-reference/roadmaps/* |
Removed route field from _openapi front matter and updated APIPage invocations: changed document path from ./content/api-reference/openapi.yaml to ./content/openapi.yaml; removed webhooks and hasHead props across 15 MDX files. |
Configuration Metadata content/api-reference/meta.json |
Normalized URL-like entries by removing leading ellipsis placeholder and standardizing leading slash usage (e.g., "...path/..." → "/path/..."). |
Dependency Updates package.json |
Updated fumadocs-core, fumadocs-mdx, fumadocs-openapi, fumadocs-typescript, fumadocs-ui, and next to newer versions with caret ranges; updated react and react-dom to caret ranges. |
OpenAPI Configuration src/lib/openapi.ts |
Changed YAML source from ./content/api-reference/openapi.yaml to ./content/openapi.yaml; removed shikiOptions and themes configuration. |
Component Refactoring src/components/MDXComponents.tsx |
Replaced direct APIPage import with createAPIPage factory; added img renderer with ImageZoom; updated APIPage prop typing from APIPageProps to ApiPageProps; configured custom Shiki themes (vesper, vitesse-light). |
Source Architecture src/lib/source.ts |
Migrated from icon handlers and pageTree transformers to plugin-based approach; replaced transformerOpenAPI with openapiPlugin; added lucideIconsPlugin to all sources; updated imports to use fumadocs-mdx:collections/server namespace. |
Build Configuration src/app/layout.tsx, tsconfig.json, src/scripts/pre-build.ts |
Updated RootProvider import path; changed jsx compiler option to "react-jsx"; added path mapping for fumadocs-mdx:collections; switched to named OpenAPI import and removed file preservations from build script. |
Sitemap Integration src/app/sitemap.ts |
Added sitePolicySource to sitemap generation sources array. |
Footer Component src/components/Footer.tsx |
Removed sidebar detection logic (useEffect, useState, useSidebar); replaced sticky positioning with ms-auto class; simplified styling. |
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
- feat: re-structure docs #401: Modifies source configuration structure and src/lib/source.ts to restructure documentation sources, sharing similar refactoring scope and file overlap.
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The PR title accurately describes the primary change: updating dependencies for Next.js and FumaDocs, which aligns with the majority of changes in package.json and the commit messages. |
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
- 📝 Generate docstrings
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.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tsconfig.json (1)
16-35: Change"jsx"to"preserve"for Next.js 16 compatibility.Next.js enforces
"jsx": "preserve"intsconfig.json(SWC handles JSX transformation). Your current setting of"react-jsx"conflicts with Next's build pipeline.The
"fumadocs-mdx:collections/*"path mapping is correctly configured—fumadocs-mdx provides this as a virtual module during build, no manual.sourcedirectory generation needed.
🤖 Fix all issues with AI agents
In `@content/api-reference/meta.json`:
- Around line 10-35: The pages list in meta.json mixes entries with and without
leading slashes (e.g., "/auth/userSignin", "auth/userSignup") which can cause
routing mismatches; normalize all entries to the same format by removing leading
slashes across the array (update entries like "/auth/userSignin",
"/auth/sendVerificationEmail", "/auth/getSiteSetup", "/auth/siteSetup" to
"auth/userSignin", "auth/sendVerificationEmail", "auth/getSiteSetup",
"auth/siteSetup") so every path uses the no-leading-slash convention used by the
majority.
In `@package.json`:
- Around line 18-28: The project currently pins Next.js to ^16.1.6 which is
incompatible with `@opennextjs/cloudflare` and the fumadocs v16 ecosystem; to fix,
change the "next" dependency to a Next.js 15-compatible version (pin "next" to a
^15.x release) and align fumadocs packages to versions that match Next 15
(downgrade "fumadocs-core", "fumadocs-mdx", "fumadocs-openapi",
"fumadocs-twoslash", "fumadocs-typescript", "fumadocs-ui" to their
Next-15-compatible releases), update any code that calls createOpenAPI() to use
the v10-compatible signature if you keep fumadocs-openapi v10, and ensure your
deploy/preview scripts that rely on `@opennextjs/cloudflare` continue to target
supported Next.js versions; alternatively, if you intend to stay on Next 16,
revert changes that touch Next/ fumadocs APIs and wait for
`@opennextjs/cloudflare` support or complete the fumadocs v16 migration
(sidebar/server export/provider API and async-only cookies()/headers() changes)
before attempting deployment.
🧹 Nitpick comments (1)
src/scripts/pre-build.ts (1)
19-27: Minor:Promise.allwith single item is unnecessary.The
Promise.all([...])wrapper around a singlegenerateFiles()call adds no value. However, this is harmless and may be intentional for potential future additions.💡 Optional simplification
- await Promise.all([ - generateFiles({ - input: openapi, - output: apiReferencePath, - per: "operation", - groupBy: "tag", - includeDescription: true, - }), - ]); + await generateFiles({ + input: openapi, + output: apiReferencePath, + per: "operation", + groupBy: "tag", + includeDescription: true, + });
| "/auth/userSignin", | ||
| "auth/userSignup", | ||
| "/auth/sendVerificationEmail", | ||
|
|
||
| "---Site---", | ||
| ".../auth/getSiteSetup", | ||
| ".../auth/siteSetup", | ||
| "/auth/getSiteSetup", | ||
| "/auth/siteSetup", | ||
|
|
||
| "---Posts---", | ||
| "...posts/filterPosts", | ||
| "...posts/postBySlug", | ||
| "...posts/createPost", | ||
| "...posts/updatePost", | ||
| "...posts/deletePost", | ||
| "posts/filterPosts", | ||
| "posts/postBySlug", | ||
| "posts/createPost", | ||
| "posts/updatePost", | ||
| "posts/deletePost", | ||
|
|
||
| "---Votes---", | ||
| "...votes/addVoteToPost", | ||
| "...votes/removeVoteFromPost", | ||
| "votes/addVoteToPost", | ||
| "votes/removeVoteFromPost", | ||
|
|
||
| "---Boards---", | ||
| "...boards/filterBoards", | ||
| "boards/filterBoards", | ||
|
|
||
| "---Roadmaps---", | ||
| "...roadmaps/filterRoadmaps", | ||
| "...roadmaps/roadmapByUrl", | ||
| "...roadmaps/searchRoadmaps" | ||
| "roadmaps/filterRoadmaps", | ||
| "roadmaps/roadmapByUrl", | ||
| "roadmaps/searchRoadmaps" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normalize leading slashes in pages entries to avoid inconsistent routing.
The mix of /auth/... and auth/... can cause mismatches depending on how the nav resolver interprets slugs. Consider standardizing the format.
Suggested normalization (remove leading slashes to match the majority)
- "/auth/userSignin",
+ "auth/userSignin",
- "/auth/sendVerificationEmail",
+ "auth/sendVerificationEmail",
- "/auth/getSiteSetup",
+ "auth/getSiteSetup",
- "/auth/siteSetup",
+ "auth/siteSetup",🤖 Prompt for AI Agents
In `@content/api-reference/meta.json` around lines 10 - 35, The pages list in
meta.json mixes entries with and without leading slashes (e.g.,
"/auth/userSignin", "auth/userSignup") which can cause routing mismatches;
normalize all entries to the same format by removing leading slashes across the
array (update entries like "/auth/userSignin", "/auth/sendVerificationEmail",
"/auth/getSiteSetup", "/auth/siteSetup" to "auth/userSignin",
"auth/sendVerificationEmail", "auth/getSiteSetup", "auth/siteSetup") so every
path uses the no-leading-slash convention used by the majority.
| "fumadocs-core": "^16.4.9", | ||
| "fumadocs-mdx": "^14.2.6", | ||
| "fumadocs-openapi": "^10.2.6", | ||
| "fumadocs-twoslash": "^3.1.10", | ||
| "fumadocs-typescript": "^5.0.1", | ||
| "fumadocs-ui": "^16.4.9", | ||
| "lucide-react": "^0.562.0", | ||
| "next": "15.5.9", | ||
| "next": "^16.1.6", | ||
| "prettier": "^3.6.2", | ||
| "react": "19.2.3", | ||
| "react-dom": "19.2.3", | ||
| "react": "^19.2.3", | ||
| "react-dom": "^19.2.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# Check if `@opennextjs/cloudflare` is in the codebase
git ls-files | head -20Repository: logchimp/docs
Length of output: 446
🏁 Script executed:
# Search for `@opennextjs/cloudflare` usage
rg "@opennextjs/cloudflare" --type jsonRepository: logchimp/docs
Length of output: 109
🏁 Script executed:
# Check the full package.json to understand the project context
cat -n package.jsonRepository: logchimp/docs
Length of output: 1717
🏁 Script executed:
# Look for any configuration files related to Next.js or Cloudflare
fd -e "next.config" -e "wrangler.toml" -e ".env" -type fRepository: logchimp/docs
Length of output: 227
🌐 Web query:
Next.js 16 breaking changes compatibility
💡 Result:
Key Next.js 16 breaking changes and what they mean for compatibility:
-
Runtime/tooling minimums (hard requirements)
- Node.js ≥ 20.9.0 (Node 18 no longer supported)
- TypeScript ≥ 5.1
- Browsers: Chrome/Edge/Firefox ≥ 111, Safari ≥ 16.4
These can break CI/CD, hosting runtimes, or older enterprise browsers. [1][2]
-
Async Request / Dynamic APIs: sync access removed (major breaking change)
- These must now be accessed asynchronously (sync compatibility is removed in 16):
cookies(),headers(),draftMode()paramsinlayout/page/route/defaultand metadata image routessearchParamsinpage.js
Expect widespread code changes in App Router pages/layouts/routes. [2]
- These must now be accessed asynchronously (sync compatibility is removed in 16):
-
Removed features (will break builds if you still use them)
- AMP support removed (
useAmp,config.amp, etc.) next lintremoved (andnext buildno longer runs linting)serverRuntimeConfig/publicRuntimeConfigremoved (use env vars instead)devIndicatorsoptions removed (appIsrStatus,buildActivity,buildActivityPosition)- Config change:
experimental.turbopackmoved to top-levelturbopack experimental.dynamicIOrenamed toexperimental.cacheComponents[1]
- AMP support removed (
-
Next/Image behavior/default changes
- Default image optimization cache TTL increased (can affect update frequency/caching expectations).
- Default
images.imageSizesno longer includes16. [2]
Sources: Next.js 16 release post [1] and official upgrade guide for v16 breaking changes [2].
🌐 Web query:
@opennextjs/cloudflare Next.js 16 support
💡 Result:
As of January 29, 2026, @opennextjs/cloudflare does not list Next.js 16 as supported.
The OpenNext Cloudflare docs currently state supported versions are “all minor and patch versions of Next.js 15” and “the latest minor of Next.js 14”—with no mention of Next.js 16 support. [1] Cloudflare’s announcement/blog post also frames the support target as Next.js 14 (latest minor) and Next.js 15 (all minors). [2]
If you need a guaranteed-supported setup today, pin to Next.js 15 (or the supported Next.js 14 minor). For Next.js 16, you’d be in “try it and see / wait for official support” territory until the docs or release notes explicitly add it. [1]
Sources: [1], [2]
🌐 Web query:
fumadocs v16 migration guide breaking changes
💡 Result:
Fumadocs v16 migration: breaking changes (and what to change)
1) fumadocs-core/sidebar removed
- Breaking:
fumadocs-core/sidebaris gone. - Migrate: replace with your own sidebar (Fumadocs suggests using pre-built Shadcn UI sidebars). [1][2]
2) fumadocs-core/server exports removed / moved
- Breaking:
fumadocs-core/serverexports were redistributed. [1][2] - Migrate imports:
getGithubLastEdit→fumadocs-core/content/github[1][2]getTableOfContents→fumadocs-core/content/toc[1][2]PageTree+ page-tree utilities →fumadocs-core/page-tree[1][2]TOCItemType,TableOfContents→fumadocs-core/toc[1]createMetadataImageremoved → use Next.js Metadata API instead. [1][2]
3) Shiki default regex engine changed
- Breaking: default switched to Shiki JavaScript regex engine (instead of Oniguruma/WASM). Impacts
rehype-code(engineoption) andfumadocs-core/highlight. [1][2]
4) React / Next.js minimums raised (for Fumadocs UI)
- Breaking: minimum React 19.2.0. [1]
- Next.js: if you use Fumadocs UI on Next.js, you must use Next.js 16+. [1]
5) fumadocs-ui/provider removed
- Breaking:
fumadocs-ui/providerno longer exists. [1] - Migrate:
- root provider →
fumadocs-ui/provider/next - contexts → import from
fumadocs-ui/contexts/*[1]
- root provider →
6) fumadocs-ui/page removals
- Breaking:
<DocsCategory />removed. [1]- Migrate: use
getPageTreePeers()fromfumadocs-core/page-tree. [1]
- Migrate: use
- Breaking:
<DocsPage />optionbreadcrumbs.fullremoved. [1]
7) Search API breaking changes
- Algolia: option
documentrenamed toindexNameinfumadocs-core/search/algolia. [1] - Core search hook: removed deprecated
createFromSource()signature inuseSearch(). [1] - Orama Cloud: migrated to the new SDK (
@orama/core/OramaCloud) for sync; legacy client still available viafumadocs-core/search/orama-cloud-legacy. [1]
8) Highlighting API changes
- Breaking:
useShiki()removedwithPrerenderScriptandloading; use React Suspense instead. [1]
9) i18n middleware import path changed
- Breaking:
createI18nMiddlewareremoved fromfumadocs-core/i18n. [1] - Migrate: import from
fumadocs-core/i18n/middleware. [1]
10) Source loader changes
- Breaking: in
fumadocs-core/sourceloader:transformersandpageTree.attach*options removed → use Loader Plugin instead. [1]page.fileremoved → usepage.path. [1]- internal
FileInfo/parseFilePathremoved → usePathUtils. [1]
11) Styling change you may notice
- Default
--fd-layout-widthis now1600px(override if needed). [1]
Sources: Fumadocs v16 announcement (Oct 22, 2025). [1] plus a release summary mirroring the same breaking changes. [2]
🌐 Web query:
fumadocs-openapi v10 release notes
💡 Result:
fumadocs-openapi v10 — release notes (Fumadocs OpenAPI v10)
Published: November 6, 2025. [1]
Breaking changes
createOpenAPI()redesign: separates server concerns (OpenAPI instance) from UI/API page concerns (now viacreateAPIPage), simplifying the API surface and enabling better customization. [1]- Playground toggle change:
disablePlaygroundremoved → useplayground.enabled. [1] - Client configuration added: some options moved to a client config (via
defineClientConfig), and client config is now preferred for adapters. [1] - Media adapters change: media adapters should be forwarded via client config. [1]
- Option rename:
content.showExampleInFields→schemaUI.showExample. [1] - Renderer/fields API removed: centralized
rendererAPI removed in favor of per-feature render hooks oncontentand client-side playground render APIs. [1] generateFiles()input changed: now requires an OpenAPI server instance (not an array of file paths). [1][2]
New features
storageKeyPrefix: isolates localStorage keys to avoid state bleeding between multiple OpenAPI instances. [1]
Bug fixes
- TypeScript schema output correction (and formatting disabled there for performance). [1]
Sources: Fumadocs blog post for v10 release notes [1]; generateFiles() docs reflecting the new server-instance input [2].
@opennextjs/cloudflare does not support Next.js 16—this is a critical blocker for deployment.
As of January 2026, @opennextjs/cloudflare officially supports only Next.js 15 (all minors) and the latest Next.js 14 minor. Your deploy and preview scripts depend on this tool, which means the current configuration cannot be deployed. Either downgrade Next.js to 15, or wait for @opennextjs/cloudflare to release Next.js 16 support.
Additionally, fumadocs v16 requires extensive code migrations (removed sidebar, moved server exports, redesigned APIs, provider restructuring) and fumadocs-openapi v10 requires changes to createOpenAPI() calls. Next.js 16 itself introduces breaking changes (async-only APIs for cookies(), headers(), etc.). Review the fumadocs v16 migration guide and Next.js 16 breaking changes before proceeding.
🤖 Prompt for AI Agents
In `@package.json` around lines 18 - 28, The project currently pins Next.js to
^16.1.6 which is incompatible with `@opennextjs/cloudflare` and the fumadocs v16
ecosystem; to fix, change the "next" dependency to a Next.js 15-compatible
version (pin "next" to a ^15.x release) and align fumadocs packages to versions
that match Next 15 (downgrade "fumadocs-core", "fumadocs-mdx",
"fumadocs-openapi", "fumadocs-twoslash", "fumadocs-typescript", "fumadocs-ui" to
their Next-15-compatible releases), update any code that calls createOpenAPI()
to use the v10-compatible signature if you keep fumadocs-openapi v10, and ensure
your deploy/preview scripts that rely on `@opennextjs/cloudflare` continue to
target supported Next.js versions; alternatively, if you intend to stay on Next
16, revert changes that touch Next/ fumadocs APIs and wait for
`@opennextjs/cloudflare` support or complete the fumadocs v16 migration
(sidebar/server export/provider API and async-only cookies()/headers() changes)
before attempting deployment.
|
Oh no! I just saw your PR. 😔 |
|
As for the errors you mentioned in the PR description those has been resolved by the Fumadocs author. 🙂 |
|
Closing this PR for now. |
Ready for review
Keeping the
openapi.yamlin the same location as the generated openapi page was the cause ofMaximum call stack size exceedederror. So, I movedcontent/api-reference/openapi.yamltocontent/openapi.yaml. If you want me to move it to a different location, say so.There is still is a
**warning**message during build about internationalization, I haven't figured it out yet.Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.