jest-validate
Advanced tools
Comparing version 30.0.0-alpha.2 to 30.0.0-alpha.3
@@ -166,3 +166,3 @@ /*! | ||
const conditions = (0, _condition.getValues)(defaultValue); | ||
const validTypes = Array.from(new Set(conditions.map(_jestGetType().getType))); | ||
const validTypes = [...new Set(conditions.map(_jestGetType().getType))]; | ||
const message = ` Option ${_chalk().default.bold(`"${path && path.length > 0 ? `${path.join('.')}.` : ''}${option}"`)} must be of type: | ||
@@ -230,3 +230,3 @@ ${validTypes.map(e => _chalk().default.bold.green(e)).join(' or ')} | ||
const BULLET = _chalk().default.bold('\u25cf'); | ||
const BULLET = _chalk().default.bold('\u25CF'); | ||
const DEPRECATION = exports.DEPRECATION = `${BULLET} Deprecation Warning`; | ||
@@ -239,3 +239,3 @@ const ERROR = exports.ERROR = `${BULLET} Validation Error`; | ||
exports.format = format; | ||
const formatPrettyObject = value => typeof value === 'function' ? value.toString() : typeof value === 'undefined' ? 'undefined' : JSON.stringify(value, null, 2).split('\n').join('\n '); | ||
const formatPrettyObject = value => typeof value === 'function' ? value.toString() : value === undefined ? 'undefined' : JSON.stringify(value, null, 2).split('\n').join('\n '); | ||
exports.formatPrettyObject = formatPrettyObject; | ||
@@ -384,3 +384,3 @@ class ValidationError extends Error { | ||
const BULLET = _chalk().default.bold('\u25cf'); | ||
const BULLET = _chalk().default.bold('\u25CF'); | ||
const DOCUMENTATION_NOTE = exports.DOCUMENTATION_NOTE = ` ${_chalk().default.bold('CLI Options Documentation:')} | ||
@@ -395,3 +395,3 @@ https://jestjs.io/docs/cli | ||
const unrecognized = unrecognizedOptions[0]; | ||
const didYouMeanMessage = unrecognized.length > 1 ? (0, _utils.createDidYouMeanMessage)(unrecognized, Array.from(allowedOptions)) : ''; | ||
const didYouMeanMessage = unrecognized.length > 1 ? (0, _utils.createDidYouMeanMessage)(unrecognized, [...allowedOptions]) : ''; | ||
message = ` Unrecognized option ${_chalk().default.bold((0, _utils.format)(unrecognized))}.${didYouMeanMessage ? ` ${didYouMeanMessage}` : ''}`; | ||
@@ -440,3 +440,3 @@ } else { | ||
locale: 'en-US' | ||
})) && !allowedOptions.has(arg) && (rawArgv.length === 0 || rawArgv.includes(arg)), []); | ||
})) && !allowedOptions.has(arg) && (rawArgv.length === 0 || rawArgv.includes(arg))); | ||
if (unrecognizedOptions.length > 0) { | ||
@@ -443,0 +443,0 @@ throw createCLIValidationError(unrecognizedOptions, allowedOptions); |
{ | ||
"name": "jest-validate", | ||
"version": "30.0.0-alpha.2", | ||
"version": "30.0.0-alpha.3", | ||
"repository": { | ||
@@ -22,8 +22,8 @@ "type": "git", | ||
"dependencies": { | ||
"@jest/types": "30.0.0-alpha.2", | ||
"@jest/types": "30.0.0-alpha.3", | ||
"camelcase": "^6.2.0", | ||
"chalk": "^4.0.0", | ||
"jest-get-type": "30.0.0-alpha.2", | ||
"jest-get-type": "30.0.0-alpha.3", | ||
"leven": "^3.1.0", | ||
"pretty-format": "30.0.0-alpha.2" | ||
"pretty-format": "30.0.0-alpha.3" | ||
}, | ||
@@ -39,3 +39,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "c04d13d7abd22e47b0997f6027886aed225c9ce4" | ||
"gitHead": "e267aff33d105399f2134bad7c8f82285104f3da" | ||
} |
30247
+ Added@jest/schemas@30.0.0-alpha.3(transitive)
+ Added@jest/types@30.0.0-alpha.3(transitive)
+ Added@sinclair/typebox@0.32.26(transitive)
+ Addedjest-get-type@30.0.0-alpha.3(transitive)
+ Addedpretty-format@30.0.0-alpha.3(transitive)
- Removed@jest/schemas@30.0.0-alpha.2(transitive)
- Removed@jest/types@30.0.0-alpha.2(transitive)
- Removed@sinclair/typebox@0.31.28(transitive)
- Removedjest-get-type@30.0.0-alpha.2(transitive)
- Removedpretty-format@30.0.0-alpha.2(transitive)
Updated@jest/types@30.0.0-alpha.3
Updatedjest-get-type@30.0.0-alpha.3
Updatedpretty-format@30.0.0-alpha.3