Skip to content

Commit

Permalink
Merge pull request #742 from motdotla/crypto-false-for-browser
Browse files Browse the repository at this point in the history
Add crypto to browser false list
  • Loading branch information
motdotla committed May 31, 2023
2 parents ef48935 + 0d94e71 commit 6287f15
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. See [standa

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

## [16.1.1](https://github.com/motdotla/dotenv/compare/v16.1.0...v16.1.1) (2023-05-30)

### Added

- Added type definition for `decrypt` function

### Changed

- Fixed `{crypto: false}` in `packageJson.browser`

## [16.1.0](https://github.com/motdotla/dotenv/compare/v16.0.3...v16.1.0) (2023-05-30)

### Added
Expand Down
18 changes: 15 additions & 3 deletions lib/main.d.ts
Expand Up @@ -105,10 +105,22 @@ export function config(options?: DotenvConfigOptions): DotenvConfigOutput;
*
* See https://docs.dotenv.org
*
* @param target - the target JSON object
* @param source - the source JSON object
* @param processEnv - the target JSON object. in most cases use process.env but you can also pass your own JSON object
* @param parsed - the source JSON object
* @param options - additional options. example: `{ debug: true, override: false }`
* @returns {void}
*
*/
export function populate(target: DotenvPopulateInput, source: DotenvPopulateInput, options?: DotenvConfigOptions): DotenvPopulateOutput;
export function populate(processEnv: DotenvPopulateInput, parsed: DotenvPopulateInput, options?: DotenvConfigOptions): DotenvPopulateOutput;

/**
* Decrypt ciphertext
*
* See https://docs.dotenv.org
*
* @param encrypted - the encrypted ciphertext string
* @param keyStr - the decryption key string
* @returns {string}
*
*/
export function decrypt(encrypted: string, keyStr: string): string;
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -58,7 +58,8 @@
"browser": {
"fs": false,
"path": false,
"os": false
"os": false,
"crypto": false
},
"engines": {
"node": ">=12"
Expand Down

0 comments on commit 6287f15

Please sign in to comment.