mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 08:03:30 +01:00
refactor!: remove builders and formatters re-export (#11361)
BREAKING CHANGE: removed builders and formatters re-export
This commit is contained in:
committed by
GitHub
parent
52173b6ca8
commit
84b85f4c91
@@ -66,7 +66,7 @@
|
||||
"funding": "https://github.com/discordjs/discord.js?sponsor",
|
||||
"dependencies": {
|
||||
"@discordjs/util": "workspace:^",
|
||||
"discord-api-types": "^0.38.40",
|
||||
"discord-api-types": "^0.38.41",
|
||||
"ts-mixer": "^6.0.4",
|
||||
"tslib": "^2.8.1",
|
||||
"zod": "^4.3.6"
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import { ChannelType, type APIApplicationCommandChannelOption } from 'discord-api-types/v10';
|
||||
import {
|
||||
type ApplicationCommandOptionAllowedChannelType,
|
||||
type APIApplicationCommandChannelOption,
|
||||
ChannelType,
|
||||
} from 'discord-api-types/v10';
|
||||
import { normalizeArray, type RestOrArray } from '../../../../util/normalizeArray';
|
||||
|
||||
export const ApplicationCommandOptionAllowedChannelTypes = [
|
||||
@@ -12,12 +16,7 @@ export const ApplicationCommandOptionAllowedChannelTypes = [
|
||||
ChannelType.GuildStageVoice,
|
||||
ChannelType.GuildForum,
|
||||
ChannelType.GuildMedia,
|
||||
] as const;
|
||||
|
||||
/**
|
||||
* Allowed channel types used for a channel option.
|
||||
*/
|
||||
export type ApplicationCommandOptionAllowedChannelType = (typeof ApplicationCommandOptionAllowedChannelTypes)[number];
|
||||
] as const satisfies readonly ApplicationCommandOptionAllowedChannelType[];
|
||||
|
||||
export interface ApplicationCommandOptionChannelTypesData extends Pick<
|
||||
APIApplicationCommandChannelOption,
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
"@discordjs/ws": "workspace:^",
|
||||
"@sapphire/snowflake": "^3.5.5",
|
||||
"@vladfrangu/async_event_emitter": "^2.4.7",
|
||||
"discord-api-types": "^0.38.40"
|
||||
"discord-api-types": "^0.38.41"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
"homepage": "https://discord.js.org",
|
||||
"funding": "https://github.com/discordjs/discord.js?sponsor",
|
||||
"dependencies": {
|
||||
"@discordjs/builders": "workspace:^",
|
||||
"@discordjs/collection": "workspace:^",
|
||||
"@discordjs/formatters": "workspace:^",
|
||||
"@discordjs/rest": "workspace:^",
|
||||
@@ -74,7 +73,7 @@
|
||||
"@discordjs/ws": "workspace:^",
|
||||
"@sapphire/snowflake": "3.5.5",
|
||||
"@vladfrangu/async_event_emitter": "^2.4.7",
|
||||
"discord-api-types": "^0.38.40",
|
||||
"discord-api-types": "^0.38.41",
|
||||
"fast-deep-equal": "3.1.3",
|
||||
"lodash.snakecase": "4.1.1",
|
||||
"magic-bytes.js": "^1.13.0",
|
||||
@@ -83,6 +82,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@discordjs/builders": "workspace:^",
|
||||
"@discordjs/docgen": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@favware/cliff-jumper": "^6.0.0",
|
||||
|
||||
@@ -254,8 +254,6 @@ exports.WidgetMember = require('./structures/WidgetMember.js').WidgetMember;
|
||||
|
||||
// External
|
||||
__exportStar(require('discord-api-types/v10'), exports);
|
||||
__exportStar(require('@discordjs/builders'), exports);
|
||||
__exportStar(require('@discordjs/formatters'), exports);
|
||||
__exportStar(require('@discordjs/rest'), exports);
|
||||
__exportStar(require('@discordjs/util'), exports);
|
||||
__exportStar(require('@discordjs/ws'), exports);
|
||||
|
||||
6
packages/discord.js/typings/index.d.ts
vendored
6
packages/discord.js/typings/index.d.ts
vendored
@@ -2,7 +2,6 @@ import { Buffer } from 'node:buffer';
|
||||
import { ChildProcess } from 'node:child_process';
|
||||
import { Stream } from 'node:stream';
|
||||
import { MessagePort, Worker } from 'node:worker_threads';
|
||||
import { ApplicationCommandOptionAllowedChannelType, MessageActionRowComponentBuilder } from '@discordjs/builders';
|
||||
import { Collection, ReadonlyCollection } from '@discordjs/collection';
|
||||
import { BaseImageURLOptions, ImageURLOptions, RawFile, REST, RESTOptions, EmojiURLOptions } from '@discordjs/rest';
|
||||
import { Awaitable, FileBodyEncodable, JSONEncodable } from '@discordjs/util';
|
||||
@@ -99,6 +98,7 @@ import {
|
||||
APIUser,
|
||||
APIUserSelectComponent,
|
||||
APIVoiceRegion,
|
||||
ApplicationCommandOptionAllowedChannelType,
|
||||
ApplicationCommandOptionType,
|
||||
ApplicationCommandPermissionType,
|
||||
ApplicationCommandType,
|
||||
@@ -6745,7 +6745,7 @@ export interface MessageSnapshot extends Partialize<
|
||||
export interface BaseMessageOptions {
|
||||
allowedMentions?: MessageMentionOptions;
|
||||
components?: readonly (
|
||||
| ActionRowData<MessageActionRowComponentBuilder | MessageActionRowComponentData>
|
||||
| ActionRowData<JSONEncodable<APIComponentInMessageActionRow> | MessageActionRowComponentData>
|
||||
| APIMessageTopLevelComponent
|
||||
| JSONEncodable<APIActionRowComponent<APIComponentInActionRow>>
|
||||
| JSONEncodable<APIMessageTopLevelComponent>
|
||||
@@ -7447,8 +7447,6 @@ export type InternalDiscordGatewayAdapterCreator = (
|
||||
// #endregion
|
||||
|
||||
// External
|
||||
export * from '@discordjs/builders';
|
||||
export * from '@discordjs/formatters';
|
||||
export * from '@discordjs/rest';
|
||||
export * from '@discordjs/util';
|
||||
export * from '@discordjs/ws';
|
||||
|
||||
@@ -1,7 +1,23 @@
|
||||
/* eslint-disable no-lone-blocks, @typescript-eslint/unbound-method, @typescript-eslint/ban-ts-comment, no-param-reassign, id-length */
|
||||
import type { ChildProcess } from 'node:child_process';
|
||||
import type { Worker } from 'node:worker_threads';
|
||||
import type { ChatInputCommandBuilder, ContextMenuCommandBuilder } from '@discordjs/builders';
|
||||
import {
|
||||
ActionRowBuilder,
|
||||
ButtonBuilder,
|
||||
ChannelSelectMenuBuilder,
|
||||
createComponentBuilder,
|
||||
EmbedBuilder,
|
||||
MentionableSelectMenuBuilder,
|
||||
MessageBuilder,
|
||||
ModalBuilder,
|
||||
PrimaryButtonBuilder,
|
||||
RoleSelectMenuBuilder,
|
||||
StringSelectMenuBuilder,
|
||||
TextInputBuilder,
|
||||
UserSelectMenuBuilder,
|
||||
type ChatInputCommandBuilder,
|
||||
type ContextMenuCommandBuilder,
|
||||
} from '@discordjs/builders';
|
||||
import type { ReadonlyCollection } from '@discordjs/collection';
|
||||
import type {
|
||||
APIButtonComponent,
|
||||
@@ -67,7 +83,6 @@ import type {
|
||||
AutoModerationRule,
|
||||
AutoModerationRuleManager,
|
||||
Awaitable,
|
||||
ButtonBuilder,
|
||||
ButtonComponent,
|
||||
ButtonComponentData,
|
||||
ButtonInteraction,
|
||||
@@ -143,7 +158,6 @@ import type {
|
||||
MessageManager,
|
||||
MessageMentions,
|
||||
MessageReaction,
|
||||
ModalBuilder,
|
||||
ModalSubmitInteraction,
|
||||
NonThreadGuildBasedChannel,
|
||||
PartialDMChannel,
|
||||
@@ -205,34 +219,23 @@ import type {
|
||||
VoiceServerUpdateData,
|
||||
} from './index.js';
|
||||
import {
|
||||
ActionRowBuilder,
|
||||
ChannelSelectMenuBuilder,
|
||||
Client,
|
||||
Collection,
|
||||
createComponentBuilder,
|
||||
EmbedBuilder,
|
||||
Events,
|
||||
IntentsBitField,
|
||||
MentionableSelectMenuBuilder,
|
||||
Options,
|
||||
PermissionsBitField,
|
||||
PrimaryButtonBuilder,
|
||||
Status,
|
||||
StringSelectMenuBuilder,
|
||||
TextInputBuilder,
|
||||
resolveColor,
|
||||
RoleSelectMenuBuilder,
|
||||
ShardEvents,
|
||||
TextDisplayComponentData,
|
||||
ThumbnailComponentData,
|
||||
UnfurledMediaItemData,
|
||||
UserContextMenuCommandInteraction,
|
||||
UserMention,
|
||||
UserSelectMenuBuilder,
|
||||
UserSelectMenuComponent,
|
||||
UserSelectMenuInteraction,
|
||||
Webhook,
|
||||
MessageBuilder,
|
||||
} from './index.js';
|
||||
|
||||
// Test type transformation:
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
"homepage": "https://discord.js.org",
|
||||
"funding": "https://github.com/discordjs/discord.js?sponsor",
|
||||
"dependencies": {
|
||||
"discord-api-types": "^0.38.40"
|
||||
"discord-api-types": "^0.38.41"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"@discordjs/rest": "workspace:^",
|
||||
"@discordjs/util": "workspace:^",
|
||||
"@discordjs/ws": "workspace:^",
|
||||
"discord-api-types": "^0.38.40"
|
||||
"discord-api-types": "^0.38.41"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
"@sapphire/async-queue": "^1.5.5",
|
||||
"@sapphire/snowflake": "^3.5.5",
|
||||
"@vladfrangu/async_event_emitter": "^2.4.7",
|
||||
"discord-api-types": "^0.38.40",
|
||||
"discord-api-types": "^0.38.41",
|
||||
"magic-bytes.js": "^1.13.0",
|
||||
"tslib": "^2.8.1",
|
||||
"undici": "7.22.0",
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
"dependencies": {
|
||||
"@discordjs/formatters": "workspace:^",
|
||||
"@sapphire/snowflake": "^3.5.5",
|
||||
"discord-api-types": "^0.38.40"
|
||||
"discord-api-types": "^0.38.41"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
"homepage": "https://discord.js.org",
|
||||
"funding": "https://github.com/discordjs/discord.js?sponsor",
|
||||
"dependencies": {
|
||||
"discord-api-types": "^0.38.40"
|
||||
"discord-api-types": "^0.38.41"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
"dependencies": {
|
||||
"@snazzah/davey": "^0.1.9",
|
||||
"@types/ws": "^8.18.1",
|
||||
"discord-api-types": "^0.38.40",
|
||||
"discord-api-types": "^0.38.41",
|
||||
"prism-media": "^1.3.5",
|
||||
"tslib": "^2.8.1",
|
||||
"ws": "^8.19.0"
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
"@sapphire/async-queue": "^1.5.5",
|
||||
"@types/ws": "^8.18.1",
|
||||
"@vladfrangu/async_event_emitter": "^2.4.7",
|
||||
"discord-api-types": "^0.38.40",
|
||||
"discord-api-types": "^0.38.41",
|
||||
"tslib": "^2.8.1",
|
||||
"ws": "^8.19.0"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user