From 9a74d2d6261a4c1b36c1ae8cb498018ac04aa5fc Mon Sep 17 00:00:00 2001 From: tschmidtb51 <65305130+tschmidtb51@users.noreply.github.com> Date: Fri, 5 Apr 2024 23:45:00 +0200 Subject: [PATCH 1/3] ci: add current node version (#84) * ci: add current node version * Update .github/workflows/build.yml --------- Co-authored-by: Jason Ian Green --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b4a4b4d..288d250 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 14.x] + node-version: [16.x, 18.x, 20.x, 21.x] steps: - uses: actions/checkout@v2 From ce0a6267b25ac77efbb475727f739ee873699458 Mon Sep 17 00:00:00 2001 From: Giulio Davide Carparelli Date: Fri, 5 Apr 2024 23:48:58 +0200 Subject: [PATCH 2/3] docs(README.md): fixed wrong link on data reference (#83) Co-authored-by: Jason Ian Green --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b4264cd..ab69a5d 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ These keywords are added to ajv instance when ajv-formats is used without option These keywords apply only to strings. If the data is not a string, the validation succeeds. -The value of keywords `formatMaximum`/`formatMinimum` and `formatExclusiveMaximum`/`formatExclusiveMinimum` should be a string or [\$data reference](https://github.com/ajv-validator/ajv/blob/master/docs/validation.md#data-reference). This value is the maximum (minimum) allowed value for the data to be valid as determined by `format` keyword. If `format` keyword is not present schema compilation will throw exception. +The value of keywords `formatMaximum`/`formatMinimum` and `formatExclusiveMaximum`/`formatExclusiveMinimum` should be a string or [$data reference](https://github.com/ajv-validator/ajv/blob/master/docs/guide/combining-schemas.md#data-reference). This value is the maximum (minimum) allowed value for the data to be valid as determined by `format` keyword. If `format` keyword is not present schema compilation will throw exception. When these keyword are added, they also add comparison functions to formats `"date"`, `"time"` and `"date-time"`. User-defined formats also can have comparison functions. See [addFormat](https://github.com/ajv-validator/ajv/blob/master/docs/api.md#api-addformat) method. From 4ca86d21bd07571a30178cbb3714133db6eada9a Mon Sep 17 00:00:00 2001 From: Luciano Mammino Date: Fri, 5 Apr 2024 22:53:40 +0100 Subject: [PATCH 3/3] Update README.md (#62) Fixes parenthesis in example Co-authored-by: Jason Ian Green --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ab69a5d..8e3b918 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ addFormats(ajv, ["date", "time"]) **Please note**: when ajv encounters an undefined format it throws exception (unless ajv instance was configured with `strict: false` option). To allow specific undefined formats they have to be passed to ajv instance via `formats` option with `true` value: ```javascript -const ajv = new Ajv((formats: {date: true, time: true})) // to ignore "date" and "time" formats in schemas. +const ajv = new Ajv({formats: {date: true, time: true}}) // to ignore "date" and "time" formats in schemas. ``` 2. Format validation mode (default is `"full"`) with optional list of format names and `keywords` option to add additional format comparison keywords: