Skip to content

Commit dcbdcb4

Browse files
authored
chore(deps): upgrade to nextjs 16 (#2203)
* chore(deps): upgrade to nextjs 16 * upgraded fumadocs * ensure vercel uses bun * fix build * fix bui;d * remove redundant vercel.json
1 parent 1642ed7 commit dcbdcb4

File tree

20 files changed

+260
-148
lines changed

20 files changed

+260
-148
lines changed

apps/docs/app/[lang]/[[...slug]]/page.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { findNeighbour } from 'fumadocs-core/server'
1+
import { findNeighbour } from 'fumadocs-core/page-tree'
22
import defaultMdxComponents from 'fumadocs-ui/mdx'
33
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/page'
44
import { ChevronLeft, ChevronRight } from 'lucide-react'
@@ -186,9 +186,6 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
186186
footer: <TOCFooter />,
187187
single: false,
188188
}}
189-
article={{
190-
className: 'scroll-smooth max-sm:pb-16',
191-
}}
192189
tableOfContentPopover={{
193190
style: 'clerk',
194191
enabled: true,

apps/docs/components/docs-layout/sidebar-components.tsx

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { type ReactNode, useEffect, useState } from 'react'
4-
import type { PageTree } from 'fumadocs-core/server'
4+
import type { Folder, Item, Separator } from 'fumadocs-core/page-tree'
55
import { ChevronRight } from 'lucide-react'
66
import Link from 'next/link'
77
import { usePathname } from 'next/navigation'
@@ -11,7 +11,7 @@ function isActive(url: string, pathname: string, nested = true): boolean {
1111
return url === pathname || (nested && pathname.startsWith(`${url}/`))
1212
}
1313

14-
export function SidebarItem({ item }: { item: PageTree.Item }) {
14+
export function SidebarItem({ item }: { item: Item }) {
1515
const pathname = usePathname()
1616
const active = isActive(item.url, pathname, false)
1717

@@ -33,15 +33,7 @@ export function SidebarItem({ item }: { item: PageTree.Item }) {
3333
)
3434
}
3535

36-
export function SidebarFolder({
37-
item,
38-
level,
39-
children,
40-
}: {
41-
item: PageTree.Folder
42-
level: number
43-
children: ReactNode
44-
}) {
36+
export function SidebarFolder({ item, children }: { item: Folder; children: ReactNode }) {
4537
const pathname = usePathname()
4638
const hasActiveChild = checkHasActiveChild(item, pathname)
4739
const [open, setOpen] = useState(hasActiveChild)
@@ -112,15 +104,15 @@ export function SidebarFolder({
112104
)
113105
}
114106

115-
export function SidebarSeparator({ item }: { item: PageTree.Separator }) {
107+
export function SidebarSeparator({ item }: { item: Separator }) {
116108
return (
117109
<p className='mt-4 mb-1.5 px-2.5 font-semibold text-[10px] text-gray-500/80 uppercase tracking-wide dark:text-gray-500'>
118110
{item.name}
119111
</p>
120112
)
121113
}
122114

123-
function checkHasActiveChild(node: PageTree.Folder, pathname: string): boolean {
115+
function checkHasActiveChild(node: Folder, pathname: string): boolean {
124116
if (node.index && isActive(node.index.url, pathname)) {
125117
return true
126118
}

apps/docs/lib/llms.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import type { InferPageType } from 'fumadocs-core/source'
22
import type { source } from '@/lib/source'
33

44
export async function getLLMText(page: InferPageType<typeof source>) {
5+
const processed = await page.data.getText('processed')
56
return `# ${page.data.title} (${page.url})
67
7-
${page.data.description || ''}
8-
9-
${page.data.content || ''}`
8+
${processed}`
109
}

apps/docs/lib/source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { loader } from 'fumadocs-core/source'
2-
import { docs } from '@/.source'
2+
import { docs } from '@/.source/server'
33
import { i18n } from './i18n'
44

55
export const source = loader({

apps/docs/next.config.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@ const config = {
1616
destination: '/introduction',
1717
permanent: true,
1818
},
19+
]
20+
},
21+
async rewrites() {
22+
return [
1923
{
20-
source: '/docs/:path*.mdx',
24+
source: '/:path*.mdx',
2125
destination: '/llms.mdx/:path*',
22-
permanent: true,
2326
},
2427
]
2528
},

apps/docs/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "Apache-2.0",
66
"scripts": {
77
"dev": "next dev --port 3001",
8-
"build": "NODE_OPTIONS='--max-old-space-size=8192' next build",
8+
"build": "fumadocs-mdx && NODE_OPTIONS='--max-old-space-size=8192' next build",
99
"start": "next start",
1010
"postinstall": "fumadocs-mdx",
1111
"type-check": "tsc --noEmit"
@@ -14,14 +14,14 @@
1414
"@tabler/icons-react": "^3.31.0",
1515
"@vercel/og": "^0.6.5",
1616
"clsx": "^2.1.1",
17-
"fumadocs-core": "15.8.2",
18-
"fumadocs-mdx": "11.10.1",
19-
"fumadocs-ui": "15.8.2",
17+
"fumadocs-core": "16.2.3",
18+
"fumadocs-mdx": "14.1.0",
19+
"fumadocs-ui": "16.2.3",
2020
"lucide-react": "^0.511.0",
21-
"next": "15.4.8",
21+
"next": "16.0.7",
2222
"next-themes": "^0.4.6",
23-
"react": "19.1.0",
24-
"react-dom": "19.1.0",
23+
"react": "19.2.1",
24+
"react-dom": "19.2.1",
2525
"tailwind-merge": "^3.0.2"
2626
},
2727
"devDependencies": {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { type NextFetchEvent, type NextRequest, NextResponse } from 'next/server
44
import { i18n } from '@/lib/i18n'
55

66
const { rewrite: rewriteLLM } = rewritePath('/docs/*path', '/llms.mdx/*path')
7-
const i18nMiddleware = createI18nMiddleware(i18n)
7+
const i18nProxy = createI18nMiddleware(i18n)
88

9-
export default function middleware(request: NextRequest, event: NextFetchEvent) {
9+
export default function proxy(request: NextRequest, event: NextFetchEvent) {
1010
if (isMarkdownPreferred(request)) {
1111
const result = rewriteLLM(request.nextUrl.pathname)
1212

@@ -15,7 +15,7 @@ export default function middleware(request: NextRequest, event: NextFetchEvent)
1515
}
1616
}
1717

18-
return i18nMiddleware(request, event)
18+
return i18nProxy(request, event)
1919
}
2020

2121
export const config = {

apps/docs/source.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ import { defineConfig, defineDocs } from 'fumadocs-mdx/config'
22

33
export const docs = defineDocs({
44
dir: 'content/docs',
5+
docs: {
6+
postprocess: {
7+
includeProcessedMarkdown: true,
8+
},
9+
},
510
})
611

712
export default defineConfig({

apps/docs/tsconfig.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"moduleResolution": "bundler",
1414
"resolveJsonModule": true,
1515
"isolatedModules": true,
16-
"jsx": "preserve",
16+
"jsx": "react-jsx",
1717
"incremental": true,
1818
"paths": {
19-
"@/.source": ["./.source/index.ts"],
19+
"@/.source/*": ["./.source/*"],
2020
"@/*": ["./*"]
2121
},
2222
"plugins": [
@@ -31,7 +31,8 @@
3131
"**/*.tsx",
3232
".next/types/**/*.ts",
3333
"content/docs/execution/index.mdx",
34-
"content/docs/connections/index.mdx"
34+
"content/docs/connections/index.mdx",
35+
".next/dev/types/**/*.ts"
3536
],
3637
"exclude": ["node_modules"]
3738
}

apps/sim/app/api/mcp/servers/[id]/refresh/route.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@ export const dynamic = 'force-dynamic'
1414
/**
1515
* POST - Refresh an MCP server connection (requires any workspace permission)
1616
*/
17-
export const POST = withMcpAuth('read')(
18-
async (
19-
request: NextRequest,
20-
{ userId, workspaceId, requestId },
21-
{ params }: { params: { id: string } }
22-
) => {
23-
const serverId = params.id
17+
export const POST = withMcpAuth<{ id: string }>('read')(
18+
async (request: NextRequest, { userId, workspaceId, requestId }, { params }) => {
19+
const { id: serverId } = await params
2420

2521
try {
2622
logger.info(

0 commit comments

Comments
 (0)