chore: deps

This commit is contained in:
iCrawl
2022-12-01 21:01:19 +01:00
parent 40b504a208
commit 52f56d3c2e
21 changed files with 512 additions and 457 deletions

View File

@@ -42,27 +42,27 @@
"react": "^18.2.0",
"react-custom-scrollbars-2": "^4.5.0",
"react-dom": "^18.2.0",
"react-icons": "^4.6.0",
"react-icons": "^4.7.1",
"react-use": "^17.4.0"
},
"devDependencies": {
"@astrojs/image": "^0.11.6",
"@astrojs/image": "^0.12.0",
"@astrojs/mdx": "^0.12.0",
"@astrojs/prefetch": "^0.1.1",
"@astrojs/react": "^1.2.2",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@types/node": "16.18.3",
"@types/node": "16.18.4",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.9",
"@types/react-syntax-highlighter": "^15.5.5",
"@unocss/cli": "^0.46.5",
"@unocss/reset": "^0.46.5",
"@unocss/cli": "^0.47.4",
"@unocss/reset": "^0.47.4",
"@vitejs/plugin-react": "^2.2.0",
"@vitest/coverage-c8": "^0.25.3",
"astro": "^1.6.11",
"astro-compress": "^1.1.12",
"astro-critters": "^1.1.12",
"astro": "^1.6.12",
"astro-compress": "^1.1.15",
"astro-critters": "^1.1.15",
"cross-env": "^7.0.3",
"eslint": "^8.28.0",
"eslint-config-neon": "^0.1.40",
@@ -79,8 +79,8 @@
"sharp": "^0.31.2",
"shiki": "^0.11.1",
"typescript": "^4.9.3",
"unocss": "^0.46.5",
"vercel": "^28.5.6",
"unocss": "^0.47.4",
"vercel": "^28.7.0",
"vitest": "^0.25.3"
},
"engines": {

View File

@@ -54,7 +54,7 @@
"ariakit": "^2.0.0-next.41",
"cmdk": "^0.1.20",
"meilisearch": "^0.30.0",
"next": "^13.0.6-canary.1",
"next": "^13.0.6-canary.3",
"next-mdx-remote": "^4.2.0",
"next-themes": "npm:@wits/next-themes@latest",
"react": "^18.2.0",
@@ -75,12 +75,12 @@
"@next/bundle-analyzer": "^13.0.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@types/node": "16.18.3",
"@types/node": "16.18.4",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.9",
"@types/react-syntax-highlighter": "^15.5.5",
"@unocss/cli": "^0.46.5",
"@unocss/reset": "^0.46.5",
"@unocss/cli": "^0.47.4",
"@unocss/reset": "^0.47.4",
"@vitejs/plugin-react": "^2.2.0",
"@vitest/coverage-c8": "^0.25.3",
"concurrently": "^7.6.0",
@@ -93,8 +93,8 @@
"prettier": "^2.8.0",
"prettier-plugin-tailwindcss": "^0.2.0",
"typescript": "^4.9.3",
"unocss": "^0.46.5",
"vercel": "^28.5.6",
"unocss": "^0.47.4",
"vercel": "^28.7.0",
"vitest": "^0.25.3"
},
"engines": {

View File

@@ -54,12 +54,16 @@ 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);
for (const version of versions) {
const res = await fetch(`https://docs.discordjs.dev/docs/${packageName}/${version}.api.json`);
const res = await fetch(`https://docs.discordjs.dev/docs/${packageName}/${version}.api.json`, {
next: { revalidate: 3_600 },
});
data = [...data, await res.json()];
}
}