Comparing version 2.0.0 to 2.1.0
@@ -0,1 +1,2 @@ | ||
/* eslint-disable node/no-deprecated-api */ | ||
'use strict'; | ||
@@ -44,4 +45,6 @@ const fs = require('fs'); | ||
this.encryptionKey = options.encryptionKey; | ||
this.path = path.resolve(options.cwd, `${options.configName}.${options.fileExtension}`); | ||
const fileExtension = options.fileExtension ? `.${options.fileExtension}` : ''; | ||
this.path = path.resolve(options.cwd, `${options.configName}${fileExtension}`); | ||
const fileStore = this.store; | ||
@@ -51,3 +54,3 @@ const store = Object.assign(plainObject(), options.defaults, fileStore); | ||
assert.deepEqual(fileStore, store); | ||
} catch (e) { | ||
} catch (_) { | ||
this.store = store; | ||
@@ -54,0 +57,0 @@ } |
{ | ||
"name": "conf", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Simple config handling for your app or module", | ||
@@ -48,8 +48,8 @@ "license": "MIT", | ||
"devDependencies": { | ||
"ava": "*", | ||
"clear-module": "^2.1.0", | ||
"ava": "^0.25.0", | ||
"clear-module": "^3.0.0", | ||
"del": "^3.0.0", | ||
"tempy": "^0.2.1", | ||
"xo": "*" | ||
"xo": "^0.23.0" | ||
} | ||
} |
@@ -25,2 +25,3 @@ # conf [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/conf.svg?branch=master)](https://travis-ci.org/sindresorhus/conf) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/n88jwh3aju39i0p2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/conf/branch/master) | ||
const Conf = require('conf'); | ||
const config = new Conf(); | ||
@@ -108,3 +109,3 @@ | ||
You would usually not need this, but could useful if you want to interact with a file with a custom file extension that can be associated with your app. These might be simple save/export/preference files that are intended to be shareable or saved outside of the app. | ||
You would usually not need this, but could be useful if you want to interact with a file with a custom file extension that can be associated with your app. These might be simple save/export/preference files that are intended to be shareable or saved outside of the app. | ||
@@ -111,0 +112,0 @@ ### Instance |
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
12326
143
184