@percy/config
Advanced tools
Comparing version 1.0.0-beta.59 to 1.0.0-beta.60
@@ -92,8 +92,16 @@ "use strict"; | ||
// replaced after the new schemas are added to clear any compiled caches. Existing schemas are | ||
// removed and replaced as well. If a schema id is provided as the second argument, the schema | ||
// will be set independently and not added to config schema's properties. | ||
// removed and replaced as well. If a schema has an existing $id, the schema will not be added | ||
// as config schema properties. | ||
function addSchema(schemas) { | ||
if (isArray(schemas) || schemas.$id) { | ||
if (isArray(schemas)) { | ||
return schemas.map(addSchema); | ||
} | ||
if (schemas.$id) { | ||
let { | ||
$id | ||
} = schemas; | ||
if (ajv.getSchema($id)) ajv.removeSchema($id); | ||
return ajv.addSchema(schemas); | ||
@@ -116,3 +124,3 @@ } | ||
ajv.addSchema(config, '/config'); | ||
return ajv.addSchema(config, '/config'); | ||
} // Resets the schema by removing all schemas and inserting a new default schema. | ||
@@ -119,0 +127,0 @@ |
{ | ||
"name": "@percy/config", | ||
"version": "1.0.0-beta.59", | ||
"version": "1.0.0-beta.60", | ||
"license": "MIT", | ||
@@ -25,3 +25,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@percy/logger": "^1.0.0-beta.59", | ||
"@percy/logger": "1.0.0-beta.60", | ||
"ajv": "^8.6.2", | ||
@@ -34,3 +34,3 @@ "cosmiconfig": "^7.0.0", | ||
}, | ||
"gitHead": "bcc5b6da44aef8927cc3acb9406f5ee54ba4dde0" | ||
"gitHead": "c688bfced42f48efcbd3cbba5deebebfccdb9d8c" | ||
} |
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
27612
585
+ Added@percy/logger@1.0.0-beta.60(transitive)
- Removed@percy/logger@1.30.1(transitive)
Updated@percy/logger@1.0.0-beta.60