From 3364808db762a3803c55f0f00429eab90d9769de Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Fri, 24 Jan 2025 07:08:46 +0530 Subject: [PATCH 1/5] ci: update codecov/codecov-action to v5 (#196) --- .github/workflows/nodejs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 99938f2..44aa7e2 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -110,6 +110,6 @@ jobs: run: npm run test:coverage -- --ci - name: Submit coverage data to codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} From f72cd6063dc8af6e191540a44333c0624b3fbcab Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Tue, 22 Apr 2025 16:01:49 +0300 Subject: [PATCH 2/5] fix: export `Schema` and additional schemas (#197) --- declarations/index.d.ts | 5 +++++ declarations/validate.d.ts | 4 ++-- src/index.js | 6 ++++++ src/validate.js | 4 ++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/declarations/index.d.ts b/declarations/index.d.ts index def01ba..18c0b8e 100644 --- a/declarations/index.d.ts +++ b/declarations/index.d.ts @@ -1,3 +1,8 @@ +export type Schema = import("./validate").Schema; +export type JSONSchema4 = import("./validate").JSONSchema4; +export type JSONSchema6 = import("./validate").JSONSchema6; +export type JSONSchema7 = import("./validate").JSONSchema7; +export type ExtendedSchema = import("./validate").ExtendedSchema; import { validate } from "./validate"; import { ValidationError } from "./validate"; import { enableValidation } from "./validate"; diff --git a/declarations/validate.d.ts b/declarations/validate.d.ts index 800d717..5ed73b2 100644 --- a/declarations/validate.d.ts +++ b/declarations/validate.d.ts @@ -2,7 +2,7 @@ export type JSONSchema4 = import("json-schema").JSONSchema4; export type JSONSchema6 = import("json-schema").JSONSchema6; export type JSONSchema7 = import("json-schema").JSONSchema7; export type ErrorObject = import("ajv").ErrorObject; -export type Extend = { +export type ExtendedSchema = { formatMinimum?: (string | number) | undefined; formatMaximum?: (string | number) | undefined; formatExclusiveMinimum?: (string | boolean) | undefined; @@ -10,7 +10,7 @@ export type Extend = { link?: string | undefined; undefinedAsNull?: boolean | undefined; }; -export type Schema = (JSONSchema4 | JSONSchema6 | JSONSchema7) & Extend; +export type Schema = (JSONSchema4 | JSONSchema6 | JSONSchema7) & ExtendedSchema; export type SchemaUtilErrorObject = ErrorObject & { children?: Array; }; diff --git a/src/index.js b/src/index.js index 1166d6f..71368c2 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,9 @@ +/** @typedef {import("./validate").Schema} Schema */ +/** @typedef {import("./validate").JSONSchema4} JSONSchema4 */ +/** @typedef {import("./validate").JSONSchema6} JSONSchema6 */ +/** @typedef {import("./validate").JSONSchema7} JSONSchema7 */ +/** @typedef {import("./validate").ExtendedSchema} ExtendedSchema */ + const { validate, ValidationError, diff --git a/src/validate.js b/src/validate.js index 47e982c..3b0cb38 100644 --- a/src/validate.js +++ b/src/validate.js @@ -50,7 +50,7 @@ const getAjv = memoize(() => { /** @typedef {import("ajv").ErrorObject} ErrorObject */ /** - * @typedef {Object} Extend + * @typedef {Object} ExtendedSchema * @property {(string | number)=} formatMinimum * @property {(string | number)=} formatMaximum * @property {(string | boolean)=} formatExclusiveMinimum @@ -59,7 +59,7 @@ const getAjv = memoize(() => { * @property {boolean=} undefinedAsNull */ -/** @typedef {(JSONSchema4 | JSONSchema6 | JSONSchema7) & Extend} Schema */ +/** @typedef {(JSONSchema4 | JSONSchema6 | JSONSchema7) & ExtendedSchema} Schema */ /** @typedef {ErrorObject & { children?: Array }} SchemaUtilErrorObject */ From 1478499e3f2d404355b155690f46ab9b33daa0e6 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Tue, 22 Apr 2025 16:02:10 +0300 Subject: [PATCH 3/5] chore(release): 4.3.1 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40d0e2e..b379460 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [4.3.1](https://github.com/webpack/schema-utils/compare/v4.3.0...v4.3.1) (2025-04-22) + + +### Bug Fixes + +* export `Schema` and additional schemas ([#197](https://github.com/webpack/schema-utils/issues/197)) ([f72cd60](https://github.com/webpack/schema-utils/commit/f72cd6063dc8af6e191540a44333c0624b3fbcab)) + ## [4.3.0](https://github.com/webpack/schema-utils/compare/v4.2.0...v4.3.0) (2024-12-11) diff --git a/package-lock.json b/package-lock.json index c9c1fd8..b76374c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "schema-utils", - "version": "4.3.0", + "version": "4.3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "schema-utils", - "version": "4.3.0", + "version": "4.3.1", "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.9", diff --git a/package.json b/package.json index fbf30c8..83b0a42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "schema-utils", - "version": "4.3.0", + "version": "4.3.1", "description": "webpack Validation Utils", "license": "MIT", "repository": "webpack/schema-utils", From 8e31ef311484ad1c0d122266fe520d1f1cb90fad Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Tue, 22 Apr 2025 20:45:49 +0300 Subject: [PATCH 4/5] fix: compatibility with old types (#198) --- declarations/validate.d.ts | 1 + src/validate.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/declarations/validate.d.ts b/declarations/validate.d.ts index 5ed73b2..6e4eec4 100644 --- a/declarations/validate.d.ts +++ b/declarations/validate.d.ts @@ -10,6 +10,7 @@ export type ExtendedSchema = { link?: string | undefined; undefinedAsNull?: boolean | undefined; }; +export type Extend = ExtendedSchema; export type Schema = (JSONSchema4 | JSONSchema6 | JSONSchema7) & ExtendedSchema; export type SchemaUtilErrorObject = ErrorObject & { children?: Array; diff --git a/src/validate.js b/src/validate.js index 3b0cb38..7a40e06 100644 --- a/src/validate.js +++ b/src/validate.js @@ -59,6 +59,9 @@ const getAjv = memoize(() => { * @property {boolean=} undefinedAsNull */ +// TODO remove me in the next major release +/** @typedef {ExtendedSchema} Extend */ + /** @typedef {(JSONSchema4 | JSONSchema6 | JSONSchema7) & ExtendedSchema} Schema */ /** @typedef {ErrorObject & { children?: Array }} SchemaUtilErrorObject */ From 2a92a6a229a5a63f6c9eecf5cb9d78add52d59a9 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Tue, 22 Apr 2025 20:46:18 +0300 Subject: [PATCH 5/5] chore(release): 4.3.2 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b379460..e5ac09e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [4.3.2](https://github.com/webpack/schema-utils/compare/v4.3.1...v4.3.2) (2025-04-22) + + +### Bug Fixes + +* compatibility with old types ([#198](https://github.com/webpack/schema-utils/issues/198)) ([8e31ef3](https://github.com/webpack/schema-utils/commit/8e31ef311484ad1c0d122266fe520d1f1cb90fad)) + ### [4.3.1](https://github.com/webpack/schema-utils/compare/v4.3.0...v4.3.1) (2025-04-22) diff --git a/package-lock.json b/package-lock.json index b76374c..9e646bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "schema-utils", - "version": "4.3.1", + "version": "4.3.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "schema-utils", - "version": "4.3.1", + "version": "4.3.2", "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.9", diff --git a/package.json b/package.json index 83b0a42..b9e23d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "schema-utils", - "version": "4.3.1", + "version": "4.3.2", "description": "webpack Validation Utils", "license": "MIT", "repository": "webpack/schema-utils",