Skip to content

Commit 8c98060

Browse files
authored
fix: zod4 compatibility with server package (#2234)
1 parent 7560e6f commit 8c98060

File tree

25 files changed

+847
-1515
lines changed

25 files changed

+847
-1515
lines changed

packages/plugins/openapi/src/schema.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import z from 'zod';
44
* Zod schema for OpenAPI security schemes: https://swagger.io/docs/specification/authentication/
55
*/
66
export const SecuritySchemesSchema = z.record(
7+
z.string(),
78
z.union([
89
z.object({ type: z.literal('http'), scheme: z.literal('basic') }),
910
z.object({ type: z.literal('http'), scheme: z.literal('bearer'), bearerFormat: z.string().optional() }),
@@ -20,22 +21,22 @@ export const SecuritySchemesSchema = z.record(
2021
authorizationUrl: z.string(),
2122
tokenUrl: z.string(),
2223
refreshUrl: z.string(),
23-
scopes: z.record(z.string()),
24+
scopes: z.record(z.string(), z.string()),
2425
}),
2526
implicit: z.object({
2627
authorizationUrl: z.string(),
2728
refreshUrl: z.string(),
28-
scopes: z.record(z.string()),
29+
scopes: z.record(z.string(), z.string()),
2930
}),
3031
password: z.object({
3132
tokenUrl: z.string(),
3233
refreshUrl: z.string(),
33-
scopes: z.record(z.string()),
34+
scopes: z.record(z.string(), z.string()),
3435
}),
3536
clientCredentials: z.object({
3637
tokenUrl: z.string(),
3738
refreshUrl: z.string(),
38-
scopes: z.record(z.string()),
39+
scopes: z.record(z.string(), z.string()),
3940
}),
4041
}),
4142
}),

packages/plugins/trpc/tests/projects/nuxt-trpc-v10/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"trpc-nuxt": "^0.10.22",
1818
"vue": "latest",
1919
"vue-router": "latest",
20-
"zod": "^3.25.0"
20+
"zod": "^4.0.0"
2121
},
2222
"devDependencies": {
2323
"esbuild": "^0.24.0",

packages/plugins/trpc/tests/projects/nuxt-trpc-v11/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"trpc-nuxt": "^0.11.0-beta.1",
1818
"vue": "latest",
1919
"vue-router": "latest",
20-
"zod": "^3.25.0"
20+
"zod": "^4.0.0"
2121
},
2222
"devDependencies": {
2323
"esbuild": "^0.24.0",

packages/plugins/trpc/tests/projects/t3-trpc-v10/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"dependencies": {
1616
"@prisma/client": "6.0.x",
17-
"@t3-oss/env-nextjs": "^0.7.1",
17+
"@t3-oss/env-nextjs": "^0.13.1",
1818
"@tanstack/react-query": "^4.36.1",
1919
"@trpc/client": "^10.43.6",
2020
"@trpc/next": "^10.43.6",
@@ -24,7 +24,7 @@
2424
"react": "18.2.0",
2525
"react-dom": "18.2.0",
2626
"superjson": "^2.2.1",
27-
"zod": "^3.22.4"
27+
"zod": "^4.0.0"
2828
},
2929
"devDependencies": {
3030
"@types/eslint": "^8.44.7",

0 commit comments

Comments
 (0)