refactor: replace lodash.merge with lodash.mergewith#4603
refactor: replace lodash.merge with lodash.mergewith#4603escapedcat merged 3 commits intoconventional-changelog:masterfrom
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||
There was a problem hiding this comment.
Pull request overview
Refactors commitlint packages to use lodash.mergewith instead of lodash.merge, aiming to consolidate merge utilities and remove the direct lodash.merge dependency from updated workspaces.
Changes:
- Replaced
lodash.mergeimports/usages withlodash.mergewith(mergeWith) in load logic, config export, and CLI tests. - Updated package dependencies and type definitions from
lodash.merge/@types/lodash.mergetolodash.mergewith/@types/lodash.mergewith. - Updated
yarn.lockto drop@types/lodash.mergeentries.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
yarn.lock |
Removes @types/lodash.merge and keeps @types/lodash.mergewith to reflect dependency changes. |
@commitlint/load/src/load.ts |
Switches config merge helper from merge to mergeWith. |
@commitlint/load/package.json |
Replaces lodash.merge + types with lodash.mergewith + types. |
@commitlint/config-patternplate/package.json |
Replaces lodash.merge + types with lodash.mergewith + types. |
@commitlint/config-patternplate/index.js |
Switches config merge helper from merge to mergeWith. |
@commitlint/cli/src/cli.test.ts |
Switches test helper merge from merge to mergeWith. |
@commitlint/cli/package.json |
Replaces dev dependency lodash.merge + types with lodash.mergewith + types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks! |
|
@escapedcat, maybe you can replace |
User description
Description
Replace
lodash.mergewithlodash.mergewith. (maybe) extracted from #4596.Motivation and Context
We have 2 merging libraries in our dependency tree. So i refactor it to ONLY use 1 merging library.
Usage examples
How Has This Been Tested?
Types of changes
Checklist:
PR Type
Enhancement
Description
Replace
lodash.mergewithlodash.mergewithacross codebaseConsolidate to single merging library dependency
Update package.json dependencies and type definitions
Update import statements in three packages
Diagram Walkthrough
File Walkthrough
cli.test.ts
Update merge import and usage in tests@commitlint/cli/src/cli.test.ts
lodash.mergeimport withlodash.mergewithmergeWithload.ts
Update merge import and usage in loader@commitlint/load/src/load.ts
lodash.mergeimport withlodash.mergewithmergeWithindex.js
Update merge import and usage in config@commitlint/config-patternplate/index.js
lodash.mergeimport withlodash.mergewithmergeWithpackage.json
Update dependencies and type definitions@commitlint/cli/package.json
lodash.mergewithlodash.mergewithdependency@types/lodash.mergeto@types/lodash.mergewithpackage.json
Update dependencies and type definitions@commitlint/config-patternplate/package.json
lodash.mergewithlodash.mergewithdependency@types/lodash.mergeto@types/lodash.mergewithpackage.json
Update dependencies and type definitions@commitlint/load/package.json
lodash.mergewithlodash.mergewithdependency@types/lodash.mergeto@types/lodash.mergewith