Skip to content

Commit

Permalink
feat: bump fumadocs and Next.js (#44)
Browse files Browse the repository at this point in the history
* feat: bump fumadocs

* fix: next@15 codemods

* fix: update tsconfig moduleResolution

* fix: search dialog types
  • Loading branch information
ndom91 authored Nov 12, 2024
1 parent bd3a012 commit fc51ba3
Show file tree
Hide file tree
Showing 7 changed files with 2,001 additions and 1,652 deletions.
8 changes: 5 additions & 3 deletions app/(docs)/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { openapi, utils } from "@/app/source"
import { DocsPage, DocsBody, DocsTitle, DocsDescription } from "fumadocs-ui/page"
import { notFound } from "next/navigation"
import defaultComponents from "fumadocs-ui/mdx"
import { Popup, PopupContent, PopupTrigger } from "fumadocs-ui/twoslash/popup"
import { Popup, PopupContent, PopupTrigger } from "fumadocs-twoslash/ui"
import { Tab, Tabs } from "fumadocs-ui/components/tabs"
import { Callout } from "fumadocs-ui/components/callout"
import { TypeTable } from "fumadocs-ui/components/type-table"
Expand All @@ -14,7 +14,8 @@ interface Param {
slug: string[]
}

export default function Page({ params }: { params: Param }): React.ReactElement {
export default async function Page(props: { params: Promise<Param> }): Promise<React.ReactElement> {
const params = await props.params
const page = utils.getPage(params.slug)

if (!page) notFound()
Expand Down Expand Up @@ -119,7 +120,8 @@ export function generateStaticParams(): Param[] {
})
}

export function generateMetadata({ params }: { params: { slug?: string[] } }) {
export async function generateMetadata(props: { params: Promise<{ slug?: string[] }> }) {
const params = await props.params
const page = utils.getPage(params.slug)

if (!page) notFound()
Expand Down
4 changes: 2 additions & 2 deletions app/(docs)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DocsLayout } from "fumadocs-ui/layout"
import { DocsLayout } from "fumadocs-ui/layouts/docs"
import type { ReactNode } from "react"
import { docsOptions } from "@/app/layout.config"
import "fumadocs-ui/twoslash.css"
import "fumadocs-twoslash/twoslash.css"

export default function Layout({ children }: { children: ReactNode }) {
return <DocsLayout {...docsOptions}>{children}</DocsLayout>
Expand Down
4 changes: 2 additions & 2 deletions app/layout.config.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { utils } from "@/app/source"
import type { DocsLayoutProps } from "fumadocs-ui/layout"
import type { HomeLayoutProps } from "fumadocs-ui/home-layout"
import type { DocsLayoutProps } from "fumadocs-ui/layouts/docs"
import type { HomeLayoutProps } from "fumadocs-ui/layouts/home"

import Logo from "@/components/Logo"
import Discord from "@/components/logos/discord"
Expand Down
3 changes: 1 addition & 2 deletions app/provider.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use client"

// eslint-disable-next-line import/no-extraneous-dependencies
import { Root } from "@radix-ui/react-dialog"
import DefaultSearchDialog, {
type DefaultSearchDialogProps
Expand All @@ -19,7 +18,7 @@ export function Provider({ children }: { readonly children: React.ReactNode }) {
)
}

function SearchDialog({ tag, api, ...props }: DefaultSearchDialogProps): React.ReactElement {
function SearchDialog(props: DefaultSearchDialogProps): React.ReactElement {
return (
<Root>
<DefaultSearchDialog {...props} />
Expand Down
61 changes: 31 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,50 @@
"start": "next start"
},
"dependencies": {
"@radix-ui/react-dialog": "^1.1.1",
"@shikijs/transformers": "^1.16.1",
"cmdk": "^1.0.0",
"fumadocs-core": "13.4.4",
"fumadocs-mdx": "10.0.0",
"fumadocs-openapi": "^5.4.8",
"fumadocs-ui": "13.4.4",
"next": "^14.2.7",
"@radix-ui/react-dialog": "^1.1.2",
"@shikijs/transformers": "^1.22.2",
"cmdk": "^1.0.4",
"fumadocs-core": "14.4.0",
"fumadocs-mdx": "11.1.1",
"fumadocs-openapi": "^5.5.10",
"fumadocs-twoslash": "^2.0.1",
"fumadocs-ui": "14.4.0",
"next": "^15.0.3",
"prettier": "^3.3.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"shiki": "^1.16.1",
"tailwind-merge": "^2.3.0",
"shiki": "^1.22.2",
"tailwind-merge": "^2.5.4",
"unist-util-visit": "^5.0.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.7.0",
"@next/eslint-plugin-next": "^14.2.7",
"@eslint/js": "^9.14.0",
"@next/eslint-plugin-next": "^15.0.3",
"@types/mdast": "^4.0.4",
"@types/mdx": "^2.0.13",
"@types/node": "20.14.8",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"autoprefixer": "^10.4.19",
"eslint": "^9.5.0",
"eslint-config-next": "^14.2.4",
"@types/node": "22.9.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@typescript-eslint/eslint-plugin": "^8.14.0",
"@typescript-eslint/parser": "^8.14.0",
"autoprefixer": "^10.4.20",
"eslint": "^9.14.0",
"eslint-config-next": "^15.0.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"globals": "^15.8.0",
"lint-staged": "^15.2.7",
"mermaid": "^11.3.0",
"open-props": "^1.7.4",
"postcss": "^8.4.38",
"postcss-nesting": "^12.1.5",
"prettier-plugin-tailwindcss": "^0.6.6",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.12.0",
"lint-staged": "^15.2.10",
"mermaid": "^11.4.0",
"open-props": "^1.7.7",
"postcss": "^8.4.49",
"postcss-nesting": "^13.0.1",
"prettier-plugin-tailwindcss": "^0.6.8",
"reading-time": "^1.5.0",
"remark-youtube": "^1.3.2",
"simple-git-hooks": "^2.11.1",
"tailwindcss": "^3.4.4",
"typescript": "^5.5.2",
"tailwindcss": "^3.4.14",
"typescript": "^5.6.3",
"unified": "^11.0.5"
},
"simple-git-hooks": {
Expand Down
Loading

0 comments on commit fc51ba3

Please sign in to comment.