Skip to content

Releases: DZakh/rescript-schema

v0.16.0

19 Jun 20:18
Compare
Choose a tag to compare
  • Added detailed error object S.Error.t as an operation result. It has S.Error.toString function to return a formatted error message.
  • Added Result helper module with getExn and mapErrorToString functions

v0.15.0

19 Jun 14:11
Compare
Choose a tag to compare
  • Removed transformation logic from Record struct factory. Use S.transform together with S.record to have the same behavior as before
  • Renamed constructor arguments to parser
  • Renamed destructor arguments to serializer
  • Added S.record0 struct factory
  • Added Tuple struct factory
  • Added S.literalUnit struct factory
  • Removed Unit literal, use S.literalUnit instead
  • Added more examples to the documentation

v0.14.0

15 Jun 15:46
Compare
Choose a tag to compare
  • Add Union struct factory
  • Remove Dynamic struct factory. Use Union instead
  • Add S.literalVariant to make it easier to transform JS literals to ReScript variants

v0.13.0

12 Jun 07:49
Compare
Choose a tag to compare
  • Add Unit Literal struct factory
  • Add Dynamic struct factory
  • Improve S.array and S.dict structs performance

v0.12.1

08 Jun 07:56
Compare
Choose a tag to compare
  • Fix broken MakeMetadata module

v0.12.0

08 Jun 07:25
Compare
Choose a tag to compare
  • 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

29 May 19:20
Compare
Choose a tag to compare

A lot of good though breaking changes:

  • Introduce Safe and Unsafe modes for S.parseWith function
  • Introduce S.serializeWith function with Safe and Unsafe modes
  • Remove S.constructWith in favor of S.parseWith(~mode=Unsafe, struct)
  • Remove S.destructWith in favor of S.serializeWith(~mode=Unsafe, struct)
  • Introduce S.json struct factory
  • Remove S.parseJsonWith in favor of S.parseWith(S.json(struct))
  • Remove S.serializeJsonWith in favor of S.serializeWith(S.json(struct))
  • Add S.transformUnknown function for more convenient work with S.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

15 May 15:33
Compare
Choose a tag to compare
  • Add Never struct factory
  • Add Literal struct factory
  • Add "Properly handle NaN" and "Design and add async transforms" to the roadmap

v0.9.0

15 May 09:50
Compare
Choose a tag to compare
  • Add configurable Strict and Strip unknown keys strategies

v0.8.0

14 May 11:16
Compare
Choose a tag to compare
  • Removed S.encodeWith. Use S.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