Skip to content

v2.0.0

Choose a tag to compare

@baileyherbert baileyherbert released this 20 Sep 04:55
· 10 commits to main since this release

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 StringEnvironmentSource to read environment variables from a string in dotenv format
  • Added new ObjectEnvironmentSource to 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 to process.env or to a supplied object