Skip to content

Releases: losandes/polyn-blueprint

feat: adds es module support

24 Feb 01:39
61317bb
Compare
Choose a tag to compare

Adds ES support so this lib can be imported and the top level exports
can be destructured. Also adds tests for the es module imports.

feat: adds is.arrayOf for evaluting arrays of primitives

01 Apr 19:37
26e4a80
Compare
Choose a tag to compare

The undocumented is feature in blueprint is used by other polyn libraries. This adds the ability to evaluate arrays of primitives. Note that this isn't a change to the blueprint evaluation if arrays, which support custom validation in addition to primitives. It's only an addition to the is feature set.

chore: updates dependencies

26 Mar 02:44
Compare
Choose a tag to compare

This is a maintenance release that updates the dependencies, all of which are dev dependencies, so there is no functional difference in the production code.

Adds `is.[not].primitive` to the Type File

11 Sep 17:59
40dfeac
Compare
Choose a tag to compare

Adds is.primitive, and is.not.primitive to the TypeScript Type File

Adds `is.[not].primitive` To `is`

11 Sep 17:21
afb6076
Compare
Choose a tag to compare

Adds is.primitive and is.not.primitive to is

The following results from is.getType will return true for
is.primitive. Everything else returns false.

  • 'boolean',
  • 'null',
  • 'undefined',
  • 'number',
  • 'bigint',
  • 'string',
  • 'symbol'

Fixes Typings and Upgrades Packages

27 Aug 12:57
e81fcf4
Compare
Choose a tag to compare
  • Fixes is Typings

The getType output type was set to boolean, when it should have been
string, and getType was defined on not in the Type file, but it
isn't defined there in JS.

  • Upgrades Packages

Upgrades all packages, but more specifically, gets the latest
eslint-utils to address GHSA-3gx7-xhv7-5mx3

Runs npm audit fix And Updates lodash

13 Jul 15:36
14ee062
Compare
Choose a tag to compare

This package only has devDependencies, so consumers
were not subject to any of the vulnerabilities that
are fixed in this update.

Adds `from` to `optional` and `Blueprint.required`

25 Jun 05:41
Compare
Choose a tag to compare
  • Adds required to blueprint, which can be used with from to map the
    input properties to different output properties. This is intendeded to
    be used in conjunction with immutable.
  • Adds the same from behavior to optional

Adds Partial Output To ValidationContext

25 May 14:34
Compare
Choose a tag to compare

Adds the value that will be returned by validate to the
ValidationContext, so inline validators can base their output and
validity on previously processed properties.

Adds is.asyncFunc and is.promise to the TypeScript definitions.

Updates documentation for the ValidationContext, and to all TypeScript
interfaces.

Reduces verbosity when returning IValueOrError, so consumers don't have
to set a bunch of null properties. Blueprint guarantees them for us, so
no reason to set them explicitly.

Adds Validation For AyncFunction and Promise

25 May 04:25
f6774b2
Compare
Choose a tag to compare
  • Adds ability to check if is.asyncFunction, or is.promise, as well as
    validators for these.
  • Refactors is.getType so it will always return the lowered, printed
    type (i.e. an object that prints as [object Boolean] will return
    'boolean').
  • Adds optional Strict Type support for ValueOrError<T>.
  • Adds optional Strict Type to remaining interfaces: IBlueprint and
    IValidationContext.
  • Adds examples for all Strictly Typed interfaces