All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
16.4.5 (2024-02-19)
- 🐞 fix recent regression when using
path
option. return to historical behavior: do not attempt to auto find.env
ifpath
set. (regression was introduced in16.4.3
) #814
16.4.4 (2024-02-13)
- 🐞 Replaced chaining operator
?.
with old school&&
(fixing node 12 failures) #812
16.4.3 (2024-02-12)
- Fixed processing of multiple files in
options.path
#805
16.4.2 (2024-02-10)
- Changed funding link in package.json to
dotenvx.com
16.4.1 (2024-01-24)
- Patch support for array as
path
option #797
16.4.0 (2024-01-23)
- Add
error.code
to error messages around.env.vault
decryption handling #795 - Add ability to find
.env.vault
file when filename(s) passed as an array #784
16.3.2 (2024-01-18)
- Add debug message when no encoding set #735
16.3.1 (2023-06-17)
- Add missing type definitions for
processEnv
andDOTENV_KEY
options. #756
16.3.0 (2023-06-16)
- Optionally pass
DOTENV_KEY
to options rather than relying onprocess.env.DOTENV_KEY
. Defaults toprocess.env.DOTENV_KEY
#754
16.2.0 (2023-06-15)
- Optionally write to your own target object rather than
process.env
. Defaults toprocess.env
. #753 - Add import type URL to types file #751
16.1.4 (2023-06-04)
- Added
.github/
to.npmignore
#747
16.1.3 (2023-05-31)
- Removed
browser
keys forpath
,os
, andcrypto
in package.json. These were set to false incorrectly as of 16.1. Instead, if using dotenv on the front-end make sure to include polyfills forpath
,os
, andcrypto
. node-polyfill-webpack-plugin provides these.
16.1.2 (2023-05-31)
- Exposed private function
_configDotenv
asconfigDotenv
. #744
16.1.1 (2023-05-30)
- Added type definition for
decrypt
function
- Fixed
{crypto: false}
inpackageJson.browser
16.1.0 (2023-05-30)
- Add
populate
convenience method #733 - Accept URL as path option #720
- Add dotenv to
npm fund
command - Spanish language README #698
- Add
.env.vault
support. 🎉 (#730)
ℹ️ .env.vault
extends the .env
file format standard with a localized encrypted vault file. Package it securely with your production code deploys. It's cloud agnostic so that you can deploy your secrets anywhere – without risky third-party integrations. read more
- Fixed "cannot resolve 'fs'" error on tools like Replit #693
16.0.3 (2022-09-29)
- Added library version to debug logs (#682)
16.0.2 (2022-08-30)
- Export
env-options.js
andcli-options.js
in package.json for use with downstream dotenv-expand module
16.0.1 (2022-05-10)
- Minor README clarifications
- Development ONLY: updated devDependencies as recommended for development only security risks (#658)
16.0.0 (2022-02-02)
- Breaking: Backtick support 🎉 (#615)
If you had values containing the backtick character, please quote those values with either single or double quotes.
15.0.1 (2022-02-02)
- Properly parse empty single or double quoted values 🐞 (#614)
15.0.0 (2022-01-31)
v15.0.0
is a major new release with some important breaking changes.
- Breaking: Multiline parsing support (just works. no need for the flag.)
- Breaking:
#
marks the beginning of a comment (UNLESS the value is wrapped in quotes. Please update your.env
files to wrap in quotes any values containing#
. For example:SECRET_HASH="something-with-a-#-hash"
).
..Understandably, (as some teams have noted) this is tedious to do across the entire team. To make it less tedious, we recommend using dotenv cli going forward. It's an optional plugin that will keep your .env
files in sync between machines, environments, or team members.
- Breaking: Remove multiline option (just works out of the box now. no need for the flag.)
14.3.2 (2022-01-25)
- Preserve backwards compatibility on values containing
#
🐞 (#603)
14.3.1 (2022-01-25)
- Preserve backwards compatibility on exports by re-introducing the prior in-place exports 🐞 (#606)
14.3.0 (2022-01-24)
- Add
multiline
option 🎉 (#486)
14.2.0 (2022-01-17)
- Add
dotenv_config_override
cli option - Add
DOTENV_CONFIG_OVERRIDE
command line env option
14.1.1 (2022-01-17)
- Add React gotcha to FAQ on README
14.1.0 (2022-01-17)
- Add
override
option 🎉 (#595)
14.0.1 (2022-01-16)
- Log error on failure to load
.env
file (#594)
14.0.0 (2022-01-16)
- Breaking: Support inline comments for the parser 🎉 (#568)
13.0.1 (2022-01-16)
- Hide comments and newlines from debug output (#404)
13.0.0 (2022-01-16)
- Breaking: Add type file for
config.js
(#539)
12.0.4 (2022-01-16)
- README updates
- Minor order adjustment to package json format
12.0.3 (2022-01-15)
- Simplified jsdoc for consistency across editors
12.0.2 (2022-01-15)
- Improve embedded jsdoc type documentation
12.0.1 (2022-01-15)
- README updates and clarifications
12.0.0 (2022-01-15)
- Breaking: drop support for Flow static type checker (#584)
- Move types/index.d.ts to lib/main.d.ts (#585)
- Typescript cleanup (#587)
- Explicit typescript inclusion in package.json (#566)
11.0.0 (2022-01-11)
10.0.0 (2021-05-20)
- Add generic support to parse function
- Allow for import "dotenv/config.js"
- Add support to resolve home directory in path via ~
9.0.2 (2021-05-10)
- Support windows newlines with debug mode
9.0.1 (2021-05-08)
- Updates to README
9.0.0 (2021-05-05)
- Breaking: drop support for Node v8
8.6.0 (2021-05-05)
- define package.json in exports
8.5.1 (2021-05-05)
- updated dev dependencies via npm audit
8.5.0 (2021-05-05)
- allow for
import "dotenv/config"
8.4.0 (2021-05-05)
- point to exact types file to work with VS Code
8.3.0 (2021-05-05)
- Breaking: drop support for Node v8 (mistake to be released as minor bump. later bumped to 9.0.0. see above.)
8.2.0 (2019-10-16)
- TypeScript types
8.1.0 (2019-08-18)
- Breaking: drop support for Node v6 (#392)
8.0.0 (2019-05-02)
- Breaking: drop support for Node v6 (#302)
7.0.0 - 2019-03-12
- Fix removing unbalanced quotes (#376)
- Removed
load
alias forconfig
for consistency throughout code and documentation.
6.2.0 - 2018-12-03
- Support preload configuration via environment variables (#351)
6.1.0 - 2018-10-08
debug
option forconfig
andparse
methods will turn on logging
6.0.0 - 2018-06-02
- Breaking: drop support for Node v4 (#304)
5.0.0 - 2018-01-29
- Testing against Node v8 and v9
- Documentation on trim behavior of values
- Documentation on how to use with
import
- Breaking: default
path
is nowpath.resolve(process.cwd(), '.env')
- Breaking: does not write over keys already in
process.env
if the key has a falsy value - using
const
andlet
instead ofvar
- Testing against Node v7
4.0.0 - 2016-12-23
- Return Object with parsed content or error instead of false (#165).
verbose
option removed in favor of returning result.
3.0.0 - 2016-12-20
verbose
option will log any error messages. Off by default.- parses email addresses correctly
- allow importing config method directly in ES6
- Suppress error messages by default (#154)
- Ignoring more files for NPM to make package download smaller
- False positive test due to case-sensitive variable (#124)
silent
option removed in favor ofverbose
2.0.0 - 2016-01-20
- CHANGELOG to "make it easier for users and contributors to see precisely what notable changes have been made between each release". Linked to from README
- LICENSE to be more explicit about what was defined in
package.json
. Linked to from README - Testing nodejs v4 on travis-ci
- added examples of how to use dotenv in different ways
- return parsed object on success rather than boolean true
- README has shorter description not referencing ruby gem since we don't have or want feature parity
- Variable expansion and escaping so environment variables are encouraged to be fully orthogonal
1.2.0 - 2015-06-20
- Preload hook to require dotenv without including it in your code
- clarified license to be "BSD-2-Clause" in
package.json
- retain spaces in string vars
1.1.0 - 2015-03-31
- Silent option to silence
console.log
when.env
missing
1.0.0 - 2015-03-13
- support for multiple
.env
files. should always use one.env
file for the current environment