Repository navigation
Releases: baileyherbert/env
Releases · baileyherbert/env
Release list
v3.0.0
New features
- Added conditional variables
- Added partial matching for enum variables
- Enum validators can now accept arrays of values without an explicit
as constassertion
Breaking changes
- Bumped required engine to
node>=18.0.0 - Custom environment validators must implement the new
when()method
v2.2.0
- Added a boolean parameter to
EnvironmentManager.rules()that can disable errors
v2.1.0
- Added strong types to environment variables that use custom validators
- Added an optional
requiredargument to custom validators
v2.0.1
- Improve inferred types for enum validations
v2.0.0
New major release with two breaking changes and some new features.
- Breaking: Environment sources now expose an
all()method to retrieve all known variables - Breaking: Improved enum resolution
- Enum validator no longer accepts values for enum objects by default
- Enum validator now matches key names in a case-insensitive manner
- Added new
StringEnvironmentSourceto read environment variables from a string in dotenv format - Added new
ObjectEnvironmentSourceto read environment variables from a plain object or map - Added a
custom()helper function to the schema object - Added an
apply()method to managers which applies all variables toprocess.envor to a supplied object
v1.3.1
- Fixed some internal calls that caused errors on browsers
v1.3.0
- Environment managers now accept optional prefixes which apply to all of their sources
- The default name or path of the
.envfile can now be changed with theENV_PATHvariable
v1.2.0
- Exports a new
parseEnvfunction for parsing dotenv strings - Adds support for multi-line quoted values
- Adds proper handling for quotes, escaping, and
\ncharacters - Improves error messages for improper syntax
v1.1.0
- The
sourcesproperty on managers is now exposed - The
.envfile can now be disabled usingENV_SILENT=trueon the process - Managers can now be used as sources in other managers