Comparing version 3.0.0 to 4.0.0
@@ -7,3 +7,14 @@ # Change Log | ||
## [3.0.0] | ||
## [4.0.0] - 2016-12-23 | ||
### Changed | ||
- Return Object with parsed content or error instead of false ([#165](https://github.com/motdotla/dotenv/pull/165)). | ||
### Removed | ||
- `verbose` option removed in favor of returning result. | ||
## [3.0.0] - 2016-12-20 | ||
### Added | ||
@@ -60,3 +71,5 @@ | ||
[Unreleased]: https://github.com/motdotla/dotenv/compare/v2.0.0...HEAD | ||
[Unreleased]: https://github.com/motdotla/dotenv/compare/v4.0.0...HEAD | ||
[4.0.0]: https://github.com/motdotla/dotenv/compare/v3.0.0...v4.0.0 | ||
[3.0.0]: https://github.com/motdotla/dotenv/compare/v2.0.0...v3.0.0 | ||
[2.0.0]: https://github.com/motdotla/dotenv/compare/v1.2.0...v2.0.0 | ||
@@ -63,0 +76,0 @@ [1.2.0]: https://github.com/motdotla/dotenv/compare/v1.1.0...v1.2.0 |
@@ -48,8 +48,4 @@ 'use strict' | ||
var encoding = 'utf8' | ||
var verbose = false | ||
if (options) { | ||
if (options.verbose) { | ||
verbose = options.verbose | ||
} | ||
if (options.path) { | ||
@@ -71,8 +67,5 @@ path = options.path | ||
return parsedObj | ||
return { parsed: parsedObj } | ||
} catch (e) { | ||
if (verbose) { | ||
console.error('dotenv failed to parse and/or populate:' + e.message) | ||
} | ||
return false | ||
return { error: e } | ||
} | ||
@@ -79,0 +72,0 @@ } |
{ | ||
"name": "dotenv", | ||
"version": "3.0.0", | ||
"version": "4.0.0", | ||
"description": "Loads environment variables from .env file", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -68,18 +68,9 @@ # dotenv | ||
`config` will read your .env file, parse the contents, and assign it to | ||
[`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env). You can additionally, pass options to | ||
`config`. | ||
`config` will read your .env file, parse the contents, assign it to | ||
[`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env), | ||
and return an Object with a _parsed_ key containing the loaded content or an _error_ key if it failed. | ||
You can additionally, pass options to `config`. | ||
### Options | ||
#### Verbose | ||
Default: `false` | ||
All errors are suppressed by default. Set this to `true` for more logging. | ||
```js | ||
require('dotenv').config({verbose: true}) | ||
``` | ||
#### Path | ||
@@ -86,0 +77,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
14173
0
70
209