@lwrjs/shared-utils 0.10.2 → 0.10.3
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/build/cjs/object.cjs +4 -1
- package/build/es/object.js +6 -1
- package/package.json +4 -4
package/build/cjs/object.cjs
CHANGED
|
@@ -23,7 +23,10 @@ function _deepFreeze(obj, maxDepth, depth) {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
function deepFreeze(obj, maxDepth = 5) {
|
|
26
|
-
|
|
26
|
+
let objClone = obj;
|
|
27
|
+
if (process.env.UNSAFE_IGNORE_CONFIG_VALIDATION !== "true") {
|
|
28
|
+
objClone = JSON.parse(JSON.stringify(obj));
|
|
29
|
+
}
|
|
27
30
|
return _deepFreeze(objClone, maxDepth, 0);
|
|
28
31
|
}
|
|
29
32
|
var debounce = (func, waitFor) => {
|
package/build/es/object.js
CHANGED
|
@@ -18,7 +18,12 @@ function _deepFreeze(obj, maxDepth, depth) {
|
|
|
18
18
|
*/
|
|
19
19
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
20
20
|
export function deepFreeze(obj, maxDepth = 5) {
|
|
21
|
-
|
|
21
|
+
let objClone = obj;
|
|
22
|
+
// Temporary fix for W-13723739 to prevent out of memory exceptions
|
|
23
|
+
// Only clone the object if we don't have the env variable set
|
|
24
|
+
if (process.env.UNSAFE_IGNORE_CONFIG_VALIDATION !== 'true') {
|
|
25
|
+
objClone = JSON.parse(JSON.stringify(obj));
|
|
26
|
+
}
|
|
22
27
|
return _deepFreeze(objClone, maxDepth, 0);
|
|
23
28
|
}
|
|
24
29
|
/**
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.10.
|
|
7
|
+
"version": "0.10.3",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"rollup": "^2.78.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@lwrjs/diagnostics": "0.10.
|
|
65
|
-
"@lwrjs/types": "0.10.
|
|
64
|
+
"@lwrjs/diagnostics": "0.10.3",
|
|
65
|
+
"@lwrjs/types": "0.10.3",
|
|
66
66
|
"@types/mime-types": "2.1.1",
|
|
67
67
|
"@types/path-to-regexp": "^1.7.0"
|
|
68
68
|
},
|
|
69
69
|
"engines": {
|
|
70
70
|
"node": ">=16.0.0"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "a7b63f17b331c4f2573a67be18c3c4c37993cfdd"
|
|
73
73
|
}
|