mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
chore: bump dependencies (#11051)
* chore: bump dependencies * build: bump discord-api-types to 0.38.22 * fix: fix builders --------- Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -42,7 +42,7 @@ describe('Text Input Components', () => {
|
||||
});
|
||||
|
||||
test('GIVEN valid input THEN valid JSON outputs are given', () => {
|
||||
const textInputData: APITextInputComponent = {
|
||||
const textInputData = {
|
||||
type: ComponentType.TextInput,
|
||||
label: 'label',
|
||||
custom_id: 'custom id',
|
||||
@@ -52,7 +52,7 @@ describe('Text Input Components', () => {
|
||||
value: 'value',
|
||||
required: false,
|
||||
style: TextInputStyle.Paragraph,
|
||||
};
|
||||
} satisfies APITextInputComponent;
|
||||
|
||||
expect(new TextInputBuilder(textInputData).toJSON()).toEqual(textInputData);
|
||||
expect(
|
||||
|
||||
@@ -66,27 +66,27 @@
|
||||
"funding": "https://github.com/discordjs/discord.js?sponsor",
|
||||
"dependencies": {
|
||||
"@discordjs/util": "workspace:^",
|
||||
"discord-api-types": "^0.38.16",
|
||||
"discord-api-types": "^0.38.22",
|
||||
"ts-mixer": "^6.0.4",
|
||||
"tslib": "^2.8.1",
|
||||
"zod": "^4.0.5"
|
||||
"zod": "^4.0.17"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@favware/cliff-jumper": "^4.1.0",
|
||||
"@types/node": "^22.16.3",
|
||||
"@types/node": "^22.17.2",
|
||||
"@vitest/coverage-v8": "^3.2.4",
|
||||
"cross-env": "^7.0.3",
|
||||
"cross-env": "^10.0.0",
|
||||
"esbuild-plugin-version-injector": "^1.2.1",
|
||||
"eslint": "^9.30.1",
|
||||
"eslint": "^9.33.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-compact": "^8.40.0",
|
||||
"eslint-formatter-pretty": "^6.0.1",
|
||||
"prettier": "^3.6.2",
|
||||
"tsup": "^8.5.0",
|
||||
"turbo": "^2.5.4",
|
||||
"typescript": "~5.8.3",
|
||||
"turbo": "^2.5.6",
|
||||
"typescript": "~5.9.2",
|
||||
"vitest": "^3.2.4"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -182,6 +182,8 @@ export function createComponentBuilder(
|
||||
return data;
|
||||
}
|
||||
|
||||
// https://github.com/discordjs/discord.js/pull/11034
|
||||
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
|
||||
switch (data.type) {
|
||||
case ComponentType.ActionRow:
|
||||
return new ActionRowBuilder(data);
|
||||
@@ -214,7 +216,6 @@ export function createComponentBuilder(
|
||||
case ComponentType.Container:
|
||||
return new ContainerBuilder(data);
|
||||
default:
|
||||
// @ts-expect-error This case can still occur if we get a newer unsupported component type
|
||||
throw new Error(`Cannot properly serialize component type: ${data.type}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ export class ModalBuilder implements JSONEncodable<APIModalInteractionResponseCa
|
||||
|
||||
this.data = {
|
||||
...structuredClone(rest),
|
||||
// @ts-expect-error https://github.com/discordjs/discord.js/pull/11034
|
||||
components: components.map((component) => createComponentBuilder(component)),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user