All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
- 🐞 fix recent regression when using
path
option. return to historical behavior: do not attempt to auto find .env
if path
set. (regression was introduced in 16.4.3
) #814
- 🐞 Replaced chaining operator
?.
with old school &&
(fixing node 12 failures) #812
- Fixed processing of multiple files in
options.path
#805
- Patch support for array as
path
option #797
- 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
- Add debug message when no encoding set #735
- Fix output typing for
populate
#792
- Use subarray instead of slice #793
- Add missing type definitions for
processEnv
and DOTENV_KEY
options. #756
- Optionally pass
DOTENV_KEY
to options rather than relying on process.env.DOTENV_KEY
. Defaults to process.env.DOTENV_KEY
#754
- Optionally write to your own target object rather than
process.env
. Defaults to process.env
. #753
- Add import type URL to types file #751
- Added
.github/
to .npmignore
#747
- Removed
browser
keys for path
, os
, and crypto
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 for path
, os
, and crypto
. node-polyfill-webpack-plugin provides these.
- Exposed private function
_configDotenv
as configDotenv
. #744
- Added type definition for
decrypt
function
- Fixed
{crypto: false}
in packageJson.browser
- 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
- Added library version to debug logs (#682)
- Export
env-options.js
and cli-options.js
in package.json for use with downstream dotenv-expand module
- Minor README clarifications
- Development ONLY: updated devDependencies as recommended for development only security risks (#658)
- Breaking: Backtick support 🎉 (#615)
If you had values containing the backtick character, please quote those values with either single or double quotes.
- Properly parse empty single or double quoted values 🐞 (#614)
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.)
- Preserve backwards compatibility on values containing
#
🐞 (#603)
- Preserve backwards compatibility on exports by re-introducing the prior in-place exports 🐞 (#606)
- Add
multiline
option 🎉 (#486)
- Add
dotenv_config_override
cli option
- Add
DOTENV_CONFIG_OVERRIDE
command line env option
- Add React gotcha to FAQ on README
- Add
override
option 🎉 (#595)
- Log error on failure to load
.env
file (#594)
- Breaking: Support inline comments for the parser 🎉 (#568)
- Hide comments and newlines from debug output (#404)
- Breaking: Add type file for
config.js
(#539)
- README updates
- Minor order adjustment to package json format
- Simplified jsdoc for consistency across editors
- Improve embedded jsdoc type documentation
- README updates and clarifications
- 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)
- Breaking: drop support for Node v10 (#558)
- Patch debug option (#550)
- Add generic support to parse function
- Allow for import "dotenv/config.js"
- Add support to resolve home directory in path via ~
- Support windows newlines with debug mode
- Breaking: drop support for Node v8
- define package.json in exports
- updated dev dependencies via npm audit
- allow for
import "dotenv/config"
- point to exact types file to work with VS Code
- Breaking: drop support for Node v8 (mistake to be released as minor bump. later bumped to 9.0.0. see above.)
- Breaking: drop support for Node v6 (#392)
- Breaking: drop support for Node v6 (#302)
- Fix removing unbalanced quotes (#376)
- Removed
load
alias for config
for consistency throughout code and documentation.
- Support preload configuration via environment variables (#351)
debug
option for config
and parse
methods will turn on logging
- Breaking: drop support for Node v4 (#304)
- Testing against Node v8 and v9
- Documentation on trim behavior of values
- Documentation on how to use with
import
- Breaking: default
path
is now path.resolve(process.cwd(), '.env')
- Breaking: does not write over keys already in
process.env
if the key has a falsy value
- using
const
and let
instead of var
- Return Object with parsed content or error instead of false (#165).
verbose
option removed in favor of returning result.
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 of verbose
- 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
- 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
- Silent option to silence
console.log
when .env
missing
- support for multiple
.env
files. should always use one .env
file for the current environment