motdotla / dotenv

Loads environment variables from .env for nodejs projects.
https://www.dotenvx.com
BSD 2-Clause "Simplified" License
19.01k stars 853 forks source link

16.4.5 changing behavior of "config()" #832

Open backflip opened 2 months ago

backflip commented 2 months ago

16.4.5 changed the error case of config() from returning { error: Err } to { error: Err, parsed: {} }.

As a setup I was working on apparently relied on parsed being undefined in this case, installing this patch version broke it.

Could it be worth reverting this part of the fix? Or is the risk of someone running into this rather small as parsed being undefined was not documented behavior?