Releases: DZakh/rescript-schema
Releases · DZakh/rescript-schema
v0.16.0
v0.15.0
- Removed transformation logic from
Record
struct factory. UseS.transform
together withS.record
to have the same behavior as before - Renamed
constructor
arguments toparser
- Renamed
destructor
arguments toserializer
- Added
S.record0
struct factory - Added
Tuple
struct factory - Added
S.literalUnit
struct factory - Removed
Unit
literal, useS.literalUnit
instead - Added more examples to the documentation
v0.14.0
v0.13.0
v0.12.1
v0.12.0
- Increased parsing performance by more than 100%
- Remove type annotations from code examples in README.md, because they confused beginners
- The Record tagged_t payload got a new data structure
- Fixed
S.json
type - Add validation of Literal struct values on serializing
- When serializing/parsing Literal struct value in Unsafe mode it'll always return literal value even if provided something else.
Example:123->S.parseWith(~mode=Unsafe, S.literal(String("foo"))) === Ok("foo")
v0.11.0
A lot of good though breaking changes:
- Introduce
Safe
andUnsafe
modes forS.parseWith
function - Introduce
S.serializeWith
function withSafe
andUnsafe
modes - Remove
S.constructWith
in favor ofS.parseWith(~mode=Unsafe, struct)
- Remove
S.destructWith
in favor ofS.serializeWith(~mode=Unsafe, struct)
- Introduce
S.json
struct factory - Remove
S.parseJsonWith
in favor ofS.parseWith(S.json(struct))
- Remove
S.serializeJsonWith
in favor ofS.serializeWith(S.json(struct))
- Add
S.transformUnknown
function for more convenient work withS.unknown
struct factory - Renaming public functions of the
MakeMetadata
module - Add undocumented
S.refine
function. It's an alpha version, that has a hight chance to be changed in next releases.
v0.10.0
v0.9.0
v0.8.0
- Removed
S.encodeWith
. UseS.destructWith
instead - Renamed
S.decodeWith
->S.parseWith
- Renamed
S.decodeJsonWith
->S.parseJsonWith
- Renamed
S.encodeJsonWith
->S.serializeJsonWith
- Fixed incorrect Null struct behaviour inside Deprecated and Option structs
- Added package prefix to error messages and rephrase them
- Added name to the raised JS exception