mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
build: switch to bundler moduleResolution
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { setTimeout as sleep } from 'node:timers/promises';
|
||||
import { expect, test, vi, type Mock } from 'vitest';
|
||||
import { expect, test, vi } from 'vitest';
|
||||
import { SimpleIdentifyThrottler } from '../../src/index.js';
|
||||
|
||||
vi.mock('node:timers/promises', () => ({
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
"typings": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts"
|
||||
"require": "./dist/index.js"
|
||||
},
|
||||
"./defaultWorker": {
|
||||
"import": "./dist/defaultWorker.mjs",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Awaitable } from '@discordjs/util';
|
||||
import type { APIGatewayBotInfo } from 'discord-api-types/v10';
|
||||
import type { SessionInfo, WebSocketManager, WebSocketManagerOptions } from '../../ws/WebSocketManager';
|
||||
import type { SessionInfo, WebSocketManager, WebSocketManagerOptions } from '../../ws/WebSocketManager.js';
|
||||
|
||||
export interface FetchingStrategyOptions
|
||||
extends Omit<
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Collection } from '@discordjs/collection';
|
||||
import type { Awaitable } from '@discordjs/util';
|
||||
import type { GatewaySendPayload } from 'discord-api-types/v10';
|
||||
import type { WebSocketShardDestroyOptions, WebSocketShardStatus } from '../../ws/WebSocketShard';
|
||||
import type { WebSocketShardDestroyOptions, WebSocketShardStatus } from '../../ws/WebSocketShard.js';
|
||||
|
||||
/**
|
||||
* Strategies responsible for spawning, initializing connections, destroying shards, and relaying events
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Collection } from '@discordjs/collection';
|
||||
import type { GatewaySendPayload } from 'discord-api-types/v10';
|
||||
import type { WebSocketManager } from '../../ws/WebSocketManager';
|
||||
import type { WebSocketManager } from '../../ws/WebSocketManager.js';
|
||||
import { WebSocketShard, WebSocketShardEvents, type WebSocketShardDestroyOptions } from '../../ws/WebSocketShard.js';
|
||||
import { managerToFetchingStrategyOptions } from '../context/IContextFetchingStrategy.js';
|
||||
import { SimpleContextFetchingStrategy } from '../context/SimpleContextFetchingStrategy.js';
|
||||
|
||||
@@ -3,9 +3,13 @@ import { join, isAbsolute, resolve } from 'node:path';
|
||||
import { Worker } from 'node:worker_threads';
|
||||
import { Collection } from '@discordjs/collection';
|
||||
import type { GatewaySendPayload } from 'discord-api-types/v10';
|
||||
import type { IIdentifyThrottler } from '../../throttling/IIdentifyThrottler';
|
||||
import type { SessionInfo, WebSocketManager } from '../../ws/WebSocketManager';
|
||||
import type { WebSocketShardDestroyOptions, WebSocketShardEvents, WebSocketShardStatus } from '../../ws/WebSocketShard';
|
||||
import type { IIdentifyThrottler } from '../../throttling/IIdentifyThrottler.js';
|
||||
import type { SessionInfo, WebSocketManager } from '../../ws/WebSocketManager.js';
|
||||
import type {
|
||||
WebSocketShardDestroyOptions,
|
||||
WebSocketShardEvents,
|
||||
WebSocketShardStatus,
|
||||
} from '../../ws/WebSocketShard.js';
|
||||
import { managerToFetchingStrategyOptions, type FetchingStrategyOptions } from '../context/IContextFetchingStrategy.js';
|
||||
import type { IShardingStrategy } from './IShardingStrategy.js';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { setTimeout as sleep } from 'node:timers/promises';
|
||||
import { Collection } from '@discordjs/collection';
|
||||
import { AsyncQueue } from '@sapphire/async-queue';
|
||||
import type { IIdentifyThrottler } from './IIdentifyThrottler';
|
||||
import type { IIdentifyThrottler } from './IIdentifyThrottler.js';
|
||||
|
||||
/**
|
||||
* The state of a rate limit key's identify queue.
|
||||
|
||||
@@ -10,8 +10,8 @@ import {
|
||||
type GatewayIntentBits,
|
||||
type GatewaySendPayload,
|
||||
} from 'discord-api-types/v10';
|
||||
import type { IShardingStrategy } from '../strategies/sharding/IShardingStrategy';
|
||||
import type { IIdentifyThrottler } from '../throttling/IIdentifyThrottler';
|
||||
import type { IShardingStrategy } from '../strategies/sharding/IShardingStrategy.js';
|
||||
import type { IIdentifyThrottler } from '../throttling/IIdentifyThrottler.js';
|
||||
import { DefaultWebSocketManagerOptions, type CompressionMethod, type Encoding } from '../utils/constants.js';
|
||||
import type { WebSocketShardDestroyOptions, WebSocketShardEventsMap } from './WebSocketShard.js';
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
} from 'discord-api-types/v10';
|
||||
import { WebSocket, type RawData } from 'ws';
|
||||
import type { Inflate } from 'zlib-sync';
|
||||
import type { IContextFetchingStrategy } from '../strategies/context/IContextFetchingStrategy';
|
||||
import type { IContextFetchingStrategy } from '../strategies/context/IContextFetchingStrategy.js';
|
||||
import { ImportantGatewayOpcodes, getInitialSendRateLimitState } from '../utils/constants.js';
|
||||
import type { SessionInfo } from './WebSocketManager.js';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user