Skip to content

Releases: mojotech/json-type-validation

v3.1.0

16 Jan 15:49
Compare
Choose a tag to compare

Minor changes:

Upgrade Notes:

The library now uses TS 3.1 internally, and a number of instances of any have been replaced with the newer unknown type. Projects using < [email protected] will need a polyfill for the unknown type, such as unknown-ts.

v3.0.0

01 Nov 02:52
Compare
Choose a tag to compare

Major changes:

  • Remove exported decoderErrorString function f21e684
  • Do not throw an Error object from Result.withException 77ad1c3

Minor changes:

  • Add intersection decoder 678fada
  • The array() decoder with no arguments validates any[] d4326b5
  • The object() decoder with no arguments validates dictionaries with any values b989a86
  • Add where decoder method for adding non-type constraints on a decoder fc14fe0

Patch changes:

  • Fix missing 'lodash' production dependency 1026a4d

v2.0.0

20 Feb 18:18
Compare
Choose a tag to compare

Major changes:

  • Remove constantTrue, constantFalse, constantNull functions
  • Functions constant(true) and constant(false) always have type Decoder<true> and Decoder<false> respectively.

Minor changes:

  • Improve error messages for object, valueAt, and oneOf decoders.
  • Simplify error messages that have the form "expected X, got Y"
  • constant decoder can match constant arrays and objects

Patch changes:

  • Fix typos in readme
  • Remove unused dependencies

v1.0.2

15 Feb 16:45
Compare
Choose a tag to compare
1.0.2