Skip to content

Commit

Permalink
chore: remove lodash usage (#6501)
Browse files Browse the repository at this point in the history
* Delete lodash.pick package

* Lint

---------

Co-authored-by: Nico Flaig <[email protected]>
  • Loading branch information
HiroyukiNaito and nflaig authored Mar 2, 2024
1 parent 1f18ec4 commit b5712a6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions packages/beacon-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@
"interface-datastore": "^8.2.7",
"it-all": "^3.0.4",
"it-pipe": "^3.0.1",
"lodash": "^4.17.21",
"jwt-simple": "0.5.6",
"libp2p": "1.1.1",
"multiformats": "^11.0.1",
Expand All @@ -154,7 +153,6 @@
"devDependencies": {
"@types/datastore-level": "^3.0.0",
"@types/leveldown": "^4.0.3",
"@types/lodash": "^4.14.192",
"@types/qs": "^6.9.7",
"@types/tmp": "^0.2.3",
"it-drain": "^3.0.3",
Expand Down
3 changes: 1 addition & 2 deletions packages/beacon-node/test/unit/eth1/utils/eth1Data.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pick from "lodash/pick.js";
import {describe, it, expect} from "vitest";
import {Root, phase0, ssz} from "@lodestar/types";
import {toHex} from "@lodestar/utils";
Expand Down Expand Up @@ -107,7 +106,7 @@ describe("eth1 / util / getEth1DataForBlocks", function () {

if (expectedEth1Data) {
const eth1Datas = await eth1DatasPromise;
const eth1DatasPartial = eth1Datas.map((eth1Data) => pick(eth1Data, Object.keys(expectedEth1Data[0])));
const eth1DatasPartial = eth1Datas.map(({blockNumber, depositCount}) => ({blockNumber, depositCount}));
expect(eth1DatasPartial).toEqual(expectedEth1Data);
} else if (error != null) {
await expectRejectedWithLodestarError(eth1DatasPromise, error);
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2915,11 +2915,6 @@
"@types/abstract-leveldown" "*"
"@types/node" "*"

"@types/lodash@^4.14.192":
version "4.14.202"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.202.tgz#f09dbd2fb082d507178b2f2a5c7e74bd72ff98f8"
integrity sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==

"@types/minimatch@^3.0.3":
version "3.0.5"
resolved "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz"
Expand Down

0 comments on commit b5712a6

Please sign in to comment.