Skip to content

Releases: baileyherbert/env

v3.0.0

Choose a tag to compare

@baileyherbert baileyherbert released this 17 Jan 15:44

New features

Breaking changes

  • Bumped required engine to node>=18.0.0
  • Custom environment validators must implement the new when() method

v2.2.0

Choose a tag to compare

@baileyherbert baileyherbert released this 07 Dec 20:50
  • Added a boolean parameter to EnvironmentManager.rules() that can disable errors

v2.1.0

Choose a tag to compare

@baileyherbert baileyherbert released this 05 Nov 21:03
  • Added strong types to environment variables that use custom validators
  • Added an optional required argument to custom validators

v2.0.1

Choose a tag to compare

@baileyherbert baileyherbert released this 20 Sep 05:27
  • Improve inferred types for enum validations

v2.0.0

Choose a tag to compare

@baileyherbert baileyherbert released this 20 Sep 04:55

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

v1.3.1

Choose a tag to compare

@baileyherbert baileyherbert released this 29 May 13:04
  • Fixed some internal calls that caused errors on browsers

v1.3.0

Choose a tag to compare

@baileyherbert baileyherbert released this 22 May 02:13
  • Environment managers now accept optional prefixes which apply to all of their sources
  • The default name or path of the .env file can now be changed with the ENV_PATH variable

v1.2.0

Choose a tag to compare

@baileyherbert baileyherbert released this 08 Apr 14:54
  • Exports a new parseEnv function for parsing dotenv strings
  • Adds support for multi-line quoted values
  • Adds proper handling for quotes, escaping, and \n characters
  • Improves error messages for improper syntax

v1.1.0

Choose a tag to compare

@baileyherbert baileyherbert released this 16 Mar 19:24
  • The sources property on managers is now exposed
  • The .env file can now be disabled using ENV_SILENT=true on the process
  • Managers can now be used as sources in other managers

v1.0.0

Choose a tag to compare

@baileyherbert baileyherbert released this 26 Feb 05:00
  • Initial release