Superstruct v0.16.0 Release NotesRelease Date: 2022-06-06 // 12 months ago
Refinement functions are now called with valid, but potentially unrefined values. Previously the functions passed in to
refinewould always be called with sub-elements (eg. when using objects or arrays) that were completely valid and refined. However, this prevented collecting all the refinement errors from subelements in a validation in one go, which is common when validating forms. Note: this should not have any affect on almost all use cases, so you're safe to upgrade.
Previous changes from v0.15.0
🛠 ###### FIXED
Unions can now be coerced. Previously unions created a barrier in coercion such that structs nested inside unions would not have their coercion logic triggered, but this has been fixed.
typestructs. Previously using the
assignhelper would implicitly convert
objectstructs which wasn't expected and confusing, but this has been fixed.