Releases: evanshortiss/env-var
Releases · evanshortiss/env-var
7.0.0
6.3.0
6.2.0
- Add
accessors
property to the public API for use in buildingextraAccessors
(#121) - Add support for logging with a built-in or custom logger (#112)
- Add Node.js v14 to CI builds
- Add single quote rule to
.editorconfig
(#129) - Add JavaScript example for
extraAccesors
(#129) - Fix
extraAccessors
args type error (#131) - Fix types and docs for
asUrlString()
andasUrlObject()
(#132) - Update README for
asUrlString()
to mention WHATWG URL behaviour (#126, #129)
6.1.1
6.1.0
6.0.4
- Fix compilation error caused by typings generic issue.
6.0.3
- Fix typings to support
required()
,convertFromBase64()
, etc. withExtensionFn
.
6.0.2
- Fix
default()
so that it correctly returns an empty string value if provided. - README improvement by @joh-klein for positive/negative number parsing rules.
6.0.1
- Fix typings for the
default(value)
function.
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()