baryonsoft / overleaf

GNU Affero General Public License v3.0
0 stars 0 forks source link

Update dependency ajv to v8 #142

Closed renovate[bot] closed 1 year ago

renovate[bot] commented 1 year ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
ajv (source) ^6.12.0 -> ^8.0.0 age adoption passing confidence

Release Notes

ajv-validator/ajv (ajv) ### [`v8.12.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.12.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.11.2...v8.12.0) - fix JTD serialisation (remove leading comma in objects with only optional properties) ([#​2190](https://togithub.com/ajv-validator/ajv/issues/2190), [@​piliugin-anton](https://togithub.com/piliugin-anton)) - empty JTD "values" schema ([#​2191](https://togithub.com/ajv-validator/ajv/issues/2191)) - empty object to work with JTD utility type ([#​2158](https://togithub.com/ajv-validator/ajv/issues/2158), [@​erikbrinkman](https://togithub.com/erikbrinkman)) - fix JTD "discriminator" schema for objects with more than 8 properties ([#​2194](https://togithub.com/ajv-validator/ajv/issues/2194)) - correctly narrow "number" type to "integer" ([#​2192](https://togithub.com/ajv-validator/ajv/issues/2192), [@​JacobLey](https://togithub.com/JacobLey)) - update Node.js versions in CI to 14, 16, 18 and 19 ### [`v8.11.2`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.11.2) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.11.1...v8.11.2) Update dependencies Export ValidationError and MissingRefError ([https://github.com/ajv-validator/ajv/pull/1840](https://togithub.com/ajv-validator/ajv/pull/1840), [@​dannyb648](https://togithub.com/dannyb648)) ### [`v8.11.1`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.11.1) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.11.0...v8.11.1) Update dependencies Export ValidationError and MissingRefError ([#​1840](https://togithub.com/ajv-validator/ajv/issues/1840), [@​dannyb648](https://togithub.com/dannyb648)) ### [`v8.11.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.11.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.10.0...v8.11.0) Use root schemaEnv when resolving references in oneOf ([#​1901](https://togithub.com/ajv-validator/ajv/issues/1901), [@​asprouse](https://togithub.com/asprouse)) Only use equal function in generated code when it is used ([#​1922](https://togithub.com/ajv-validator/ajv/issues/1922), [@​bhvngt](https://togithub.com/bhvngt)) ### [`v8.10.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.10.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.9.0...v8.10.0) `uriResolver` option ([@​zekth](https://togithub.com/zekth), [#​1862](https://togithub.com/ajv-validator/ajv/issues/1862)) ### [`v8.9.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.9.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.8.2...v8.9.0) Option `code.esm` to generate ESM exports for standalone validation functions ([@​rehanvdm](https://togithub.com/rehanvdm), [#​1861](https://togithub.com/ajv-validator/ajv/issues/1861)) Support discriminator keyword with $ref in oneOf subschemas ([@​dfeufel](https://togithub.com/dfeufel), [#​1815](https://togithub.com/ajv-validator/ajv/issues/1815)) ### [`v8.8.2`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.8.2) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.8.1...v8.8.2) Use full RegExp string (with flags) as cache key, related to [https://github.com/ajv-validator/ajv-keywords/issues/220](https://togithub.com/ajv-validator/ajv-keywords/issues/220) ### [`v8.8.1`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.8.1) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.8.0...v8.8.1) Fix `minContains: 0` ([#​1819](https://togithub.com/ajv-validator/ajv/issues/1819)) ### [`v8.8.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.8.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.7.1...v8.8.0) Fix browser bundles in cdnjs `regExp` option allowing to specify alternative RegExp engine, e.g. re2 ([@​efebarlas](https://togithub.com/efebarlas)) ### [`v8.7.1`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.7.1) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.7.0...v8.7.1) Publish Ajv bundle for JSON Schema 2020-12 to cdnjs.com ### [`v8.7.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.7.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.6.3...v8.7.0) Update JSON Schema Test Suite. Change `minContains: 0` now correctly allows empty array. ### [`v8.6.3`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.6.3) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.6.2...v8.6.3) Fix $ref resolution for schemas without $id ([@​rbuckton](https://togithub.com/rbuckton), [#​1725](https://togithub.com/ajv-validator/ajv/issues/1725)) Support standalone module import from ESM modules without using `.default` property ([@​bhvngt](https://togithub.com/bhvngt), [#​1757](https://togithub.com/ajv-validator/ajv/issues/1757)) Update code for breaking TS change - error in `catch` has type `unknown` ([#​1760](https://togithub.com/ajv-validator/ajv/issues/1760)) ### [`v8.6.2`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.6.2) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.6.1...v8.6.2) Fix JTD serialiser ([#​1691](https://togithub.com/ajv-validator/ajv/issues/1691)) ### [`v8.6.1`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.6.1) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.6.0...v8.6.1) Fix "not" keyword preventing validation of "allOf" and some other keywords ([#​1668](https://togithub.com/ajv-validator/ajv/issues/1668)) ### [`v8.6.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.6.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.5.0...v8.6.0) Track evaluated properties with patternProperties that have always valid schemas (e.g., true) ([@​P0lip](https://togithub.com/P0lip), [#​1626](https://togithub.com/ajv-validator/ajv/issues/1626)) Option [`int32range`](https://ajv.js.org/options.html#int32range) to disable number range checking for `int32` and `uint32` type in [JTD schemas](https://ajv.js.org/json-type-definition.html) ### [`v8.5.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.5.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.4.0...v8.5.0) Optimize validation code for `const` keyword with scalar values ([@​SoAsEr](https://togithub.com/SoAsEr), [#​1561](https://togithub.com/ajv-validator/ajv/issues/1561)) Add option `schemaId` to support [ajv-draft-04](https://togithub.com/ajv-validator/ajv-draft-04) - Ajv for JSON Schema drat-04. ### [`v8.4.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.4.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.3.0...v8.4.0) JSON Type Definition schema options: - parseDate: parse `timestamp` type as Date objects. - allowDate: non-standard - allow date without time with `timestamp` type. ### [`v8.3.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.3.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.2.0...v8.3.0) Typescript improvements: - better error reporting for JSONSchemaType in case strictNullChecks option is disabled ([@​erikbrinkman](https://togithub.com/erikbrinkman), [#​1583](https://togithub.com/ajv-validator/ajv/issues/1583)) - support missed boolean type in JTDDataType ([@​m00s](https://togithub.com/m00s), [#​1587](https://togithub.com/ajv-validator/ajv/issues/1587)) JTD timestamp validation option ([@​jrr](https://togithub.com/jrr), [#​1584](https://togithub.com/ajv-validator/ajv/issues/1584)). Docs corrections. ### [`v8.2.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.2.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.1.0...v8.2.0) Add JTDDataType to compile signature ([@​erikbrinkman](https://togithub.com/erikbrinkman), [#​1547](https://togithub.com/ajv-validator/ajv/issues/1547)) Improve JSONSchemaType for records ([@​erikbrinkman](https://togithub.com/erikbrinkman), [#​1564](https://togithub.com/ajv-validator/ajv/issues/1564)) Use rollup for browser bundles ([@​realityking](https://togithub.com/realityking), [#​1533](https://togithub.com/ajv-validator/ajv/issues/1533)) Docs corrections ### [`v8.1.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.1.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.0.5...v8.1.0) [unicodeRegExp option](https://ajv.js.org/options.html#unicoderegexp) to not use RegExp unicode flag that may be incompatible with some environments ([@​asaid-0](https://togithub.com/asaid-0), [#​1530](https://togithub.com/ajv-validator/ajv/issues/1530)) Fix JSONSchemaType ([@​erikbrinkman](https://togithub.com/erikbrinkman), [#​1541](https://togithub.com/ajv-validator/ajv/issues/1541)) Extended error message for invalid keyword values ([@​pcwiek](https://togithub.com/pcwiek), [#​1542](https://togithub.com/ajv-validator/ajv/issues/1542)) ### [`v8.0.5`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.0.5) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.0.4...v8.0.5) Fix: add source code back to npm package, 8.0.4 is breaking ajv-cli (and possibly other things) ### [`v8.0.4`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.0.4) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.0.3...v8.0.4) Reduce npm bundle size ### [`v8.0.3`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.0.3) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.0.2...v8.0.3) Improve JSONSchemaType errors ([@​erikbrinkman](https://togithub.com/erikbrinkman), [#​1525](https://togithub.com/ajv-validator/ajv/issues/1525)) ### [`v8.0.2`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.0.2) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.0.1...v8.0.2) Support RegExp formats in standalone code ([#​1470](https://togithub.com/ajv-validator/ajv/issues/1470)) Add schema path to strictTuple error message ([@​asaid-0](https://togithub.com/asaid-0), [#​1519](https://togithub.com/ajv-validator/ajv/issues/1519)) ### [`v8.0.1`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.0.1) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v8.0.0...v8.0.1) Typescript: export function `getData` (for ajv-errors) ### [`v8.0.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v8.0.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v7.2.4...v8.0.0) This document describes changes from v7.2.4 to v8.0.0. If you are migrating from v6 you can use [this document](https://togithub.com/ajv-validator/ajv/blob/master/docs/v6-to-v8-migration.md). #### New features Support JSON Schema draft-2020-12: [prefixItems](https://ajv.js.org/json-schema.html#prefixitems) keyword and changed semantics of [items](https://ajv.js.org/json-schema.html#items-in-draft-2020-12) keyword, [dynamic recursive references](https://ajv.js.org/guide/combining-schemas.html#extending-recursive-schemas). OpenAPI [discriminator](https://ajv.js.org/json-schema.html#discriminator) keyword. Improved JSON Type Definition support: - errors consistent with JTD specification. - error objects with additional properties to simplify error handling (see [Error objects](https://ajv.js.org/api.html#error-objects)) - internationalized error messages with [ajv-i18n](/packages/ajv-i18n) TypeScript: support type unions in [JSONSchemaType](https://ajv.js.org/guide/typescript.html#type-safe-unions) #### Other changes / improvements Node.js require works without .default property - see examples in [Getting started](https://ajv.js.org/guide/getting-started.html) Reduce runtime dependency for [standalone validation code](https://ajv.js.org/standalone.html) Fix resolution of `$ref: "#"` when $id is present ([#​815](https://togithub.com/ajv-validator/ajv/issues/815)) #### Breaking changes Option [strict](https://ajv.js.org/options.html#strict) controls all [strict mode](https://ajv.js.org/strict-mode.html) restrictions JSON Schema validation errors changes: - `dataPath` property replaced with `instancePath` - "should" replaced with "must" in the messages - property name is removed from "propertyName" keyword error message (it is still available in `error.params.propertyName`). ### [`v7.2.4`](https://togithub.com/ajv-validator/ajv/releases/tag/v7.2.4) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v7.2.3...v7.2.4) Fix [#​1515](https://togithub.com/ajv-validator/ajv/issues/1515): correctly initialize evaluated properties. ### [`v7.2.3`](https://togithub.com/ajv-validator/ajv/releases/tag/v7.2.3) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v7.2.2...v7.2.3) Remove docs from npm package ### [`v7.2.2`](https://togithub.com/ajv-validator/ajv/releases/tag/v7.2.2) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v7.2.1...v7.2.2) Docs correction Simplified JSONSchemaType ([@​erikbrinkman](https://togithub.com/erikbrinkman)) Fix [#​1493](https://togithub.com/ajv-validator/ajv/issues/1493) - incorrect reporting of missing required property with option `ownProperties: true` Fix [#​1501](https://togithub.com/ajv-validator/ajv/issues/1501) - JTD not working correctly with many properties in the schema ### [`v7.2.1`](https://togithub.com/ajv-validator/ajv/releases/tag/v7.2.1) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v7.2.0...v7.2.1) Add [tests](https://togithub.com/nst/JSONTestSuite) and fix parsers compiled with `ajv.compileParser` from JTD schemas: - fail on invalid JSON: - trailing comma in arrays/objects - invalid JSON numbers - control characters in strings - fix parsing of u-escaped characters - do not fail on duplicate object keys (consistent with JSON.parse) Compiled parsers are now: - consistent with JSON.parse in case of invalid JSON - only parse data that is valid for JTD schema It is a breaking change for compiled parsers compared with 7.2.0 that was released earlier on the same day. ### [`v7.2.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v7.2.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v7.1.1...v7.2.0) strictRequired option (off by default) - to log or fail if properties used in JSON Schema "required" are not defined in "properties" ([@​PBug90](https://togithub.com/PBug90), [#​1403](https://togithub.com/ajv-validator/ajv/issues/1403)) Compiled parsers (as fast as JSON.parse on valid JSON, but replace validation and fail much faster on invalid JSON) and serializers (10x+ faster than JSON.stringify) from JSON Type Definition schemas ([#​1454](https://togithub.com/ajv-validator/ajv/issues/1454)) - see examples in [javascript](https://ajv.js.org/guide/getting-started.html#parsing-and-serializing-json) and [typescript](https://ajv.js.org/guide/typescript.html#type-safe-parsers-and-serializers) Please note: there are fixes to compiled parsers in [7.2.1](https://togithub.com/ajv-validator/ajv/releases/tag/v7.2.1) The website migrated to VuePress and documentation is restructured to make navigating Ajv documentation and learning easier - this is still work in progress, but already some improvement on the information structure. Any feedback/corrections would be very much appreciated! Improved TypeScript support for JSONSchemaType: - JTDSchemaType utility type to convert your data type into the type of JTD schema, to simplify its writing and to make sure it is consistent with your data type, with type inference support for ajv methods ([@​erikbrinkman](https://togithub.com/erikbrinkman), [#​1446](https://togithub.com/ajv-validator/ajv/issues/1446), [#​1456](https://togithub.com/ajv-validator/ajv/issues/1456), [#​1457](https://togithub.com/ajv-validator/ajv/issues/1457), [#​1475](https://togithub.com/ajv-validator/ajv/issues/1475)) - see [example here](https://ajv.js.org/guide/typescript.html#utility-types-for-schemas) - Alternatively, you can use JTDDataType utility type to convert your JTD schema type into the type of data ([@​erikbrinkman](https://togithub.com/erikbrinkman), [#​1458](https://togithub.com/ajv-validator/ajv/issues/1458)) - see [this example](https://ajv.js.org/guide/typescript.html#utility-type-for-jtd-data-type) Other improvements by [@​Fdawgs](https://togithub.com/Fdawgs) ([#​1466](https://togithub.com/ajv-validator/ajv/issues/1466)), [@​t7yang](https://togithub.com/t7yang) ([#​1472](https://togithub.com/ajv-validator/ajv/issues/1472), [#​1473](https://togithub.com/ajv-validator/ajv/issues/1473)), [@​koba04](https://togithub.com/koba04) ([#​1460](https://togithub.com/ajv-validator/ajv/issues/1460)) ### [`v7.1.1`](https://togithub.com/ajv-validator/ajv/releases/tag/v7.1.1) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v7.1.0...v7.1.1) Support readonly arrays with JSONSchemaType ([@​LinusU](https://togithub.com/LinusU), [#​1447](https://togithub.com/ajv-validator/ajv/issues/1447)) ### [`v7.1.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v7.1.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v7.0.4...v7.1.0) Support for JSON Type Definition RFC 8927 - a simple schema language provided as an alternative to JSON Schema. See these docs: - an [informal document](https://ajv.js.org/json-type-definition.html) on Ajv site - [RFC8927](https://datatracker.ietf.org/doc/rfc8927/) - [choosing schema language](https://ajv.js.org/guide/schema-language.html) - comparison with JSON Schema Allow ":" in keyword names ([#​1421](https://togithub.com/ajv-validator/ajv/issues/1421), [@​teq0](https://togithub.com/teq0)) ### [`v7.0.4`](https://togithub.com/ajv-validator/ajv/releases/tag/v7.0.4) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v7.0.3...v7.0.4) Fix: duplicate functions in standalone validation code with mutually recursive schemas ([#​1361](https://togithub.com/ajv-validator/ajv/issues/1361)) Fix: reference resolution when base URI change was not applied ([#​1414](https://togithub.com/ajv-validator/ajv/issues/1414)) ### [`v7.0.3`](https://togithub.com/ajv-validator/ajv/releases/tag/v7.0.3) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v7.0.2...v7.0.3) Fixes: - oneOf error type ([#​1368](https://togithub.com/ajv-validator/ajv/issues/1368), [@​G-Rath](https://togithub.com/G-Rath)) - remove multiple imports ([rollup/plugins#745](https://togithub.com/rollup/plugins/issues/745)) Docs: - Using in ES5 ([#​1364](https://togithub.com/ajv-validator/ajv/issues/1364), [@​aladdin-add](https://togithub.com/aladdin-add)) - Option strictTypes: false has to be used with json-schema-secure schema ([#​1373](https://togithub.com/ajv-validator/ajv/issues/1373)) ### [`v7.0.2`](https://togithub.com/ajv-validator/ajv/releases/tag/v7.0.2) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v7.0.1...v7.0.2) Remove duplicate functions from standalone validation code ([#​1361](https://togithub.com/ajv-validator/ajv/issues/1361)) ### [`v7.0.1`](https://togithub.com/ajv-validator/ajv/releases/tag/v7.0.1) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v7.0.0...v7.0.1) Update error message for `maxLength`/`minLength` keywords ### [`v7.0.0`](https://togithub.com/ajv-validator/ajv/releases/tag/v7.0.0) [Compare Source](https://togithub.com/ajv-validator/ajv/compare/v6.12.6...v7.0.0) Please note: this document covers the changes from v6.12.6. ### The main changes - support of JSON Schema draft-2019-09 features: [`unevaluatedProperties`](https://togithub.com/ajv-validator/ajv/blob/master/docs/json-schema.md#unevaluatedproperties) and [`unevaluatedItems`](https://togithub.com/ajv-validator/ajv/blob/master/docs/json-schema.md#unevaluateditems), [dynamic recursive references](https://togithub.com/ajv-validator/ajv/blob/master/docs/validation.md#extending-recursive-schemas) and other [additional keywords](https://togithub.com/ajv-validator/ajv/blob/master/docs/json-schema.md#json-schema-draft-2019-09). - comprehensive support for [standalone validation code](https://togithub.com/ajv-validator/ajv/blob/master/docs/standalone.md) - compiling one or multiple schemas to standalone modules with one or multiple exports. - to reduce the mistakes in JSON schemas and unexpected validation results, [strict mode](https://togithub.com/ajv-validator/ajv/blob/master/docs/strict-mode.md) is added - it prohibits ignored or ambiguous JSON Schema elements. See [Strict mode](https://togithub.com/ajv-validator/ajv/blob/master/docs/strict-mode.md) and [Options](https://togithub.com/ajv-validator/ajv/blob/master/docs/api.md) for more details - to make code injection from untrusted schemas impossible, [code generation](https://togithub.com/ajv-validator/ajv/blob/master/docs/codegen.md) is fully re-written to be type-level safe against code injection. - to simplify Ajv extensions, the new keyword API that is used by pre-defined keywords is available to user-defined keywords - it is much easier to define any keywords now, especially with subschemas. - schemas are compiled to ES6 code (ES5 code generation is supported with an option). - to improve reliability and maintainability the code is migrated to TypeScript. - separate Ajv classes from draft-07 and draft-2019-09 support with different default imports (see [Getting started](https://togithub.com/ajv-validator/ajv#usage) or [v7.0.0-beta.5](https://togithub.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.5) for the details). **Please note**: - the support for JSON-Schema draft-04 is removed - if you have schemas using "id" attributes you have to replace them with "$id" (or continue using version 6 that will be supported until 02/28/2021). - all formats are separated to [ajv-formats](https://togithub.com/ajv-validator/ajv-formats) package - they have to be explicitly added if you use them. - Ajv instance can only be created with `new` keyword, as Ajv is now ES6 class. - browser bundles are automatically published to ajv-dist package (but still available on cdnjs.com). - order of schema keyword validation changed - keywords that apply to all types (allOf etc.) are now validated first, before the keywords that apply to specific data types. You can still define custom keywords that apply to all types AND are validated after type-specific keywords using option `post: true` in keyword definition. - regular expressions in keywords "pattern" and "patternProperties" are now used as if they had unicode "u" flag, as required by JSON Schema specification - it means that some regular expressions that were valid with Ajv v6 are now invalid (and vice versa). #### Better TypeScript support: - Methods `compile` and `compileAsync` now return type-guards - see [Getting started](https://togithub.com/ajv-validator/ajv/tree/master#usage). - Method `validate` is a type-guard. - Better separation of asynchronous schemas on type level. - Type utility JSONSchemaType that generates the type for JSON Schema for type interface in the type parameter - it simplifies writing schemas (no unions support at the moment). #### API changes: - addVocabulary - NEW method that allows to add an array of keyword definitions. - addKeyword - keyword name should be passed as property in definition object, not as the first parameter (old API works with "deprecated" warning). Also "inline" keywords support is removed, code generation keywords can now be defined with "code" keyword - the same definition format that is used by all pre-defined keywords - Ajv no longer allows to create the instance without `new` keyword (it is ES6 class). ##### Added options (and defaults): - strict: true - strict mode - strictTypes: "log" - prevent mistakes related to type keywords and keyword applicability (see [Strict Types](https://togithub.com/ajv-validator/ajv/blob/master/docs/strict-mode.md#strict-types)) - strictTuples: "log" - prevent incomplete tuple schemas (see [Prohibit unconstrained tuples](https://togithub.com/ajv-validator/ajv/blob/master/docs/strict-mode.md#prohibit-unconstrained-tuples)) - allowUnionTypes: false - allow multiple non-null types in "type" keyword - allowMatchingProperties: false - allow overlap between "properties" and "patternProperties" keywords - loopEnum: Infinity - optimise validation of enums, similar to `loopRequired` - validateFormats: true - enable format validation - code: {optimize: number|boolean} - control [code optimisation](https://togithub.com/ajv-validator/ajv/blob/master/docs/codegen.md#code-optimization) - code: {es5: true} - generate ES5 code, the default is to generate ES6 code. - code: {lines: true} - add line breaks to generated code - simplifies debugging of compiled schemas when you need it ##### Changed options: - `keywords` - now expects the array of keyword definitions (old API works with "deprecated" warning) ##### Removed options: - errorDataPath - was deprecated, now removed. - format - `validateFormats: false` can be used instead, old format mode can be chosen via ajv-formats package. - nullable: `nullable` keyword is supported by default. - jsonPointers: JSONPointers are used to report errors by default, `jsPropertySyntax: true` (deprecated) can be used if old format is needed. - extendRefs: $ref siblings are validated by default (consistent with draft 2019-09), `ignoreKeywordsWithRef` (deprecated) can be used instead to ignore $ref siblings. - missingRefs: now exception is always thrown. Pass empty schema with $id that should be ignored to ajv.addSchema. - processCode: replaced with `code: {process: (code, schemaEnv: object) => string}`. - sourceCode: replaced with `code: {source: true}`. - schemaId: removed, as JSON Schema draft-04 is no longer supported. - strictDefaults, strictKeywords, strictNumbers: it is default now, controlled with `strict`. - uniqueItems: '"uniqueItems" keyword is always validated. - unknownFormats: the same can be achieved by passing true for formats that need to be ignored via `ajv.addFormat` or `formats` option. - cache and serialize: Map is used as cache, schema object as key.

Configuration

📅 Schedule: Branch creation - "every weekday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Mend Renovate. View repository job log here.

renovate[bot] commented 1 year ago

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 8.x releases. But if you manually upgrade to 8.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.