Skip to content

Commit

Permalink
feat(base)!: remove isDeepEqual function
Browse files Browse the repository at this point in the history
  • Loading branch information
homura committed Jun 11, 2024
1 parent 8d11c75 commit 64151f0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
6 changes: 3 additions & 3 deletions packages/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
"@types/blake2b": "^2.1.0",
"@types/lodash.isequal": "^4.5.5",
"blake2b": "^2.1.3",
"js-xxhash": "^1.0.4",
"lodash.isequal": "^4.5.0"
"js-xxhash": "^1.0.4"
},
"devDependencies": {
"jsbi": "^4.1.0"
"jsbi": "^4.1.0",
"lodash.isequal": "^4.5.0"
},
"publishConfig": {
"access": "public"
Expand Down
6 changes: 0 additions & 6 deletions packages/base/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import blake2b, { Blake2b } from "blake2b";
import isEqual from "lodash.isequal";
import { xxHash32 } from "js-xxhash";
import { bytes, number, BytesLike } from "@ckb-lumos/codec";
import { BI, BIish } from "@ckb-lumos/bi";
Expand Down Expand Up @@ -149,10 +148,6 @@ function assertHexadecimal(debugPath: string, str: string): void {
}
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
function isDeepEqual(a: any, b: any): boolean {
return isEqual(a, b);
}
// Buffer.from('TYPE_ID')
const TYPE_ID_CODE_HASH =
"0x00000000000000000000000000000000000000000000000000545950455f4944";
Expand Down Expand Up @@ -272,6 +267,5 @@ export {
hashCode,
assertHexString,
assertHexadecimal,
isDeepEqual,
generateTypeIdScript,
};
5 changes: 3 additions & 2 deletions packages/base/tests/since.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const test = require("ava");
const isEqual = require("lodash.isequal");
const { BI } = require("@ckb-lumos/bi");

const { since, utils } = require("../src");
const { since } = require("../src");

const {
parseSinceCompatible,
Expand Down Expand Up @@ -91,7 +92,7 @@ test.before(() => {
test("parsedSince", (t) => {
fixtrues.forEach((v) => {
const parsed = parseSinceCompatible(v.since);
t.true(utils.isDeepEqual(parsed, v.parsed));
t.true(isEqual(parsed, v.parsed));
});
});

Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 64151f0

Please sign in to comment.