Skip to content

Commit 538b47d

Browse files
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>
1 parent d923e90 commit 538b47d

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

packages/create-discord-bot/template/Bun/JavaScript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
"eslint-config-neon": "^0.2.9",
2020
"eslint-formatter-pretty": "^7.0.0",
2121
"prettier": "^3.6.2",
22-
"zod": "^3.25.76"
22+
"zod": "^4.1.12"
2323
}
2424
}

packages/create-discord-bot/template/Bun/TypeScript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
"eslint-formatter-pretty": "^7.0.0",
2323
"prettier": "^3.6.2",
2424
"typescript": "~5.9.3",
25-
"zod": "^3.25.76"
25+
"zod": "^4.1.12"
2626
}
2727
}

packages/create-discord-bot/template/Deno/deno.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
"imports": {
2222
"@discordjs/core": "npm:@discordjs/core@^2.3.0",
2323
"discord.js": "npm:discord.js@^14.24.2",
24-
"zod": "npm:zod@^3.25.76",
24+
"zod": "npm:zod@^4.1.12",
2525
},
2626
}

packages/create-discord-bot/template/Deno/src/commands/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export type Command = {
2222
* Defines the schema for a command
2323
*/
2424
export const schema = z.object({
25-
data: z.record(z.any()),
25+
data: z.record(z.string(), z.any()),
2626
execute: z.function(),
2727
});
2828

packages/create-discord-bot/template/Deno/src/events/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export type Event<EventName extends keyof ClientEvents = keyof ClientEvents> = {
1919
/**
2020
* Whether or not the event should only be listened to once
2121
*
22-
* @defaultValue false
22+
* @defaultValue `false`
2323
*/
2424
once?: boolean;
2525
};

packages/create-discord-bot/template/JavaScript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"eslint-config-neon": "^0.2.9",
2020
"eslint-formatter-pretty": "^7.0.0",
2121
"prettier": "^3.6.2",
22-
"zod": "^3.25.76"
22+
"zod": "^4.1.12"
2323
},
2424
"engines": {
2525
"node": ">=22.12.0"

packages/create-discord-bot/template/JavaScript/src/commands/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { z } from 'zod';
1212
* Defines the schema for a command
1313
*/
1414
export const schema = z.object({
15-
data: z.record(z.any()),
15+
data: z.record(z.string(), z.any()),
1616
execute: z.function(),
1717
});
1818

packages/create-discord-bot/template/TypeScript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"eslint-formatter-pretty": "^7.0.0",
2424
"prettier": "^3.6.2",
2525
"typescript": "~5.9.3",
26-
"zod": "^3.25.76"
26+
"zod": "^4.1.12"
2727
},
2828
"engines": {
2929
"node": ">=22.12.0"

packages/create-discord-bot/template/TypeScript/src/commands/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export type Command = {
2222
* Defines the schema for a command
2323
*/
2424
export const schema = z.object({
25-
data: z.record(z.any()),
25+
data: z.record(z.string(), z.any()),
2626
execute: z.function(),
2727
});
2828

packages/create-discord-bot/template/TypeScript/src/events/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export type Event<EventName extends keyof ClientEvents = keyof ClientEvents> = {
1919
/**
2020
* Whether or not the event should only be listened to once
2121
*
22-
* @defaultValue false
22+
* @defaultValue `false`
2323
*/
2424
once?: boolean;
2525
};

0 commit comments

Comments
 (0)