build: pnpm (#9806)

This commit is contained in:
Noel
2023-08-27 20:24:03 +02:00
committed by GitHub
parent 8325fa6540
commit e96a8a977f
82 changed files with 24444 additions and 28614 deletions

View File

@@ -3,6 +3,10 @@ import { NextResponse, type NextRequest } from 'next/server';
import { PACKAGES } from './util/constants';
async function fetchLatestVersion(packageName: string) {
if (process.env.NEXT_PUBLIC_LOCAL_DEV || process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview') {
return 'main';
}
const res = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`, { cache: 'no-store' });
const data: string[] = await res.json();