Skip to content

Expose dotenv candidate paths

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Sep 07:43
Immutable release. Only release title and notes can be modified.

EnvLoader now exposes a getPaths() method to inspect every dotenv file it may load, in priority order, without reading the filesystem.

const loader = new EnvLoader(appRoot)
const paths = loader.getPaths()

The returned absolute paths account for NODE_ENV, ENV_PATH, test environments, and the optional .env.example file.