From 1ba1f238f04221ec890fc921678909b5b7d92c26 Mon Sep 17 00:00:00 2001 From: Lioness100 Date: Fri, 17 Feb 2023 15:07:38 -0500 Subject: [PATCH] docs: fix typos (#9127) * docs: fix typos * indicies -> indices * rename file --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- apps/website/package.json | 2 +- apps/website/scripts/generateAllIndices.js | 5 +++++ apps/website/scripts/generateAllIndicies.js | 5 ----- packages/discord.js/src/structures/GuildAuditLogsEntry.js | 2 +- packages/proxy/src/handlers/proxyRequests.ts | 2 +- packages/rest/__tests__/RequestHandler.test.ts | 4 ++-- packages/scripts/src/generateIndex.ts | 2 +- packages/ws/src/utils/WorkerBootstrapper.ts | 2 +- packages/ws/src/ws/WebSocketShard.ts | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 apps/website/scripts/generateAllIndices.js delete mode 100644 apps/website/scripts/generateAllIndicies.js diff --git a/apps/website/package.json b/apps/website/package.json index 2c850c2627d1..f479093c30d2 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -10,7 +10,7 @@ "build:prod": "yarn workspaces foreach -ptR run build && yarn build:copy_readme && yarn build:css && yarn build:next", "build:next": "next build", "build:css": "yarn generate:css", - "build:search_indicies": "yarn node scripts/generateAllIndicies.js", + "build:search_indices": "yarn node scripts/generateAllIndices.js", "build:analyze": "yarn run --top-level docs --force && cross-env-shell ANALYZE=true NEXT_PUBLIC_LOCAL_DEV=true yarn build:prod", "dev": "yarn run --top-level docs && concurrently 'yarn dev:css' 'yarn dev:next'", "dev:next": "next dev", diff --git a/apps/website/scripts/generateAllIndices.js b/apps/website/scripts/generateAllIndices.js new file mode 100644 index 000000000000..dda074cdc51d --- /dev/null +++ b/apps/website/scripts/generateAllIndices.js @@ -0,0 +1,5 @@ +import { generateAllIndices } from '@discordjs/scripts'; + +console.log('Generating all indices...'); +await generateAllIndices(); +console.log('Generated all indices.'); diff --git a/apps/website/scripts/generateAllIndicies.js b/apps/website/scripts/generateAllIndicies.js deleted file mode 100644 index 91e908196295..000000000000 --- a/apps/website/scripts/generateAllIndicies.js +++ /dev/null @@ -1,5 +0,0 @@ -import { generateAllIndicies } from '@discordjs/scripts'; - -console.log('Generating all indicies...'); -await generateAllIndicies(); -console.log('Generated all indicies.'); diff --git a/packages/discord.js/src/structures/GuildAuditLogsEntry.js b/packages/discord.js/src/structures/GuildAuditLogsEntry.js index b5c1620c604d..42a468744c00 100644 --- a/packages/discord.js/src/structures/GuildAuditLogsEntry.js +++ b/packages/discord.js/src/structures/GuildAuditLogsEntry.js @@ -109,7 +109,7 @@ class GuildAuditLogsEntry { this.actionType = GuildAuditLogsEntry.actionType(data.action_type); /** - * The type of action that occured. + * The type of action that occurred. * @type {AuditLogEvent} */ this.action = data.action_type; diff --git a/packages/proxy/src/handlers/proxyRequests.ts b/packages/proxy/src/handlers/proxyRequests.ts index 5f4704efb96a..0c9fbbf84d5e 100644 --- a/packages/proxy/src/handlers/proxyRequests.ts +++ b/packages/proxy/src/handlers/proxyRequests.ts @@ -58,7 +58,7 @@ export function proxyRequests(rest: REST): RequestHandler { } else if (error instanceof Error && error.name === 'AbortError') { populateAbortErrorResponse(res); } else { - // Unclear if there's better course of action here for unknown erorrs. Any web framework allows to pass in an error handler for something like this + // Unclear if there's better course of action here for unknown errors. Any web framework allows to pass in an error handler for something like this // at which point the user could dictate what to do with the error - otherwise we could just 500 throw error; } diff --git a/packages/rest/__tests__/RequestHandler.test.ts b/packages/rest/__tests__/RequestHandler.test.ts index d9c5746a5d5c..6764f1a3b419 100644 --- a/packages/rest/__tests__/RequestHandler.test.ts +++ b/packages/rest/__tests__/RequestHandler.test.ts @@ -360,7 +360,7 @@ test('Handle unexpected 429', async () => { const previous = performance.now(); let firstResolvedTime: number; let secondResolvedTime: number; - const unexepectedSublimit = api.get('/unexpected').then((res) => { + const unexpectedSublimit = api.get('/unexpected').then((res) => { firstResolvedTime = performance.now(); return res; }); @@ -369,7 +369,7 @@ test('Handle unexpected 429', async () => { return res; }); - expect(await unexepectedSublimit).toStrictEqual({ test: true }); + expect(await unexpectedSublimit).toStrictEqual({ test: true }); expect(await queuedSublimit).toStrictEqual({ test: true }); expect(performance.now()).toBeGreaterThanOrEqual(previous + 1_000); // @ts-expect-error: This is intentional diff --git a/packages/scripts/src/generateIndex.ts b/packages/scripts/src/generateIndex.ts index 2bc31a1a5848..dbdc7c9abca5 100644 --- a/packages/scripts/src/generateIndex.ts +++ b/packages/scripts/src/generateIndex.ts @@ -152,7 +152,7 @@ export async function generateIndex(model: ApiModel, packageName: string, tag = ); } -export async function generateAllIndicies() { +export async function generateAllIndices() { for (const pkg of PACKAGES) { const response = await request(`https://docs.discordjs.dev/api/info?package=${pkg}`); const versions = await response.body.json(); diff --git a/packages/ws/src/utils/WorkerBootstrapper.ts b/packages/ws/src/utils/WorkerBootstrapper.ts index 4fc7dc8aa4eb..6becafe41e1a 100644 --- a/packages/ws/src/utils/WorkerBootstrapper.ts +++ b/packages/ws/src/utils/WorkerBootstrapper.ts @@ -29,7 +29,7 @@ export interface BootstrapOptions { } /** - * Utility class for bootstraping a worker thread to be used for sharding + * Utility class for bootstrapping a worker thread to be used for sharding */ export class WorkerBootstrapper { /** diff --git a/packages/ws/src/ws/WebSocketShard.ts b/packages/ws/src/ws/WebSocketShard.ts index 9685667dd73f..3861888f0c79 100644 --- a/packages/ws/src/ws/WebSocketShard.ts +++ b/packages/ws/src/ws/WebSocketShard.ts @@ -542,7 +542,7 @@ export class WebSocketShard extends AsyncEventEmitter { } case GatewayCloseCodes.UnknownError: { - this.debug([`An unknown error occured: ${code}`]); + this.debug([`An unknown error occurred: ${code}`]); return this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume }); }