Skip to content

Commit

Permalink
Add type definition for DOTENV_KEY
Browse files Browse the repository at this point in the history
  • Loading branch information
motdotla committed Jun 17, 2023
1 parent 50163a1 commit 80fff4b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Expand Up @@ -2,7 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [Unreleased](https://github.com/motdotla/dotenv/compare/v16.3.0...master)
## [Unreleased](https://github.com/motdotla/dotenv/compare/v16.3.1...master)

## [16.3.1](https://github.com/motdotla/dotenv/compare/v16.3.0...v16.3.1) (2023-06-17)

### Added

- Add missing type definitions for `processEnv` and `DOTENV_KEY` options. [#756](https://github.com/motdotla/dotenv/pull/756)

## [16.3.0](https://github.com/motdotla/dotenv/compare/v16.2.0...v16.3.0) (2023-06-16)

Expand Down
11 changes: 10 additions & 1 deletion lib/main.d.ts
Expand Up @@ -59,11 +59,20 @@ export interface DotenvConfigOptions {
/**
* Default: `process.env`
*
* Override any environment variables that have already been set on your machine with values from your .env file.
* Specify an object to write your secrets to. Defaults to process.env environment variables.
*
* example: `const processEnv = {}; require('dotenv').config({ processEnv: processEnv })`
*/
processEnv?: DotenvPopulateInput;

/**
* Default: `undefined`
*
* Pass the DOTENV_KEY directly to config options. Defaults to looking for process.env.DOTENV_KEY environment variable. Note this only applies to decrypting .env.vault files. If passed as null or undefined, or not passed at all, dotenv falls back to its traditional job of parsing a .env file.
*
* example: `require('dotenv').config({ DOTENV_KEY: 'dotenv://:key_1234…@dotenv.org/vault/.env.vault?environment=production' })`
*/
DOTENV_KEY?: string;
}

export interface DotenvConfigOutput {
Expand Down

0 comments on commit 80fff4b

Please sign in to comment.