@venncity/nested-config
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -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 @@ |
{ | ||
"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'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26180
12
383