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

@myob-oss/config

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@myob-oss/config - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

4

lib/config-wrapper.js

@@ -8,6 +8,2 @@ const Config = require('./config.js');

constructor() {
if (JSON.stringify(effectiveConfigObject) !== '{}') {
return;
}
const file = new File();

@@ -14,0 +10,0 @@ const defaultConfigObject = file.getFileContents('default.json');

16

package.json
{
"name": "@myob-oss/config",
"version": "1.0.6",
"description": "A simple, slightly opinionated, and predictable configuration module.",
"version": "1.0.7",
"description": "A simple, slightly opinionated, and predictable configuration module for Node.js applications.",
"main": "lib/config-wrapper.js",

@@ -22,14 +22,14 @@ "scripts": {

"deepmerge": "^2.1.1",
"json5": "^1.0.1"
"json5": "^2.0.1"
},
"devDependencies": {
"eslint": "^5.0.1",
"eslint-config-airbnb-base": "^13.0.0",
"eslint-plugin-import": "^2.13.0",
"eslint": "^5.4.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-import": "^2.14.0",
"gulp": "^3.9.1",
"gulp-eslint": "^4.0.2",
"gulp-eslint": "^5.0.0",
"gulp-mocha": "^6.0.0",
"istanbul": "^0.4.5",
"mocha": "^5.2.0",
"should": "^13.2.1"
"should": "^13.2.3"
},

@@ -36,0 +36,0 @@ "engines": {

@@ -19,2 +19,12 @@ /* global it:false, describe:false */

});
it('Should expose the same configuration if it is required for a third time later on', (done) => {
setTimeout(() => {
const config3 = require('../../lib/config-wrapper.js'); // eslint-disable-line global-require
config3.should.have.property('configurationFile');
config3.configurationFile.should.eql('runtime');
config3.configurationFile.should.eql(config.configurationFile);
done();
}, 300);
});
});

@@ -30,2 +30,10 @@ /* global it:false, describe:false, beforeEach:false */

it('Should not get the contents of a file which does not exist', (done) => {
const result = file.getFileContents('some-file-which-does-not-exist.json');
result.should.eql({});
done();
});
it('Should get the environment', (done) => {

@@ -35,15 +43,15 @@ const currentEnvironment = process.env.NODE_ENV;

process.env.NODE_ENV = 'test';
let result = file.getEnvironment();
result.should.eql('test');
process.env.NODE_ENV = null;
result = file.getEnvironment();
result.should.eql('production');
delete process.env.NODE_ENV;
result = file.getEnvironment();
result.should.eql('production');
process.env.NODE_ENV = 'null';
result = file.getEnvironment();
result.should.eql('production');

@@ -50,0 +58,0 @@

Sorry, the diff of this file is not supported yet

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