mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat: upgrade zod to v4 (#11258)
* feat: upgrade zod to v4 * fix: requested changes --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -19,6 +19,6 @@
|
|||||||
"eslint-config-neon": "^0.2.9",
|
"eslint-config-neon": "^0.2.9",
|
||||||
"eslint-formatter-pretty": "^7.0.0",
|
"eslint-formatter-pretty": "^7.0.0",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
"zod": "^3.25.76"
|
"zod": "^4.1.12"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,6 @@
|
|||||||
"eslint-formatter-pretty": "^7.0.0",
|
"eslint-formatter-pretty": "^7.0.0",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
"zod": "^3.25.76"
|
"zod": "^4.1.12"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,6 @@
|
|||||||
"imports": {
|
"imports": {
|
||||||
"@discordjs/core": "npm:@discordjs/core@^2.3.0",
|
"@discordjs/core": "npm:@discordjs/core@^2.3.0",
|
||||||
"discord.js": "npm:discord.js@^14.24.2",
|
"discord.js": "npm:discord.js@^14.24.2",
|
||||||
"zod": "npm:zod@^3.25.76",
|
"zod": "npm:zod@^4.1.12",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export type Command = {
|
|||||||
* Defines the schema for a command
|
* Defines the schema for a command
|
||||||
*/
|
*/
|
||||||
export const schema = z.object({
|
export const schema = z.object({
|
||||||
data: z.record(z.any()),
|
data: z.record(z.string(), z.any()),
|
||||||
execute: z.function(),
|
execute: z.function(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export type Event<EventName extends keyof ClientEvents = keyof ClientEvents> = {
|
|||||||
/**
|
/**
|
||||||
* Whether or not the event should only be listened to once
|
* Whether or not the event should only be listened to once
|
||||||
*
|
*
|
||||||
* @defaultValue false
|
* @defaultValue `false`
|
||||||
*/
|
*/
|
||||||
once?: boolean;
|
once?: boolean;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
"eslint-config-neon": "^0.2.9",
|
"eslint-config-neon": "^0.2.9",
|
||||||
"eslint-formatter-pretty": "^7.0.0",
|
"eslint-formatter-pretty": "^7.0.0",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
"zod": "^3.25.76"
|
"zod": "^4.1.12"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22.12.0"
|
"node": ">=22.12.0"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { z } from 'zod';
|
|||||||
* Defines the schema for a command
|
* Defines the schema for a command
|
||||||
*/
|
*/
|
||||||
export const schema = z.object({
|
export const schema = z.object({
|
||||||
data: z.record(z.any()),
|
data: z.record(z.string(), z.any()),
|
||||||
execute: z.function(),
|
execute: z.function(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
"eslint-formatter-pretty": "^7.0.0",
|
"eslint-formatter-pretty": "^7.0.0",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
"zod": "^3.25.76"
|
"zod": "^4.1.12"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22.12.0"
|
"node": ">=22.12.0"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export type Command = {
|
|||||||
* Defines the schema for a command
|
* Defines the schema for a command
|
||||||
*/
|
*/
|
||||||
export const schema = z.object({
|
export const schema = z.object({
|
||||||
data: z.record(z.any()),
|
data: z.record(z.string(), z.any()),
|
||||||
execute: z.function(),
|
execute: z.function(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export type Event<EventName extends keyof ClientEvents = keyof ClientEvents> = {
|
|||||||
/**
|
/**
|
||||||
* Whether or not the event should only be listened to once
|
* Whether or not the event should only be listened to once
|
||||||
*
|
*
|
||||||
* @defaultValue false
|
* @defaultValue `false`
|
||||||
*/
|
*/
|
||||||
once?: boolean;
|
once?: boolean;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user