diff --git a/benchmark/package.json b/benchmark/package.json index 6a2baee8..ea2a7ab8 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -14,6 +14,7 @@ "dependencies": { "deepmerge": "^4.3.1", "deepmerge-ts": "link:..", + "defu": "^6.1.4", "lodash": "^4.17.21", "merge-anything": "^5.1.7", "object-accumulator": "^0.0.5" diff --git a/benchmark/pnpm-lock.yaml b/benchmark/pnpm-lock.yaml index 70b16ca5..47d5b6e6 100644 --- a/benchmark/pnpm-lock.yaml +++ b/benchmark/pnpm-lock.yaml @@ -14,6 +14,9 @@ importers: deepmerge-ts: specifier: link:.. version: link:.. + defu: + specifier: ^6.1.4 + version: 6.1.4 lodash: specifier: ^4.17.21 version: 4.17.21 @@ -184,6 +187,9 @@ packages: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} + defu@6.1.4: + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + esbuild@0.20.2: resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} engines: {node: '>=12'} @@ -307,6 +313,8 @@ snapshots: deepmerge@4.3.1: {} + defu@6.1.4: {} + esbuild@0.20.2: optionalDependencies: '@esbuild/aix-ppc64': 0.20.2 diff --git a/benchmark/run.ts b/benchmark/run.ts index 5b6a94e2..f9c8dcbd 100644 --- a/benchmark/run.ts +++ b/benchmark/run.ts @@ -7,6 +7,7 @@ import { fileURLToPath } from "node:url"; import deepmerge from "deepmerge"; import { deepmerge as deepmergeTs } from "deepmerge-ts"; +import { defu } from "defu"; import lodash from "lodash"; import { merge as mergeAnything } from "merge-anything"; import { Accumulator as ObjectAccumulator } from "object-accumulator"; @@ -74,6 +75,9 @@ for (let m_i = 0; m_i < benchmarkDataSets.length; m_i++) { .add("deepmerge", () => { deepmerge.all(benchmarkData); }) + .add("defu", () => { + defu({}, ...benchmarkData); + }) .add("merge-anything", () => { (mergeAnything as any)(...benchmarkData); }) diff --git a/project-dictionary.txt b/project-dictionary.txt index dd8f3ec0..ae965a26 100644 --- a/project-dictionary.txt +++ b/project-dictionary.txt @@ -8,6 +8,7 @@ deassert deepmerge deepmergecustomoptions deepmergets +defu denoify foo fred