{
  "manifest": {
    "name": "jest-validate",
    "version": "27.5.1",
    "repository": {
      "type": "git",
      "url": "https://github.com/facebook/jest.git",
      "directory": "packages/jest-validate"
    },
    "license": "MIT",
    "main": "./build/index.js",
    "types": "./build/index.d.ts",
    "exports": {
      ".": {
        "types": "./build/index.d.ts",
        "default": "./build/index.js"
      },
      "./package.json": "./package.json"
    },
    "dependencies": {
      "@jest/types": "^27.5.1",
      "camelcase": "^6.2.0",
      "chalk": "^4.0.0",
      "jest-get-type": "^27.5.1",
      "leven": "^3.1.0",
      "pretty-format": "^27.5.1"
    },
    "devDependencies": {
      "@types/yargs": "^16.0.0"
    },
    "engines": {
      "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
    },
    "publishConfig": {
      "access": "public"
    },
    "gitHead": "67c1aa20c5fec31366d733e901fee2b981cb1850",
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-jest-validate-27.5.1-9197d54dc0bdb52260b8db40b46ae668e04df067-integrity/node_modules/jest-validate/package.json",
    "readmeFilename": "README.md",
    "readme": "# jest-validate\n\nGeneric configuration validation tool that helps you with warnings, errors and deprecation messages as well as showing users examples of correct configuration.\n\n```bash\nnpm install --save jest-validate\n```\n\n## Usage\n\n```js\nimport {validate} from 'jest-validate';\n\nvalidate(config, validationOptions); // => {hasDeprecationWarnings: boolean, isValid: boolean}\n```\n\nWhere `ValidationOptions` are:\n\n```ts\ntype ValidationOptions = {\n  comment?: string;\n  condition?: (option: unknown, validOption: unknown) => boolean;\n  deprecate?: (\n    config: Record<string, unknown>,\n    option: string,\n    deprecatedOptions: DeprecatedOptions,\n    options: ValidationOptions,\n  ) => boolean;\n  deprecatedConfig?: DeprecatedOptions;\n  error?: (\n    option: string,\n    received: unknown,\n    defaultValue: unknown,\n    options: ValidationOptions,\n    path?: Array<string>,\n  ) => void;\n  exampleConfig: Record<string, unknown>;\n  recursive?: boolean;\n  recursiveBlacklist?: Array<string>;\n  recursiveDenylist?: Array<string>;\n  title?: Title;\n  unknown?: (\n    config: Record<string, unknown>,\n    exampleConfig: Record<string, unknown>,\n    option: string,\n    options: ValidationOptions,\n    path?: Array<string>,\n  ) => void;\n};\n\ntype Title = {\n  deprecation?: string;\n  error?: string;\n  warning?: string;\n};\n```\n\n`exampleConfig` is the only option required.\n\n## API\n\nBy default `jest-validate` will print generic warning and error messages. You can however customize this behavior by providing `options: ValidationOptions` object as a second argument:\n\nAlmost anything can be overwritten to suite your needs.\n\n### Options\n\n- `recursiveDenylist` – optional array of string keyPaths that should be excluded from deep (recursive) validation.\n- `comment` – optional string to be rendered below error/warning message.\n- `condition` – an optional function with validation condition.\n- `deprecate`, `error`, `unknown` – optional functions responsible for displaying warning and error messages.\n- `deprecatedConfig` – optional object with deprecated config keys.\n- `exampleConfig` – the only **required** option with configuration against which you'd like to test.\n- `recursive` - optional boolean determining whether recursively compare `exampleConfig` to `config` (default: `true`).\n- `title` – optional object of titles for errors and messages.\n\nYou will find examples of `condition`, `deprecate`, `error`, `unknown`, and `deprecatedConfig` inside source of this repository, named respectively.\n\n## exampleConfig syntax\n\n`exampleConfig` should be an object with key/value pairs that contain an example of a valid value for each key. A configuration value is considered valid when:\n\n- it matches the JavaScript type of the example value, e.g. `string`, `number`, `array`, `boolean`, `function`, or `object`\n- it is `null` or `undefined`\n- it matches the Javascript type of any of arguments passed to `MultipleValidOptions(...)`\n\nThe last condition is a special syntax that allows validating where more than one type is permissible; see example below. It's acceptable to have multiple values of the same type in the example, so you can also use this syntax to provide more than one example. When a validation failure occurs, the error message will show all other values in the array as examples.\n\n## Examples\n\nMinimal example:\n\n```js\nvalidate(config, {exampleConfig});\n```\n\nExample with slight modifications:\n\n```js\nvalidate(config, {\n  comment: '  Documentation: http://custom-docs.com',\n  deprecatedConfig,\n  exampleConfig,\n  title: {\n    deprecation: 'Custom Deprecation',\n    // leaving 'error' and 'warning' as default\n  },\n});\n```\n\nThis will output:\n\n#### Warning:\n\n```bash\n● Validation Warning:\n\n  Unknown option transformx with value \"<rootDir>/node_modules/babel-jest\" was found.\n  This is either a typing error or a user mistake. Fixing it will remove this message.\n\n  Documentation: http://custom-docs.com\n```\n\n#### Error:\n\n```bash\n● Validation Error:\n\n  Option transform must be of type:\n    object\n  but instead received:\n    string\n\n  Example:\n  {\n    \"transform\": {\n      \"\\\\.js$\": \"<rootDir>/preprocessor.js\"\n    }\n  }\n\n  Documentation: http://custom-docs.com\n```\n\n## Example validating multiple types\n\n```js\nimport {multipleValidOptions} from 'jest-validate';\n\nvalidate(config, {\n  // `bar` will accept either a string or a number\n  bar: multipleValidOptions('string is ok', 2),\n});\n```\n\n#### Error:\n\n```bash\n● Validation Error:\n\n  Option foo must be of type:\n    string or number\n  but instead received:\n    array\n\n  Example:\n  {\n    \"bar\": \"string is ok\"\n  }\n\n  or\n\n  {\n    \"bar\": 2\n  }\n\n  Documentation: http://custom-docs.com\n```\n\n#### Deprecation\n\nBased on `deprecatedConfig` object with proper deprecation messages. Note custom title:\n\n```bash\nCustom Deprecation:\n\n  Option scriptPreprocessor was replaced by transform, which support multiple preprocessors.\n\n  Jest now treats your current configuration as:\n  {\n    \"transform\": {\".*\": \"xxx\"}\n  }\n\n  Please update your configuration.\n\n  Documentation: http://custom-docs.com\n```\n",
    "description": "Generic configuration validation tool that helps you with warnings, errors and deprecation messages as well as showing users examples of correct configuration.",
    "licenseText": "MIT License\n\nCopyright (c) Facebook, Inc. and its affiliates.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.5.1.tgz#9197d54dc0bdb52260b8db40b46ae668e04df067",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.5.1.tgz",
    "hash": "9197d54dc0bdb52260b8db40b46ae668e04df067",
    "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==",
    "registry": "npm",
    "packageName": "jest-validate",
    "cacheIntegrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ== sha1-kZfVTcC9tSJguNtAtGrmaOBN8Gc="
  },
  "registry": "npm",
  "hash": "9197d54dc0bdb52260b8db40b46ae668e04df067"
}