Socket
Socket
Sign inDemoInstall

dotenv

Package Overview
Dependencies
Maintainers
4
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotenv - npm Package Compare versions

Comparing version 3.0.0 to 4.0.0

17

CHANGELOG.md

@@ -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

11

lib/main.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc