fix(website): downgrade nextjs

This commit is contained in:
iCrawl 2023-04-07 20:10:20 +02:00
parent 9aafdd6214
commit f195556b64
No known key found for this signature in database
GPG key ID: 1AB888B16355FBB2
3 changed files with 27 additions and 24 deletions

View file

@ -60,7 +60,7 @@
"bright": "^0.7.1",
"cmdk": "^0.2.0",
"meilisearch": "^0.32.2",
"next": "^13.3.0",
"next": "^13.2.5-canary.34",
"next-mdx-remote": "^4.4.1",
"next-themes": "^0.2.1",
"react": "^18.2.0",
@ -71,6 +71,7 @@
"rehype-raw": "^6.1.1",
"rehype-slug": "^5.1.0",
"remark-gfm": "^3.0.1",
"server-only": "^0.0.1",
"sharp": "^0.32.0",
"swr": "^2.1.2"
},

View file

@ -1,7 +1,8 @@
import 'server-only';
import { readFile } from 'node:fs/promises';
import { join } from 'node:path';
import { connect } from '@planetscale/database';
import { cache } from 'react';
const sql = connect({ url: process.env.DATABASE_URL! });
@ -13,7 +14,7 @@ export async function fetchVersions(packageName: string): Promise<string[]> {
return response.json();
}
export const fetchModelJSON = cache(async (packageName: string, version: string): Promise<unknown> => {
export async function fetchModelJSON(packageName: string, version: string): Promise<unknown> {
if (process.env.NEXT_PUBLIC_LOCAL_DEV) {
const res = await readFile(
join(process.cwd(), '..', '..', 'packages', packageName, 'docs', 'docs.api.json'),
@ -35,4 +36,4 @@ export const fetchModelJSON = cache(async (packageName: string, version: string)
// @ts-expect-error: https://github.com/planetscale/database-js/issues/71
return rows[0].data;
});
}

View file

@ -132,9 +132,9 @@ __metadata:
linkType: hard
"@astrojs/compiler@npm:^1.0.0, @astrojs/compiler@npm:^1.0.1":
version: 1.3.0
resolution: "@astrojs/compiler@npm:1.3.0"
checksum: d2eb523499289c567d2197b4d6b3106cab3449627dfd0017652cbf3829c73684bd5db8a2c011a3a96f058be3fdfbed2a46d23b6f04aece62b77808f6ee752e06
version: 1.3.1
resolution: "@astrojs/compiler@npm:1.3.1"
checksum: fcf0df0729f20656f7a504c14ca85e06c0ab26a236c3d76d6f1b7835372c996f796da1cb5b8942d6b9bc7ae8e570d4e3500d354ceabe7e6041243d8b9f6b9c07
languageName: node
linkType: hard
@ -2382,7 +2382,7 @@ __metadata:
happy-dom: ^9.1.7
lighthouse: ^10.1.0
meilisearch: ^0.32.2
next: ^13.3.0
next: ^13.2.5-canary.34
next-mdx-remote: ^4.4.1
next-themes: ^0.2.1
prettier: ^2.8.7
@ -2395,6 +2395,7 @@ __metadata:
rehype-raw: ^6.1.1
rehype-slug: ^5.1.0
remark-gfm: ^3.0.1
server-only: ^0.0.1
sharp: ^0.32.0
swr: ^2.1.2
typescript: ^5.0.3
@ -9715,9 +9716,9 @@ __metadata:
linkType: hard
"electron-to-chromium@npm:^1.4.284":
version: 1.4.355
resolution: "electron-to-chromium@npm:1.4.355"
checksum: b3fb9df3364d6e677df0a9ae9f470fae494131d85cbba57c3d58e0619208a8b4954aea834a0c6163d63248bc86f36bb0dc7b93508b8c1ae1f2d4eb9fe6fe2c00
version: 1.4.356
resolution: "electron-to-chromium@npm:1.4.356"
checksum: 5a61003c574f5fb6d32dcfc0ae2220a45a6a395ccadd9495c8227e9c33f36ea97cb34aa925c2b039d17dfea5a8040825026db2df01a352d2d1c0037f53dbeebb
languageName: node
linkType: hard
@ -12448,8 +12449,8 @@ __metadata:
linkType: hard
"happy-dom@npm:^9.1.7":
version: 9.1.7
resolution: "happy-dom@npm:9.1.7"
version: 9.1.9
resolution: "happy-dom@npm:9.1.9"
dependencies:
css.escape: ^1.5.1
he: ^1.2.0
@ -12457,7 +12458,7 @@ __metadata:
webidl-conversions: ^7.0.0
whatwg-encoding: ^2.0.0
whatwg-mimetype: ^3.0.0
checksum: ebe37a6d4b43e0cbd4add70f4394e19f8fb7d494b1089368811deac9a19bddf9c3feb4d79c10efb44c7a816fca9caf7e8cddcd86123815172e2e409fbb8a7e54
checksum: 2a2542a9962e9b67870b2b2bc22e6de7193cc7076e5d4f7d85404bc86bc09d1035999e52515a4bfb92272bbdeffcdb762d331176f44c527db7c30faa58f900d6
languageName: node
linkType: hard
@ -14908,8 +14909,8 @@ __metadata:
linkType: hard
"lint-staged@npm:^13.2.0":
version: 13.2.0
resolution: "lint-staged@npm:13.2.0"
version: 13.2.1
resolution: "lint-staged@npm:13.2.1"
dependencies:
chalk: 5.2.0
cli-truncate: ^3.1.0
@ -14926,7 +14927,7 @@ __metadata:
yaml: ^2.2.1
bin:
lint-staged: bin/lint-staged.js
checksum: dcaa8fbbde567eb8ac27230a18b3a22f30c278c524c0e27cf7d4110d662d5d33ed68a585a2e1b05075ef1c262e853f557a5ae046188b723603246d63e6b9f07b
checksum: 5788d3fe38e69b7f7b7f700284d4e10738978a0916bc77d3f6253c43a030fc4f01f89c09da349fb658f929f3393d8b1e3eaabaac5b604416ebc33476640b51ce
languageName: node
linkType: hard
@ -16880,7 +16881,7 @@ __metadata:
languageName: node
linkType: hard
"next@npm:^13.3.0":
"next@npm:^13.2.5-canary.34, next@npm:^13.3.0":
version: 13.3.0
resolution: "next@npm:13.3.0"
dependencies:
@ -21913,12 +21914,12 @@ __metadata:
linkType: hard
"typescript@npm:^4.6.4 || ^5.0.0, typescript@npm:^5.0.3":
version: 5.0.3
resolution: "typescript@npm:5.0.3"
version: 5.0.4
resolution: "typescript@npm:5.0.4"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 3cce0576d218cb4277ff8b6adfef1a706e9114a98b4261a38ad658a7642f1b274a8396394f6cbff8c0ba852996d7ed2e233e9b8431d5d55ac7c2f6fea645af02
checksum: 82b94da3f4604a8946da585f7d6c3025fff8410779e5bde2855ab130d05e4fd08938b9e593b6ebed165bda6ad9292b230984f10952cf82f0a0ca07bbeaa08172
languageName: node
linkType: hard
@ -21963,12 +21964,12 @@ __metadata:
linkType: hard
"typescript@patch:typescript@^4.6.4 || ^5.0.0#~builtin<compat/typescript>, typescript@patch:typescript@^5.0.3#~builtin<compat/typescript>":
version: 5.0.3
resolution: "typescript@patch:typescript@npm%3A5.0.3#~builtin<compat/typescript>::version=5.0.3&hash=85af82"
version: 5.0.4
resolution: "typescript@patch:typescript@npm%3A5.0.4#~builtin<compat/typescript>::version=5.0.4&hash=85af82"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 5580367025ff7ee1f2a61e5affdbddccfe6e893bc662aa33fefdbf12de7e493173fa7d47475e9e15121828691004c4ed13bcd115e57866baed97b54c60954e1c
checksum: bb309d320c59a26565fb3793dba550576ab861018ff3fd1b7fccabbe46ae4a35546bc45f342c0a0b6f265c801ccdf64ffd68f548f117ceb7f0eac4b805cd52a9
languageName: node
linkType: hard