bitcore icon indicating copy to clipboard operation
bitcore copied to clipboard

drop lodash

Open dynst opened this issue 6 months ago • 2 comments

https://github.com/bitpay/bitcore/blob/c464b8806a8801a43bea5102ce281fc70045945c/packages/bitcore-lib/package.json#L44

It's an enormous dependency that hasn't had a release since 2021. How much of it is even needed? _.includes is just a standard array method now. is-what can be imported for helpers like _.isObject. _.shuffle is replaceable by just-shuffle

https://github.com/lodash/lodash/issues/5989#issuecomment-2897446421

dynst avatar Jun 30 '25 17:06 dynst

Yes, it's an unneeded dependency, but is prolific throughout the repo. I've been removing lodash as I go.

kajoseph avatar Jun 30 '25 18:06 kajoseph

One wrinkle. Won't removing this be a breaking change requiring a major version bump? Maybe it'd be a good idea to remove all of these, actually...

https://github.com/bitpay/bitcore/blob/f3c6fef0e4f086bef957289ff123b9552f0bb3d7/packages/bitcore-lib/index.js#L63-L69

Most of those lines have been there untouched since 2014. #1040

dynst avatar Jul 03 '25 02:07 dynst