mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
chore: upgrade deps (#10824)
This commit is contained in:
@@ -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