fix: replace @dmitryrechkin/json-schema-to-zod with native zod v4 con…#295
Open
veeramarni wants to merge 1 commit intoinngest:mainfrom
Open
fix: replace @dmitryrechkin/json-schema-to-zod with native zod v4 con…#295veeramarni wants to merge 1 commit intoinngest:mainfrom
veeramarni wants to merge 1 commit intoinngest:mainfrom
Conversation
…verter Remove the @dmitryrechkin/json-schema-to-zod dependency which requires zod v3 and replace it with a self-contained JSON Schema to Zod converter that works natively with zod v4. Changes: - Remove @dmitryrechkin/json-schema-to-zod from dependencies in package.json - Add src/json-schema-to-zod.ts: self-contained converter supporting strings (format, pattern, enum, length), numbers/integers (min/max/multipleOf), booleans, nulls, arrays (items, min/max), objects (required, additionalProperties), combinators (oneOf/anyOf/allOf), nullable types, and type arrays - Update src/agent.ts: replace dynamic import of the external package with a direct import of the local jsonSchemaToZod function; removes the `as unknown as ZodType` cast since it now returns a native zod v4 type - Add src/json-schema-to-zod.test.ts: 25 tests covering all conversion scenarios including MCP-style tool input schemas This eliminates the zod v3/v4 compatibility issue where ZodSchema was renamed to ZodType in zod v4, which was causing runtime errors without patching.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…verter
Remove the @dmitryrechkin/json-schema-to-zod dependency which requires zod v3 and replace it with a self-contained JSON Schema to Zod converter that works natively with zod v4.
Changes:
as unknown as ZodTypecast since it now returns a native zod v4 typeThis eliminates the zod v3/v4 compatibility issue where ZodSchema was renamed to ZodType in zod v4, which was causing runtime errors without patching.