Skip to content

Releases: DZakh/rescript-schema

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

v0.7.0

13 May 16:23
Compare
Choose a tag to compare
  • Added Null struct factory for nullable data
  • Added Unknown struct factory
  • Use the transform word instead of coerce
  • Removed Custom struct factory in favor of Unknown
  • Better tests that cover some edge-cases that aren't properly handled right now

v0.6.0

06 May 20:31
Compare
Choose a tag to compare
  • Make encodeWith and decodeWith work with any JS values and not only with Js.Json.t
  • Remove Json module because it became unneeded
  • Introduce opaque S.unknown type. You can use Js.Types module to work with it
  • Improve consistency for struct factories testing

I'm very happy about the change, because it makes rescript-struct something more than yet another JSON decoding/encoding library.
I've decided to update the roadmap section and start describing changes for releases 🎆