Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(package): Updated @effect/schema to 0.67.24
Patch Changes This commit addresses concerns raised by users about the confusing behavior when 'optional' is misused in a schema definition. Previously, users experienced unexpected results, such as a schema returning 'Schema.All' when 'optional' was used incorrectly, without clear guidance on the correct usage or error messages. Changes: Enhanced the 'optional' method to return a descriptive type-level error when used incorrectly, helping users identify and correct their schema definitions. Updated the Schema.optional() implementation to check its context within a pipeline and ensure it is being used correctly. Added unit tests to verify that the new error handling works as expected and to ensure that correct usage does not affect existing functionality. This commit addresses an issue where users encountered unexpected decoding behaviors, specifically regarding how undefined values and missing properties are handled. The default behavior of the @effect/schema library treats missing properties as undefined during decoding, which can lead to confusion when stricter validation is expected. Changes: Exposed an internal configuration option exțact (default: false), which when set to true, enforces strict decoding that will error on missing properties instead of treating them as undefined. Updated documentation to clearly outline the default and strict decoding behaviors, providing users with guidance on how to enable strict validation. Updated dependencies [06ede85, 7204ca5]: [email protected] Signed-off-by: Giovanni Ravalico <[email protected]>
- Loading branch information