6.0.0
- 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 asasString()
is invoked. - Fix typings issue where
required()
was undefined on aIPresentVariable
.
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', 'admin@example.com').asString()
// New 6.x compatible code
const emailAddr = env.get('EMAIL_ADDR').default('admin@example.com').asString()