npm / dotenv
dotenv
What changed in dotenv 8 to 18, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
3 breaking6 new APIs and options1 performance5 behavior and defaults1 tooling9 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initdotenv 1820 changes
Breaking changes 2
Support for .env.vault has been removed.
Preloading has been removed; use the CLI with dotenv run -- your-command instead.
New APIs and options 4
Pass fast: true to opt in to the approximately 2x faster character-scanner parser.
Set DOTENV_FAST=true to opt in to the approximately 2x faster character-scanner parser.
Dotenv now provides a CLI command to run a command with environment variables injected.
The CLI accepts --fast to opt in to the approximately 2x faster character-scanner parser.
Performance 1
Improves performance when processing large .env files.
Behavior and default changes 4
The CLI now permits DOTENV_PATH to be an empty string.
Undefined settings such as quiet: true are treated as null rather than falsey.
Importing dotenv/config now defaults quiet to true.
The injecting message is sent to stderr rather than stdout.
Tooling 1
Type details were improved.
Fixes and other changes 8
Fixed dotenv.parse in Vite by moving the CLI shebang to a separate entry point.
The fast parser strips appended extra quotes.
The CLI honors the DOTENV_QUIET setting in the .env file.
Uses smarter parseBoolean logic instead of Boolean() to fix override behavior.
Fixes a missing TypeScript module declaration.
Patches the DOTENV_QUIET setting when it is inside an .env file.
Additional edge cases in the fast parser were patched.
Config logging now handles file URLs.
dotenv 174 changes
New APIs and options 2
Adds focused dotenv and dotenvx agent skills for discovery via the skills.sh ecosystem.
DotenvPopulateInput now accepts the NodeJS.ProcessEnv type.
Behavior and default changes 1
Tightens up log output; injection messages now use the format
◇ injecting env (14) from .env.
Fixes and other changes 1
Changes the text from “injecting” to “injected.”
dotenv 81 changes
Breaking changes 1
Support for Node v6 was dropped; developers must use a newer Node version.