mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
build: switch to bundler moduleResolution
This commit is contained in:
@@ -4,7 +4,7 @@ import { performance } from 'node:perf_hooks';
|
||||
import { MockAgent, setGlobalDispatcher } from 'undici';
|
||||
import type { Interceptable, MockInterceptor } from 'undici/types/mock-interceptor';
|
||||
import { beforeEach, afterEach, test, expect, vitest } from 'vitest';
|
||||
import { DiscordAPIError, HTTPError, RateLimitError, REST, BurstHandlerMajorIdKey } from '../src/index.js';
|
||||
import { DiscordAPIError, REST, BurstHandlerMajorIdKey } from '../src/index.js';
|
||||
import { BurstHandler } from '../src/lib/handlers/BurstHandler.js';
|
||||
import { genPath } from './util.js';
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { Snowflake } from 'discord-api-types/v10';
|
||||
import { Routes } from 'discord-api-types/v10';
|
||||
import type { FormData } from 'undici';
|
||||
import { File as UndiciFile, MockAgent, setGlobalDispatcher } from 'undici';
|
||||
import type { Interceptable, MockInterceptor } from 'undici/types/mock-interceptor';
|
||||
import type { Interceptable, MockInterceptor } from 'undici/types/mock-interceptor.js';
|
||||
import { beforeEach, afterEach, test, expect } from 'vitest';
|
||||
import { REST } from '../src/index.js';
|
||||
import { genPath } from './util.js';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { performance } from 'node:perf_hooks';
|
||||
import { setInterval, clearInterval, setTimeout } from 'node:timers';
|
||||
import { MockAgent, setGlobalDispatcher } from 'undici';
|
||||
import type { Interceptable, MockInterceptor } from 'undici/types/mock-interceptor';
|
||||
import type { Interceptable, MockInterceptor } from 'undici/types/mock-interceptor.js';
|
||||
import { beforeEach, afterEach, test, expect, vitest } from 'vitest';
|
||||
import { DiscordAPIError, HTTPError, RateLimitError, REST, RESTEvents } from '../src/index.js';
|
||||
import { genPath } from './util.js';
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
"module": "./dist/index.mjs",
|
||||
"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"
|
||||
},
|
||||
"directories": {
|
||||
"lib": "src",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { RateLimitData } from '../REST';
|
||||
import type { RateLimitData } from '../REST.js';
|
||||
|
||||
export class RateLimitError extends Error implements RateLimitData {
|
||||
public timeToReset: number;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Dispatcher } from 'undici';
|
||||
import type { RequestOptions } from '../REST';
|
||||
import type { RequestOptions } from '../REST.js';
|
||||
import type { HandlerRequestData, RouteData } from '../RequestManager.js';
|
||||
|
||||
export interface IHandler {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { setTimeout as sleep } from 'node:timers/promises';
|
||||
import { AsyncQueue } from '@sapphire/async-queue';
|
||||
import type { Dispatcher } from 'undici';
|
||||
import type { RateLimitData, RequestOptions } from '../REST';
|
||||
import type { HandlerRequestData, RequestManager, RouteData } from '../RequestManager';
|
||||
import type { RateLimitData, RequestOptions } from '../REST.js';
|
||||
import type { HandlerRequestData, RequestManager, RouteData } from '../RequestManager.js';
|
||||
import { RESTEvents } from '../utils/constants.js';
|
||||
import { hasSublimit, onRateLimit, parseHeader } from '../utils/utils.js';
|
||||
import type { IHandler } from './IHandler.js';
|
||||
|
||||
Reference in New Issue
Block a user