All: Support Next.js 14

This commit is contained in:
SonMooSans
2023-10-27 11:59:08 +08:00
parent 2fc06f3ed7
commit 01b23e2b93
11 changed files with 109 additions and 89 deletions
+8
View File
@@ -0,0 +1,8 @@
---
'create-next-docs-app': patch
'next-docs-zeta': patch
'next-docs-mdx': patch
'next-docs-ui': patch
---
Support Next.js 14
+2 -1
View File
@@ -1,4 +1,5 @@
import { ImageResponse, type NextRequest } from 'next/server'
import { ImageResponse } from 'next/og'
import type { NextRequest } from 'next/server'
type Mode = {
param: string
+8 -1
View File
@@ -4,6 +4,7 @@ import { Inter } from 'next/font/google'
import 'next-docs-ui/style.css'
import './style.css'
import { base_url, createMetadata } from '@/utils/metadata'
import type { Viewport } from 'next'
import { Provider } from './provider'
export const metadata = createMetadata({
@@ -11,11 +12,17 @@ export const metadata = createMetadata({
template: '%s | Next Docs',
default: 'Next Docs'
},
themeColor: '#ffffff',
description: 'The Next.js framework for building documentation sites',
metadataBase: base_url
})
export const viewport: Viewport = {
themeColor: [
{ media: '(prefers-color-scheme: dark)', color: '#0A0A0A' },
{ media: '(prefers-color-scheme: light)', color: '#fff' }
]
}
const inter = Inter({
subsets: ['latin']
})
+3 -3
View File
@@ -11,14 +11,14 @@
"dependencies": {
"@mdx-js/loader": "^2.3.0",
"@mdx-js/react": "^2.3.0",
"@next/env": "^13.5.6",
"@next/mdx": "^13.5.6",
"@next/env": "^14.0.0",
"@next/mdx": "^14.0.0",
"algoliasearch": "^4.20.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"katex": "^0.16.8",
"lucide-react": "^0.288.0",
"next": "13.5.6",
"next": "14.0.0",
"next-docs-mdx": "workspace:*",
"next-docs-ui": "workspace:*",
"next-docs-zeta": "workspace:*",
+1 -1
View File
@@ -9,7 +9,7 @@
},
"dependencies": {
"contentlayer": "0.3.4",
"next": "13.5.6",
"next": "14.0.0",
"next-contentlayer": "0.3.4",
"next-docs-ui": "4.0.0",
"next-docs-zeta": "4.0.0",
+2 -2
View File
@@ -8,10 +8,10 @@
"start": "next start"
},
"dependencies": {
"@next/mdx": "^13.5.6",
"@next/mdx": "^14.0.0",
"@mdx-js/loader": "^2.3.0",
"@mdx-js/react": "^2.3.0",
"next": "13.5.6",
"next": "14.0.0",
"next-docs-ui": "4.0.0",
"next-docs-zeta": "4.0.0",
"next-docs-mdx": "4.0.0",
+1 -1
View File
@@ -9,7 +9,7 @@
},
"dependencies": {
"contentlayer": "0.3.4",
"next": "13.5.6",
"next": "14.0.0",
"next-contentlayer": "0.3.4",
"next-docs-ui": "4.0.0",
"next-docs-zeta": "4.0.0",
+3 -3
View File
@@ -45,15 +45,15 @@
"zod": "^3.22.4"
},
"peerDependencies": {
"@next/mdx": "13.x",
"@next/mdx": ">= 13",
"next-docs-zeta": "4.0.0"
},
"devDependencies": {
"@next/mdx": "13.5.6",
"@next/mdx": "14.0.0",
"@types/mdast": "^3.0.12",
"@types/mdx": "^2.0.8",
"@types/react": "18.2.0",
"next": "13.5.6",
"next": "14.0.0",
"next-docs-zeta": "workspace:*",
"unified": "^10.1.2",
"webpack": "^5.89.0"
+4 -4
View File
@@ -65,9 +65,9 @@
"tailwind-merge": "^1.14.0"
},
"peerDependencies": {
"next": "13.x",
"react": "18.x",
"react-dom": "18.x"
"next": ">= 13",
"react": ">= 18",
"react-dom": ">= 18"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.10",
@@ -76,7 +76,7 @@
"algoliasearch": "^4.20.0",
"autoprefixer": "10.4.16",
"contentlayer": "^0.3.4",
"next": "13.5.6",
"next": "14.0.0",
"postcss": "8.4.31",
"postcss-cli": "^10.1.0",
"postcss-import": "^15.1.0",
+4 -4
View File
@@ -106,9 +106,9 @@
"unist-util-visit": "^4.1.2"
},
"peerDependencies": {
"next": "13.x",
"react": "18.x",
"react-dom": "18.x"
"next": ">= 13",
"react": ">= 18",
"react-dom": ">= 18"
},
"devDependencies": {
"@algolia/client-search": "^4.20.0",
@@ -120,7 +120,7 @@
"@types/react-dom": "18.2.1",
"algoliasearch": "^4.20.0",
"contentlayer": "^0.3.4",
"next": "13.5.6",
"next": "14.0.0",
"unified": "^10.1.2",
"@types/node": "18.17.5"
},
+73 -69
View File
@@ -63,11 +63,11 @@ importers:
specifier: ^2.3.0
version: 2.3.0([email protected])
'@next/env':
specifier: ^13.5.6
version: 13.5.6
specifier: ^14.0.0
version: 14.0.0
'@next/mdx':
specifier: ^13.5.6
version: 13.5.6(@mdx-js/[email protected])(@mdx-js/[email protected])
specifier: ^14.0.0
version: 14.0.0(@mdx-js/[email protected])(@mdx-js/[email protected])
algoliasearch:
specifier: ^4.20.0
version: 4.20.0
@@ -84,8 +84,8 @@ importers:
specifier: ^0.288.0
version: 0.288.0([email protected])
next:
specifier: 13.5.6
version: 13.5.6(@babel/[email protected])([email protected])([email protected])
specifier: 14.0.0
version: 14.0.0(@babel/[email protected])([email protected])([email protected])
next-docs-mdx:
specifier: workspace:*
version: link:../../packages/next-docs-mdx
@@ -97,7 +97,7 @@ importers:
version: link:../../packages/next-docs
next-sitemap:
specifier: ^4.2.3
version: 4.2.3(next@13.5.6)
version: 4.2.3(next@14.0.0)
react:
specifier: 18.2.0
version: 18.2.0
@@ -154,11 +154,11 @@ importers:
specifier: 0.3.4
version: 0.3.4
next:
specifier: 13.5.6
version: 13.5.6(@babel/[email protected])([email protected])([email protected])
specifier: 14.0.0
version: 14.0.0(@babel/[email protected])([email protected])([email protected])
next-contentlayer:
specifier: 0.3.4
version: 0.3.4([email protected])(next@13.5.6)([email protected])([email protected])
version: 0.3.4([email protected])(next@14.0.0)([email protected])([email protected])
next-docs-ui:
specifier: 4.0.0
version: link:../../packages/next-docs-ui
@@ -200,11 +200,11 @@ importers:
specifier: ^2.3.0
version: 2.3.0([email protected])
'@next/mdx':
specifier: ^13.5.6
version: 13.5.6(@mdx-js/[email protected])(@mdx-js/[email protected])
specifier: ^14.0.0
version: 14.0.0(@mdx-js/[email protected])(@mdx-js/[email protected])
next:
specifier: 13.5.6
version: 13.5.6(@babel/[email protected])([email protected])([email protected])
specifier: 14.0.0
version: 14.0.0(@babel/[email protected])([email protected])([email protected])
next-docs-mdx:
specifier: 4.0.0
version: link:../../packages/next-docs-mdx
@@ -240,11 +240,11 @@ importers:
specifier: 0.3.4
version: 0.3.4
next:
specifier: 13.5.6
version: 13.5.6(@babel/[email protected])([email protected])([email protected])
specifier: 14.0.0
version: 14.0.0(@babel/[email protected])([email protected])([email protected])
next-contentlayer:
specifier: 0.3.4
version: 0.3.4([email protected])(next@13.5.6)([email protected])([email protected])
version: 0.3.4([email protected])(next@14.0.0)([email protected])([email protected])
next-docs-ui:
specifier: 4.0.0
version: link:../../packages/next-docs-ui
@@ -299,10 +299,10 @@ importers:
specifier: ^0.6.3
version: 0.6.3
react:
specifier: 18.x
specifier: '>= 18'
version: 18.2.0
react-dom:
specifier: 18.x
specifier: '>= 18'
version: 18.2.0([email protected])
react-remove-scroll:
specifier: ^2.5.6
@@ -366,8 +366,8 @@ importers:
specifier: ^0.3.4
version: 0.3.4
next:
specifier: 13.5.6
version: 13.5.6(@babel/[email protected])([email protected])([email protected])
specifier: 14.0.0
version: 14.0.0(@babel/[email protected])([email protected])([email protected])
unified:
specifier: ^10.1.2
version: 10.1.2
@@ -391,8 +391,8 @@ importers:
version: 3.22.4
devDependencies:
'@next/mdx':
specifier: 13.5.6
version: 13.5.6(@mdx-js/[email protected])(@mdx-js/[email protected])
specifier: 14.0.0
version: 14.0.0(@mdx-js/[email protected])(@mdx-js/[email protected])
'@types/mdast':
specifier: ^3.0.12
version: 3.0.12
@@ -403,8 +403,8 @@ importers:
specifier: 18.2.0
version: 18.2.0
next:
specifier: 13.5.6
version: 13.5.6(@babel/[email protected])([email protected])([email protected])
specifier: 14.0.0
version: 14.0.0(@babel/[email protected])([email protected])([email protected])
next-docs-zeta:
specifier: workspace:*
version: link:../next-docs
@@ -455,12 +455,12 @@ importers:
version: link:../next-docs
next-themes:
specifier: ^0.2.1
version: 0.2.1(next@13.5.6)([email protected])([email protected])
version: 0.2.1(next@14.0.0)([email protected])([email protected])
react:
specifier: 18.x
specifier: '>= 18'
version: 18.2.0
react-dom:
specifier: 18.x
specifier: '>= 18'
version: 18.2.0([email protected])
react-medium-image-zoom:
specifier: ^5.1.8
@@ -488,8 +488,8 @@ importers:
specifier: ^0.3.4
version: 0.3.4
next:
specifier: 13.5.6
version: 13.5.6(@babel/[email protected])([email protected])([email protected])
specifier: 14.0.0
version: 14.0.0(@babel/[email protected])([email protected])([email protected])
postcss:
specifier: 8.4.31
version: 8.4.31
@@ -1631,6 +1631,10 @@ packages:
/@next/[email protected]:
resolution: {integrity: sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw==}
dev: false
/@next/[email protected]:
resolution: {integrity: sha512-cIKhxkfVELB6hFjYsbtEeTus2mwrTC+JissfZYM0n+8Fv+g8ucUfOlm3VEDtwtwydZ0Nuauv3bl0qF82nnCAqA==}
/@next/[email protected]:
resolution: {integrity: sha512-N/O+zGb6wZQdwu6atMZHbR7T9Np5SUFUjZqCbj0sXm+MwQO35M8TazVB4otm87GkXYs2l6OPwARd3/PUWhZBVQ==}
@@ -1638,8 +1642,8 @@ packages:
glob: 7.1.7
dev: true
/@next/mdx@13.5.6(@mdx-js/[email protected])(@mdx-js/[email protected]):
resolution: {integrity: sha512-2AMyCrz1SxSWNUpADyLz3RbPbq0GHrchbO7Msvg7IsH8MrTw3VYaZSI1KNa6JzZIoykwtNVSEL+uBmPZi106Jw==}
/@next/mdx@14.0.0(@mdx-js/[email protected])(@mdx-js/[email protected]):
resolution: {integrity: sha512-pFSJO81fGoK6wVZPa8j/z+DKY5t3shMY2/hajdhxMjITL4nLzUZenuq42j8cLsN/nNJymaUJCA1SjiRb7jNQ1A==}
peerDependencies:
'@mdx-js/loader': '>=0.15.0'
'@mdx-js/react': '>=0.15.0'
@@ -1653,72 +1657,72 @@ packages:
'@mdx-js/react': 2.3.0([email protected])
source-map: 0.7.4
/@next/swc-darwin-arm64@13.5.6:
resolution: {integrity: sha512-5nvXMzKtZfvcu4BhtV0KH1oGv4XEW+B+jOfmBdpFI3C7FrB/MfujRpWYSBBO64+qbW8pkZiSyQv9eiwnn5VIQA==}
/@next/swc-darwin-arm64@14.0.0:
resolution: {integrity: sha512-HQKi159jCz4SRsPesVCiNN6tPSAFUkOuSkpJsqYTIlbHLKr1mD6be/J0TvWV6fwJekj81bZV9V/Tgx3C2HO9lA==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
optional: true
/@next/swc-darwin-x64@13.5.6:
resolution: {integrity: sha512-6cgBfxg98oOCSr4BckWjLLgiVwlL3vlLj8hXg2b+nDgm4bC/qVXXLfpLB9FHdoDu4057hzywbxKvmYGmi7yUzA==}
/@next/swc-darwin-x64@14.0.0:
resolution: {integrity: sha512-4YyQLMSaCgX/kgC1jjF3s3xSoBnwHuDhnF6WA1DWNEYRsbOOPWjcYhv8TKhRe2ApdOam+VfQSffC4ZD+X4u1Cg==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
requiresBuild: true
optional: true
/@next/swc-linux-arm64-gnu@13.5.6:
resolution: {integrity: sha512-txagBbj1e1w47YQjcKgSU4rRVQ7uF29YpnlHV5xuVUsgCUf2FmyfJ3CPjZUvpIeXCJAoMCFAoGnbtX86BK7+sg==}
/@next/swc-linux-arm64-gnu@14.0.0:
resolution: {integrity: sha512-io7fMkJ28Glj7SH8yvnlD6naIhRDnDxeE55CmpQkj3+uaA2Hko6WGY2pT5SzpQLTnGGnviK85cy8EJ2qsETj/g==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
requiresBuild: true
optional: true
/@next/swc-linux-arm64-musl@13.5.6:
resolution: {integrity: sha512-cGd+H8amifT86ZldVJtAKDxUqeFyLWW+v2NlBULnLAdWsiuuN8TuhVBt8ZNpCqcAuoruoSWynvMWixTFcroq+Q==}
/@next/swc-linux-arm64-musl@14.0.0:
resolution: {integrity: sha512-nC2h0l1Jt8LEzyQeSs/BKpXAMe0mnHIMykYALWaeddTqCv5UEN8nGO3BG8JAqW/Y8iutqJsaMe2A9itS0d/r8w==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
requiresBuild: true
optional: true
/@next/swc-linux-x64-gnu@13.5.6:
resolution: {integrity: sha512-Mc2b4xiIWKXIhBy2NBTwOxGD3nHLmq4keFk+d4/WL5fMsB8XdJRdtUlL87SqVCTSaf1BRuQQf1HvXZcy+rq3Nw==}
/@next/swc-linux-x64-gnu@14.0.0:
resolution: {integrity: sha512-Wf+WjXibJQ7hHXOdNOmSMW5bxeJHVf46Pwb3eLSD2L76NrytQlif9NH7JpHuFlYKCQGfKfgSYYre5rIfmnSwQw==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
requiresBuild: true
optional: true
/@next/swc-linux-x64-musl@13.5.6:
resolution: {integrity: sha512-CFHvP9Qz98NruJiUnCe61O6GveKKHpJLloXbDSWRhqhkJdZD2zU5hG+gtVJR//tyW897izuHpM6Gtf6+sNgJPQ==}
/@next/swc-linux-x64-musl@14.0.0:
resolution: {integrity: sha512-WTZb2G7B+CTsdigcJVkRxfcAIQj7Lf0ipPNRJ3vlSadU8f0CFGv/ST+sJwF5eSwIe6dxKoX0DG6OljDBaad+rg==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
requiresBuild: true
optional: true
/@next/swc-win32-arm64-msvc@13.5.6:
resolution: {integrity: sha512-aFv1ejfkbS7PUa1qVPwzDHjQWQtknzAZWGTKYIAaS4NMtBlk3VyA6AYn593pqNanlicewqyl2jUhQAaFV/qXsg==}
/@next/swc-win32-arm64-msvc@14.0.0:
resolution: {integrity: sha512-7R8/x6oQODmNpnWVW00rlWX90sIlwluJwcvMT6GXNIBOvEf01t3fBg0AGURNKdTJg2xNuP7TyLchCL7Lh2DTiw==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
requiresBuild: true
optional: true
/@next/swc-win32-ia32-msvc@13.5.6:
resolution: {integrity: sha512-XqqpHgEIlBHvzwG8sp/JXMFkLAfGLqkbVsyN+/Ih1mR8INb6YCc2x/Mbwi6hsAgUnqQztz8cvEbHJUbSl7RHDg==}
/@next/swc-win32-ia32-msvc@14.0.0:
resolution: {integrity: sha512-RLK1nELvhCnxaWPF07jGU4x3tjbyx2319q43loZELqF0+iJtKutZ+Lk8SVmf/KiJkYBc7Cragadz7hb3uQvz4g==}
engines: {node: '>= 10'}
cpu: [ia32]
os: [win32]
requiresBuild: true
optional: true
/@next/swc-win32-x64-msvc@13.5.6:
resolution: {integrity: sha512-Cqfe1YmOS7k+5mGu92nl5ULkzpKuxJrP3+4AEuPmrpFZ3BHxTY3TnHmU1On3bFmFFs6FbTcdF58CCUProGpIGQ==}
/@next/swc-win32-x64-msvc@14.0.0:
resolution: {integrity: sha512-g6hLf1SUko+hnnaywQQZzzb3BRecQsoKkF3o/C+F+dOA4w/noVAJngUVkfwF0+2/8FzNznM7ofM6TGZO9svn7w==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
@@ -6336,7 +6340,7 @@ packages:
/[email protected]:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
/[email protected]([email protected])(next@13.5.6)([email protected])([email protected]):
/[email protected]([email protected])(next@14.0.0)([email protected])([email protected]):
resolution: {integrity: sha512-UtUCwgAl159KwfhNaOwyiI7Lg6sdioyKMeh+E7jxx0CJ29JuXGxBEYmCI6+72NxFGIFZKx8lvttbbQhbnYWYSw==}
peerDependencies:
contentlayer: 0.3.4
@@ -6347,7 +6351,7 @@ packages:
'@contentlayer/core': 0.3.4
'@contentlayer/utils': 0.3.4
contentlayer: 0.3.4
next: 13.5.6(@babel/[email protected])([email protected])([email protected])
next: 14.0.0(@babel/[email protected])([email protected])([email protected])
react: 18.2.0
react-dom: 18.2.0([email protected])
transitivePeerDependencies:
@@ -6357,7 +6361,7 @@ packages:
- supports-color
dev: false
/[email protected](next@13.5.6):
/[email protected](next@14.0.0):
resolution: {integrity: sha512-vjdCxeDuWDzldhCnyFCQipw5bfpl4HmZA7uoo3GAaYGjGgfL4Cxb1CiztPuWGmS+auYs7/8OekRS8C2cjdAsjQ==}
engines: {node: '>=14.18'}
hasBin: true
@@ -6368,24 +6372,24 @@ packages:
'@next/env': 13.5.6
fast-glob: 3.3.1
minimist: 1.2.8
next: 13.5.6(@babel/[email protected])([email protected])([email protected])
next: 14.0.0(@babel/[email protected])([email protected])([email protected])
dev: false
/[email protected](next@13.5.6)([email protected])([email protected]):
/[email protected](next@14.0.0)([email protected])([email protected]):
resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==}
peerDependencies:
next: '*'
react: '*'
react-dom: '*'
dependencies:
next: 13.5.6(@babel/[email protected])([email protected])([email protected])
next: 14.0.0(@babel/[email protected])([email protected])([email protected])
react: 18.2.0
react-dom: 18.2.0([email protected])
dev: false
/next@13.5.6(@babel/[email protected])([email protected])([email protected]):
resolution: {integrity: sha512-Y2wTcTbO4WwEsVb4A8VSnOsG1I9ok+h74q0ZdxkwM3EODqrs4pasq7O0iUxbcS9VtWMicG7f3+HAj0r1+NtKSw==}
engines: {node: '>=16.14.0'}
/next@14.0.0(@babel/[email protected])([email protected])([email protected]):
resolution: {integrity: sha512-J0jHKBJpB9zd4+c153sair0sz44mbaCHxggs8ryVXSFBuBqJ8XdE9/ozoV85xGh2VnSjahwntBZZgsihL9QznA==}
engines: {node: '>=18.17.0'}
hasBin: true
peerDependencies:
'@opentelemetry/api': ^1.1.0
@@ -6398,7 +6402,7 @@ packages:
sass:
optional: true
dependencies:
'@next/env': 13.5.6
'@next/env': 14.0.0
'@swc/helpers': 0.5.2
busboy: 1.6.0
caniuse-lite: 1.0.30001538
@@ -6408,15 +6412,15 @@ packages:
styled-jsx: 5.1.1(@babel/[email protected])([email protected])
watchpack: 2.4.0
optionalDependencies:
'@next/swc-darwin-arm64': 13.5.6
'@next/swc-darwin-x64': 13.5.6
'@next/swc-linux-arm64-gnu': 13.5.6
'@next/swc-linux-arm64-musl': 13.5.6
'@next/swc-linux-x64-gnu': 13.5.6
'@next/swc-linux-x64-musl': 13.5.6
'@next/swc-win32-arm64-msvc': 13.5.6
'@next/swc-win32-ia32-msvc': 13.5.6
'@next/swc-win32-x64-msvc': 13.5.6
'@next/swc-darwin-arm64': 14.0.0
'@next/swc-darwin-x64': 14.0.0
'@next/swc-linux-arm64-gnu': 14.0.0
'@next/swc-linux-arm64-musl': 14.0.0
'@next/swc-linux-x64-gnu': 14.0.0
'@next/swc-linux-x64-musl': 14.0.0
'@next/swc-win32-arm64-msvc': 14.0.0
'@next/swc-win32-ia32-msvc': 14.0.0
'@next/swc-win32-x64-msvc': 14.0.0
transitivePeerDependencies:
- '@babel/core'
- babel-plugin-macros