@percy/config
Advanced tools
Comparing version 1.7.2 to 1.8.0
@@ -134,10 +134,14 @@ import AJV from 'ajv/dist/2019.js'; | ||
for (let [key, schema] of entries(schemas)) { | ||
let $id = `/config/${key}`; | ||
if (ajv.getSchema($id)) ajv.removeSchema($id); | ||
assign(config.properties, { | ||
[key]: { | ||
$ref: $id | ||
} | ||
}); | ||
ajv.addSchema(schema, $id); | ||
if (key === '$config') { | ||
assign(config, typeof schema === 'function' ? schema(config) : schema); | ||
} else { | ||
let $id = `/config/${key}`; | ||
if (ajv.getSchema($id)) ajv.removeSchema($id); | ||
assign(config.properties, { | ||
[key]: { | ||
$ref: $id | ||
} | ||
}); | ||
ajv.addSchema(schema, $id); | ||
} | ||
} | ||
@@ -159,3 +163,3 @@ | ||
const HIDE_NESTED_KEYWORDS = ['oneOf', 'anyOf', 'allOf', 'not']; | ||
const HIDE_NESTED_KEYWORDS = ['oneOf', 'anyOf', 'allOf', 'if', 'then', 'else', 'not']; | ||
@@ -162,0 +166,0 @@ function shouldHideError(key, path, error) { |
{ | ||
"name": "@percy/config", | ||
"version": "1.7.2", | ||
"version": "1.8.0", | ||
"license": "MIT", | ||
@@ -37,3 +37,3 @@ "repository": { | ||
"dependencies": { | ||
"@percy/logger": "1.7.2", | ||
"@percy/logger": "1.8.0", | ||
"ajv": "^8.6.2", | ||
@@ -46,3 +46,3 @@ "cosmiconfig": "^7.0.0", | ||
}, | ||
"gitHead": "d9da4a4f9eafc3c3ac361a50f679f030172ad362" | ||
"gitHead": "596808e5775a87514d3c7ffc8ac593cdc9289ad7" | ||
} |
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
33909
715
+ Added@percy/logger@1.8.0(transitive)
- Removed@percy/logger@1.7.2(transitive)
Updated@percy/logger@1.8.0