@trackunit/react-core-contexts-test 1.3.99 → 1.3.101
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/index.cjs.js +14 -1
- package/index.esm.js +14 -1
- package/package.json +4 -4
package/index.cjs.js
CHANGED
|
@@ -1015,7 +1015,7 @@ const useDebugger = (propsToWatch, id) => {
|
|
|
1015
1015
|
// eslint-disable-next-line no-console
|
|
1016
1016
|
console.log(`${uniqueId} changed property: ${changedProp}`);
|
|
1017
1017
|
// JSON stringify is used to avoid console.table from logging the object reference
|
|
1018
|
-
const result = JSON.parse(
|
|
1018
|
+
const result = JSON.parse(safeStringify(changedProps[changedProp]));
|
|
1019
1019
|
const result0 = result[0];
|
|
1020
1020
|
const result1 = result[1];
|
|
1021
1021
|
result0 &&
|
|
@@ -1071,6 +1071,19 @@ const Debugger = ({ id, logPropsChanges, stop, children, }) => {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
return jsxRuntime.jsx("div", { className: "Debugger", children: children });
|
|
1073
1073
|
};
|
|
1074
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1075
|
+
const safeStringify = (obj) => {
|
|
1076
|
+
const seen = new WeakSet();
|
|
1077
|
+
return JSON.stringify(obj, function (key, value) {
|
|
1078
|
+
if (typeof value === "object" && value !== null) {
|
|
1079
|
+
if (seen.has(value)) {
|
|
1080
|
+
return undefined; // Omit circular reference
|
|
1081
|
+
}
|
|
1082
|
+
seen.add(value);
|
|
1083
|
+
}
|
|
1084
|
+
return value;
|
|
1085
|
+
});
|
|
1086
|
+
};
|
|
1074
1087
|
|
|
1075
1088
|
/**
|
|
1076
1089
|
*
|
package/index.esm.js
CHANGED
|
@@ -1013,7 +1013,7 @@ const useDebugger = (propsToWatch, id) => {
|
|
|
1013
1013
|
// eslint-disable-next-line no-console
|
|
1014
1014
|
console.log(`${uniqueId} changed property: ${changedProp}`);
|
|
1015
1015
|
// JSON stringify is used to avoid console.table from logging the object reference
|
|
1016
|
-
const result = JSON.parse(
|
|
1016
|
+
const result = JSON.parse(safeStringify(changedProps[changedProp]));
|
|
1017
1017
|
const result0 = result[0];
|
|
1018
1018
|
const result1 = result[1];
|
|
1019
1019
|
result0 &&
|
|
@@ -1069,6 +1069,19 @@ const Debugger = ({ id, logPropsChanges, stop, children, }) => {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
return jsx("div", { className: "Debugger", children: children });
|
|
1071
1071
|
};
|
|
1072
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1073
|
+
const safeStringify = (obj) => {
|
|
1074
|
+
const seen = new WeakSet();
|
|
1075
|
+
return JSON.stringify(obj, function (key, value) {
|
|
1076
|
+
if (typeof value === "object" && value !== null) {
|
|
1077
|
+
if (seen.has(value)) {
|
|
1078
|
+
return undefined; // Omit circular reference
|
|
1079
|
+
}
|
|
1080
|
+
seen.add(value);
|
|
1081
|
+
}
|
|
1082
|
+
return value;
|
|
1083
|
+
});
|
|
1084
|
+
};
|
|
1072
1085
|
|
|
1073
1086
|
/**
|
|
1074
1087
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-core-contexts-test",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.101",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"graphql": "^16.10.0",
|
|
15
15
|
"@tanstack/react-router": "1.114.29",
|
|
16
16
|
"@tanstack/router-core": "1.114.29",
|
|
17
|
-
"@trackunit/react-core-contexts-api": "1.4.
|
|
18
|
-
"@trackunit/react-core-hooks": "1.3.
|
|
19
|
-
"@trackunit/shared-utils": "1.5.
|
|
17
|
+
"@trackunit/react-core-contexts-api": "1.4.96",
|
|
18
|
+
"@trackunit/react-core-hooks": "1.3.98",
|
|
19
|
+
"@trackunit/shared-utils": "1.5.93"
|
|
20
20
|
},
|
|
21
21
|
"module": "./index.esm.js",
|
|
22
22
|
"main": "./index.cjs.js",
|