Skip to content

Commit 80fff4b

Browse files
committed
Add type definition for DOTENV_KEY
1 parent 50163a1 commit 80fff4b

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
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.
44

5-
## [Unreleased](https://github.com/motdotla/dotenv/compare/v16.3.0...master)
5+
## [Unreleased](https://github.com/motdotla/dotenv/compare/v16.3.1...master)
6+
7+
## [16.3.1](https://github.com/motdotla/dotenv/compare/v16.3.0...v16.3.1) (2023-06-17)
8+
9+
### Added
10+
11+
- Add missing type definitions for `processEnv` and `DOTENV_KEY` options. [#756](https://github.com/motdotla/dotenv/pull/756)
612

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

lib/main.d.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,20 @@ export interface DotenvConfigOptions {
5959
/**
6060
* Default: `process.env`
6161
*
62-
* Override any environment variables that have already been set on your machine with values from your .env file.
62+
* Specify an object to write your secrets to. Defaults to process.env environment variables.
6363
*
6464
* example: `const processEnv = {}; require('dotenv').config({ processEnv: processEnv })`
6565
*/
6666
processEnv?: DotenvPopulateInput;
67+
68+
/**
69+
* Default: `undefined`
70+
*
71+
* 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.
72+
*
73+
* example: `require('dotenv').config({ DOTENV_KEY: 'dotenv://:key_1234…@dotenv.org/vault/.env.vault?environment=production' })`
74+
*/
75+
DOTENV_KEY?: string;
6776
}
6877

6978
export interface DotenvConfigOutput {

0 commit comments

Comments
 (0)