@backstage/config
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -5,7 +5,10 @@ 'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var cloneDeep2 = require('lodash/cloneDeep'); | ||
var mergeWith2 = require('lodash/mergeWith'); | ||
var cloneDeep2 = _interopDefault(require('lodash/cloneDeep')); | ||
var mergeWith2 = _interopDefault(require('lodash/mergeWith')); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var cloneDeep2__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep2); | ||
var mergeWith2__default = /*#__PURE__*/_interopDefaultLegacy(mergeWith2); | ||
const CONFIG_KEY_PART_PATTERN = /^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i; | ||
@@ -86,3 +89,3 @@ function isObject(value) { | ||
} | ||
return mergeWith2({}, {value: cloneDeep2(fallbackValue)}, {value}, (into, from) => !isObject(from) || !isObject(into) ? from : void 0).value; | ||
return mergeWith2__default['default']({}, {value: cloneDeep2__default['default'](fallbackValue)}, {value}, (into, from) => !isObject(from) || !isObject(into) ? from : void 0).value; | ||
} | ||
@@ -200,12 +203,6 @@ getConfig(key) { | ||
} | ||
if (value !== void 0) { | ||
const result = validate(value); | ||
if (result !== true) { | ||
const { | ||
key: keyName = key, | ||
value: theValue = value, | ||
expected | ||
} = result; | ||
throw new TypeError(errors.type(this.fullKey(keyName), this.context, typeOf(theValue), expected)); | ||
} | ||
const result = validate(value); | ||
if (result !== true) { | ||
const {key: keyName = key, value: theValue = value, expected} = result; | ||
throw new TypeError(errors.type(this.fullKey(keyName), this.context, typeOf(theValue), expected)); | ||
} | ||
@@ -212,0 +209,0 @@ return value; |
@@ -192,12 +192,6 @@ import cloneDeep2 from 'lodash/cloneDeep'; | ||
} | ||
if (value !== void 0) { | ||
const result = validate(value); | ||
if (result !== true) { | ||
const { | ||
key: keyName = key, | ||
value: theValue = value, | ||
expected | ||
} = result; | ||
throw new TypeError(errors.type(this.fullKey(keyName), this.context, typeOf(theValue), expected)); | ||
} | ||
const result = validate(value); | ||
if (result !== true) { | ||
const {key: keyName = key, value: theValue = value, expected} = result; | ||
throw new TypeError(errors.type(this.fullKey(keyName), this.context, typeOf(theValue), expected)); | ||
} | ||
@@ -204,0 +198,0 @@ return value; |
{ | ||
"name": "@backstage/config", | ||
"description": "Config API used by Backstage core, backend, and CLI", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"private": false, | ||
@@ -42,4 +42,4 @@ "publishConfig": { | ||
], | ||
"gitHead": "8360d9f7e29119eef62f6ffe6d8204d9ed1389ea", | ||
"gitHead": "f94ac54a7fc4b547aedd7cec55ddcbd5f24bb1ad", | ||
"module": "dist/index.esm.js" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
9
56199
502