-
-
Notifications
You must be signed in to change notification settings - Fork 39
Version 8 #345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
# Proposed changes - Change validation logic to follow Standard Schema consumption - Remove individual adapters for validation libraries ## Related issue(s) or discussion(s) re #321 --------- Co-authored-by: Edoardo Ranghieri <[email protected]>
BREAKING CHANGE: Remove the deprecated execute on mount functionality, found in hooks.
…on, throw them instead (#337) This PR removes the shaper `handleBindArgsValidationErrorsShape` util function, and also removes `bindArgsValidationErrors` from the result. Instead, if bound args validation errors occur, throw them on the server, using a new `ActionBindArgsValidationError` error class.
Code in this PR brings back the always defined safe action result, so users can destructure the result object, and access its optional properties directly. This is because `next/navigation` functions don't trigger an `undefined` result anymore, so everything works as expected now.
…339) The code in this PR renames the `schema` instance method to `inputSchema`. Since introducing output validation with the `outputSchema` method, I have considered renaming `schema` to `inputSchema` to make its purpose clearer. Note that the `schema` method will remain as an alias for `inputSchema`, but will be removed in a future release.
Code in this PR simplifies internal library code by a lot.
If a metadata schema is provided via `defineMetadataSchema` init function, and the `metadata` method is not used before `action`/`stateAction` method, now an error will inform the user that the type is incomplete.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…wValidationErrors` (#346) Code in this PR adds the ability to override the validation error message, when the `throwValidationErrors` option is used at the action level, using an optional async function called `overrideErrorMessage`, that returns the overridden error message, instead of the default one.
🎉 This PR is included in version 8.0.0-beta.12 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 8.0.0-beta.13 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 8.0.0-beta.14 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 8.0.0-beta.24 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 8.0.0-beta.25 🎉 The release is available on: Your semantic-release bot 📦🚀 |
curious on eta of this version 8? about to migrate some code and wanted to use safe-action, buti think i want to wait for this update |
🎉 This PR is included in version 8.0.0-beta.26 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 8.0.0-beta.27 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hey @chuckstock, I'll probably release it later today. I just need to fix the HookForm/Resolvers compatibility issues in the React Hook Form adapter package, but the lib API is stable right now. |
No description provided.