refactor: remove lodash dependency - #331
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the dependency on lodash by replacing its utility functions with native ES6+ features, custom lightweight helpers, and ts-deepmerge. The review feedback highlights a few areas of improvement for these custom helpers: updating isPlainObject to support objects created with Object.create(null) for full Lodash compatibility, simplifying mapValues using Object.entries(), and making the in operator check in wrapV1 safer against truthy primitives to prevent runtime TypeErrors.
|
Nice to see lodash go. Three things from our side before this lands:
CI is green and the rest of the replacements checked out faithful (random, isEmpty at the live call sites, the resource-name param lookup is actually stricter than lodash get in a good way). |
Removes lodash and @types/lodash as direct dependencies and replaces all usages with modern native ES6+ features and the existing ts-deepmerge library. - Compiled and ran the unit and integration tests: npm test - Validated with ESLint checks: npm run lint
c243820 to
7a78706
Compare
|
Thanks @cabljac! We've addressed your feedback:
All local tests compile and pass successfully, and all CI checks on GitHub have passed. |
Removes lodash and @types/lodash as direct dependencies and replaces all usages with modern native ES6+ features and the existing ts-deepmerge library.
Description
Removes lodash and @types/lodash as direct dependencies and replaces all usages with modern native ES6+ features and the existing ts-deepmerge library.
Scenarios Tested
npm testnpm run lint