Releases: humanwhocodes/env
Releases · humanwhocodes/env
v2.2.0
- 13e1b9d New: Add requireFirst() method (fixes #13) (@nzakas)
- a04b84e Chore: Ensure test doesn't output new files (@nzakas)
- 6c8b62b Update: Allow first() to accept a single-item array (fixes #26) (@nzakas)
- 84c64b1 Update: Type definition for require() (fixes #24) (@nzakas)
- 8b561ba Upgrade: Bump y18n from 4.0.0 to 4.0.1 (#20) (@dependabot[bot])
v2.1.4
v2.1.3
v2.1.2
v2.1.1
v2.1.0
v2.0.1
v2.0.0
v1.0.1
v1.0.0
Overview
This version updates the require()
method and the required
property so both will throw not only when an environment variable doesn't exist, but also when the environment variable is an empty string. While this is an unlikely scenario in local development, it becomes more likely when using a continuous integration (CI) environment where you often need to define environment variable values in a location separate from where they are used. These changes help to identify such problems.
For backwards compatibility, a new exists
property was added that works the same as required
in versions prior to v1.0.0. Additionally, a new has()
method was added to allow you to check for the existence of an environment variable directly.