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

configya

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

configya - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

2

package.json
{
"name": "configya",
"version": "0.0.8",
"version": "0.0.9",
"description": "Config files that defer to env settings.",

@@ -5,0 +5,0 @@ "main": "src/configya.js",

require( 'should' );
describe( 'when using deprecated API (calling get())', function() {

@@ -50,3 +49,2 @@ describe( 'when loading config that doesn\'t exist', function() {

describe( 'when loading valid config with environment variables', function() {

@@ -170,2 +168,3 @@ var cfg;

} );
describe( 'with deploy-type set to DEV for testing', function() {

@@ -262,4 +261,25 @@ var cfg;

} );
} )
} );
describe( 'with empty default property', function() {
var cfg;
before( function() {
cfg = require( '../src/configya.js' )(
{
integration: {
agent: {
loglevel: 'info',
id: 'p6-test'
}
}
},
'./spec/test.json' );
} );
it( 'should not overwrite root property', function() {
cfg.integration.agent.id.should.equal( 'test123' );
cfg.integration.agent.loglevel.should.equal( 'trace' );
} );
} );
after( function() {

@@ -266,0 +286,0 @@ delete process.env[ 'test_redis_port' ];

{
"test-key": "hulloo",
"override-me": "you will see this only when you have deploy-type set to 'DEV'",
"NESTED_KEY": "a test of nested keys from files"
"NESTED_KEY": "a test of nested keys from files",
"INTEGRATION_AGENT_LOGLEVEL": "trace",
"INTEGRATION_AGENT_ID": "test123"
}

@@ -23,3 +23,3 @@ var fs = require( 'fs' );

} else {
var child = target[ key ] || {};
var child = target[ k ] || {};
target[ k ] = child;

@@ -26,0 +26,0 @@ ensurePath( child, val, paths );

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