{"name":"@percy/config","version":"1.26.0","license":"MIT","_id":"@percy/config@1.26.0","homepage":"https://github.com/percy/cli#readme","bugs":{"url":"https://github.com/percy/cli/issues"},"dist":{"shasum":"bfe5e987da98aa1e7785848d2d5c80c9e1deb45d","tarball":"http://registry-npm.ywwl.com/@percy/config/download/@percy/config-1.26.0.tgz","fileCount":14,"integrity":"sha512-dqCpVDSSXp710sg7w3qrxeKJjqa6ouDL/VnDvUFcCB6StuxKvnQ5p426SembQqOQ/3s+13TOkXQc5OO1kcg/KA==","signatures":[{"sig":"MEUCIG5NMdziOAavPGzrqcC7FR43pCAlxpYcM7GHIkbpgy8WAiEA3HgSltDu4sgFafKZN97QLC4xDtz9qbEUGjS5qbZNgFE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34390,"size":11799,"noattachment":false,"key":"/@percy/config/-/@percy/config-1.26.0.tgz"},"main":"./dist/index.js","type":"module","types":"./types/index.d.ts","engines":{"node":">=14"},"exports":{".":"./dist/index.js","./utils":"./dist/utils/index.js","./test/helpers":"./test/helpers.js"},"gitHead":"0792d3978ca2169a45e8788eba012a61f81f5159","scripts":{"lint":"eslint --ignore-path ../../.gitignore .","test":"node ../../scripts/test","build":"node ../../scripts/build","test:types":"tsd","test:coverage":"yarn test --coverage"},"_npmUser":{"name":"percy-admin","email":"apps+npm@percy.io"},"repository":{"url":"git+https://github.com/percy/cli.git","type":"git","directory":"packages/config"},"_npmVersion":"lerna/6.0.1/node@v14.21.3+x64 (linux)","description":"Handles loading and adding options to Percy configuration files. Uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) to load configuration files and [JSON schema](https://json-schema.org/) with [AJV](https://github.com/epoberezkin/ajv) to val","directories":{},"_nodeVersion":"14.21.3","dependencies":{"ajv":"^8.6.2","yaml":"^2.0.0","cosmiconfig":"^8.0.0","@percy/logger":"1.26.0"},"publishConfig":{"tag":"latest","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"json-schema-typed":"^7.0.3"},"_npmOperationalInternal":{"tmp":"tmp/config_1.26.0_1686562890500_0.35324383621957156","host":"s3://npm-registry-packages"},"readme":"# @percy/config\n\nHandles loading and adding options to Percy configuration files. Uses\n[cosmiconfig](https://github.com/davidtheclark/cosmiconfig) to load configuration files and [JSON\nschema](https://json-schema.org/) with [AJV](https://github.com/epoberezkin/ajv) to validate those\nconfiguration files.\n\n- [Loading config files](#loading-config-files)\n- [Extending config options](#extending-config-options)\n\n## Loading config files\n\nThe `.load()` method will load and validate a configuration file, optionally merging it with any\nprovided `overrides`. If no `path` is provided, will search for the first supported config found\nfrom the current directory up to the home directory. Configuration files are cached and reused unless\n`reload` is `true`.\n\n```js\nimport PercyConfig from '@percy/config'\n\n// loading is done synchronously\nconst config = PercyConfig.load(options)\n```\n\n#### Options\n\n- `path` — Config file path or directory containing a config file\n- `overrides` — Config option overrides\n- `reload` — Do not use cached config (**default** `false`)\n- `bail` — Return undefined when failing validation (**default** `false`)\n- `print` — Print info and error logs (**default** `false`)\n\n#### Supported files\n\n- `\"percy\"` entry in `package.json`\n- `.percyrc` YAML or JSON file\n- `.percy.json` JSON file\n- `.percy.yaml` or `.percy.yml` YAML file\n- `.percy.js` or `percy.config.js` file that exports an object\n\n## Extending config options\n\nThe `.addSchema()` function will add a sub-schema to the Percy configuration file which will be\nparsed and validated when `PercyConfig.load()` is called. See [JSON\nschema](https://json-schema.org/) for possible schema options.\n\n```js\nimport PercyConfig from '@percy/config'\n\nPercyConfig.addSchema({\n  propertyName: JSONSchema\n})\n```\n","publish_time":1686562890723,"maintainers":[{"name":"percy-admin","email":"apps+npm@percy.io"}],"_cnpm_publish_time":1686562890723,"dist-tags":{"alpha":"1.31.15-alpha.0","beta":"1.33.2-beta.0","latest":"1.33.1"}}