Skip to content

Commit 2e2ba9d

Browse files
feat: backport old logic from v3
1 parent 4b8acf2 commit 2e2ba9d

File tree

10 files changed

+8550
-6057
lines changed

10 files changed

+8550
-6057
lines changed

.github/workflows/nodejs.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
strategy:
6464
matrix:
6565
os: [ubuntu-latest, windows-latest, macos-latest]
66-
node-version: [12.x, 14.x, 16.x, 18.x, 20.x, 22.x, 23.x]
66+
node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x, 22.x, 23.x]
6767

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

@@ -96,13 +96,20 @@ jobs:
9696
architecture: ${{ steps.calculate_architecture.outputs.result }}
9797
cache: "npm"
9898

99+
- name: Install dependencies
100+
run: |
101+
npm i del-cli@^3
102+
npm i --ignore-engines
103+
if: matrix.node-version == '10.x' || matrix.node-version == '12.x' || matrix.node-version == '14.x' || matrix.node-version == '16.x'
104+
99105
- name: Install dependencies
100106
run: npm ci
107+
if: matrix.node-version == '18.x' || matrix.node-version == '20.x' || matrix.node-version == '22.x' || matrix.node-version == '23.x'
101108

102109
- name: Run tests with coverage
103110
run: npm run test:coverage -- --ci
104111

105112
- name: Submit coverage data to codecov
106-
uses: codecov/codecov-action@v3
113+
uses: codecov/codecov-action@v4
107114
with:
108115
token: ${{ secrets.CODECOV_TOKEN }}

declarations/keywords/limit.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export default addLimitKeyword;
2+
export type Ajv = import("ajv").default;
3+
export type Code = import("ajv").Code;
4+
export type Name = import("ajv").Name;
5+
export type KeywordErrorDefinition = import("ajv").KeywordErrorDefinition;
6+
/** @typedef {import("ajv").default} Ajv */
7+
/** @typedef {import("ajv").Code} Code */
8+
/** @typedef {import("ajv").Name} Name */
9+
/** @typedef {import("ajv").KeywordErrorDefinition} KeywordErrorDefinition */
10+
/**
11+
* @param {Ajv} ajv
12+
* @returns {Ajv}
13+
*/
14+
declare function addLimitKeyword(ajv: Ajv): Ajv;

declarations/validate.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ export type JSONSchema6 = import("json-schema").JSONSchema6;
33
export type JSONSchema7 = import("json-schema").JSONSchema7;
44
export type ErrorObject = import("ajv").ErrorObject;
55
export type Extend = {
6-
formatMinimum?: string | undefined;
7-
formatMaximum?: string | undefined;
8-
formatExclusiveMinimum?: string | undefined;
9-
formatExclusiveMaximum?: string | undefined;
6+
formatMinimum?: (string | number) | undefined;
7+
formatMaximum?: (string | number) | undefined;
8+
formatExclusiveMinimum?: (string | boolean) | undefined;
9+
formatExclusiveMaximum?: (string | boolean) | undefined;
1010
link?: string | undefined;
1111
undefinedAsNull?: boolean | undefined;
1212
};

0 commit comments

Comments
 (0)