Releases: DZakh/rescript-schema
Releases · DZakh/rescript-schema
v2.0.0
Release to fix limitations I faced developing rescript-envsafe. Shouldn't be breaking for most users.
- Add
S.Int.port
built-in refinement - Rename
action
type tomigration
. Still don't like the name though 😅 - Add advanced preprocessing functionality, might be useful when you build sometimes on top of rescript-struct
- Remove
[ReScript Struct]
prefix from error message created byS.Error.toString
- Remove custom error
RescriptStructError
for panic and throw normalError
s with[rescript-struct]
prefix in message - Fix matching of
Literal
in thetagged
type. I mentioned the problem in the form post - Fix
Defaulted
andJson
structs withparseAsyncInStepsWith
. They will synchronously return error that happened before asynchronous operation - The
Json
struct factory is more performant and creates structs withJson
name instead ofString
- Creating structs became 20% faster. Now to create a struct and parse is just a little slower than only parsing for zod
- Add rescript-envsafe to the ecosystem of rescript-struct
- Update LICENSE copyright
v1.0.0
Final API changes:
- Rename
Record
struct toObject
- Rename
S.default
toS.defaulted
- Redesign undocumented
Metadata
module - Rename
tagged_t
totagged
- Move
Defaulted
,Deprecated
andunknownKeys
fromS.tagged
to their own modules - Add highlights to the documentation
v0.27.0
v0.26.0
v0.25.0
- Start using [email protected]
- Update API of the
Deprecated
struct factory to make it similar to built-in refinements - Change
Date
structtagged_t
fromInstance(unknown)
toDate
- Add helper
S.name
to get a struct name. Useful for custom error messages
v0.24.0
v0.23.0
Breaking changes:
- Remove different parsing modes. The reason is that the
Safe
mode became comparably fast to theMigration
mode. - Use
S.Record.strip
as default instead ofS.Record.strict
. - Remove
S.superTransform
andS.Error.make
. - Change
S.transform
andS.custom
API from result based to exception based. Use the newS.Error.raise
to exit with failure.
New features:
- Finalize and document
S.refine
function. - Add async refinements with
S.asyncRefine
. - Add async transforms with
S.advancedTransform
. - Add
S.parseAsyncWith
andS.parseAsyncInStepsWith
to parse structs with asynchronous refinements or transforms. - Add the
UnexpectedAsync
error when trying to synchronously parse structs with asynchronous refinements or transforms. - Increase parsing performance by 20%.
- Update roadmap
v0.22.0
v0.21.0
- Remove different modes for serializing
- [dev] Update rescript-ava package