@lwrjs/shared-utils 0.10.2 → 0.10.4

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.
@@ -23,7 +23,10 @@ function _deepFreeze(obj, maxDepth, depth) {
23
23
  }
24
24
  }
25
25
  function deepFreeze(obj, maxDepth = 5) {
26
- const objClone = JSON.parse(JSON.stringify(obj));
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) => {
@@ -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
- const objClone = JSON.parse(JSON.stringify(obj));
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.2",
7
+ "version": "0.10.4",
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.2",
65
- "@lwrjs/types": "0.10.2",
64
+ "@lwrjs/diagnostics": "0.10.4",
65
+ "@lwrjs/types": "0.10.4",
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": "40988dfc093a3b9dea859f1bf61a49bca1edb0c5"
72
+ "gitHead": "b945f7642573141e5bda5ba4cb0dc3c622de907d"
73
73
  }