New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

confi

Package Overview
Dependencies
Maintainers
5
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

confi - npm Package Compare versions

Comparing version 7.1.1 to 8.0.0

.nyc_output/4c0770a6317733a255c4ff2cc4cba75e.json

30

lib/confi.js

@@ -13,2 +13,3 @@ 'use strict';

const parseDir = require('parse-dir');
const ms = require('ms');

@@ -21,2 +22,3 @@ const confPath = process.env.CONFI_PATH || path.join(cwd, 'conf');

context: {},
config: {},
helpers: {}

@@ -99,5 +101,24 @@ };

config(defaultConf, packageOpts, envConf, userConf, urlConf, envVarConf, fileConf, opts, done) {
const config = aug(defaultConf, packageOpts, envConf, fileConf, urlConf, userConf, envVarConf, opts.context);
const config = aug(defaultConf, packageOpts, envConf, fileConf, urlConf, userConf, envVarConf, opts.config);
config.env = opts.env;
return done(null, config);
},
defaultHelpers(done) {
done(null, {
ms,
getEnv(key, fallback) {
return process.env[key] || fallback;
}
});
},
context(opts, defaultHelpers, done) {
const context = aug({
env: opts.env,
CWD: cwd,
ENV: process.env || {}
}, opts.context, defaultHelpers, opts.helpers);
done(null, context);
},
varson(context, config, done) {
done(null, varson(config, context));
}

@@ -108,8 +129,3 @@ }, (err, results) => {

}
const context = Object.assign({
env: results.opts.env,
CWD: cwd,
ENV: process.env || {}
}, results.opts.helpers);
return callback(null, varson(results.config, context));
return callback(null, results.varson);
});

@@ -116,0 +132,0 @@ };

{
"name": "confi",
"description": "a simple configuration library",
"version": "7.1.1",
"version": "8.0.0",
"homepage": "https://github.com/firstandthird/confi",

@@ -16,4 +16,5 @@ "author": "First+Third",

"js-yaml": "^3.8.4",
"ms": "^2.0.0",
"parse-dir": "2.0.0",
"varson": "1.0.1",
"varson": "^2.0.0",
"wreck": "^12.2.0"

@@ -20,0 +21,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