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 }} 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/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/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", 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 */