Skip to content

Commit

Permalink
chore: Update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
bebraw committed Jul 2, 2024
1 parent 315d474 commit 8caf9a5
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

## 6.0.0 / xxxx-xx-xx
## 6.0.1 / 2024-07-02

- Fix - Restore usage of `clone-deep` as there was a corner case where `structuredClone` did not work as expected. #214

## 6.0.0 / 2024-07-02

- Chore - Update internal dependencies. As a result, the package needs at least Node 18 to run.
- Chore - Use `structuredClone` over `clone-deep` dependency since it is included to Node 18 or above. #214
Expand Down
93 changes: 93 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"dist"
],
"dependencies": {
"clone-deep": "^4.0.1",
"flat": "^5.0.2",
"wildcard": "^2.0.1"
},
Expand Down
8 changes: 7 additions & 1 deletion src/join-arrays.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import cloneDeep from "clone-deep";
import { Customize, Key } from "./types";
import mergeWith from "./merge-with";
import { isRegex, isFunction, isPlainObject } from "./utils";
Expand Down Expand Up @@ -47,7 +48,12 @@ export default function joinArrays({
}

if (isPlainObject(b)) {
return structuredClone(b);
return cloneDeep(b);

// The behavior of structuredClone differs from cloneDeep
// so it cannot work as a replacement for all cases although
// tests pass with it.
// return structuredClone(b);
}

if (isArray(b)) {
Expand Down

0 comments on commit 8caf9a5

Please sign in to comment.