Skip to content

Commit

Permalink
Merge branch 'main' into fix/message-create
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Apr 27, 2024
2 parents 8299e52 + 14f9ff7 commit 3b6d6ed
Show file tree
Hide file tree
Showing 44 changed files with 3,707 additions and 3,653 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/tests.yml
Expand Up @@ -35,14 +35,6 @@ jobs:
if: ${{ github.event_name == 'push' }}
run: pnpm exec turbo run build --filter="...[HEAD^1]" --concurrency=4

- name: ESLint (PR)
if: ${{ github.event_name != 'push' }}
run: pnpm exec turbo run lint --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=4 -- --format=compact

- name: ESLint (Push)
if: ${{ github.event_name == 'push' }}
run: pnpm exec turbo run lint --filter="...[HEAD^1]" --concurrency=4 -- --format=compact

- name: Tests (PR)
if: ${{ github.event_name != 'push' }}
run: pnpm exec turbo run test --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=4
Expand All @@ -51,6 +43,14 @@ jobs:
if: ${{ github.event_name == 'push' }}
run: pnpm exec turbo run test --filter="...[HEAD^1]" --concurrency=4

- name: ESLint (PR)
if: ${{ github.event_name != 'push' }}
run: pnpm exec turbo run lint --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=4 -- --format=compact

- name: ESLint (Push)
if: ${{ github.event_name == 'push' }}
run: pnpm exec turbo run lint --filter="...[HEAD^1]" --concurrency=4 -- --format=compact

