diff --git a/README.md b/README.md index 9fe0c2364..a072cd868 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,6 @@ See the shipped `package.json` for version constraints. * Validation of JSON on _Node.js_ requires all of: * [`ajv`](https://www.npmjs.com/package/ajv) * [`ajv-formats`](https://www.npmjs.com/package/ajv-formats) - * [`ajv-formats-draft2019`](https://www.npmjs.com/package/ajv-formats-draft2019) * Validation of XML on _Node.js_ requires all of: * [`libxmljs2`](https://www.npmjs.com/package/libxmljs2) * the system might need to meet the requirements for [`node-gyp`](https://github.com/TooTallNate/node-gyp#installation), in certain cases. diff --git a/docs/install.rst b/docs/install.rst index 411c357fe..223802b33 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -30,7 +30,6 @@ See the shipped ``package.json`` for version constraints. * Validation of JSON on _Node.js_ requires all of: * `ajv `_ * `ajv-formats `_ - * `ajv-formats-draft2019 `_ * Validation of XML on _Node.js_ requires all of: * `libxmljs2 `_ * the system must meet the requirements for `node-gyp `_ diff --git a/package.json b/package.json index 89bbce43a..caf6c9e2c 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,6 @@ "optionalDependencies": { "ajv": "^8.12.0", "ajv-formats": "^3.0.1", - "ajv-formats-draft2019": "^1.6.1", "libxmljs2": "^0.35", "xmlbuilder2": "^3.0.2" }, diff --git a/src/_optPlug.node/__jsonValidators/ajv.ts b/src/_optPlug.node/__jsonValidators/ajv.ts index e2fa46463..d93d6a169 100644 --- a/src/_optPlug.node/__jsonValidators/ajv.ts +++ b/src/_optPlug.node/__jsonValidators/ajv.ts @@ -21,8 +21,6 @@ import { readFile } from 'node:fs/promises' import Ajv, { type Options as AjvOptions } from 'ajv' import addFormats from 'ajv-formats' -/* @ts-expect-error TS7016 */ -import addFormats2019 from 'ajv-formats-draft2019' import type { ValidationError } from '../../validation/types' import type { Functionality, Validator } from '../jsonValidator' @@ -34,7 +32,6 @@ const ajvOptions: AjvOptions = Object.freeze({ strictSchema: false, addUsedSchema: false }) - /** @internal */ export default (async function (schemaPath: string, schemaMap: Record = {}): Promise { /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-return -- intended */ @@ -49,10 +46,10 @@ export default (async function (schemaPath: string, schemaMap: Record('JsonValidator', [ /* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-require-imports -- needed */ - ['( ajv && ajv-formats && ajv-formats-draft2019 )', () => require('./__jsonValidators/ajv').default] + ['( ajv && ajv-formats )', () => require('./__jsonValidators/ajv').default] // ... add others here, pull-requests welcome! /* eslint-enable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-require-imports */