Closed
Conversation
- Update all z.record() calls to include key schemas - Fix z.function() API from tuple to object syntax - Replace .strict()/.passthrough() with z.strictObject()/z.looseObject() - Fix ZodError.errors → .issues usage in loaders - Fix ActionInputError generic type parameter - Remove zod-to-json-schema dependency, use native z.toJSONSchema() - Fix z.looseObject() schema._def property access issues - Update i18n.ts to handle looseObject type inference - Fix safeParseAsync usage in content/utils.ts Errors reduced from 190+ to 38 remaining, primarily type inference issues with z.looseObject() returning Record<string|number|symbol, T> keys
- Replace z.strict() with z.strictObject() and z.passthrough() with z.looseObject()
- Update z.function() calls to object syntax: {input: [...], output: ...}
- Change ZodError.errors to .issues everywhere
- Update z.record() calls to include both key and value schemas
- Remove errorMap parameter from parseAsync() calls (no longer supported)
- Fix ZodErrorMap callback signature with as any cast
- Add @ts-expect-error for Zod 4 RefinementCtx.path type issue
- Cast z.looseObject() results with as any where type inference fails
- 53 errors reduced to 3 remaining (type definition issues, not Zod API)
|
- Update z.record() to use 2-arg form (key, value schema)
- Update z.function() to use { input: [], output: schema } syntax
- Replace .error.errors with .error.issues in Zod 4
- Remove errorMap option parameters (not supported in Zod 4)
- Add type assertions for complex generic constraints
- Fix .default() to support function form in integration config
- Fix formDataToObject to check `_def.catchall` instead of `unknownKeys` for passthrough detection in Zod 4 - Fix handleFormDataGetAll to use `_def.element` instead of `_def.type` for accessing array element validators in Zod 4 - Update config-validate tests to use `.issues` instead of `.errors` for ZodError in Zod 4
- Changed errorMap from Zod 3's (baseError, ctx) to Zod 4's (iss) signature - Updated z.config() to use customError callback instead of z.setErrorMap() - Use iss.input instead of received for invalid_type/invalid_literal errors - Show received type name instead of actual value for type mismatch errors - Add handling for too_small errors in validation - Add error handling in customError callback to fallback gracefully
Closed
1 task
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.
WIP - early stages, ignore for now
Changes
Testing
Docs