optimal

Build, validate, and transform values with immutable typed schemas.

MIT License

Downloads
256.4K
Stars
17
Committers
2

Bot releases are visible (Hide)

optimal - [email protected]

Published by milesj about 3 years ago

5.1.1 - 2021-10-16

🐞 Fixes

  • Improve optimal error message with name. (bfdd104)

⚙️ Types

  • [instance] Allow generic to be customized. (0ea4958)

Note: Version bump only for package optimal

optimal - [email protected] Latest Release

Published by milesj about 3 years ago

0.2.1 - 2021-10-16

📘 Docs

Note: Version bump only for package website

optimal - [email protected]

Published by milesj about 3 years ago

0.2.0 - 2021-10-10

🚀 Updates

  • Add .transform() method to all schemas. (be597e4)

🐞 Fixes

  • [func] Fix improper handling of undefined values. (d35d9a5)

Note: Version bump only for package website

optimal - [email protected]

Published by milesj about 3 years ago

5.1.0 - 2021-10-10

🚀 Updates

  • Add .transform() method to all schemas. (be597e4)

🐞 Fixes

  • [func] Fix improper handling of undefined values. (d35d9a5)

Note: Version bump only for package optimal

optimal - [email protected]

Published by milesj about 3 years ago

0.1.0 - 2021-10-07

🚀 Updates

