Skip to content

Commit deec474

Browse files
committed
chore: use zod v4
1 parent 6b5c0de commit deec474

82 files changed

Lines changed: 300 additions & 295 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

integration-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@
4949
"strip-ansi": "7.1.2",
5050
"tslib": "2.8.1",
5151
"vitest": "4.1.3",
52-
"zod": "3.25.76"
52+
"zod": "4.4.3"
5353
}
5454
}

packages/internal/postgres/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"slonik": "48.13.2",
1212
"slonik-interceptor-query-logging": "48.13.2",
1313
"slonik-sql-tag-raw": "48.13.2",
14-
"zod": "3.25.76"
14+
"zod": "4.4.3"
1515
},
1616
"devDependencies": {
1717
"@hive/service-common": "workspace:*",

packages/libraries/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"graphql": "^16.8.1",
6868
"graphql-tag": "2.12.6",
6969
"tslib": "2.8.1",
70-
"zod": "3.25.76"
70+
"zod": "4.4.3"
7171
},
7272
"devDependencies": {
7373
"@types/env-ci": "3.1.4",

packages/libraries/cli/src/commands/app/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ export default class AppCreate extends Command<typeof AppCreate> {
310310
}
311311
}
312312

313-
const ManifestModel = z.record(z.string());
313+
const ManifestModel = z.record(z.string(), z.string());
314314

315315
const CreateAppDeploymentMutation = graphql(/* GraphQL */ `
316316
mutation CreateAppDeployment($input: CreateAppDeploymentInput!) {

packages/libraries/laboratory/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"react-dom": "^18.0.0 || ^19.0.0",
4040
"subscriptions-transport-ws": "^0.11.0",
4141
"tslib": "^2.8.1",
42-
"zod": "^4.1.12"
42+
"zod": "^4.4.3"
4343
},
4444
"dependencies": {
4545
"@base-ui/react": "^1.1.0",
@@ -135,7 +135,7 @@
135135
"vite-plugin-commonjs": "^0.10.4",
136136
"vite-plugin-dts": "^4.5.4",
137137
"vite-plugin-monaco-editor": "^1.1.0",
138-
"zod": "^4.3.6"
138+
"zod": "4.4.3"
139139
},
140140
"publishConfig": {
141141
"access": "public"

packages/migrations/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"tslib": "2.8.1",
3636
"tsx": "4.19.2",
3737
"typescript": "5.7.3",
38-
"zod": "3.25.76"
38+
"zod": "4.4.3"
3939
},
4040
"buildOptions": {
4141
"external": [

packages/migrations/src/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ if (environmentErrors.length) {
8282
process.exit(1);
8383
}
8484

85-
function extractConfig<Input, Output>(config: zod.SafeParseReturnType<Input, Output>): Output {
85+
function extractConfig<Output>(config: zod.ZodSafeParseResult<Output>): Output {
8686
if (!config.success) {
8787
throw new Error('Something went wrong.');
8888
}

packages/migrations/src/scripts/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ if (environmentErrors.length) {
5959
process.exit(1);
6060
}
6161

62-
function extractConfig<Input, Output>(config: zod.SafeParseReturnType<Input, Output>): Output {
62+
function extractConfig<Output>(config: zod.ZodSafeParseResult<Output>): Output {
6363
if (!config.success) {
6464
throw new Error('Something went wrong.');
6565
}

packages/services/api/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"redlock": "5.0.0-beta.2",
8383
"stripe": "17.5.0",
8484
"vitest": "4.1.3",
85-
"zod": "3.25.76",
86-
"zod-validation-error": "3.4.0"
85+
"zod": "4.4.3",
86+
"zod-validation-error": "5.0.0"
8787
}
8888
}

packages/services/api/src/modules/alerts/resolvers/Mutation/addAlertChannel.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ export const addAlertChannel: NonNullable<MutationResolvers['addAlertChannel']>
2222
const result = AddAlertChannelModel.safeParse(input);
2323

2424
if (!result.success) {
25+
const errors = z.treeifyError(result.error);
2526
return {
2627
error: {
2728
message: 'Please check your input.',
2829
inputErrors: {
29-
slackChannel: result.error.formErrors.fieldErrors.slack?.[0],
30-
webhookEndpoint: result.error.formErrors.fieldErrors.webhook?.[0],
31-
name: result.error.formErrors.fieldErrors.name?.[0],
30+
slackChannel: errors.properties?.slack?.errors.at(0),
31+
webhookEndpoint: errors.properties?.webhook?.errors.at(0),
32+
name: errors.properties?.name?.errors.at(0),
3233
},
3334
},
3435
};

0 commit comments

Comments
 (0)