Skip to content

Commit

Permalink
feat: backport old logic from v3
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait authored Dec 11, 2024
1 parent 4b8acf2 commit 2e2ba9d
Show file tree
Hide file tree
Showing 10 changed files with 8,550 additions and 6,057 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [12.x, 14.x, 16.x, 18.x, 20.x, 22.x, 23.x]
node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x, 22.x, 23.x]

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -96,13 +96,20 @@ jobs:
architecture: ${{ steps.calculate_architecture.outputs.result }}
cache: "npm"

- name: Install dependencies
run: |
npm i del-cli@^3
npm i --ignore-engines
if: matrix.node-version == '10.x' || matrix.node-version == '12.x' || matrix.node-version == '14.x' || matrix.node-version == '16.x'

- name: Install dependencies
run: npm ci
if: matrix.node-version == '18.x' || matrix.node-version == '20.x' || matrix.node-version == '22.x' || matrix.node-version == '23.x'

- name: Run tests with coverage
run: npm run test:coverage -- --ci

- name: Submit coverage data to codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
14 changes: 14 additions & 0 deletions declarations/keywords/limit.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export default addLimitKeyword;
export type Ajv = import("ajv").default;
export type Code = import("ajv").Code;
export type Name = import("ajv").Name;
export type KeywordErrorDefinition = import("ajv").KeywordErrorDefinition;
/** @typedef {import("ajv").default} Ajv */
/** @typedef {import("ajv").Code} Code */
/** @typedef {import("ajv").Name} Name */
/** @typedef {import("ajv").KeywordErrorDefinition} KeywordErrorDefinition */
/**
* @param {Ajv} ajv
* @returns {Ajv}
*/
declare function addLimitKeyword(ajv: Ajv): Ajv;
8 changes: 4 additions & 4 deletions declarations/validate.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ export type JSONSchema6 = import("json-schema").JSONSchema6;
export type JSONSchema7 = import("json-schema").JSONSchema7;
export type ErrorObject = import("ajv").ErrorObject;
export type Extend = {
formatMinimum?: string | undefined;
formatMaximum?: string | undefined;
formatExclusiveMinimum?: string | undefined;
formatExclusiveMaximum?: string | undefined;
formatMinimum?: (string | number) | undefined;
formatMaximum?: (string | number) | undefined;
formatExclusiveMinimum?: (string | boolean) | undefined;
formatExclusiveMaximum?: (string | boolean) | undefined;
link?: string | undefined;
undefinedAsNull?: boolean | undefined;
};
Expand Down
Loading

0 comments on commit 2e2ba9d

Please sign in to comment.