Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ajv from 6.12.6 to 7.0.3 #378

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 3, 2021

Bumps ajv from 6.12.6 to 7.0.3.

Release notes

Sourced from ajv's releases.

v7.0.3

Fixes:

Docs:

  • Using in ES5 (#1364, @aladdin-add)
  • Option strictTypes: false has to be used with json-schema-secure schema (#1373)

v7.0.2

Remove duplicate functions from standalone validation code (#1361)

v7.0.1

Update error message for maxLength/minLength keywords

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 and unevaluatedItems, dynamic recursive references and other additional keywords.
  • comprehensive support for standalone validation code - 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 is added - it prohibits ignored or ambiguous JSON Schema elements. See Strict mode and Options for more details
  • to make code injection from untrusted schemas impossible, code generation 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 or 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 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.

Better TypeScript support:

  • Methods compile and compileAsync now return type-guards - see Getting started.
  • 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)

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually

@dependabot dependabot bot requested review from matz3 and RandomByte January 3, 2021 03:24
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/ajv-7.0.3 branch 2 times, most recently from a33e301 to 60eef38 Compare January 14, 2021 14:26
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/ajv-7.0.3 branch 2 times, most recently from 47346ae to bf94916 Compare January 21, 2021 12:19
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/ajv-7.0.3 branch 2 times, most recently from dbb9ee1 to f5a26bf Compare January 28, 2021 13:12
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/ajv-7.0.3 branch from f5a26bf to dffce56 Compare January 29, 2021 10:32
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Feb 7, 2021

Superseded by #393.

@dependabot dependabot bot closed this Feb 7, 2021
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/ajv-7.0.3 branch February 7, 2021 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants