Framework updates
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
20
node_modules/ajv/README.md
generated
vendored
20
node_modules/ajv/README.md
generated
vendored
@@ -6,7 +6,7 @@ The fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/
|
||||
|
||||
[](https://travis-ci.org/ajv-validator/ajv)
|
||||
[](https://www.npmjs.com/package/ajv)
|
||||
[](https://www.npmjs.com/package/ajv/v/7.0.0-beta.0)
|
||||
[](https://www.npmjs.com/package/ajv/v/7.0.0-beta.4)
|
||||
[](https://www.npmjs.com/package/ajv)
|
||||
[](https://coveralls.io/github/ajv-validator/ajv?branch=master)
|
||||
[](https://gitter.im/ajv-validator/ajv)
|
||||
@@ -15,12 +15,13 @@ The fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/
|
||||
|
||||
## Ajv v7 beta is released
|
||||
|
||||
[Ajv version 7.0.0-beta.0](https://github.com/ajv-validator/ajv/tree/v7-beta) is released with these changes:
|
||||
[Ajv version 7 (beta)](https://github.com/ajv-validator/ajv/tree/v7-beta) is released with these changes:
|
||||
|
||||
- support of JSON Schema draft-2019-09 features: [`unevaluatedProperties`](./json-schema.md#unevaluatedproperties) and [`unevaluatedItems`](./json-schema.md#unevaluateditems), [dynamic recursive references](./validation.md#extending-recursive-schemas) and other [additional keywords](./json-schema.md#json-schema-draft-2019-09).
|
||||
- to reduce the mistakes in JSON schemas and unexpected validation results, [strict mode](./docs/strict-mode.md) is added - it prohibits ignored or ambiguous JSON Schema elements.
|
||||
- to make code injection from untrusted schemas impossible, [code generation](./docs/codegen.md) is fully re-written to be safe.
|
||||
- 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 make code injection from untrusted schemas impossible, [code generation](./docs/codegen.md) is fully re-written to be safe and to allow code optimization (compiled schema code size is reduced by more than 10%).
|
||||
- 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. [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package was updated to use the new API (in [v4.0.0-beta.0](https://github.com/ajv-validator/ajv-keywords/releases/tag/v4.0.0-beta.0))
|
||||
- schemas are compiled to ES6 code (ES5 code generation is also supported with an option).
|
||||
- to improve reliability and maintainability the code is migrated to TypeScript.
|
||||
|
||||
**Please note**:
|
||||
@@ -1214,7 +1215,8 @@ Defaults:
|
||||
sourceCode: false,
|
||||
processCode: undefined, // function (str: string, schema: object): string {}
|
||||
cache: new Cache,
|
||||
serialize: undefined
|
||||
serialize: undefined,
|
||||
regExp: undefined // custom RegExp engine
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1328,6 +1330,11 @@ Defaults:
|
||||
- `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/ajv-validator/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information.
|
||||
- _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`.
|
||||
- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used.
|
||||
- _regExp_: an optional function to create RegExp objects. This allows using a custom RegExp engine (e.g., [RE2](https://github.com/uhop/node-re2)) to mitigate ReDoS attacks. The function must have the signature `(pattern: string) => RegExpLike` where `RegExpLike` is an object with a `test(string) => boolean` method. Example with RE2:
|
||||
```javascript
|
||||
var ajv = new Ajv({regExp: require('re2')});
|
||||
```
|
||||
By default (`undefined`), native `RegExp` constructor is used.
|
||||
|
||||
|
||||
## Validation errors
|
||||
@@ -1451,6 +1458,7 @@ If you have published a useful plugin please submit a PR to add it to the next s
|
||||
- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter
|
||||
- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages
|
||||
- [ESLint](https://github.com/eslint/eslint) - the pluggable linting utility for JavaScript and JSX
|
||||
- [Spectral](https://github.com/stoplightio/spectral) - the customizable linting utility for JSON/YAML, OpenAPI, AsyncAPI, and JSON Schema
|
||||
|
||||
|
||||
## Tests
|
||||
|
||||
Reference in New Issue
Block a user