NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #5410 most downloaded on npm
A TypeScript deep merge function.
Latest stable
8.0.0
Last release 6 months ago
22 May 2026
Release timing varies
gaps range from 4 weeks to 13 months
Some releases are documented
notes for 13 of 33 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
33 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
This version safeguards against additional reserved prototype methods from being overwritten by merge operations.
This version safeguards against additional reserved prototype methods from being overwritten by merge operations.
Thank you to @igorg1312 for the contribution!
This version ensures nested objects are always dereferenced, even when a merge operation will not affect internal values.
This version ensures nested objects are always dereferenced, even when a merge operation will not affect internal values.
Thanks to @nick-michael for the contribution!
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
This version moves from using a default export for the merge function, to exporting it as a named function. This is to avoid some issues that some nat
This version moves from using a default export for the merge function, to exporting it as a named function. This is to avoid some issues that some native ESM TypeScript projects were facing where it couldn't resolve the types correctly.
This version just updates the dev dependencies of the project.
This version just updates the dev dependencies of the project.
This version includes a new option - allowUndefinedOverrides. If you provide it with false it will prevent explicitly-provided properties with a value
This version includes a new option - allowUndefinedOverrides. If you provide it with false it will prevent explicitly-provided properties with a value of undefined from overwriting existing values:
import merge from "ts-deepmerge";
const objA = { value: 1 };
const objB = { value: 2 };
const objC = { value: undefined };
merge.withOptions({ allowUndefinedOverrides: false }, objA, objB, objC);
The result of the above example would be:
{ value: 2 }
Thanks to @norahmaria for raising an issue (https://github.com/voodoocreation/ts-deepmerge/issues/28) asking for this feature🙏
This version includes a new option - uniqueArrayItems. If you provide it with false it will allow duplicate array items:
This version includes a new option - uniqueArrayItems. If you provide it with false it will allow duplicate array items:
import merge from "ts-deepmerge";
const objA = { array: ["a", "b"] };
const objB = { array: ["b", "c"] };
merge.withOptions({ uniqueArrayItems: false }, objA, objB);
The result of the above example would be:
{ array: ["a", "b", "b", "c"] }
Thanks to @KlutzyBubbles for raising an issue (#27) asking for this feature🙏
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
This version updates the TypeScript logic to merge all possible property values when inconsistent objects are provided to merge, to address #21.
This version updates the TypeScript logic to merge all possible property values when inconsistent objects are provided to merge, to address #21.
The previous logic used a much simpler method which resulted in less accurate results when used outside of the designed context of providing objects that were all consistent with each other.
Nothing published for this version
Nothing published for this version
Nothing published for this version
This version unintentionally added a breaking change for Node <16 environments. Have reverted it in 2.0.7 and added a Node >=14 requirement in 3.0.0.…
This version unintentionally added a breaking change for Node <16 environments. Have reverted it in 2.0.7 and added a Node >=14 requirement in 3.0.0. If you encounter the issue, simply upgrade to one of these versions.
Thank you to @sesam for flagging it 🙏
Nothing published for this version
Previously we were safeguarding against this using TypeScript by using length: never in IObject - this caused issues with legitimate object primitives
Previously we were safeguarding against this using TypeScript by using length: never in IObject - this caused issues with legitimate object primitives that had a length property. This version removes that in favour of a runtime check for Array.isArray. Unfortunately it means that the TS compile-time check is lost, but at least it's not creating issues for users when providing a legitimate object.
Nothing published for this version
This version adds a safeguard against prototype pollution - sufficient unit test coverage has been added to cover the scenario.
This version adds a safeguard against prototype pollution - sufficient unit test coverage has been added to cover the scenario.
Nothing published for this version
This function is only designed to have objects provided to it as args. This version fixes it so that it won't allow unsupported args such as arrays.
This function is only designed to have objects provided to it as args. This version fixes it so that it won't allow unsupported args such as arrays.
This version adds the .withOptions functionality, with a mergeArrays option, to optionally turn off the deep array merging behaviour.
This version adds the .withOptions functionality, with a mergeArrays option, to optionally turn off the deep array merging behaviour.
Nothing published for this version
Nothing published for this version
Included a more descriptive README.md, with a scenario showing an overwrite case for a duplicate value.
Included a more descriptive README.md, with a scenario showing an overwrite case for a duplicate value.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.