mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 08:03:30 +01:00
chore: update deps & search indice action refactor (#11339)
* chore: update deps & search indice action refactor - Updated pnpm, dependencies and regenerated the lockfile - Removed immer and some eslint plugins that weren't being used - Updated the version of `@types/node` to v24 on internal packages as that's the version that is being used on github actions - Refactored the uploadSearchIndices action slightly and upgraded the meilisearch dependency * chore: remove more deps
This commit is contained in:
@@ -49,50 +49,33 @@
|
|||||||
"funding": "https://github.com/discordjs/discord.js?sponsor",
|
"funding": "https://github.com/discordjs/discord.js?sponsor",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@opennextjs/cloudflare": "^1.14.4",
|
"@opennextjs/cloudflare": "^1.14.4",
|
||||||
"@react-icons/all-files": "^4.1.0",
|
|
||||||
"@vercel/analytics": "^1.6.1",
|
"@vercel/analytics": "^1.6.1",
|
||||||
"cmdk": "^1.1.1",
|
|
||||||
"cva": "1.0.0-beta.3",
|
|
||||||
"fumadocs-core": "^16.2.3",
|
"fumadocs-core": "^16.2.3",
|
||||||
"fumadocs-mdx": "^14.1.0",
|
"fumadocs-mdx": "^14.1.0",
|
||||||
"fumadocs-twoslash": "^3.1.10",
|
"fumadocs-twoslash": "^3.1.10",
|
||||||
"fumadocs-ui": "^16.2.3",
|
"fumadocs-ui": "^16.2.3",
|
||||||
"geist": "^1.5.1",
|
"geist": "^1.5.1",
|
||||||
"immer": "^10.2.0",
|
"lucide-react": "^0.556.0",
|
||||||
"jotai": "^2.15.2",
|
|
||||||
"jotai-immer": "^0.4.1",
|
|
||||||
"lucide-react": "^0.548.0",
|
|
||||||
"mermaid": "^11.12.2",
|
"mermaid": "^11.12.2",
|
||||||
"motion": "^12.23.25",
|
|
||||||
"next": "^16.0.7",
|
"next": "^16.0.7",
|
||||||
"next-mdx-remote-client": "^2.1.7",
|
|
||||||
"next-themes": "^0.4.6",
|
"next-themes": "^0.4.6",
|
||||||
"nuqs": "^2.8.3",
|
|
||||||
"p-retry": "^7.1.0",
|
"p-retry": "^7.1.0",
|
||||||
"react": "^19.2.1",
|
"react": "^19.2.1",
|
||||||
"react-aria": "^3.44.0",
|
|
||||||
"react-aria-components": "^1.13.0",
|
|
||||||
"react-dom": "^19.2.1",
|
"react-dom": "^19.2.1",
|
||||||
"react-error-boundary": "^6.0.0",
|
|
||||||
"safe-mdx": "^1.3.9",
|
|
||||||
"sharp": "^0.34.5",
|
"sharp": "^0.34.5",
|
||||||
"tailwind-merge": "^3.4.0",
|
"tailwind-merge": "^3.4.0",
|
||||||
"tw-animate-css": "^1.4.0",
|
"tw-animate-css": "^1.4.0",
|
||||||
"twoslash": "^0.3.4",
|
"twoslash": "^0.3.4"
|
||||||
"usehooks-ts": "^3.1.1"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@next/env": "^16.0.7",
|
|
||||||
"@shikijs/rehype": "^3.19.0",
|
"@shikijs/rehype": "^3.19.0",
|
||||||
"@tailwindcss/postcss": "^4.1.17",
|
"@tailwindcss/postcss": "^4.1.17",
|
||||||
"@tailwindcss/typography": "^0.5.19",
|
|
||||||
"@tailwindcss/vite": "^4.1.17",
|
|
||||||
"@types/mdx": "^2.0.13",
|
"@types/mdx": "^2.0.13",
|
||||||
"@types/node": "^24.10.1",
|
"@types/node": "^24.10.1",
|
||||||
"@types/react": "^19.2.7",
|
"@types/react": "^19.2.7",
|
||||||
"@types/react-dom": "^19.2.3",
|
"@types/react-dom": "^19.2.3",
|
||||||
"autoprefixer": "^10.4.22",
|
"autoprefixer": "^10.4.22",
|
||||||
"babel-plugin-react-compiler": "19.1.0-rc.3",
|
"babel-plugin-react-compiler": "^1.0.0",
|
||||||
"cpy-cli": "^6.0.0",
|
"cpy-cli": "^6.0.0",
|
||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
"eslint": "^9.39.1",
|
"eslint": "^9.39.1",
|
||||||
@@ -106,10 +89,9 @@
|
|||||||
"remark-rehype": "^11.1.2",
|
"remark-rehype": "^11.1.2",
|
||||||
"shiki": "^3.19.0",
|
"shiki": "^3.19.0",
|
||||||
"tailwindcss": "^4.1.17",
|
"tailwindcss": "^4.1.17",
|
||||||
"tailwindcss-react-aria-components": "^2.0.1",
|
|
||||||
"turbo": "^2.6.3",
|
"turbo": "^2.6.3",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "~5.9.3",
|
||||||
"vercel": "^48.12.1",
|
"vercel": "^49.1.2",
|
||||||
"wrangler": "^4.53.0"
|
"wrangler": "^4.53.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -56,20 +56,15 @@
|
|||||||
"@react-icons/all-files": "^4.1.0",
|
"@react-icons/all-files": "^4.1.0",
|
||||||
"@tanstack/react-query": "^5.90.12",
|
"@tanstack/react-query": "^5.90.12",
|
||||||
"@vercel/analytics": "^1.6.1",
|
"@vercel/analytics": "^1.6.1",
|
||||||
"@vercel/edge-config": "^1.4.3",
|
|
||||||
"@vercel/postgres": "^0.10.0",
|
"@vercel/postgres": "^0.10.0",
|
||||||
"cloudflare": "^5.2.0",
|
"cloudflare": "^5.2.0",
|
||||||
"cmdk": "^1.1.1",
|
"cmdk": "^1.1.1",
|
||||||
"cva": "1.0.0-beta.3",
|
"cva": "1.0.0-beta.3",
|
||||||
"geist": "^1.5.1",
|
"geist": "^1.5.1",
|
||||||
"immer": "^10.2.0",
|
|
||||||
"jotai": "^2.15.2",
|
"jotai": "^2.15.2",
|
||||||
"jotai-immer": "^0.4.1",
|
"lucide-react": "^0.556.0",
|
||||||
"lucide-react": "^0.548.0",
|
"meilisearch": "^0.54.0",
|
||||||
"meilisearch": "^0.53.0",
|
|
||||||
"motion": "^12.23.25",
|
|
||||||
"next": "^16.0.7",
|
"next": "^16.0.7",
|
||||||
"next-mdx-remote-client": "^2.1.7",
|
|
||||||
"next-themes": "^0.4.6",
|
"next-themes": "^0.4.6",
|
||||||
"nuqs": "^2.8.3",
|
"nuqs": "^2.8.3",
|
||||||
"overlayscrollbars": "^2.13.0",
|
"overlayscrollbars": "^2.13.0",
|
||||||
@@ -78,7 +73,6 @@
|
|||||||
"react-aria": "^3.44.0",
|
"react-aria": "^3.44.0",
|
||||||
"react-aria-components": "^1.13.0",
|
"react-aria-components": "^1.13.0",
|
||||||
"react-dom": "^19.2.1",
|
"react-dom": "^19.2.1",
|
||||||
"react-error-boundary": "^6.0.0",
|
|
||||||
"safe-mdx": "^1.3.9",
|
"safe-mdx": "^1.3.9",
|
||||||
"sharp": "^0.34.5",
|
"sharp": "^0.34.5",
|
||||||
"tailwind-merge": "^3.4.0",
|
"tailwind-merge": "^3.4.0",
|
||||||
@@ -86,16 +80,14 @@
|
|||||||
"usehooks-ts": "^3.1.1"
|
"usehooks-ts": "^3.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@next/env": "^16.0.7",
|
|
||||||
"@shikijs/rehype": "^3.19.0",
|
"@shikijs/rehype": "^3.19.0",
|
||||||
"@tailwindcss/postcss": "^4.1.17",
|
"@tailwindcss/postcss": "^4.1.17",
|
||||||
"@tailwindcss/typography": "^0.5.19",
|
"@tailwindcss/typography": "^0.5.19",
|
||||||
"@tailwindcss/vite": "^4.1.17",
|
|
||||||
"@types/node": "^24.10.1",
|
"@types/node": "^24.10.1",
|
||||||
"@types/react": "^19.2.7",
|
"@types/react": "^19.2.7",
|
||||||
"@types/react-dom": "^19.2.3",
|
"@types/react-dom": "^19.2.3",
|
||||||
"autoprefixer": "^10.4.22",
|
"autoprefixer": "^10.4.22",
|
||||||
"babel-plugin-react-compiler": "19.1.0-rc.3",
|
"babel-plugin-react-compiler": "^1.0.0",
|
||||||
"cpy-cli": "^6.0.0",
|
"cpy-cli": "^6.0.0",
|
||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
"eslint": "^9.39.1",
|
"eslint": "^9.39.1",
|
||||||
@@ -111,8 +103,8 @@
|
|||||||
"tailwindcss": "^4.1.17",
|
"tailwindcss": "^4.1.17",
|
||||||
"tailwindcss-react-aria-components": "^2.0.1",
|
"tailwindcss-react-aria-components": "^2.0.1",
|
||||||
"turbo": "^2.6.3",
|
"turbo": "^2.6.3",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "~5.9.3",
|
||||||
"vercel": "^48.12.1",
|
"vercel": "^49.1.2",
|
||||||
"wrangler": "^4.53.0"
|
"wrangler": "^4.53.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -71,13 +71,13 @@
|
|||||||
"tsup": "^8.5.1",
|
"tsup": "^8.5.1",
|
||||||
"turbo": "^2.6.3",
|
"turbo": "^2.6.3",
|
||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
"typescript-eslint": "^8.48.1",
|
"typescript-eslint": "^8.49.0",
|
||||||
"unocss": "^66.5.10",
|
"unocss": "^66.5.10",
|
||||||
"vercel": "^48.12.1",
|
"vercel": "^49.1.2",
|
||||||
"vitest": "^4.0.15"
|
"vitest": "^4.0.15"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22.12.0"
|
"node": ">=22.12.0"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.24.0"
|
"packageManager": "pnpm@10.25.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
"@discordjs/scripts": "workspace:^",
|
"@discordjs/scripts": "workspace:^",
|
||||||
"cloudflare": "^5.2.0",
|
"cloudflare": "^5.2.0",
|
||||||
"commander": "^14.0.2",
|
"commander": "^14.0.2",
|
||||||
"meilisearch": "^0.38.0",
|
"meilisearch": "^0.54.0",
|
||||||
"p-limit": "^7.2.0",
|
"p-limit": "^7.2.0",
|
||||||
"p-queue": "^9.0.1",
|
"p-queue": "^9.0.1",
|
||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
@@ -56,8 +56,8 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@npm/types": "^2.1.0",
|
"@npm/types": "^2.1.0",
|
||||||
"@types/bun": "^1.3.3",
|
"@types/bun": "^1.3.4",
|
||||||
"@types/node": "^22.19.1",
|
"@types/node": "^24.10.1",
|
||||||
"@vitest/coverage-v8": "^4.0.15",
|
"@vitest/coverage-v8": "^4.0.15",
|
||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
"eslint": "^9.39.1",
|
"eslint": "^9.39.1",
|
||||||
|
|||||||
@@ -2,33 +2,35 @@ import process from 'node:process';
|
|||||||
import { setFailed } from '@actions/core';
|
import { setFailed } from '@actions/core';
|
||||||
import { generateAllIndices } from '@discordjs/scripts';
|
import { generateAllIndices } from '@discordjs/scripts';
|
||||||
import Cloudflare from 'cloudflare';
|
import Cloudflare from 'cloudflare';
|
||||||
import { MeiliSearch } from 'meilisearch';
|
import { type EnqueuedTask, MeiliSearch } from 'meilisearch';
|
||||||
import pLimit from 'p-limit';
|
import pLimit from 'p-limit';
|
||||||
import { fetch } from 'undici';
|
import { fetch } from 'undici';
|
||||||
|
|
||||||
if (!(process.env.CF_D1_DOCS_API_KEY && process.env.CF_D1_DOCS_ID && process.env.CF_ACCOUNT_ID)) {
|
if (!process.env.CF_D1_DOCS_API_KEY || !process.env.CF_D1_DOCS_ID || !process.env.CF_ACCOUNT_ID) {
|
||||||
setFailed('Missing Cloudflare D1 environment variables.');
|
setFailed('Missing Cloudflare D1 environment variables.');
|
||||||
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!process.env.SEARCH_API_URL) {
|
if (!process.env.SEARCH_API_URL) {
|
||||||
setFailed('SEARCH_API_URL is not set');
|
setFailed('SEARCH_API_URL is not set');
|
||||||
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!process.env.SEARCH_API_KEY) {
|
if (!process.env.SEARCH_API_KEY) {
|
||||||
setFailed('SEARCH_API_KEY is not set');
|
setFailed('SEARCH_API_KEY is not set');
|
||||||
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const cf = new Cloudflare({
|
const cf = new Cloudflare({
|
||||||
apiToken: process.env.CF_D1_DOCS_API_KEY!,
|
apiToken: process.env.CF_D1_DOCS_API_KEY,
|
||||||
});
|
});
|
||||||
|
|
||||||
const client = new MeiliSearch({
|
const client = new MeiliSearch({
|
||||||
host: process.env.SEARCH_API_URL!,
|
host: process.env.SEARCH_API_URL,
|
||||||
apiKey: process.env.SEARCH_API_KEY!,
|
apiKey: process.env.SEARCH_API_KEY,
|
||||||
});
|
});
|
||||||
|
|
||||||
const limit = pLimit(10);
|
const limit = pLimit(10);
|
||||||
let promises: Promise<any>[] = [];
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log('Generating all indices...');
|
console.log('Generating all indices...');
|
||||||
@@ -62,35 +64,31 @@ try {
|
|||||||
|
|
||||||
console.log('Uploading indices...');
|
console.log('Uploading indices...');
|
||||||
|
|
||||||
try {
|
const promises = indices.map(async (index) =>
|
||||||
promises = indices.map(async (index) =>
|
limit(async () => {
|
||||||
limit(async () => {
|
console.log(`Uploading ${index.index}...`);
|
||||||
console.log(`Uploading ${index.index}...`);
|
let task: EnqueuedTask | undefined;
|
||||||
let task;
|
try {
|
||||||
try {
|
task = await client.createIndex(index.index);
|
||||||
task = await client.createIndex(index.index);
|
} catch {}
|
||||||
} catch {}
|
|
||||||
|
|
||||||
if (task) {
|
if (task) {
|
||||||
await client.waitForTask(task.taskUid);
|
await client.tasks.waitForTask(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
const searchIndex = client.index(index.index);
|
const searchIndex = client.index(index.index);
|
||||||
await searchIndex.updateSettings({ sortableAttributes: ['type'] });
|
await searchIndex.updateSettings({ sortableAttributes: ['type'] });
|
||||||
|
|
||||||
await searchIndex.addDocuments(index.data);
|
await searchIndex.addDocuments(index.data);
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
} catch {}
|
|
||||||
|
await Promise.all(promises);
|
||||||
|
|
||||||
console.log('Uploaded all indices.');
|
console.log('Uploaded all indices.');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const err = error as Error;
|
const err = error as Error;
|
||||||
|
console.error(err);
|
||||||
setFailed(err.message);
|
setFailed(err.message);
|
||||||
}
|
process.exit(1);
|
||||||
|
|
||||||
try {
|
|
||||||
await Promise.all(promises);
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
"@rushstack/node-core-library": "5.13.1"
|
"@rushstack/node-core-library": "5.13.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^22.19.1",
|
"@types/node": "^24.10.1",
|
||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
"eslint": "^9.39.1",
|
"eslint": "^9.39.1",
|
||||||
"eslint-config-neon": "^0.2.9",
|
"eslint-config-neon": "^0.2.9",
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
"@microsoft/tsdoc": "~0.15.1"
|
"@microsoft/tsdoc": "~0.15.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^22.19.1",
|
"@types/node": "^24.10.1",
|
||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
"eslint": "^9.39.1",
|
"eslint": "^9.39.1",
|
||||||
"eslint-config-neon": "^0.2.9",
|
"eslint-config-neon": "^0.2.9",
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/lodash": "^4.17.21",
|
"@types/lodash": "^4.17.21",
|
||||||
"@types/node": "^22.19.1",
|
"@types/node": "^24.10.1",
|
||||||
"@types/resolve": "^1.20.6",
|
"@types/resolve": "^1.20.6",
|
||||||
"@types/semver": "^7.7.1",
|
"@types/semver": "^7.7.1",
|
||||||
"cpy-cli": "^6.0.0",
|
"cpy-cli": "^6.0.0",
|
||||||
|
|||||||
@@ -92,8 +92,6 @@
|
|||||||
"eslint-config-neon": "^0.2.9",
|
"eslint-config-neon": "^0.2.9",
|
||||||
"eslint-formatter-compact": "^9.0.1",
|
"eslint-formatter-compact": "^9.0.1",
|
||||||
"eslint-formatter-pretty": "^7.0.0",
|
"eslint-formatter-pretty": "^7.0.0",
|
||||||
"eslint-plugin-import": "^2.32.0",
|
|
||||||
"eslint-plugin-jsdoc": "^54.7.0",
|
|
||||||
"prettier": "^3.7.4",
|
"prettier": "^3.7.4",
|
||||||
"tsd": "^0.33.0",
|
"tsd": "^0.33.0",
|
||||||
"turbo": "^2.6.3",
|
"turbo": "^2.6.3",
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jsdoc-to-markdown": "^7.0.6",
|
"@types/jsdoc-to-markdown": "^7.0.6",
|
||||||
"@types/node": "^22.19.1",
|
"@types/node": "^24.10.1",
|
||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
"eslint": "^9.39.1",
|
"eslint": "^9.39.1",
|
||||||
"eslint-config-neon": "^0.2.9",
|
"eslint-config-neon": "^0.2.9",
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@turbo/gen": "^2.6.3",
|
"@turbo/gen": "^2.6.3",
|
||||||
"@types/node": "^22.19.1",
|
"@types/node": "^24.10.1",
|
||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
"eslint": "^9.39.1",
|
"eslint": "^9.39.1",
|
||||||
"eslint-config-neon": "^0.2.9",
|
"eslint-config-neon": "^0.2.9",
|
||||||
|
|||||||
@@ -167,7 +167,10 @@ export async function generateAllIndices({
|
|||||||
fetchPackageVersionDocs = fetchVersionDocs,
|
fetchPackageVersionDocs = fetchVersionDocs,
|
||||||
writeToFile = true,
|
writeToFile = true,
|
||||||
} = {}) {
|
} = {}) {
|
||||||
const indices: Record<any, any>[] = [];
|
const indices: {
|
||||||
|
data: ReturnType<typeof visitNodes>;
|
||||||
|
index: string;
|
||||||
|
}[] = [];
|
||||||
|
|
||||||
for (const pkg of PACKAGES) {
|
for (const pkg of PACKAGES) {
|
||||||
const versions = await fetchPackageVersions(pkg);
|
const versions = await fetchPackageVersions(pkg);
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
"@types/react-dom": "^19.2.3",
|
"@types/react-dom": "^19.2.3",
|
||||||
"@unocss/eslint-plugin": "^66.5.10",
|
"@unocss/eslint-plugin": "^66.5.10",
|
||||||
"@unocss/reset": "^66.5.10",
|
"@unocss/reset": "^66.5.10",
|
||||||
"@vitejs/plugin-react": "^5.1.1",
|
"@vitejs/plugin-react": "^5.1.2",
|
||||||
"chromatic": "^13.3.4",
|
"chromatic": "^13.3.4",
|
||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
"eslint": "^9.39.1",
|
"eslint": "^9.39.1",
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
"turbo": "^2.6.3",
|
"turbo": "^2.6.3",
|
||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
"unocss": "^66.5.10",
|
"unocss": "^66.5.10",
|
||||||
"vite": "^7.2.6",
|
"vite": "^7.2.7",
|
||||||
"vite-plugin-dts": "^4.5.4"
|
"vite-plugin-dts": "^4.5.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
1564
pnpm-lock.yaml
generated
1564
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user