Skip to content

Releases: dhoulb/blork

v9.3.0

30 Jan 15:23
Compare
Choose a tag to compare

9.3.0 (2021-01-30)

Features

  • typings: make stricter error type declaration (9561c87)

v9.2.2

05 Nov 18:03
c31b3c7
Compare
Choose a tag to compare

9.2.2 (2019-11-05)

Bug Fixes

  • add TypeScript definitions (c31b3c7)

v9.2.1

16 Dec 02:47
Compare
Choose a tag to compare

9.2.1 (2018-12-16)

Bug Fixes

  • Incorrect function name prepended to error messages (55dce4f)
  • Strip unnecessary "Object." from function name (55de4f1)

v9.2.0

16 Dec 01:44
Compare
Choose a tag to compare

9.2.0 (2018-12-16)

Features

  • Add path, relative, absolute checkers for validating filesystem paths (b946d60)

v9.1.1

05 Nov 02:31
Compare
Choose a tag to compare

9.1.1 (2018-11-05)

Bug Fixes

  • modifiers: return false if sub-checkers aren't found (causing BlorkError) (d9bea70)

v9.1.0

02 Nov 18:20
Compare
Choose a tag to compare

9.1.0 (2018-11-02)

Features

  • add uint16..., typeerror..., and identifier checkers (d52bc95)

v9.0.2

27 Oct 13:49
Compare
Choose a tag to compare

9.0.2 (2018-10-27)

Bug Fixes

  • types: param for BlorkChecker should allow any (1bc61e0)
  • types: ValueError allows any value (6f46680)

v9.0.1

27 Oct 12:46
Compare
Choose a tag to compare

9.0.1 (2018-10-27)

Bug Fixes

  • types: value in ValueError is not readonly (82932e4)

Major version

11 Sep 04:07
Compare
Choose a tag to compare

This is a major version introducing several breaking changes and removes several features in order to significantly reduce bloat and bundle size. Please review changes carefully before upgrading.

  • Changes to simplify check()
    • Removed prefix as third argument (check() now accepts only value, type, error)
    • Added prefix: X string modifier type instead to cover the same functionality
    • e.g. check(123, "name: string") will throw "name: Must be string (received 123)")
  • Types can only be specified as strings now:
    • Removed ability to use a literal array or object as the type in check() (use array and object string types instead)
    • Removed ability to use a literal function as an instanceof in check() (add a custom named checker with add() and use that instead)
    • Removed ability to use constructors (e.g. Number) as a type in check() (use "num" etc instead)
  • Remove excess barely-used and bloated functionality:
    • Removed blork() function that created an independent instance of Blork (unnecessary bloat)
    • Removed throws() function (confusing bloat — use third argument of check() instead)
    • Removed args() function (created inconsistencies — use several check() calls instead)
    • Removed assert() function (was confusing to use — use if (!X) throw Error instead as it's more explicit)
  • Add Flow type declaration for exported functions

Bugfix version

10 Sep 16:11
Compare
Choose a tag to compare
  • Fix to ensure return type has highest precedence