diff --git a/cli.js b/cli.js index ab590e593e8..7190c499e95 100644 --- a/cli.js +++ b/cli.js @@ -11,6 +11,7 @@ import { Ajv as AjvDraft06And07 } from 'ajv' import _Ajv2019 from 'ajv/dist/2019.js' import _Ajv2020 from 'ajv/dist/2020.js' import _addFormats from 'ajv-formats' +import _ajvKeywords from 'ajv-keywords' import { ajvFormatsDraft2019 } from '@hyperupcall/ajv-formats-draft2019' import schemasafe from '@exodus/schemasafe' import TOML from 'smol-toml' @@ -55,6 +56,9 @@ const Ajv2019 = /** @type {any} */ (_Ajv2019) /** @type {typeof _Ajv2020.default} */ const Ajv2020 = /** @type {any} */ (_Ajv2020) +/** @type {any} */ +const ajvKeywords = _ajvKeywords + /** @type {typeof _addFormats.default} */ const addFormats = /** @type {any} */ (_addFormats) @@ -487,6 +491,8 @@ async function ajvFactory( throw new Error('No JSON Schema version specified') } + ajvKeywords(ajv, 'uniqueItemProperties') + /** * In strict mode, Ajv will throw an error if it does not * recognize any non-standard formats. That is, unrecognized diff --git a/package-lock.json b/package-lock.json index 85e065b6712..8b9be6a2602 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "ajv": "^8.18.0", "ajv-draft-04": "^1.0.0", "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0", "chalk": "^5.6.2", "eslint": "^9.26.0", "eslint-config-prettier": "^10.1.8", @@ -463,6 +464,7 @@ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -486,6 +488,7 @@ "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -859,6 +862,7 @@ "integrity": "sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -1980,6 +1984,7 @@ "integrity": "sha512-8c3mgTe0ASwWAJK+78dpviD+A8EqhndQPUBpNUIPt6+xWlIigCwfN01lWr9MAede4uqXGTEKeQWTvzb3vjia0Q==", "dev": true, "license": "MIT", + "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -2405,6 +2410,7 @@ "integrity": "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index 962893a460a..5ea93b2b807 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "ajv": "^8.18.0", "ajv-draft-04": "^1.0.0", "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0", "chalk": "^5.6.2", "eslint": "^9.26.0", "eslint-config-prettier": "^10.1.8",