Skip to content

Commit 0560439

Browse files
committed
refactor(deps): move zod from dependencies to peerDependencies
Move zod to peerDependencies with range '>=3.25.0 <5' to align with AI SDK compatibility requirements. This allows users to provide their own zod version, avoiding duplicate installations and ensuring type compatibility when using zod schemas with AI SDK. Changes: - Remove zod from dependencies - Add zod to peerDependencies (>=3.25.0 <5) - Add zod to devDependencies for testing (^4.1.13) - Update pnpm-workspace.yaml catalogs accordingly
1 parent feb36c4 commit 0560439

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@
5353
"dependencies": {
5454
"@modelcontextprotocol/sdk": "catalog:prod",
5555
"@orama/orama": "catalog:prod",
56-
"defu": "catalog:prod",
57-
"zod": "catalog:prod"
56+
"defu": "catalog:prod"
5857
},
5958
"devDependencies": {
6059
"@ai-sdk/provider": "catalog:dev",
@@ -78,12 +77,14 @@
7877
"type-fest": "catalog:dev",
7978
"typescript": "catalog:dev",
8079
"unplugin-unused": "catalog:dev",
81-
"vitest": "catalog:dev"
80+
"vitest": "catalog:dev",
81+
"zod": "catalog:dev"
8282
},
8383
"peerDependencies": {
8484
"@anthropic-ai/sdk": "catalog:peer",
8585
"ai": "catalog:peer",
86-
"openai": "catalog:peer"
86+
"openai": "catalog:peer",
87+
"zod": "catalog:peer"
8788
},
8889
"peerDependenciesMeta": {
8990
"@anthropic-ai/sdk": {

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ catalogs:
2828
typescript: ^5.8.3
2929
unplugin-unused: ^0.5.4
3030
vitest: ^4.0.15
31+
zod: ^4.1.13
3132
examples:
3233
'@anthropic-ai/claude-agent-sdk': ^0.1.67
3334
'@tanstack/ai': ^0.0.3
@@ -36,11 +37,11 @@ catalogs:
3637
'@anthropic-ai/sdk': ^0.52.0
3738
ai: ^5.0.108
3839
openai: ^6.2.0
40+
zod: '>=3.25.0 <5'
3941
prod:
4042
'@modelcontextprotocol/sdk': ^1.24.3
4143
'@orama/orama': ^3.1.11
4244
defu: ^6.1.4
43-
zod: ^4.1.13
4445

4546
enablePrePostScripts: true
4647

0 commit comments

Comments
 (0)