Packages

dotenv-expand

1000.0.0 · 29 Jul 2026BSD-3-Clause62.5M / weekRepositoryHomepagenpmAtom feed

Your version

12.0.0

major16 Nov 2024Where it was published

12.0.3 is the newest release of 12.x.

In short

1 breaking1 new1 changed

  • Breaking

    ⚠️ BREAKING: do NOT attempt expansion of process.env

Release note

Added

  • 🎉 support alternate value expansion (see usage)

Changed

  • 🎉 Expansion logic rewritten to match dotenvx

NOTE: I recommend dotenvx over dotenv-expand when you are ready. I'm putting all my effort there for a unified standard .env implementation that works everywhere and matches bash, docker-compose, and more. In some cases it slightly improves on them - leading to more reliability for your secrets and config.

  • Breaking

    ⚠️ BREAKING: do NOT attempt expansion of process.env

This has always been dangerous (unexpected side effects) and is now removed. process.env should not hold values you want to expand. If for some reason you need equivalent abilities, use dotenvx. You can ship an encrypted .env file with your code - allowing safe expansion at runtime - rather than relying on trying to expand pre-existing process.env values that could for good reason have a dollar sign in them (example a password).

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.