chore: upgrade deps (#10824)

This commit is contained in:
Noel
2025-04-05 13:18:56 +02:00
committed by GitHub
parent 432aba3df7
commit f580de8025
200 changed files with 6756 additions and 12893 deletions

View File

@@ -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';

View File

@@ -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 });

View File

@@ -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;