jest-validate
Advanced tools
Comparing version 26.6.1 to 26.6.2
@@ -8,12 +8,12 @@ 'use strict'; | ||
var _condition = require('./condition'); | ||
var _deprecated = require('./deprecated'); | ||
var _warnings = require('./warnings'); | ||
var _errors = require('./errors'); | ||
var _condition = require('./condition'); | ||
var _utils = require('./utils'); | ||
var _warnings = require('./warnings'); | ||
/** | ||
@@ -20,0 +20,0 @@ * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. |
@@ -28,6 +28,6 @@ 'use strict'; | ||
var _condition = require('./condition'); | ||
var _utils = require('./utils'); | ||
var _condition = require('./condition'); | ||
function _interopRequireDefault(obj) { | ||
@@ -34,0 +34,0 @@ return obj && obj.__esModule ? obj : {default: obj}; |
@@ -18,6 +18,6 @@ 'use strict'; | ||
function _prettyFormat() { | ||
const data = _interopRequireDefault(require('pretty-format')); | ||
function _leven() { | ||
const data = _interopRequireDefault(require('leven')); | ||
_prettyFormat = function () { | ||
_leven = function () { | ||
return data; | ||
@@ -29,6 +29,6 @@ }; | ||
function _leven() { | ||
const data = _interopRequireDefault(require('leven')); | ||
function _prettyFormat() { | ||
const data = _interopRequireDefault(require('pretty-format')); | ||
_leven = function () { | ||
_prettyFormat = function () { | ||
return data; | ||
@@ -35,0 +35,0 @@ }; |
@@ -7,4 +7,4 @@ /** | ||
*/ | ||
import type { Options } from 'yargs'; | ||
import type { Config } from '@jest/types'; | ||
import type { Options } from 'yargs'; | ||
import type { DeprecatedOptions } from './types'; | ||
@@ -11,0 +11,0 @@ export declare const DOCUMENTATION_NOTE: string; |
@@ -9,6 +9,6 @@ 'use strict'; | ||
function _chalk() { | ||
const data = _interopRequireDefault(require('chalk')); | ||
function _camelcase() { | ||
const data = _interopRequireDefault(require('camelcase')); | ||
_chalk = function () { | ||
_camelcase = function () { | ||
return data; | ||
@@ -20,6 +20,6 @@ }; | ||
function _camelcase() { | ||
const data = _interopRequireDefault(require('camelcase')); | ||
function _chalk() { | ||
const data = _interopRequireDefault(require('chalk')); | ||
_camelcase = function () { | ||
_chalk = function () { | ||
return data; | ||
@@ -31,7 +31,7 @@ }; | ||
var _utils = require('./utils'); | ||
var _defaultConfig = _interopRequireDefault(require('./defaultConfig')); | ||
var _deprecated = require('./deprecated'); | ||
var _defaultConfig = _interopRequireDefault(require('./defaultConfig')); | ||
var _utils = require('./utils'); | ||
@@ -38,0 +38,0 @@ function _interopRequireDefault(obj) { |
{ | ||
"name": "jest-validate", | ||
"version": "26.6.1", | ||
"version": "26.6.2", | ||
"repository": { | ||
@@ -13,3 +13,3 @@ "type": "git", | ||
"dependencies": { | ||
"@jest/types": "^26.6.1", | ||
"@jest/types": "^26.6.2", | ||
"camelcase": "^6.0.0", | ||
@@ -19,3 +19,3 @@ "chalk": "^4.0.0", | ||
"leven": "^3.1.0", | ||
"pretty-format": "^26.6.1" | ||
"pretty-format": "^26.6.2" | ||
}, | ||
@@ -31,3 +31,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "f6366db60e32f1763e612288bf3984bcfa7a0a15" | ||
"gitHead": "4c46930615602cbf983fb7e8e82884c282a624d5" | ||
} |
@@ -14,3 +14,3 @@ # jest-validate | ||
validate((config: Object), (options: ValidationOptions)); // => {hasDeprecationWarnings: boolean, isValid: boolean} | ||
validate(config, validationOptions); // => {hasDeprecationWarnings: boolean, isValid: boolean} | ||
``` | ||
@@ -20,36 +20,39 @@ | ||
```js | ||
```ts | ||
type ValidationOptions = { | ||
blacklist?: Array<string>, | ||
comment?: string, | ||
condition?: (option: any, validOption: any) => boolean, | ||
comment?: string; | ||
condition?: (option: unknown, validOption: unknown) => boolean; | ||
deprecate?: ( | ||
config: Object, | ||
config: Record<string, unknown>, | ||
option: string, | ||
deprecatedOptions: Object, | ||
deprecatedOptions: DeprecatedOptions, | ||
options: ValidationOptions, | ||
) => true, | ||
deprecatedConfig?: {[key: string]: Function}, | ||
) => boolean; | ||
deprecatedConfig?: DeprecatedOptions; | ||
error?: ( | ||
option: string, | ||
received: any, | ||
defaultValue: any, | ||
received: unknown, | ||
defaultValue: unknown, | ||
options: ValidationOptions, | ||
) => void, | ||
exampleConfig: Object, | ||
recursive?: boolean, | ||
title?: Title, | ||
path?: Array<string>, | ||
) => void; | ||
exampleConfig: Record<string, unknown>; | ||
recursive?: boolean; | ||
recursiveBlacklist?: Array<string>; | ||
recursiveDenylist?: Array<string>; | ||
title?: Title; | ||
unknown?: ( | ||
config: Object, | ||
exampleConfig: Object, | ||
config: Record<string, unknown>, | ||
exampleConfig: Record<string, unknown>, | ||
option: string, | ||
options: ValidationOptions, | ||
) => void, | ||
path?: Array<string>, | ||
) => void; | ||
}; | ||
type Title = {| | ||
deprecation?: string, | ||
error?: string, | ||
warning?: string, | ||
|}; | ||
type Title = { | ||
deprecation?: string; | ||
error?: string; | ||
warning?: string; | ||
}; | ||
``` | ||
@@ -56,0 +59,0 @@ |
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
31986
197
Updated@jest/types@^26.6.2
Updatedpretty-format@^26.6.2