Summary
Replace merge-deep with deepmerge to eliminate 13 transitive dependencies, improve bundler compatibility, and move to an actively maintained package with built-in TypeScript types.
Comparison
| Dimension |
deepmerge (4.3.1) |
merge-deep (3.0.3) |
| Weekly downloads |
~70.6M |
~1.96M |
| Last published |
2023-03-16 |
2021-01-11 (unmaintained since 2018) |
| Dependencies |
0 |
3 direct / 13 transitive |
| TypeScript |
Built-in types |
Requires @types/merge-deep |
| Bundle size |
~4 KB |
Larger (multiple packages) |
| ESM support |
CJS + UMD (works in all bundlers) |
CJS only |
| Known vulnerabilities |
None |
Pulls unmaintained clone-deep@0.2.4, lazy-cache, kind-of@2/3 |
| GitHub stars |
~2.7k |
~200 |
| Bundler compatibility |
Webpack 5, Vite, esbuild, Turbopack |
CJS-only + old micro-packages cause issues with ESM-first bundlers |
Motivation
- Bundler compatibility:
merge-deep → clone-deep@0.2.4 → old CJS micro-packages break ESM-first compilers like Turbopack
- Supply chain reduction: 13 transitive dependencies → 0
- Maintenance:
merge-deep is effectively abandoned; deepmerge has 36x adoption and is stable
- TypeScript: Built-in types, no separate
@types package needed
Summary
Replace
merge-deepwithdeepmergeto eliminate 13 transitive dependencies, improve bundler compatibility, and move to an actively maintained package with built-in TypeScript types.Comparison
deepmerge(4.3.1)merge-deep(3.0.3)@types/merge-deepclone-deep@0.2.4,lazy-cache,kind-of@2/3Motivation
merge-deep→clone-deep@0.2.4→ old CJS micro-packages break ESM-first compilers like Turbopackmerge-deepis effectively abandoned;deepmergehas 36x adoption and is stable@typespackage needed