feat!: 700% faster deepCopyObject, refactor deep merging and deep copying, type improvements (#7272)

**BREAKING:**
- The `deepMerge` exported from payload now handles more complex data and
is slower. The old, simple deepMerge is now exported as `deepMergeSimple`
- `combineMerge` is no longer exported. You can use
`deepMergeWithCombinedArrays` instead
- The behavior of the exported `deepCopyObject` and `isPlainObject` may
be different and more reliable, as the underlying algorithm has changed
This commit is contained in:
Alessio Gravili
2024-07-22 13:01:52 -04:00
committed by GitHub
parent 2c16c608ba
commit c45fbb9149
82 changed files with 592 additions and 537 deletions

View File

@@ -286,7 +286,7 @@ describe('Localization', () => {
const post = await payload.create({
collection: localizedSortSlug,
data: {
date: new Date(),
date: new Date().toISOString(),
title: `EN ${i}`,
},
locale: englishLocale,
@@ -296,7 +296,7 @@ describe('Localization', () => {
id: post.id,
collection: localizedSortSlug,
data: {
date: new Date(),
date: new Date().toISOString(),
title: `ES ${i}`,
},
locale: spanishLocale,