-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: replace lodash with ramda #1242
Conversation
Coverage report
Show files with reduced coverage 🔻
Test suite run success1198 tests passing in 207 suites. Report generated by 🧪jest coverage report action from 6016ea7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM mate. Btw, do you think it would be a better idea to merge this PR into the browser testing PR's branch instead of master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Does Ramda work with treeshaking? The lodash packages here were two tiny subsets of lodash. Most modern JS only imports the code being utilized.
I'm assuming yes, but can we double-check?
@Dhaiwat10 I can get a topic branch going if that is preferred, however I as part of this work I will also be upgrading other packages. For example, ethers v5 -> v6 as that bring ES support, which I think would be good to have on |
@camsjams Ramda has supported tree-shaking since |
…/feat/replace-lodash-with-ramda
@camsjams the bundle size actually looks to be smaller with ramda so yes definitely some smart bundling happening, therefore I am going to merge this PR. Master: ESM dist/index.mjs 883.00 B
ESM dist/cli.mjs 684.00 B
ESM dist/bin.mjs 721.00 B
ESM dist/index.mjs.map 1.12 KB
ESM dist/cli.mjs.map 1.16 KB
ESM dist/bin.mjs.map 1.28 KB
ESM ⚡️ Build success in 10ms
CJS dist/bin.js 761.00 B
CJS dist/index.js 3.49 KB
CJS dist/cli.js 1.66 KB
CJS dist/bin.js.map 1.31 KB
CJS dist/cli.js.map 1.24 KB
CJS dist/index.js.map 1.32 KB
CJS ⚡️ Build success in 10ms
IIFE dist/bin.global.js 871.63 KB
IIFE dist/cli.global.js 871.58 KB
IIFE dist/index.global.js 1.94 MB
IIFE dist/cli.global.js.map 1.50 MB
IIFE dist/bin.global.js.map 1.50 MB
IIFE dist/index.global.js.map 3.48 MB w/ Ramda: ESM dist/bin.mjs 721.00 B
ESM dist/cli.mjs 684.00 B
ESM dist/index.mjs 883.00 B
ESM dist/index.mjs.map 1.12 KB
ESM dist/cli.mjs.map 1.16 KB
ESM dist/bin.mjs.map 1.28 KB
ESM ⚡️ Build success in 11ms
CJS dist/index.js 3.49 KB
CJS dist/cli.js 1.66 KB
CJS dist/bin.js 761.00 B
CJS dist/index.js.map 1.32 KB
CJS dist/bin.js.map 1.31 KB
CJS dist/cli.js.map 1.24 KB
CJS ⚡️ Build success in 11ms
IIFE dist/bin.global.js 873.39 KB
IIFE dist/cli.global.js 873.34 KB
IIFE dist/index.global.js 1.92 MB
IIFE dist/bin.global.js.map 1.49 MB
IIFE dist/cli.global.js.map 1.49 MB
IIFE dist/index.global.js.map 3.42 MB |
This work is instigated by the efforts to support browser testing, specifically regarding Vitest. The version of lodash we use does not export for ESM. This PR looks to swap out lodash for ramda, which exports both CJS and ESM.
Relates to #284 and specifically this comment.