@mui/utils 6.0.0-alpha.8 → 6.0.0-dev.20240529-082515-213b5e33ab
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deepmerge/deepmerge.js +2 -4
- package/index.js +1 -1
- package/modern/deepmerge/deepmerge.js +2 -4
- package/modern/index.js +1 -1
- package/node/deepmerge/deepmerge.js +2 -4
- package/node/index.js +1 -1
- package/package.json +2 -2
package/deepmerge/deepmerge.js
CHANGED
|
@@ -24,11 +24,9 @@ export default function deepmerge(target, source, options = {
|
|
|
24
24
|
} : target;
|
|
25
25
|
if (isPlainObject(target) && isPlainObject(source)) {
|
|
26
26
|
Object.keys(source).forEach(key => {
|
|
27
|
+
if (isPlainObject(source[key]) &&
|
|
27
28
|
// Avoid prototype pollution
|
|
28
|
-
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {
|
|
29
|
+
Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {
|
|
32
30
|
// Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
|
|
33
31
|
output[key] = deepmerge(target[key], source[key], options);
|
|
34
32
|
} else if (options.clone) {
|
package/index.js
CHANGED
|
@@ -24,11 +24,9 @@ export default function deepmerge(target, source, options = {
|
|
|
24
24
|
} : target;
|
|
25
25
|
if (isPlainObject(target) && isPlainObject(source)) {
|
|
26
26
|
Object.keys(source).forEach(key => {
|
|
27
|
+
if (isPlainObject(source[key]) &&
|
|
27
28
|
// Avoid prototype pollution
|
|
28
|
-
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {
|
|
29
|
+
Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {
|
|
32
30
|
// Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
|
|
33
31
|
output[key] = deepmerge(target[key], source[key], options);
|
|
34
32
|
} else if (options.clone) {
|
package/modern/index.js
CHANGED
|
@@ -31,11 +31,9 @@ function deepmerge(target, source, options = {
|
|
|
31
31
|
} : target;
|
|
32
32
|
if (isPlainObject(target) && isPlainObject(source)) {
|
|
33
33
|
Object.keys(source).forEach(key => {
|
|
34
|
+
if (isPlainObject(source[key]) &&
|
|
34
35
|
// Avoid prototype pollution
|
|
35
|
-
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {
|
|
36
|
+
Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {
|
|
39
37
|
// Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
|
|
40
38
|
output[key] = deepmerge(target[key], source[key], options);
|
|
41
39
|
} else if (options.clone) {
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/utils",
|
|
3
|
-
"version": "6.0.0-
|
|
3
|
+
"version": "6.0.0-dev.20240529-082515-213b5e33ab",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Utility functions for React components.",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"url": "https://opencollective.com/mui-org"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@babel/runtime": "^7.24.
|
|
29
|
+
"@babel/runtime": "^7.24.6",
|
|
30
30
|
"@types/prop-types": "^15.7.12",
|
|
31
31
|
"prop-types": "^15.8.1",
|
|
32
32
|
"react-is": "^18.2.0"
|