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

@venncity/nested-config

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@venncity/nested-config - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

src/utils.js

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [2.0.6](https://github.com/venn-city/npm-shelf/compare/@venncity/nested-config@2.0.5...@venncity/nested-config@2.0.6) (2020-02-18)
### Bug Fixes
* **nested-config:** Require ConfigJS lazily ([e36b913](https://github.com/venn-city/npm-shelf/commit/e36b913ae586eea6944ce1f7bab3480d6e3aeec3))
## [2.0.5](https://github.com/venn-city/npm-shelf/compare/@venncity/nested-config@2.0.4...@venncity/nested-config@2.0.5) (2020-02-05)

@@ -8,0 +19,0 @@

4

package.json
{
"name": "@venncity/nested-config",
"version": "2.0.5",
"version": "2.0.6",
"author": "Venn Engineering",

@@ -45,3 +45,3 @@ "main": "src/nestedConfig.js",

},
"gitHead": "3f1e215f7f1c06cb97563dd0e6b117f428f86134"
"gitHead": "c454daadeec3f2319e76a1ea4477692b519168da"
}
process.env.ALLOW_CONFIG_MUTATIONS = true;
const config = require('config');
const crypto = require('crypto');

@@ -7,2 +6,3 @@ const path = require('path');

const packageInfo = require('@venncity/package-info');
const { getConfigJS } = require('./utils');

@@ -12,2 +12,3 @@ const packagePathToConfigKeyPrefix = new Map();

function init(modulePath, packagePath) {
const config = getConfigJS();
const innerConfigDir = path.join(packagePath, 'config');

@@ -22,2 +23,3 @@ const baseConfig = config.util.loadFileConfigs(innerConfigDir);

function setModuleConfig(modulePath, packagePath, baseConfig) {
const config = getConfigJS();
const packageName = path.basename(packagePath);

@@ -35,2 +37,3 @@ const configKeyPrefix = `${packageName}-${createHash(modulePath)}`;

function configByPackage(packagePath) {
const config = getConfigJS();
return {

@@ -37,0 +40,0 @@ get: (key, options = { getConfigFromParent: false }) => {

const fs = require('fs');
const path = require('path');
const config = require('config');
const { packageInfo } = require('@venncity/package-info');
const { getConfigJS } = require('../src/utils');
const parentConfig = config.util.loadFileConfigs(path.join(process.cwd(), 'config'));
const nestedConfigBuildRule = {

@@ -31,2 +29,4 @@ test: {

function buildConfigObj(modulePath) {
const config = getConfigJS();
const parentConfig = config.util.loadFileConfigs(path.join(process.cwd(), 'config'));
const packagePath = packageInfo(modulePath).path;

@@ -33,0 +33,0 @@ const innerConfigDir = path.join(packagePath, 'config');

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