Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

app-conf

Package Overview
Dependencies
Maintainers
3
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-conf - npm Package Compare versions

Comparing version 0.6.2 to 0.7.0

8

index.js

@@ -5,6 +5,3 @@ "use strict";

const promisify = require("promise-toolbox/promisify");
const dirname = require("path").dirname;
const getFileStats = promisify(require("fs").stat);
const resolvePath = require("path").resolve;

@@ -23,9 +20,6 @@

const isPath = path => getFileStats(path).then(() => true, () => false);
const RELATIVE_PATH_RE = /^\.{1,2}[/\\]/;
function resolveRelativePaths(value, base) {
if (typeof value === "string" && RELATIVE_PATH_RE.test(value)) {
const path = resolvePath(base, value);
return isPath(path).then(success => (success ? path : value));
return Promise.resolve(resolvePath(base, value));
}

@@ -32,0 +26,0 @@

15

package.json
{
"name": "app-conf",
"version": "0.6.2",
"version": "0.7.0",
"license": "ISC",

@@ -29,3 +29,3 @@ "author": "Julien Fontanet <julien.fontanet@isonoe.net> (http://julien.isonoe.net/)",

"make-error": "^1.3.5",
"promise-toolbox": "^0.11.0",
"promise-toolbox": "^0.12.1",
"xdg-basedir": "^3.0.0"

@@ -35,10 +35,10 @@ },

"eslint": "^5.9.0",
"eslint-config-prettier": "^3.3.0",
"eslint-config-prettier": "^4.2.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-node": "^9.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"husky": "^1.1.4",
"jest": "^23.6.0",
"husky": "^2.3.0",
"jest": "^24.8.0",
"lint-staged": "^8.1.0",

@@ -67,5 +67,6 @@ "mock-fs": "^4.7.0",

"git add",
"eslint --ignore-pattern '!*'"
"eslint --ignore-pattern '!*'",
"jest --findRelatedTests --passWithNoTests"
]
}
}

@@ -6,5 +6,8 @@ # app-conf [![Build Status](https://travis-ci.org/julien-f/nodejs-app-conf.png?branch=master)](https://travis-ci.org/julien-f/nodejs-app-conf)

```javascript
var loadConfig = require('app-conf').load;
var loadConfig = require("app-conf").load;
loadConfig('my-application').then(function (config) {
loadConfig("my-application", {
// this is the directory where the vendor conf is stored
appDir: __dirname,
}).then(function(config) {
console.log(config);

@@ -23,2 +26,5 @@ });

Relative paths, string values starting by `./` or `../`, are automatically
resolved from the config file directory.
JSON format is supported natively but you may install the following

@@ -35,3 +41,3 @@ packages to have additional features:

Contributions are *very* welcome, either on the documentation or on
Contributions are _very_ welcome, either on the documentation or on
the code.

@@ -38,0 +44,0 @@

@@ -9,2 +9,2 @@ "use strict";

exports = module.exports = makeError("UnknownFormatError");
module.exports = makeError("UnknownFormatError");
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