Skip to content

Releases: voodoocreation/ts-deepmerge

Ensure nested objects are always dereferenced

02 May 01:23

Choose a tag to compare

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!

Update dependencies

21 Nov 23:57

Choose a tag to compare

7.0.2

fix ESLint config

Update dependencies

16 Jul 04:29

Choose a tag to compare

7.0.1

update dependencies

Use named export instead of default

23 Jan 23:18

Choose a tag to compare

Changes

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.

Update dependencies

23 Jan 01:20

Choose a tag to compare

This version just updates the dev dependencies of the project.

Add `allowUndefinedOverrides` option + update dependencies

18 Jul 00:34

Choose a tag to compare

Changes

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 (#28) asking for this feature🙏

Add `uniqueArrayItems` option + update dependencies

19 Jun 22:24

Choose a tag to compare

Changes

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🙏

Update dependencies

27 Mar 21:26

Choose a tag to compare

6.0.3

update dependencies

Ensure cjs subfolder package.json is packed

27 Jan 02:46

Choose a tag to compare

6.0.2

ensure cjs subfolder package.json is packed

Fix `types` path in `package.json`

27 Jan 02:37

Choose a tag to compare

6.0.1

fix types path