Skip to content

Commit 0e2f52e

Browse files
committed
downgrade zod to match MCP typescript-sdk version
1 parent e969917 commit 0e2f52e

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

packages/common/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
},
3434
"dependencies": {
3535
"moment": "^2.30.1",
36-
"zod": "^4.0.0"
36+
"zod": "^3.23.8",
37+
"zod-to-json-schema": "^3.23.5"
3738
},
3839
"stableVersion": "0.1.14"
3940
}

packages/common/src/schemas/dataShapeToZod.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { z, ZodRawShape } from 'zod';
2+
import { zodToJsonSchema } from 'zod-to-json-schema';
23
import { DataShape, FieldDefinition, FieldType, Status } from '../index.js';
34

45
/**
@@ -110,10 +111,10 @@ export function toZod(dataShape: DataShape): z.ZodObject<ZodRawShape> {
110111
}
111112

112113
/**
113-
* Converts a DataShape to JSON Schema string using Zod v4 native conversion
114+
* Converts a DataShape to JSON Schema string using zod-to-json-schema
114115
*/
115116
export function toZodJSON(dataShape: DataShape): string {
116117
const zodSchema = toZod(dataShape);
117-
const jsonSchema = z.toJSONSchema(zodSchema);
118+
const jsonSchema = zodToJsonSchema(zodSchema);
118119
return JSON.stringify(jsonSchema, null, 2);
119120
}

packages/mcp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@vue-skuilder/common": "workspace:*",
2626
"@vue-skuilder/courseware": "workspace:*",
2727
"@vue-skuilder/db": "workspace:*",
28-
"zod": "^4.0.0"
28+
"zod": "^3.23.8"
2929
},
3030
"devDependencies": {
3131
"@modelcontextprotocol/inspector": "^0.16.1",

yarn.lock

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6626,7 +6626,8 @@ __metadata:
66266626
dependencies:
66276627
moment: "npm:^2.30.1"
66286628
typescript: "npm:~5.7.2"
6629-
zod: "npm:^4.0.0"
6629+
zod: "npm:^3.23.8"
6630+
zod-to-json-schema: "npm:^3.23.5"
66306631
languageName: unknown
66316632
linkType: soft
66326633

@@ -6877,7 +6878,7 @@ __metadata:
68776878
"@vue-skuilder/db": "workspace:*"
68786879
tsup: "npm:^8.0.0"
68796880
typescript: "npm:~5.7.2"
6880-
zod: "npm:^4.0.0"
6881+
zod: "npm:^3.23.8"
68816882
languageName: unknown
68826883
linkType: soft
68836884

@@ -21215,7 +21216,7 @@ __metadata:
2121521216
languageName: node
2121621217
linkType: hard
2121721218

21218-
"zod-to-json-schema@npm:^3.24.1":
21219+
"zod-to-json-schema@npm:^3.23.5, zod-to-json-schema@npm:^3.24.1":
2121921220
version: 3.24.6
2122021221
resolution: "zod-to-json-schema@npm:3.24.6"
2122121222
peerDependencies:

0 commit comments

Comments
 (0)