mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
chore: upgrade deps (#10824)
This commit is contained in:
@@ -44,26 +44,28 @@
|
||||
"@actions/core": "^1.11.1",
|
||||
"@actions/glob": "^0.5.0",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@vercel/blob": "^0.23.4",
|
||||
"@vercel/blob": "^0.27.3",
|
||||
"@vercel/postgres": "^0.9.0",
|
||||
"meilisearch": "^0.38.0",
|
||||
"p-limit": "^6.2.0",
|
||||
"p-queue": "^8.0.1",
|
||||
"p-queue": "^8.1.0",
|
||||
"tslib": "^2.8.1",
|
||||
"undici": "6.21.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.10.10",
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"@types/node": "^22.14.0",
|
||||
"@vitest/coverage-v8": "^3.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4",
|
||||
"vitest": "^2.1.8"
|
||||
"prettier": "^3.5.3",
|
||||
"terser": "^5.37.0",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3",
|
||||
"vitest": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -9,7 +9,7 @@ runs:
|
||||
with:
|
||||
swap-size-gb: 10
|
||||
|
||||
- uses: pnpm/action-setup@v4.0.0
|
||||
- uses: pnpm/action-setup@v4.1.0
|
||||
name: Install pnpm
|
||||
with:
|
||||
run_install: false
|
||||
|
||||
@@ -26,7 +26,6 @@ for await (const file of globber.globGenerator()) {
|
||||
const data = await readFile(file, 'utf8');
|
||||
try {
|
||||
promises.push(
|
||||
// eslint-disable-next-line @typescript-eslint/no-loop-func
|
||||
limit(async () => {
|
||||
console.log(`Uploading ${file} with ${version}...`);
|
||||
const json = JSON.parse(data);
|
||||
|
||||
@@ -21,7 +21,6 @@ for await (const file of globber.globGenerator()) {
|
||||
const pkgName = dirname(relative(cwd(), file)).split(sep)[1];
|
||||
try {
|
||||
promises.push(
|
||||
// eslint-disable-next-line @typescript-eslint/no-loop-func
|
||||
queue.add(async () => {
|
||||
console.log(`Uploading ${file} with ${version} from ${pkgName}...`);
|
||||
const name = basename(file).replace('main.', '');
|
||||
|
||||
@@ -37,15 +37,17 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/node": "^22.10.10",
|
||||
"@types/node": "^22.14.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"jest": "^29.7.0",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4"
|
||||
"prettier": "^3.5.3",
|
||||
"terser": "^5.37.0",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export enum Meaning {
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
|
||||
export interface IApiItemOptions {}
|
||||
|
||||
export interface IApiItemJson {
|
||||
|
||||
@@ -490,9 +490,7 @@ export function ApiItemContainerMixin<TBaseClass extends IApiItemConstructor>(
|
||||
// ^^^
|
||||
// ```
|
||||
const firstReferenceToken: ExcerptToken | undefined = extendsType.excerpt.spannedTokens.find(
|
||||
(token: ExcerptToken) => {
|
||||
return token.kind === ExcerptTokenKind.Reference && token.canonicalReference;
|
||||
},
|
||||
(token: ExcerptToken) => token.kind === ExcerptTokenKind.Reference && token.canonicalReference,
|
||||
);
|
||||
|
||||
if (!firstReferenceToken) {
|
||||
|
||||
@@ -77,7 +77,7 @@ export class ApiModel extends ApiItemContainerMixin(ApiItem) {
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/class-literal-property-style
|
||||
|
||||
public override get containerKey(): string {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -50,15 +50,17 @@
|
||||
"@microsoft/tsdoc": "0.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.10.10",
|
||||
"@types/node": "^22.14.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4"
|
||||
"prettier": "^3.5.3",
|
||||
"terser": "^5.37.0",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -66,17 +66,19 @@
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/lodash": "^4.17.13",
|
||||
"@types/node": "^22.10.10",
|
||||
"@types/node": "^22.14.0",
|
||||
"@types/resolve": "^1.20.6",
|
||||
"@types/semver": "^7.5.8",
|
||||
"cpy-cli": "^5.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"jest": "^29.7.0",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3"
|
||||
"prettier": "^3.5.3",
|
||||
"terser": "^5.37.0",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,11 +17,7 @@ describe(SyntaxHelpers.name, () => {
|
||||
'01234'
|
||||
];
|
||||
|
||||
expect(
|
||||
inputs.map((x) => {
|
||||
return { input: x, output: SyntaxHelpers.makeCamelCaseIdentifier(x) };
|
||||
}),
|
||||
).toMatchInlineSnapshot(`
|
||||
expect(inputs.map((x) => ({ input: x, output: SyntaxHelpers.makeCamelCaseIdentifier(x) }))).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Object {
|
||||
"input": "",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface,tsdoc/syntax */
|
||||
/* eslint-disable tsdoc/syntax */
|
||||
/**
|
||||
* @block
|
||||
* @inline test
|
||||
|
||||
@@ -2,11 +2,9 @@ import type Redis from 'ioredis';
|
||||
import { test, expect, vi } from 'vitest';
|
||||
import { PubSubRedisBroker } from '../src/index.js';
|
||||
|
||||
vi.mock('node:fs', () => {
|
||||
return {
|
||||
readFileSync: vi.fn(),
|
||||
};
|
||||
});
|
||||
vi.mock('node:fs', () => ({
|
||||
readFileSync: vi.fn(),
|
||||
}));
|
||||
|
||||
const mockRedisClient = {
|
||||
defineCommand: vi.fn(),
|
||||
|
||||
@@ -67,26 +67,27 @@
|
||||
"homepage": "https://discord.js.org",
|
||||
"funding": "https://github.com/discordjs/discord.js?sponsor",
|
||||
"dependencies": {
|
||||
"@msgpack/msgpack": "3.0.0-beta2",
|
||||
"@msgpack/msgpack": "3.1.1",
|
||||
"@vladfrangu/async_event_emitter": "^2.4.6",
|
||||
"ioredis": "^5.4.2"
|
||||
"ioredis": "^5.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@types/node": "^22.10.10",
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"@types/node": "^22.14.0",
|
||||
"@vitest/coverage-v8": "^3.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.1",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4",
|
||||
"vitest": "^2.1.8"
|
||||
"prettier": "^3.5.3",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3",
|
||||
"vitest": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -40,6 +40,7 @@ export type ToEventMap<
|
||||
];
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
export interface IBaseBroker<TEvents extends {}> {
|
||||
/**
|
||||
* Subscribes to the given events
|
||||
@@ -51,6 +52,7 @@ export interface IBaseBroker<TEvents extends {}> {
|
||||
unsubscribe(events: (keyof TEvents)[]): Promise<void>;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
export interface IPubSubBroker<TEvents extends {}>
|
||||
extends IBaseBroker<TEvents>,
|
||||
AsyncEventEmitter<ToEventMap<TEvents>> {
|
||||
|
||||
@@ -66,28 +66,29 @@
|
||||
"funding": "https://github.com/discordjs/discord.js?sponsor",
|
||||
"dependencies": {
|
||||
"@discordjs/util": "workspace:^",
|
||||
"discord-api-types": "^0.37.118",
|
||||
"discord-api-types": "^0.37.119",
|
||||
"ts-mixer": "^6.0.4",
|
||||
"tslib": "^2.8.1",
|
||||
"zod": "^3.24.1",
|
||||
"zod": "^3.24.2",
|
||||
"zod-validation-error": "^3.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@types/node": "^22.10.10",
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"@types/node": "^22.14.0",
|
||||
"@vitest/coverage-v8": "^3.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.1",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4",
|
||||
"vitest": "^2.1.8"
|
||||
"prettier": "^3.5.3",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3",
|
||||
"vitest": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -15,6 +15,7 @@ export const localeMapPredicate = z
|
||||
.strict();
|
||||
|
||||
export const refineURLPredicate = (allowedProtocols: string[]) => (value: string) => {
|
||||
// eslint-disable-next-line n/prefer-global/url
|
||||
const url = new URL(value);
|
||||
return allowedProtocols.includes(url.protocol);
|
||||
};
|
||||
|
||||
@@ -63,15 +63,12 @@ export const messagePredicate = z
|
||||
poll: pollPredicate.optional(),
|
||||
})
|
||||
.refine(
|
||||
(data) => {
|
||||
return (
|
||||
data.content !== undefined ||
|
||||
(data.embeds !== undefined && data.embeds.length > 0) ||
|
||||
data.poll !== undefined ||
|
||||
(data.attachments !== undefined && data.attachments.length > 0) ||
|
||||
(data.components !== undefined && data.components.length > 0) ||
|
||||
(data.sticker_ids !== undefined && data.sticker_ids.length > 0)
|
||||
);
|
||||
},
|
||||
(data) =>
|
||||
data.content !== undefined ||
|
||||
(data.embeds !== undefined && data.embeds.length > 0) ||
|
||||
data.poll !== undefined ||
|
||||
(data.attachments !== undefined && data.attachments.length > 0) ||
|
||||
(data.components !== undefined && data.components.length > 0) ||
|
||||
(data.sticker_ids !== undefined && data.sticker_ids.length > 0),
|
||||
{ message: 'Messages must have content, embeds, a poll, attachments, components, or stickers' },
|
||||
);
|
||||
|
||||
@@ -47,24 +47,16 @@ export const embedPredicate = z
|
||||
fields: z.array(embedFieldPredicate).max(25).optional(),
|
||||
})
|
||||
.refine(
|
||||
(embed) => {
|
||||
return (
|
||||
embed.title !== undefined ||
|
||||
embed.description !== undefined ||
|
||||
(embed.fields !== undefined && embed.fields.length > 0) ||
|
||||
embed.footer !== undefined ||
|
||||
embed.author !== undefined ||
|
||||
embed.image !== undefined ||
|
||||
embed.thumbnail !== undefined
|
||||
);
|
||||
},
|
||||
(embed) =>
|
||||
embed.title !== undefined ||
|
||||
embed.description !== undefined ||
|
||||
(embed.fields !== undefined && embed.fields.length > 0) ||
|
||||
embed.footer !== undefined ||
|
||||
embed.author !== undefined ||
|
||||
embed.image !== undefined ||
|
||||
embed.thumbnail !== undefined,
|
||||
{
|
||||
message: 'Embed must have at least a title, description, a field, a footer, an author, an image, OR a thumbnail.',
|
||||
},
|
||||
)
|
||||
.refine(
|
||||
(embed) => {
|
||||
return embedLength(embed) <= 6_000;
|
||||
},
|
||||
{ message: 'Embeds must not exceed 6000 characters in total.' },
|
||||
);
|
||||
.refine((embed) => embedLength(embed) <= 6_000, { message: 'Embeds must not exceed 6000 characters in total.' });
|
||||
|
||||
@@ -64,18 +64,19 @@
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@types/node": "^22.10.10",
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"@types/node": "^22.14.0",
|
||||
"@vitest/coverage-v8": "^3.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.1",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4",
|
||||
"vitest": "^2.1.8"
|
||||
"prettier": "^3.5.3",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3",
|
||||
"vitest": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -25,6 +25,7 @@ export interface Collection<Key, Value> {
|
||||
* @typeParam Key - The key type this collection holds
|
||||
* @typeParam Value - The value type this collection holds
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
|
||||
export class Collection<Key, Value> extends Map<Key, Value> {
|
||||
/**
|
||||
* Obtains the value of the given key if it exists, otherwise sets and returns the value provided by the default value generator.
|
||||
|
||||
@@ -70,24 +70,25 @@
|
||||
"@discordjs/ws": "workspace:^",
|
||||
"@sapphire/snowflake": "^3.5.5",
|
||||
"@vladfrangu/async_event_emitter": "^2.4.6",
|
||||
"discord-api-types": "^0.37.118"
|
||||
"discord-api-types": "^0.37.119"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@types/node": "^22.10.10",
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"@types/node": "^22.14.0",
|
||||
"@vitest/coverage-v8": "^3.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.1",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4",
|
||||
"vitest": "^2.1.8"
|
||||
"prettier": "^3.5.3",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3",
|
||||
"vitest": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -27,6 +27,7 @@ export class OAuth2API {
|
||||
* @param options - The options for creating the authorization URL
|
||||
*/
|
||||
public generateAuthorizationURL(options: RESTOAuth2AuthorizationQuery) {
|
||||
// eslint-disable-next-line n/prefer-global/url
|
||||
const url = new URL(`${RouteBases.api}${Routes.oauth2Authorization()}`);
|
||||
url.search = makeURLSearchParams(options).toString();
|
||||
return url.toString();
|
||||
|
||||
@@ -141,7 +141,6 @@ export class WebhooksAPI {
|
||||
body,
|
||||
auth: false,
|
||||
signal,
|
||||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
||||
}) as Promise<RESTPostAPIWebhookWithTokenWaitResult | void>;
|
||||
}
|
||||
|
||||
|
||||
@@ -185,6 +185,7 @@ export interface MappedEvents {
|
||||
[GatewayDispatchEvents.WebhooksUpdate]: [ToEventProps<GatewayWebhooksUpdateDispatchData>];
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
export interface ManagerShardEventsMap extends MappedEvents {}
|
||||
|
||||
export interface ClientOptions {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export * from './api/index.js';
|
||||
export * from './client.js';
|
||||
export * from './Gateway.js';
|
||||
export type * from './Gateway.js';
|
||||
export * from './util/index.js';
|
||||
|
||||
export * from 'discord-api-types/v10';
|
||||
|
||||
@@ -49,26 +49,27 @@
|
||||
"homepage": "https://discord.js.org",
|
||||
"funding": "https://github.com/discordjs/discord.js?sponsor",
|
||||
"dependencies": {
|
||||
"commander": "^12.1.0",
|
||||
"fast-glob": "^3.3.2",
|
||||
"commander": "^13.1.0",
|
||||
"fast-glob": "^3.3.3",
|
||||
"picocolors": "^1.1.1",
|
||||
"prompts": "^2.4.2",
|
||||
"validate-npm-package-name": "^5.0.1"
|
||||
"validate-npm-package-name": "^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@types/node": "^22.10.10",
|
||||
"@types/node": "^22.14.0",
|
||||
"@types/prompts": "^2.4.9",
|
||||
"@types/validate-npm-package-name": "^4.0.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier": "^3.5.3",
|
||||
"terser": "^5.37.0",
|
||||
"tsup": "^8.3.5",
|
||||
"typescript": "~5.5.4"
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -55,6 +55,7 @@ export function install(packageManager: PackageManager) {
|
||||
|
||||
console.log(`Installing dependencies with ${packageManager}...`);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
|
||||
switch (packageManager) {
|
||||
case 'yarn':
|
||||
console.log();
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
"discord.js": "^14.17.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier": "^3.5.3",
|
||||
"zod": "^3.24.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,10 +17,11 @@
|
||||
"devDependencies": {
|
||||
"@sapphire/ts-config": "^5.0.1",
|
||||
"@types/bun": "^1.1.14",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier": "^3.5.3",
|
||||
"typescript": "~5.5.4",
|
||||
"zod": "^3.24.1"
|
||||
}
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
"dotenv": "^16.4.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier": "^3.5.3",
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -19,10 +19,11 @@
|
||||
"devDependencies": {
|
||||
"@sapphire/ts-config": "^5.0.1",
|
||||
"@types/node": "^22.10.10",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier": "^3.5.3",
|
||||
"typescript": "~5.5.4",
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
"@discordjs/ws": "workspace:^",
|
||||
"@sapphire/snowflake": "3.5.5",
|
||||
"@vladfrangu/async_event_emitter": "^2.4.6",
|
||||
"discord-api-types": "^0.37.118",
|
||||
"discord-api-types": "^0.37.119",
|
||||
"fast-deep-equal": "3.1.3",
|
||||
"lodash.snakecase": "4.1.1",
|
||||
"tslib": "^2.8.1",
|
||||
@@ -84,19 +84,21 @@
|
||||
"@discordjs/docgen": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@types/node": "^22.10.10",
|
||||
"@typescript-eslint/eslint-plugin": "^8.19.0",
|
||||
"@typescript-eslint/parser": "^8.19.0",
|
||||
"@types/node": "^22.14.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.29.0",
|
||||
"@typescript-eslint/parser": "^8.29.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"dtslint": "4.2.1",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"jest": "29.7.0",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier": "^3.5.3",
|
||||
"tsd": "^0.31.2",
|
||||
"tslint": "6.1.3",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4"
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
"homepage": "https://discord.js.org",
|
||||
"funding": "https://github.com/discordjs/discord.js?sponsor",
|
||||
"dependencies": {
|
||||
"commander": "^12.1.0",
|
||||
"commander": "^13.1.0",
|
||||
"jsdoc-to-markdown": "^8.0.3",
|
||||
"tslib": "^2.8.1",
|
||||
"typedoc": "^0.25.13"
|
||||
@@ -68,15 +68,16 @@
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@types/jsdoc-to-markdown": "^7.0.6",
|
||||
"@types/node": "^22.10.10",
|
||||
"@types/node": "^22.14.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4"
|
||||
"prettier": "^3.5.3",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
export * from './access.type.js';
|
||||
export * from './childTypes.type';
|
||||
export * from './class.interface.js';
|
||||
export * from './config.interface.js';
|
||||
export * from './constructor.interface.js';
|
||||
export * from './customDocs.interface.js';
|
||||
export * from './event.interface.js';
|
||||
export * from './exception.interface.js';
|
||||
export * from './external.interface.js';
|
||||
export * from './interface.interface.js';
|
||||
export * from './item.interface.js';
|
||||
export * from './member.interface.js';
|
||||
export * from './meta.interface.js';
|
||||
export * from './method.interface.js';
|
||||
export * from './param.interface.js';
|
||||
export * from './return.interface.js';
|
||||
export * from './rootTypes.type.js';
|
||||
export * from './scope.type.js';
|
||||
export * from './type.interface.js';
|
||||
export * from './typedef.interface.js';
|
||||
export * from './var-type.interface';
|
||||
export type * from './access.type.js';
|
||||
export type * from './childTypes.type';
|
||||
export type * from './class.interface.js';
|
||||
export type * from './config.interface.js';
|
||||
export type * from './constructor.interface.js';
|
||||
export type * from './customDocs.interface.js';
|
||||
export type * from './event.interface.js';
|
||||
export type * from './exception.interface.js';
|
||||
export type * from './external.interface.js';
|
||||
export type * from './interface.interface.js';
|
||||
export type * from './item.interface.js';
|
||||
export type * from './member.interface.js';
|
||||
export type * from './meta.interface.js';
|
||||
export type * from './method.interface.js';
|
||||
export type * from './param.interface.js';
|
||||
export type * from './return.interface.js';
|
||||
export type * from './rootTypes.type.js';
|
||||
export type * from './scope.type.js';
|
||||
export type * from './type.interface.js';
|
||||
export type * from './typedef.interface.js';
|
||||
export type * from './var-type.interface';
|
||||
|
||||
@@ -91,6 +91,7 @@ export function parseType(someType: JSONOutput.SomeType | JSONOutput.Type | stri
|
||||
return `'${someType.value}'`;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
||||
return `${someType.value}`;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,24 +55,25 @@
|
||||
"homepage": "https://discord.js.org",
|
||||
"funding": "https://github.com/discordjs/discord.js?sponsor",
|
||||
"dependencies": {
|
||||
"discord-api-types": "^0.37.118"
|
||||
"discord-api-types": "^0.37.119"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@types/node": "^22.10.10",
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"@types/node": "^22.14.0",
|
||||
"@vitest/coverage-v8": "^3.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.1",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4",
|
||||
"vitest": "^2.1.8"
|
||||
"prettier": "^3.5.3",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3",
|
||||
"vitest": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -521,6 +521,7 @@ export function heading<Content extends string>(content: Content, level: Heading
|
||||
export function heading<Content extends string>(content: Content, level: HeadingLevel.Three): `### ${Content}`;
|
||||
|
||||
export function heading(content: string, level?: HeadingLevel) {
|
||||
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
|
||||
switch (level) {
|
||||
case HeadingLevel.Three:
|
||||
return `### ${content}`;
|
||||
|
||||
@@ -72,24 +72,25 @@
|
||||
"@discordjs/rest": "workspace:^",
|
||||
"@discordjs/util": "workspace:^",
|
||||
"@discordjs/ws": "workspace:^",
|
||||
"discord-api-types": "^0.37.118"
|
||||
"discord-api-types": "^0.37.119"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@types/node": "^22.10.10",
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"@types/node": "^22.14.0",
|
||||
"@vitest/coverage-v8": "^3.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.1",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4",
|
||||
"vitest": "^2.1.8"
|
||||
"prettier": "^3.5.3",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3",
|
||||
"vitest": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -50,15 +50,17 @@
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.10.10",
|
||||
"@types/node": "^22.14.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4"
|
||||
"prettier": "^3.5.3",
|
||||
"terser": "^5.37.0",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -74,20 +74,21 @@
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@types/node": "^22.10.10",
|
||||
"@types/supertest": "^6.0.2",
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"@types/node": "^22.14.0",
|
||||
"@types/supertest": "^6.0.3",
|
||||
"@vitest/coverage-v8": "^3.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.1",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier": "^3.5.3",
|
||||
"supertest": "^7.0.0",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4",
|
||||
"vitest": "^2.1.8"
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3",
|
||||
"vitest": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -88,28 +88,29 @@
|
||||
"@sapphire/async-queue": "^1.5.5",
|
||||
"@sapphire/snowflake": "^3.5.5",
|
||||
"@vladfrangu/async_event_emitter": "^2.4.6",
|
||||
"discord-api-types": "^0.37.118",
|
||||
"discord-api-types": "^0.37.119",
|
||||
"magic-bytes.js": "^1.10.0",
|
||||
"tslib": "^2.8.1",
|
||||
"undici": "6.21.1",
|
||||
"uuid": "^11.0.3"
|
||||
"uuid": "^11.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@types/node": "18.17.9",
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"@vitest/coverage-v8": "^3.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.1",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"prettier": "^3.5.3",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.5.4",
|
||||
"vitest": "^2.1.8"
|
||||
"vitest": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -216,6 +216,7 @@ export class SequentialHandler implements IHandler {
|
||||
limit = this.manager.options.globalRequestsPerSecond;
|
||||
timeout = this.manager.globalReset + offset - Date.now();
|
||||
// If this is the first task to reach the global timeout, set the global delay
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
||||
if (!this.manager.globalDelay) {
|
||||
// The global delay function clears the global delay state when it is resolved
|
||||
this.manager.globalDelay = this.globalDelayFor(timeout);
|
||||
|
||||
@@ -14,6 +14,7 @@ export interface RestEvents {
|
||||
restDebug: [info: string];
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
export interface RestEventsMap extends RestEvents {}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ import { RequestMethod } from './types.js';
|
||||
import type { GetRateLimitOffsetFunction, RateLimitData, ResponseLike } from './types.js';
|
||||
|
||||
function serializeSearchParam(value: unknown): string | null {
|
||||
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
|
||||
switch (typeof value) {
|
||||
case 'string':
|
||||
return value;
|
||||
|
||||
@@ -65,26 +65,28 @@
|
||||
"@discordjs/api-extractor-utils": "workspace:^",
|
||||
"@microsoft/tsdoc": "0.14.2",
|
||||
"@microsoft/tsdoc-config": "0.16.2",
|
||||
"@vercel/blob": "^0.23.4",
|
||||
"@vercel/blob": "^0.27.3",
|
||||
"@vercel/postgres": "^0.9.0",
|
||||
"commander": "^12.1.0",
|
||||
"commander": "^13.1.0",
|
||||
"tslib": "^2.8.1",
|
||||
"undici": "6.21.1",
|
||||
"yaml": "^2.7.0"
|
||||
"yaml": "^2.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@turbo/gen": "^2.3.3",
|
||||
"@types/node": "^22.10.10",
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"@turbo/gen": "^2.5.0",
|
||||
"@types/node": "^22.14.0",
|
||||
"@vitest/coverage-v8": "^3.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"env-cmd": "^10.1.0",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4"
|
||||
"prettier": "^3.5.3",
|
||||
"terser": "^5.37.0",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -852,16 +852,14 @@ export function itemHierarchyText({
|
||||
// </div>
|
||||
// );
|
||||
|
||||
return excerpts.map((excerpt) => {
|
||||
return {
|
||||
type,
|
||||
excerpts: itemExcerptText(
|
||||
excerpt,
|
||||
item.getAssociatedPackage()!,
|
||||
item.getHierarchy().find(ApiTypeParameterListMixin.isBaseClassOf),
|
||||
),
|
||||
};
|
||||
});
|
||||
return excerpts.map((excerpt) => ({
|
||||
type,
|
||||
excerpts: itemExcerptText(
|
||||
excerpt,
|
||||
item.getAssociatedPackage()!,
|
||||
item.getHierarchy().find(ApiTypeParameterListMixin.isBaseClassOf),
|
||||
),
|
||||
}));
|
||||
}
|
||||
|
||||
function itemClass(item: ApiClass) {
|
||||
@@ -880,14 +878,12 @@ function itemClass(item: ApiClass) {
|
||||
}
|
||||
|
||||
function itemFunction(item: ApiFunction) {
|
||||
const functionItem = (item: ApiFunction) => {
|
||||
return {
|
||||
...itemInfo(item),
|
||||
overloadIndex: item.overloadIndex,
|
||||
typeParameters: itemTypeParameters(item),
|
||||
parameters: itemParameters(item),
|
||||
};
|
||||
};
|
||||
const functionItem = (item: ApiFunction) => ({
|
||||
...itemInfo(item),
|
||||
overloadIndex: item.overloadIndex,
|
||||
typeParameters: itemTypeParameters(item),
|
||||
parameters: itemParameters(item),
|
||||
});
|
||||
|
||||
const hasOverloads = item.getMergedSiblings().length > 1;
|
||||
const overloads = item.getMergedSiblings().map((sibling) => functionItem(sibling as ApiFunction));
|
||||
@@ -986,6 +982,7 @@ function itemEnum(item: ApiEnum) {
|
||||
}
|
||||
|
||||
function memberKind(member: ApiItem | null) {
|
||||
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
|
||||
switch (member?.kind) {
|
||||
case 'Class': {
|
||||
const classMember = member as ApiClass;
|
||||
@@ -1080,6 +1077,7 @@ export async function generateSplitDocumentation({
|
||||
|
||||
const members = entry.members
|
||||
.filter((item) => {
|
||||
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
|
||||
switch (item.kind) {
|
||||
case ApiItemKind.Function:
|
||||
return (item as ApiFunction).overloadIndex === 1;
|
||||
|
||||
@@ -63,10 +63,11 @@
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.1",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier": "^3.5.3",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4",
|
||||
|
||||
@@ -53,39 +53,40 @@
|
||||
"dependencies": {
|
||||
"@react-icons/all-files": "^4.1.0",
|
||||
"ariakit": "2.0.0-next.44",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@react-icons/all-files": "^4.1.0",
|
||||
"@storybook/addon-essentials": "^8.4.7",
|
||||
"@storybook/addon-interactions": "^8.4.7",
|
||||
"@storybook/addon-links": "^8.4.7",
|
||||
"@storybook/addon-essentials": "^8.6.12",
|
||||
"@storybook/addon-interactions": "^8.6.12",
|
||||
"@storybook/addon-links": "^8.6.12",
|
||||
"@storybook/addon-styling": "^1.3.7",
|
||||
"@storybook/blocks": "^8.4.7",
|
||||
"@storybook/react": "^8.4.7",
|
||||
"@storybook/react-vite": "^8.4.7",
|
||||
"@storybook/blocks": "^8.6.12",
|
||||
"@storybook/react": "^8.6.12",
|
||||
"@storybook/react-vite": "^8.6.12",
|
||||
"@storybook/testing-library": "^0.2.2",
|
||||
"@types/node": "^22.10.10",
|
||||
"@types/react": "^18.3.18",
|
||||
"@types/react-dom": "^18.3.5",
|
||||
"@types/node": "^22.14.0",
|
||||
"@types/react": "^19.1.0",
|
||||
"@types/react-dom": "^19.1.1",
|
||||
"@unocss/eslint-plugin": "^0.60.4",
|
||||
"@unocss/reset": "^0.60.4",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"chromatic": "^11.20.2",
|
||||
"chromatic": "^11.28.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier": "^3.5.3",
|
||||
"prop-types": "^15.8.1",
|
||||
"storybook": "^8.4.7",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4",
|
||||
"storybook": "^8.6.12",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3",
|
||||
"unocss": "^0.60.4",
|
||||
"vite": "^5.4.11",
|
||||
"vite-plugin-dts": "^3.9.1"
|
||||
"vite": "^6.2.5",
|
||||
"vite-plugin-dts": "^4.5.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { VscChevronDown } from '@react-icons/all-files/vsc/VscChevronDown';
|
||||
import { Disclosure, DisclosureContent, useDisclosureState } from 'ariakit/disclosure';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import type { JSX, PropsWithChildren } from 'react';
|
||||
|
||||
export interface SectionOptions {
|
||||
readonly background?: boolean | undefined;
|
||||
|
||||
@@ -7,7 +7,7 @@ export interface IDiscordMessageEmbedFooter {
|
||||
export function DiscordMessageEmbedFooter({ content, icon, timestamp }: IDiscordMessageEmbedFooter) {
|
||||
return (
|
||||
<div className="mt-2 flex items-center text-xs">
|
||||
{icon ? <img className="mr-2 rounded-full" height="20" src={icon} width="20" /> : null}
|
||||
{icon ? <img alt="Icon" className="mr-2 rounded-full" height="20" src={icon} width="20" /> : null}
|
||||
|
||||
{content}
|
||||
{content && timestamp ? <span className="mx-1 font-medium">•</span> : null}
|
||||
|
||||
@@ -65,18 +65,19 @@
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@types/node": "^22.10.10",
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"@types/node": "^22.14.0",
|
||||
"@vitest/coverage-v8": "^3.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.1",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4",
|
||||
"vitest": "^2.1.8"
|
||||
"prettier": "^3.5.3",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3",
|
||||
"vitest": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export * from './types.js';
|
||||
export type * from './types.js';
|
||||
export * from './functions/index.js';
|
||||
export * from './JSONEncodable.js';
|
||||
export * from './Equatable.js';
|
||||
|
||||
@@ -14,12 +14,10 @@ import { AudioPlayerError } from '../src/audio/AudioPlayerError';
|
||||
import { AudioResource } from '../src/audio/AudioResource';
|
||||
import { NoSubscriberBehavior } from '../src/index';
|
||||
|
||||
vitest.mock('../src/DataStore', () => {
|
||||
return {
|
||||
addAudioPlayer: vitest.fn(),
|
||||
deleteAudioPlayer: vitest.fn(),
|
||||
};
|
||||
});
|
||||
vitest.mock('../src/DataStore', () => ({
|
||||
addAudioPlayer: vitest.fn(),
|
||||
deleteAudioPlayer: vitest.fn(),
|
||||
}));
|
||||
|
||||
vitest.mock('../src/VoiceConnection', async (importOriginal) => {
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
||||
@@ -34,11 +32,9 @@ vitest.mock('../src/VoiceConnection', async (importOriginal) => {
|
||||
};
|
||||
});
|
||||
|
||||
vitest.mock('../src/audio/AudioPlayerError', () => {
|
||||
return {
|
||||
AudioPlayerError: vitest.fn(),
|
||||
};
|
||||
});
|
||||
vitest.mock('../src/audio/AudioPlayerError', () => ({
|
||||
AudioPlayerError: vitest.fn(),
|
||||
}));
|
||||
|
||||
function* silence() {
|
||||
while (true) {
|
||||
|
||||
@@ -37,9 +37,7 @@ const AudioPlayer = _AudioPlayer as unknown as vitest.Mocked<typeof _AudioPlayer
|
||||
const PlayerSubscription = _PlayerSubscription as unknown as vitest.Mock<_PlayerSubscription>;
|
||||
|
||||
const _NetworkingClass = Networking.Networking;
|
||||
vitest.spyOn(Networking, 'Networking').mockImplementation((...args) => {
|
||||
return new _NetworkingClass(...args);
|
||||
});
|
||||
vitest.spyOn(Networking, 'Networking').mockImplementation((...args) => new _NetworkingClass(...args));
|
||||
|
||||
function createFakeAdapter() {
|
||||
const sendPayload = vitest.fn();
|
||||
|
||||
@@ -63,31 +63,32 @@
|
||||
"homepage": "https://discord.js.org",
|
||||
"funding": "https://github.com/discordjs/discord.js?sponsor",
|
||||
"dependencies": {
|
||||
"@types/ws": "^8.5.13",
|
||||
"discord-api-types": "^0.37.118",
|
||||
"@types/ws": "^8.18.1",
|
||||
"discord-api-types": "^0.37.119",
|
||||
"prism-media": "^1.3.5",
|
||||
"tslib": "^2.8.1",
|
||||
"ws": "^8.18.0"
|
||||
"ws": "^8.18.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@discordjs/opus": "^0.9.0",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@noble/ciphers": "^1.1.3",
|
||||
"@types/node": "^22.10.10",
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"@noble/ciphers": "^1.2.1",
|
||||
"@types/node": "^22.14.0",
|
||||
"@vitest/coverage-v8": "^3.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.1",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"prettier": "^3.5.3",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.5.4",
|
||||
"vitest": "^2.1.8",
|
||||
"vitest-websocket-mock": "^0.3.0"
|
||||
"vitest": "^3.1.1",
|
||||
"vitest-websocket-mock": "^0.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
|
||||
@@ -44,17 +44,13 @@ const libs = {
|
||||
additionalData: Buffer,
|
||||
nonce: Buffer,
|
||||
key: ArrayBufferLike,
|
||||
) => {
|
||||
return sodium.api.crypto_aead_xchacha20poly1305_ietf_decrypt(cipherText, additionalData, null, nonce, key);
|
||||
},
|
||||
) => sodium.api.crypto_aead_xchacha20poly1305_ietf_decrypt(cipherText, additionalData, null, nonce, key),
|
||||
crypto_aead_xchacha20poly1305_ietf_encrypt: (
|
||||
plaintext: Buffer,
|
||||
additionalData: Buffer,
|
||||
nonce: Buffer,
|
||||
key: ArrayBufferLike,
|
||||
) => {
|
||||
return sodium.api.crypto_aead_xchacha20poly1305_ietf_encrypt(plaintext, additionalData, null, nonce, key);
|
||||
},
|
||||
) => sodium.api.crypto_aead_xchacha20poly1305_ietf_encrypt(plaintext, additionalData, null, nonce, key),
|
||||
}),
|
||||
'libsodium-wrappers': (sodium: any): Methods => ({
|
||||
crypto_aead_xchacha20poly1305_ietf_decrypt: (
|
||||
@@ -62,17 +58,13 @@ const libs = {
|
||||
additionalData: Buffer,
|
||||
nonce: Buffer,
|
||||
key: ArrayBufferLike,
|
||||
) => {
|
||||
return sodium.crypto_aead_xchacha20poly1305_ietf_decrypt(null, cipherText, additionalData, nonce, key);
|
||||
},
|
||||
) => sodium.crypto_aead_xchacha20poly1305_ietf_decrypt(null, cipherText, additionalData, nonce, key),
|
||||
crypto_aead_xchacha20poly1305_ietf_encrypt: (
|
||||
plaintext: Buffer,
|
||||
additionalData: Buffer,
|
||||
nonce: Buffer,
|
||||
key: ArrayBufferLike,
|
||||
) => {
|
||||
return sodium.crypto_aead_xchacha20poly1305_ietf_encrypt(plaintext, additionalData, null, nonce, key);
|
||||
},
|
||||
) => sodium.crypto_aead_xchacha20poly1305_ietf_encrypt(plaintext, additionalData, null, nonce, key),
|
||||
}),
|
||||
'@stablelib/xchacha20poly1305': (stablelib: any): Methods => ({
|
||||
crypto_aead_xchacha20poly1305_ietf_decrypt(plaintext, additionalData, nonce, key) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export * from './generateDependencyReport';
|
||||
export * from './entersState';
|
||||
export * from './adapter';
|
||||
export type * from './adapter';
|
||||
export * from './demuxProbe';
|
||||
|
||||
@@ -77,30 +77,31 @@
|
||||
"@discordjs/rest": "workspace:^",
|
||||
"@discordjs/util": "workspace:^",
|
||||
"@sapphire/async-queue": "^1.5.5",
|
||||
"@types/ws": "^8.5.13",
|
||||
"@types/ws": "^8.18.1",
|
||||
"@vladfrangu/async_event_emitter": "^2.4.6",
|
||||
"discord-api-types": "^0.37.118",
|
||||
"discord-api-types": "^0.37.119",
|
||||
"tslib": "^2.8.1",
|
||||
"ws": "^8.18.0"
|
||||
"ws": "^8.18.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@types/node": "^22.10.10",
|
||||
"@vitest/coverage-v8": "^2.1.8",
|
||||
"@types/node": "^22.14.0",
|
||||
"@vitest/coverage-v8": "^3.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.1",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-neon": "^0.1.62",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"mock-socket": "^9.3.1",
|
||||
"prettier": "^3.4.2",
|
||||
"tsup": "^8.3.5",
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.5.4",
|
||||
"prettier": "^3.5.3",
|
||||
"tsup": "^8.4.0",
|
||||
"turbo": "^2.5.0",
|
||||
"typescript": "~5.8.3",
|
||||
"undici": "6.21.1",
|
||||
"vitest": "^2.1.8",
|
||||
"vitest": "^3.1.1",
|
||||
"zlib-sync": "^0.1.9"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -2,11 +2,11 @@ export * from './strategies/context/IContextFetchingStrategy.js';
|
||||
export * from './strategies/context/SimpleContextFetchingStrategy.js';
|
||||
export * from './strategies/context/WorkerContextFetchingStrategy.js';
|
||||
|
||||
export * from './strategies/sharding/IShardingStrategy.js';
|
||||
export type * from './strategies/sharding/IShardingStrategy.js';
|
||||
export * from './strategies/sharding/SimpleShardingStrategy.js';
|
||||
export * from './strategies/sharding/WorkerShardingStrategy.js';
|
||||
|
||||
export * from './throttling/IIdentifyThrottler.js';
|
||||
export type * from './throttling/IIdentifyThrottler.js';
|
||||
export * from './throttling/SimpleIdentifyThrottler.js';
|
||||
|
||||
export * from './utils/constants.js';
|
||||
|
||||
@@ -25,12 +25,10 @@ export class SimpleIdentifyThrottler implements IIdentifyThrottler {
|
||||
public async waitForIdentify(shardId: number, signal: AbortSignal): Promise<void> {
|
||||
const key = shardId % this.maxConcurrency;
|
||||
|
||||
const state = this.states.ensure(key, () => {
|
||||
return {
|
||||
queue: new AsyncQueue(),
|
||||
resetsAt: Number.POSITIVE_INFINITY,
|
||||
};
|
||||
});
|
||||
const state = this.states.ensure(key, () => ({
|
||||
queue: new AsyncQueue(),
|
||||
resetsAt: Number.POSITIVE_INFINITY,
|
||||
}));
|
||||
|
||||
await state.queue.wait({ signal });
|
||||
|
||||
|
||||
@@ -304,6 +304,7 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
|
||||
return;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
||||
if (!options.code) {
|
||||
options.code = options.recover === WebSocketShardDestroyRecovery.Resume ? CloseCodes.Resuming : CloseCodes.Normal;
|
||||
}
|
||||
@@ -704,7 +705,7 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
|
||||
this.replayedEvents++;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-nested-switch
|
||||
// eslint-disable-next-line sonarjs/no-nested-switch, @typescript-eslint/switch-exhaustiveness-check
|
||||
switch (payload.t) {
|
||||
case GatewayDispatchEvents.Ready: {
|
||||
this.#status = WebSocketShardStatus.Ready;
|
||||
|
||||
Reference in New Issue
Block a user