@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.
@@ -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
- if (key === '__proto__') {
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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/utils v6.0.0-alpha.8
2
+ * @mui/utils v6.0.0-dev.20240529-082515-213b5e33ab
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -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
- if (key === '__proto__') {
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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/utils v6.0.0-alpha.8
2
+ * @mui/utils v6.0.0-dev.20240529-082515-213b5e33ab
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -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
- if (key === '__proto__') {
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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/utils v6.0.0-alpha.8
2
+ * @mui/utils v6.0.0-dev.20240529-082515-213b5e33ab
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/utils",
3
- "version": "6.0.0-alpha.8",
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.5",
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"