@percy/config
Advanced tools
Comparing version 1.0.0-beta.2 to 1.0.0-beta.3
@@ -72,9 +72,7 @@ "use strict"; | ||
ajv.addSchema(getDefaultSchema(), 'config'); | ||
} // Used to ensure warnings for the exact same invalid configs are never logged more than once. | ||
const invalidCache = new Set(); // Validates config data according to the config schema and logs warnings to the | ||
} // Validates config data according to the config schema and logs warnings to the | ||
// console. Optionallly scrubs invalid values from the provided config. Returns | ||
// true when the validation success, false otherwise. | ||
function validate(config, { | ||
@@ -86,11 +84,4 @@ scrub | ||
if (!result) { | ||
// do not log warnings for the same config more than once | ||
let cacheKey = JSON.stringify(config); | ||
let logWarning = !invalidCache.has(cacheKey); | ||
invalidCache.add(cacheKey); | ||
_logger.default.warn('Invalid config:'); | ||
if (logWarning) { | ||
_logger.default.warn('Invalid config:'); | ||
} | ||
for (let error of ajv.errors) { | ||
@@ -122,5 +113,3 @@ let { | ||
if (logWarning) { | ||
_logger.default.warn(`- ${pre}${message}`); | ||
} | ||
_logger.default.warn(`- ${pre}${message}`); | ||
} | ||
@@ -127,0 +116,0 @@ } |
{ | ||
"name": "@percy/config", | ||
"version": "1.0.0-beta.2", | ||
"version": "1.0.0-beta.3", | ||
"license": "MIT", | ||
@@ -25,3 +25,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@percy/logger": "^1.0.0-beta.2", | ||
"@percy/logger": "^1.0.0-beta.3", | ||
"ajv": "^6.12.0", | ||
@@ -36,3 +36,3 @@ "cosmiconfig": "^6.0.0", | ||
}, | ||
"gitHead": "4a04251eb211d0213e04efd460c76c5834bf4914" | ||
"gitHead": "4f66b0b984ef715774002b19bd6e767a9e50d01a" | ||
} |
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
16155
10
308
Updated@percy/logger@^1.0.0-beta.3