Comparing version 1.0.0 to 1.1.0
@@ -14,2 +14,3 @@ 'use strict' | ||
var encoding = 'utf8' | ||
var silent = false | ||
@@ -23,2 +24,5 @@ if (options) { | ||
} | ||
if (options.silent) { | ||
silent = options.silent | ||
} | ||
} | ||
@@ -36,3 +40,5 @@ | ||
} catch(e) { | ||
console.error(e) | ||
if (!silent) { | ||
console.error(e) | ||
} | ||
return false | ||
@@ -39,0 +45,0 @@ } |
{ | ||
"name": "dotenv", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Loads environment variables from .env file", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -7,4 +7,5 @@ # dotenv | ||
[![BuildStatus](https://travis-ci.org/motdotla/dotenv.png?branch=master)](https://travis-ci.org/motdotla/dotenv) | ||
[![NPM version](https://badge.fury.io/js/dotenv.png)](http://badge.fury.io/js/dotenv) | ||
[![BuildStatus](https://img.shields.io/travis/motdotla/dotenv.svg?style=flat-square)](https://travis-ci.org/motdotla/dotenv) | ||
[![NPM version](https://img.shields.io/npm/v/dotenv.svg?style=flat-square)](https://www.npmjs.com/package/dotenv) | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) | ||
@@ -11,0 +12,0 @@ > "Storing [configuration in the environment](http://www.12factor.net/config) |
@@ -86,2 +86,11 @@ 'use strict' | ||
it('takes option for silencing errors', function (done) { | ||
var errorStub = s.stub(console, 'error') | ||
readFileSyncStub.throws() | ||
dotenv.config({silent: true}).should.eql(false) | ||
errorStub.called.should.be.false | ||
done() | ||
}) | ||
}) | ||
@@ -88,0 +97,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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
20008
236
174
0