- name: Docs (PR)
if: ${{ github.event_name != 'push' }}
run: pnpm exec turbo run docs --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=4
Expand Down
37 changes: 19 additions & 18 deletions apps/guide/package.json
Expand Up @@ -43,6 +43,7 @@
"url": "https://github.com/discordjs/discord.js/issues"
},
"homepage": "https://discord.js.org",
"funding": "https://github.com/discordjs/discord.js?sponsor",
"dependencies": {
"@code-hike/mdx": "^0.9.0",
"@discordjs/ui": "workspace:^",
Expand All @@ -53,45 +54,45 @@
"ariakit": "2.0.0-next.44",
"cmdk": "^1.0.0",
"contentlayer": "^0.3.4",
"next": "14.1.3",
"next": "14.2.1",
"next-contentlayer": "^0.3.4",
"next-themes": "^0.2.1",
"next-themes": "^0.3.0",
"react": "^18.2.0",
"react-custom-scrollbars-2": "^4.5.0",
"react-dom": "^18.2.0",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.1.0",
"remark-gfm": "^3.0.1",
"sharp": "^0.33.2"
"sharp": "^0.33.3"
},
"devDependencies": {
"@next/bundle-analyzer": "14.1.3",
"@testing-library/react": "^14.2.1",
"@next/bundle-analyzer": "14.2.1",
"@testing-library/react": "^15.0.2",
"@testing-library/user-event": "^14.5.2",
"@types/html-escaper": "^3.0.2",
"@types/node": "18.18.8",
"@types/react": "^18.2.64",
"@types/react-dom": "^18.2.21",
"@unocss/eslint-plugin": "^0.58.5",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"@unocss/eslint-plugin": "^0.59.3",
"@unocss/postcss": "^0.58.5",
"@unocss/reset": "^0.58.5",
"@unocss/reset": "^0.59.3",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-v8": "^1.3.1",
"@vitest/coverage-v8": "^1.5.0",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-neon": "^0.1.59",
"eslint-config-neon": "^0.1.62",
"eslint-formatter-pretty": "^6.0.1",
"happy-dom": "^13.7.3",
"happy-dom": "^14.7.1",
"hast-util-to-string": "^2.0.0",
"hastscript": "^8.0.0",
"html-escaper": "^3.0.3",
"postcss": "^8.4.35",
"postcss": "^8.4.38",
"prettier": "^3.2.5",
"turbo": "^1.12.5",
"typescript": "^5.4.2",
"unocss": "^0.58.5",
"vercel": "^33.5.5",
"vitest": "^1.3.1"
"turbo": "^1.13.2",
"typescript": "^5.4.5",
"unocss": "^0.59.3",
"vercel": "^34.0.0",
"vitest": "^1.5.0"
},
"engines": {
"node": ">=18"
Expand Down
55 changes: 28 additions & 27 deletions apps/website/package.json
Expand Up @@ -45,61 +45,62 @@
"url": "https://github.com/discordjs/discord.js/issues"
},
"homepage": "https://discord.js.org",
"funding": "https://github.com/discordjs/discord.js?sponsor",
"dependencies": {
"@radix-ui/react-collapsible": "^1.0.3",
"@react-icons/all-files": "^4.1.0",
"@vercel/analytics": "^1.2.2",
"@vercel/blob": "^0.22.1",
"@vercel/blob": "^0.22.3",
"@vercel/edge-config": "^1.1.0",
"@vercel/og": "^0.6.2",
"@vercel/postgres": "^0.7.2",
"@vercel/postgres": "^0.8.0",
"cmdk": "^1.0.0",
"geist": "^1.2.2",
"jotai": "^2.7.0",
"lucide-react": "^0.356.0",
"geist": "^1.3.0",
"jotai": "^2.8.0",
"lucide-react": "^0.368.0",
"meilisearch": "^0.38.0",
"next": "14.2.0-canary.13",
"next": "14.2.1",
"next-mdx-remote": "^4.4.1",
"next-themes": "^0.2.1",
"next-themes": "^0.3.0",
"overlayscrollbars": "^2.6.0",
"overlayscrollbars-react": "^0.5.4",
"overlayscrollbars-react": "^0.5.6",
"react": "^18.2.0",
"react-aria-components": "^1.1.1",
"react-dom": "^18.2.0",
"sharp": "^0.33.2",
"usehooks-ts": "^3.0.1",
"sharp": "^0.33.3",
"usehooks-ts": "^3.1.0",
"vaul": "^0.9.0"
},
"devDependencies": {
"@next/bundle-analyzer": "14.2.0-canary.13",
"@next/bundle-analyzer": "14.2.1",
"@react-aria/optimize-locales-plugin": "^1.0.2",
"@shikijs/rehype": "1.1.7",
"@tailwindcss/typography": "^0.5.10",
"@testing-library/react": "^14.2.1",
"@tailwindcss/typography": "^0.5.12",
"@testing-library/react": "^15.0.2",
"@testing-library/user-event": "^14.5.2",
"@types/node": "18.18.8",
"@types/react": "^18.2.64",
"@types/react-dom": "^18.2.21",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-v8": "^1.3.1",
"autoprefixer": "^10.4.18",
"@vitest/coverage-v8": "^1.5.0",
"autoprefixer": "^10.4.19",
"cpy-cli": "^5.0.0",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-neon": "^0.1.59",
"eslint-config-neon": "^0.1.62",
"eslint-formatter-pretty": "^6.0.1",
"happy-dom": "^13.7.3",
"postcss": "^8.4.35",
"happy-dom": "^14.7.1",
"postcss": "^8.4.38",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.12",
"prettier-plugin-tailwindcss": "^0.5.14",
"remark-gfm": "^3.0.1",
"remark-rehype": "^11.1.0",
"shiki": "1.1.7",
"tailwindcss": "^3.4.1",
"turbo": "^1.12.5",
"typescript": "^5.4.2",
"vercel": "^33.5.5",
"vitest": "^1.3.1"
"shiki": "1.3.0",
"tailwindcss": "^3.4.3",
"turbo": "^1.13.2",
"typescript": "^5.4.5",
"vercel": "^34.0.0",
"vitest": "^1.5.0"
},
"engines": {
"node": ">=18"
Expand Down
6 changes: 3 additions & 3 deletions apps/website/src/app/layout.tsx
Expand Up @@ -85,13 +85,13 @@ export default async function RootLayout({ children }: PropsWithChildren) {
<LocalizedStringProvider locale="en-US" />
<Providers>
{ENV.IS_LOCAL_DEV ? (
<div className="sticky top-0 z-10 flex h-10 place-content-center place-items-center bg-red-500 text-lg text-white">
<div className="fixed left-1/2 top-2 z-10 flex -translate-x-1/2 place-content-center place-items-center rounded-md border border-red-400/35 bg-red-500/65 p-2 px-4 text-center text-base text-white shadow-md backdrop-blur">
Local test environment
</div>
) : null}
{ENV.IS_PREVIEW ? (
<div className="sticky top-0 z-10 flex h-10 place-content-center place-items-center bg-red-500 text-lg text-white">
Preview deployment
<div className="fixed left-1/2 top-2 z-10 flex -translate-x-1/2 place-content-center place-items-center rounded-md border border-red-400/35 bg-red-500/65 p-2 px-4 text-center text-base text-white shadow-md backdrop-blur">
Preview environment
</div>
) : null}
{children}
Expand Down
10 changes: 9 additions & 1 deletion apps/website/src/components/DocItem.tsx
Expand Up @@ -17,7 +17,15 @@ import { TypeParameterNode } from './TypeParameterNode';
import { UnionMember } from './UnionMember';
import { Tab, TabList, TabPanel, Tabs } from './ui/Tabs';

async function OverloadNode({ node, packageName, version }: { node: any; packageName: string; version: string }) {
async function OverloadNode({
node,
packageName,
version,
}: {
readonly node: any;
readonly packageName: string;
readonly version: string;
}) {
return (
<Tabs className="flex flex-col gap-4">
<TabList className="flex gap-2">
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/components/DocNode.tsx
Expand Up @@ -13,7 +13,7 @@ export async function DocNode({ node, version }: { readonly node?: any; readonly
<Link
key={`${node.text}-${idx}`}
className="font-mono text-blurple hover:text-blurple-500 dark:hover:text-blurple-300"
href={`/docs/packages/${node.resolvedPackage.packageName}/${version}/${node.uri}`}
href={`/docs/packages/${node.resolvedPackage.packageName}/${node.resolvedPackage.version ?? version}/${node.uri}`}
>
{node.text}
</Link>
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/components/ExcerptNode.tsx
Expand Up @@ -20,7 +20,7 @@ export async function ExcerptNode({ node, version }: { readonly node?: any; read
<Link
key={`${excerpt.resolvedItem.displayName}-${idx}`}
className="text-blurple hover:text-blurple-500 dark:hover:text-blurple-300"
href={`/docs/packages/${excerpt.resolvedItem.packageName}/${version}/${excerpt.resolvedItem.uri}`}
href={`/docs/packages/${excerpt.resolvedItem.packageName}/${excerpt.resolvedItem.version ?? version}/${excerpt.resolvedItem.uri}`}
>
{excerpt.text}
</Link>
Expand Down
1 change: 1 addition & 0 deletions apps/website/src/components/ui/CmdK.tsx
Expand Up @@ -95,6 +95,7 @@ export function CmdK({ dependencies }: { readonly dependencies: string[] }) {
q: searchString,
limit: 25,
attributesToSearchOn: ['name'],
sort: ['type:asc'],
})),
});
setSearchResults(result.results.flatMap((res) => res.hits));
Expand Down
5 changes: 4 additions & 1 deletion apps/website/src/util/fetchNode.ts
Expand Up @@ -17,7 +17,10 @@ export async function fetchNode({
if (ENV.IS_LOCAL_DEV) {
try {
const fileContent = await readFile(
join(process.cwd(), `../../packages/${packageName}/docs/split/${version}.${normalizeItem}.api.json`),
join(
process.cwd(),
`../../packages/${packageName}/docs/${packageName}/split/${version}.${normalizeItem}.api.json`,
),
'utf8',
);

Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/util/fetchSitemap.ts
Expand Up @@ -13,7 +13,7 @@ export async function fetchSitemap({
if (ENV.IS_LOCAL_DEV) {
try {
const fileContent = await readFile(
join(process.cwd(), `../../packages/${packageName}/docs/split/${version}.sitemap.api.json`),
join(process.cwd(), `../../packages/${packageName}/docs/${packageName}/split/${version}.sitemap.api.json`),
'utf8',
);

Expand Down
27 changes: 14 additions & 13 deletions package.json
Expand Up @@ -48,29 +48,30 @@
"url": "https://github.com/discordjs/discord.js/issues"
},
"homepage": "https://discord.js.org",
"funding": "https://github.com/discordjs/discord.js?sponsor",
"devDependencies": {
"@commitlint/cli": "^19.0.3",
"@commitlint/config-angular": "^19.0.3",
"@favware/cliff-jumper": "^3.0.1",
"@commitlint/cli": "^19.2.2",
"@commitlint/config-angular": "^19.2.2",
"@favware/cliff-jumper": "^3.0.2",
"@favware/npm-deprecate": "^1.0.7",
"@types/lodash.merge": "^4.6.9",
"@unocss/eslint-plugin": "^0.58.5",
"@vitest/coverage-v8": "^1.3.1",
"@unocss/eslint-plugin": "^0.59.3",
"@vitest/coverage-v8": "^1.5.0",
"conventional-changelog-cli": "^4.1.0",
"eslint": "^8.57.0",
"eslint-config-neon": "^0.1.59",
"eslint-config-neon": "^0.1.62",
"husky": "^9.0.11",
"is-ci": "^3.0.1",
"lint-staged": "^15.2.2",
"lodash.merge": "^4.6.2",
"prettier": "^3.2.5",
"tsup": "^8.0.2",
"turbo": "^1.12.5",
"typescript": "^5.4.2",
"typescript-eslint": "^7.1.1",
"unocss": "^0.58.5",
"vercel": "^33.5.5",
"vitest": "^1.3.1"
"turbo": "^1.13.2",
"typescript": "^5.4.5",
"typescript-eslint": "^7.7.0",
"unocss": "^0.59.3",
"vercel": "^34.0.0",
"vitest": "^1.5.0"
},
"pnpm": {
"peerDependencyRules": {
Expand All @@ -96,5 +97,5 @@
"engines": {
"node": ">=18"
},
"packageManager": "pnpm@8.10.2"
"packageManager": "pnpm@8.15.7+sha256.50783dd0fa303852de2dd1557cd4b9f07cb5b018154a6e76d0f40635d6cee019"
}
17 changes: 9 additions & 8 deletions packages/actions/package.json
Expand Up @@ -39,29 +39,30 @@
"url": "https://github.com/discordjs/discord.js/issues"
},
"homepage": "https://discord.js.org",
"funding": "https://github.com/discordjs/discord.js?sponsor",
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/glob": "^0.4.0",
"@discordjs/scripts": "workspace:^",
"@vercel/blob": "^0.22.1",
"@vercel/postgres": "^0.7.2",
"@vercel/blob": "^0.22.3",
"@vercel/postgres": "^0.8.0",
"meilisearch": "^0.38.0",
"p-limit": "^5.0.0",
"tslib": "^2.6.2",
"undici": "6.7.1"
"undici": "6.13.0"
},
"devDependencies": {
"@types/node": "18.18.8",
"@vitest/coverage-v8": "^1.3.1",
"@vitest/coverage-v8": "^1.5.0",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-neon": "^0.1.59",
"eslint-config-neon": "^0.1.62",
"eslint-formatter-pretty": "^6.0.1",
"prettier": "^3.2.5",
"tsup": "^8.0.2",
"turbo": "^1.12.5",
"typescript": "^5.4.2",
"vitest": "^1.3.1"
"turbo": "^1.13.2",
"typescript": "^5.4.5",
"vitest": "^1.5.0"
},
"engines": {
"node": ">=18"
Expand Down
5 changes: 4 additions & 1 deletion packages/actions/src/uploadSearchIndices/index.ts
Expand Up @@ -66,7 +66,10 @@ try {
await client.waitForTask(task.taskUid);
}

await client.index(index.index).addDocuments(index.data);
const searchIndex = client.index(index.index);
await searchIndex.updateSettings({ sortableAttributes: ['type'] });

await searchIndex.addDocuments(index.data);
}),
);
} catch {}
Expand Down

0 comments on commit 3b6d6ed

Please sign in to comment.