diff --git a/apps/website/package.json b/apps/website/package.json index fb193243d..ee4dbbd24 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -54,7 +54,7 @@ "ariakit": "^2.0.0-next.41", "cmdk": "^0.1.20", "meilisearch": "^0.30.0", - "next": "^13.0.6", + "next": "^13.0.7-canary.1", "next-mdx-remote": "^4.2.0", "next-themes": "npm:@wits/next-themes@latest", "react": "^18.2.0", diff --git a/apps/website/src/app/docs/packages/[package]/[...slug]/page.tsx b/apps/website/src/app/docs/packages/[package]/[...slug]/page.tsx index 8333623db..800bb507b 100644 --- a/apps/website/src/app/docs/packages/[package]/[...slug]/page.tsx +++ b/apps/website/src/app/docs/packages/[package]/[...slug]/page.tsx @@ -54,7 +54,9 @@ export async function generateStaticParams({ params }: { params?: { package: str const res = await readFile(join(cwd(), '..', '..', 'packages', packageName, 'docs', 'docs.api.json'), 'utf8'); data = JSON.parse(res); } else { - const response = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`); + const response = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`, { + next: { revalidate: 3_600 }, + }); versions = await response.json(); versions = versions.slice(-2); diff --git a/apps/website/src/app/docs/packages/[package]/page.tsx b/apps/website/src/app/docs/packages/[package]/page.tsx index 7199ac76f..256523e4f 100644 --- a/apps/website/src/app/docs/packages/[package]/page.tsx +++ b/apps/website/src/app/docs/packages/[package]/page.tsx @@ -10,7 +10,7 @@ async function getData(pkg: string) { notFound(); } - const res = await fetch(`https://docs.discordjs.dev/api/info?package=${pkg}`); + const res = await fetch(`https://docs.discordjs.dev/api/info?package=${pkg}`, { next: { revalidate: 3_600 } }); const data: string[] = await res.json(); if (!data.length) { diff --git a/apps/website/src/app/docs/packages/page.tsx b/apps/website/src/app/docs/packages/page.tsx index c7a8ce537..aeabd0d7c 100644 --- a/apps/website/src/app/docs/packages/page.tsx +++ b/apps/website/src/app/docs/packages/page.tsx @@ -8,7 +8,9 @@ import { PACKAGES } from '~/util/constants'; async function getData() { return Promise.all( PACKAGES.map(async (pkg) => { - const response = await fetch(`https://docs.discordjs.dev/api/info?package=${pkg}`); + const response = await fetch(`https://docs.discordjs.dev/api/info?package=${pkg}`, { + next: { revalidate: 3_600 }, + }); const versions = await response.json(); const latestVersion = versions.at(-2) ?? 'main'; return { packageName: pkg, version: latestVersion }; diff --git a/yarn.lock b/yarn.lock index b0bd93fe2..7e4147190 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2438,7 +2438,7 @@ __metadata: eslint-formatter-pretty: ^4.1.0 happy-dom: ^7.7.0 meilisearch: ^0.30.0 - next: ^13.0.6 + next: ^13.0.7-canary.1 next-mdx-remote: ^4.2.0 next-themes: "npm:@wits/next-themes@latest" prettier: ^2.8.0 @@ -3298,10 +3298,10 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:13.0.6": - version: 13.0.6 - resolution: "@next/env@npm:13.0.6" - checksum: 89ca41c63d720128164ec19eb0a8cf95ad7dbfdc4bc153e027eb0e95a774c5e19563c5649ae2d06304ddfee70c0aec94e2a8e7c72e9172a41560c492db1e13bd +"@next/env@npm:13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "@next/env@npm:13.0.7-canary.1" + checksum: 5c0bc1dfad713a57ed3694b2ef41f0ffc0afb36bb40123327439f99e8cb4ff39174ab06eba4b113f7342f6327637394c3672e7589139c9bff13eaef033206968 languageName: node linkType: hard @@ -3314,93 +3314,93 @@ __metadata: languageName: node linkType: hard -"@next/swc-android-arm-eabi@npm:13.0.6": - version: 13.0.6 - resolution: "@next/swc-android-arm-eabi@npm:13.0.6" +"@next/swc-android-arm-eabi@npm:13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "@next/swc-android-arm-eabi@npm:13.0.7-canary.1" conditions: os=android & cpu=arm languageName: node linkType: hard -"@next/swc-android-arm64@npm:13.0.6": - version: 13.0.6 - resolution: "@next/swc-android-arm64@npm:13.0.6" +"@next/swc-android-arm64@npm:13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "@next/swc-android-arm64@npm:13.0.7-canary.1" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:13.0.6": - version: 13.0.6 - resolution: "@next/swc-darwin-arm64@npm:13.0.6" +"@next/swc-darwin-arm64@npm:13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "@next/swc-darwin-arm64@npm:13.0.7-canary.1" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-x64@npm:13.0.6": - version: 13.0.6 - resolution: "@next/swc-darwin-x64@npm:13.0.6" +"@next/swc-darwin-x64@npm:13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "@next/swc-darwin-x64@npm:13.0.7-canary.1" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@next/swc-freebsd-x64@npm:13.0.6": - version: 13.0.6 - resolution: "@next/swc-freebsd-x64@npm:13.0.6" +"@next/swc-freebsd-x64@npm:13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "@next/swc-freebsd-x64@npm:13.0.7-canary.1" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@next/swc-linux-arm-gnueabihf@npm:13.0.6": - version: 13.0.6 - resolution: "@next/swc-linux-arm-gnueabihf@npm:13.0.6" +"@next/swc-linux-arm-gnueabihf@npm:13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "@next/swc-linux-arm-gnueabihf@npm:13.0.7-canary.1" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:13.0.6": - version: 13.0.6 - resolution: "@next/swc-linux-arm64-gnu@npm:13.0.6" +"@next/swc-linux-arm64-gnu@npm:13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "@next/swc-linux-arm64-gnu@npm:13.0.7-canary.1" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:13.0.6": - version: 13.0.6 - resolution: "@next/swc-linux-arm64-musl@npm:13.0.6" +"@next/swc-linux-arm64-musl@npm:13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "@next/swc-linux-arm64-musl@npm:13.0.7-canary.1" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:13.0.6": - version: 13.0.6 - resolution: "@next/swc-linux-x64-gnu@npm:13.0.6" +"@next/swc-linux-x64-gnu@npm:13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "@next/swc-linux-x64-gnu@npm:13.0.7-canary.1" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:13.0.6": - version: 13.0.6 - resolution: "@next/swc-linux-x64-musl@npm:13.0.6" +"@next/swc-linux-x64-musl@npm:13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "@next/swc-linux-x64-musl@npm:13.0.7-canary.1" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:13.0.6": - version: 13.0.6 - resolution: "@next/swc-win32-arm64-msvc@npm:13.0.6" +"@next/swc-win32-arm64-msvc@npm:13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "@next/swc-win32-arm64-msvc@npm:13.0.7-canary.1" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:13.0.6": - version: 13.0.6 - resolution: "@next/swc-win32-ia32-msvc@npm:13.0.6" +"@next/swc-win32-ia32-msvc@npm:13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "@next/swc-win32-ia32-msvc@npm:13.0.7-canary.1" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:13.0.6": - version: 13.0.6 - resolution: "@next/swc-win32-x64-msvc@npm:13.0.6" +"@next/swc-win32-x64-msvc@npm:13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "@next/swc-win32-x64-msvc@npm:13.0.7-canary.1" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -15640,24 +15640,24 @@ __metadata: languageName: node linkType: hard -"next@npm:^13.0.6": - version: 13.0.6 - resolution: "next@npm:13.0.6" +"next@npm:^13.0.7-canary.1": + version: 13.0.7-canary.1 + resolution: "next@npm:13.0.7-canary.1" dependencies: - "@next/env": 13.0.6 - "@next/swc-android-arm-eabi": 13.0.6 - "@next/swc-android-arm64": 13.0.6 - "@next/swc-darwin-arm64": 13.0.6 - "@next/swc-darwin-x64": 13.0.6 - "@next/swc-freebsd-x64": 13.0.6 - "@next/swc-linux-arm-gnueabihf": 13.0.6 - "@next/swc-linux-arm64-gnu": 13.0.6 - "@next/swc-linux-arm64-musl": 13.0.6 - "@next/swc-linux-x64-gnu": 13.0.6 - "@next/swc-linux-x64-musl": 13.0.6 - "@next/swc-win32-arm64-msvc": 13.0.6 - "@next/swc-win32-ia32-msvc": 13.0.6 - "@next/swc-win32-x64-msvc": 13.0.6 + "@next/env": 13.0.7-canary.1 + "@next/swc-android-arm-eabi": 13.0.7-canary.1 + "@next/swc-android-arm64": 13.0.7-canary.1 + "@next/swc-darwin-arm64": 13.0.7-canary.1 + "@next/swc-darwin-x64": 13.0.7-canary.1 + "@next/swc-freebsd-x64": 13.0.7-canary.1 + "@next/swc-linux-arm-gnueabihf": 13.0.7-canary.1 + "@next/swc-linux-arm64-gnu": 13.0.7-canary.1 + "@next/swc-linux-arm64-musl": 13.0.7-canary.1 + "@next/swc-linux-x64-gnu": 13.0.7-canary.1 + "@next/swc-linux-x64-musl": 13.0.7-canary.1 + "@next/swc-win32-arm64-msvc": 13.0.7-canary.1 + "@next/swc-win32-ia32-msvc": 13.0.7-canary.1 + "@next/swc-win32-x64-msvc": 13.0.7-canary.1 "@swc/helpers": 0.4.14 caniuse-lite: ^1.0.30001406 postcss: 8.4.14 @@ -15704,7 +15704,7 @@ __metadata: optional: true bin: next: dist/bin/next - checksum: 2de1d9975f90ba67b4fb0ca6ec16d91eff3f7e05cea218cf2abb214c28cf8969b4fa7e81df23fe2025bceda676dda2db90e873f0909b17df1d395f6a275a2715 + checksum: 03e6b1462c8e32e745716705cdf1d3ac1f85345ba0373a7fd58f9a4d638d95a757f651e9a42b3c29006fa15306149df4b35aa444f77aef53306e8ad6f778eaa8 languageName: node linkType: hard