📘 Docs

  • Integrate Docusaurus. (#41) (7435080), closes #41

Note: Version bump only for package website

optimal - [email protected]

Published by milesj about 3 years ago

5.0.0 - 2021-10-07

💥 Breaking

  • Update and/or/xor to use arrays. (6f9e12d)

🚀 Updates

  • Reduce error noise and complexity. (#40) (85f9215), closes #40
  • Add id() schema. (162f881)
  • Add options to common criteria. (21474b6)
  • Add uuid() schema. (5021ab9)

⚙️ Types

  • Allow current/root object to be typed. (ea39c8c)
  • Dont undefined arrays during deep partial. (93c1915)

📘 Docs

  • Integrate Docusaurus. (#41) (7435080), closes #41

Note: Version bump only for package optimal

optimal - [email protected]

Published by milesj about 3 years ago

5.0.0-alpha.5 - 2021-10-01

🚀 Updates

  • Improve error messages. (a6a7bb8)
  • Support undefined as a first-class type/value. (#39) (c885310), closes #39

🐞 Fixes

  • Only collection errors for shapes/unions. (49c64d8)

Note: Version bump only for package optimal

optimal - [email protected]

Published by milesj about 3 years ago

5.0.0-alpha.4 - 2021-09-21

🚀 Updates

  • Show value in error messages. (fbdde11)

🐞 Fixes

  • Allow empty blueprints for shapes. (6319a06)
  • Dont run criteria if never flag is set. (822f8da)
  • Include schema name in error message. (7dac519)

🛠 Internals

  • Verify function default values. (ac456bc)

Note: Version bump only for package optimal

optimal - [email protected]

Published by milesj about 3 years ago

5.0.0-alpha.3 - 2021-09-21

💥 Breaking

  • Implement an immutable API. (#37) (d1f12ba), closes #37
  • Migrate to ESM only. (5a7b10a)
  • Rework optimal() API. (e1edef8)

🚀 Updates

  • Add default value callbacks for lazy init. (89115c0)
  • Add lazy() schema. (0fca859)
  • Add new Infer type. (b0c42db)
  • Add when() criteria. (8ffb9c8)
  • Added keysOf() to objects. (186d509)
  • Collect all errors instead of failing on the first. (#38) (61ce05f), closes #38

🐞 Fixes

  • Allow empty strings for oneOf(). (67fddaf)
  • Pass path to custom callbacks. (fa2800a)
  • Remove default value from shape(). (96905e2)
  • Remove default value from tuple(). (97ec98b)
  • Remove schemas from union() call. (c71191e)
  • Switch to any function for consumers. (628e513)

⚙️ Types

  • Improve deep partial. (f36807b)
  • Update of to use generics for value. (a582bf6)
  • Update schema validation to use unknown. (72269c4)
  • Update to use Required. (cdce9b7)
  • Use new 'abstract new' constructor type. (a2a1e4f)

📦 Dependencies

  • [packemon] Update to v1.5. (06bea75)

🛠 Internals

Note: Version bump only for package optimal

optimal -

Published by milesj about 3 years ago

  • deps(packemon): Update to v1.5. 06bea75
  • deps(beemo/dev): Update to latest configs. 70e3d7a
  • types: Improve deep partial. f36807b
  • types: Update of to use generics for value. a582bf6
  • types: Update schema validation to use unknown. 72269c4
  • types: Use new 'abstract new' constructor type. a2a1e4f
  • fix: Switch to any function for consumers. 628e513

https://github.com/milesj/optimal/compare/v5.0.0-alpha.1...v5.0.0-alpha.2

optimal -

Published by milesj about 3 years ago

  • build: Fix release script. 524fb7e
  • breaking: Migrate to ESM only. 5a7b10a
  • new: Add when() criteria. 8ffb9c8
  • internal: Remove DEV checks. 4887f65
  • new: Add lazy() schema. 0fca859
  • new: Collect all errors instead of failing on the first. (#38) 61ce05f
  • docs: Start on comparison doc. 42c83fc
  • breaking: Implement an immutable API. (#37) d1f12ba
  • breaking: Rework optimal() API. e1edef8
  • new: Add new Infer type. b0c42db
  • new: Added keysOf() to objects. 186d509
  • new: Add default value callbacks for lazy init. 89115c0
  • fix: Pass path to custom callbacks. fa2800a
  • fix: Remove schemas from union() call. c71191e
  • fix: Remove default value from tuple(). 97ec98b
  • fix: Remove default value from shape(). 96905e2
  • fix: Allow empty strings for oneOf(). 67fddaf
  • build: Switch to a monorepo. (#36) 52b7140
  • build: Add local Beemo deps. 3f53316
  • build: Add tsconfig for build process. 21fe6a9
  • internal: Bump version to an alpha release. 57ee9dd
  • build: Migrate to Yarn 3. c69db83
  • build: Increase code coverage. a98f474
  • build: Migrate to @beemo/dev. (#34) b1e5997
  • breaking: Ground up rewrite. Migrate to functions from classes. (#31) 3aaabe2

https://github.com/milesj/optimal/compare/v4.3.0...v5.0.0-alpha.1

optimal - v4.3.0

Published by milesj over 3 years ago

new: Include invalid value in error messages.
fix: Improve tuple error messages.
fix: Improve union error messages.
fix: Resolve array/tuple within unions.
deps: Update root and dev dependencies.

optimal -

Published by milesj over 4 years ago

  • new: Rework default values to support undefined and null. 7ee0b15

https://github.com/milesj/optimal/compare/v4.1.2...v4.2.0

optimal -

Published by milesj over 4 years ago

  • fix: Fix nullable and empty checks. 914d2ef
  • fix(shape): Reset schema state. 5f57bc0
  • deps: Update all and rebuild lock file. 3c3bd12

https://github.com/milesj/optimal/compare/v4.1.1...v4.1.2

optimal -

Published by milesj over 4 years ago

  • fix: Remove func constraint. 25b9f2a

https://github.com/milesj/optimal/compare/v4.1.0...v4.1.1

optimal -

Published by milesj over 4 years ago

  • new: Add new schema properties. 6cb209a

https://github.com/milesj/optimal/compare/v4.0.1...v4.1.0

optimal -

Published by milesj almost 5 years ago

  • fix: Fix tuples in unions. f96a73e
  • fix: Fix tuple failing array checks. 186e8c8
  • deps: Update to latest. 4d24e5d

https://github.com/milesj/optimal/compare/v4.0.0...v4.0.1

optimal -

Published by milesj almost 5 years ago

  • new: Add Predicate#default() to return the default value. 9358f64
  • deps: Update to latest. 5a2d845

https://github.com/milesj/optimal/compare/v4.0.0-2...v4.0.0

optimal -

Published by milesj almost 5 years ago

  • fix: Dont use optimal within shapes. 36006f0
  • fix: Revert required() changes. 91e6322

https://github.com/milesj/optimal/compare/v4.0.0-1...v4.0.0-2

optimal -

Published by milesj almost 5 years ago

  • new: Support mapped types for object(). 88821bd
  • build: Switch to Rollup. (#24) 368eb3f
  • breaking: Rename Builder to Predicate. (#23) 03d75de
  • breaking: Rewrite to use an underlying Schema. (#22) 731f516
  • breaking: Rename runChecks() to run(). 69bd948
  • new: Add Builder#validate() method. 7ec0017

https://github.com/milesj/optimal/compare/v4.0.0-0...v4.0.0-1

Package Rankings
Top 4.03% on Npmjs.org
Badges
Extracted from project README
Build Status npm version npm deps