From fb5803eb227034883452eb1e560140bca5af9aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Thu, 11 Jul 2024 01:28:50 +0300 Subject: [PATCH 1/3] use dequal --- lib/compile/resolve.ts | 2 +- lib/runtime/equal.ts | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/compile/resolve.ts b/lib/compile/resolve.ts index b8c4aca394..c84a1d6cc6 100644 --- a/lib/compile/resolve.ts +++ b/lib/compile/resolve.ts @@ -2,7 +2,7 @@ import type {AnySchema, AnySchemaObject, UriResolver} from "../types" import type Ajv from "../ajv" import type {URIComponent} from "fast-uri" import {eachItem} from "./util" -import * as equal from "fast-deep-equal" +import { dequal as equal } from "dequal" import * as traverse from "json-schema-traverse" // the hash of local references inside the schema (created by getSchemaRefs), used for inline resolution diff --git a/lib/runtime/equal.ts b/lib/runtime/equal.ts index 3cb00631a2..b9a63a6957 100644 --- a/lib/runtime/equal.ts +++ b/lib/runtime/equal.ts @@ -1,5 +1,5 @@ // https://github.com/ajv-validator/ajv/issues/889 -import * as equal from "fast-deep-equal" +import { dequal as equal } from "dequal" type Equal = typeof equal & {code: string} ;(equal as Equal).code = 'require("ajv/dist/runtime/equal").default' diff --git a/package.json b/package.json index 5198552a1c..eee92a833d 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "homepage": "https://ajv.js.org", "runkitExampleFilename": ".runkit_example.js", "dependencies": { - "fast-deep-equal": "^3.1.3", + "dequal": "^2.0.3", "fast-uri": "^2.4.0", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" From a6bf40eacd579c5ab39e6216f0186f3decff02fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Thu, 11 Jul 2024 01:30:38 +0300 Subject: [PATCH 2/3] improve --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eee92a833d..4829c2e8c4 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "runkitExampleFilename": ".runkit_example.js", "dependencies": { "dequal": "^2.0.3", - "fast-uri": "^2.4.0", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" }, From 7ee286f3b2741041c57b970e32e0d58994df6630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Thu, 11 Jul 2024 01:34:25 +0300 Subject: [PATCH 3/3] lint --- lib/compile/resolve.ts | 2 +- lib/runtime/equal.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compile/resolve.ts b/lib/compile/resolve.ts index c84a1d6cc6..1dfd836452 100644 --- a/lib/compile/resolve.ts +++ b/lib/compile/resolve.ts @@ -2,7 +2,7 @@ import type {AnySchema, AnySchemaObject, UriResolver} from "../types" import type Ajv from "../ajv" import type {URIComponent} from "fast-uri" import {eachItem} from "./util" -import { dequal as equal } from "dequal" +import {dequal as equal} from "dequal" import * as traverse from "json-schema-traverse" // the hash of local references inside the schema (created by getSchemaRefs), used for inline resolution diff --git a/lib/runtime/equal.ts b/lib/runtime/equal.ts index b9a63a6957..557a0a5e10 100644 --- a/lib/runtime/equal.ts +++ b/lib/runtime/equal.ts @@ -1,5 +1,5 @@ // https://github.com/ajv-validator/ajv/issues/889 -import { dequal as equal } from "dequal" +import {dequal as equal} from "dequal" type Equal = typeof equal & {code: string} ;(equal as Equal).code = 'require("ajv/dist/runtime/equal").default'