Skip to content

6.0.0

Compare
Choose a tag to compare
@evanshortiss evanshortiss released this 12 Feb 21:36
· 64 commits to master since this release
efebf57
  • Add support for setting an example value via the example(string) function.
  • Passing default values is now performed using the default(string) function.
  • Defer checks for required() until an accessor such as asString() is invoked.
  • Fix typings issue where required() was undefined on a IPresentVariable.

Migration from 5.x to 6.0.0 should be smooth. Change any instance of
env.get(target, default) to env.get(target).default(default). For example:

// Old 5.x code
const emailAddr = env.get('EMAIL_ADDR', '[email protected]').asString()

// New 6.x compatible code
const emailAddr = env.get('EMAIL_ADDR').default('[email protected]').asString()