autobots-commonlib 1.3.11 → 1.3.12

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.
@@ -4,11 +4,8 @@
4
4
  <option name="autoReloadType" value="SELECTIVE" />
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
- <list default="true" id="30c1af58-4d10-4799-8434-f7c14eade97a" name="Default Changelist" comment="优化重定向写日志参数处理1.3.10">
7
+ <list default="true" id="30c1af58-4d10-4799-8434-f7c14eade97a" name="Default Changelist" comment="更新版本号到1.3.8">
8
8
  <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
9
- <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
10
- <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
11
- <change beforePath="$PROJECT_DIR$/util/utils.js" beforeDir="false" afterPath="$PROJECT_DIR$/util/utils.js" afterDir="false" />
12
9
  </list>
13
10
  <option name="SHOW_DIALOG" value="false" />
14
11
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -230,22 +227,22 @@
230
227
  <option name="hideEmptyMiddlePackages" value="true" />
231
228
  <option name="showLibraryContents" value="true" />
232
229
  </component>
233
- <component name="PropertiesComponent"><![CDATA[{
234
- "keyToString": {
235
- "RunOnceActivity.OpenProjectViewOnStart": "true",
236
- "RunOnceActivity.ShowReadmeOnStart": "true",
237
- "RunOnceActivity.git.unshallow": "true",
238
- "WebServerToolWindowFactoryState": "false",
239
- "git-widget-placeholder": "master",
240
- "last_opened_file_path": "/Users/majing15134/projects/RN/autobots-commonlib",
241
- "node.js.detected.package.eslint": "true",
242
- "node.js.detected.package.tslint": "true",
243
- "node.js.selected.package.eslint": "(autodetect)",
244
- "node.js.selected.package.tslint": "(autodetect)",
245
- "nodejs_package_manager_path": "npm",
246
- "vue.rearranger.settings.migration": "true"
230
+ <component name="PropertiesComponent">{
231
+ &quot;keyToString&quot;: {
232
+ &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
233
+ &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
234
+ &quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
235
+ &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
236
+ &quot;git-widget-placeholder&quot;: &quot;master&quot;,
237
+ &quot;last_opened_file_path&quot;: &quot;/Users/majing15134/projects/RN/autobots-commonlib&quot;,
238
+ &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
239
+ &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
240
+ &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
241
+ &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
242
+ &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
243
+ &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
247
244
  }
248
- }]]></component>
245
+ }</component>
249
246
  <component name="RecentsManager">
250
247
  <key name="CopyFile.RECENT_KEYS">
251
248
  <recent name="$PROJECT_DIR$" />
@@ -331,6 +328,7 @@
331
328
  <workItem from="1716272524681" duration="9005000" />
332
329
  <workItem from="1716814998133" duration="636000" />
333
330
  <workItem from="1744956907040" duration="306000" />
331
+ <workItem from="1745226099998" duration="607000" />
334
332
  </task>
335
333
  <task id="LOCAL-00001" summary="1、增加新组件NewNavbar;&#10;2、修改jump方法,增加一个参数;">
336
334
  <created>1561551696357</created>
@@ -603,12 +601,24 @@
603
601
  <component name="Vcs.Log.Tabs.Properties">
604
602
  <option name="OPEN_GENERIC_TABS">
605
603
  <map>
604
+ <entry key="37b214ca-431b-4a81-bc9e-5fe3e91842d9" value="TOOL_WINDOW" />
605
+ <entry key="3c8b0b99-0aa6-41f7-ac7f-4cb445fce607" value="TOOL_WINDOW" />
606
606
  <entry key="68016c0f-bd47-47ae-a11b-0f2068b8d124" value="TOOL_WINDOW" />
607
607
  <entry key="af60ef88-1ce1-4b05-af70-286a8a22b0ce" value="TOOL_WINDOW" />
608
608
  </map>
609
609
  </option>
610
610
  <option name="TAB_STATES">
611
611
  <map>
612
+ <entry key="37b214ca-431b-4a81-bc9e-5fe3e91842d9">
613
+ <value>
614
+ <State />
615
+ </value>
616
+ </entry>
617
+ <entry key="3c8b0b99-0aa6-41f7-ac7f-4cb445fce607">
618
+ <value>
619
+ <State />
620
+ </value>
621
+ </entry>
612
622
  <entry key="68016c0f-bd47-47ae-a11b-0f2068b8d124">
613
623
  <value>
614
624
  <State>
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  autobots commonlib
2
2
 
3
+ "1.3.12"
4
+ 日志重定向对象转JSON场景处理循环引用的情况
5
+
3
6
  "1.3.11"
4
7
  去掉consolelog开关,由原生开关着统一控制
5
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autobots-commonlib",
3
- "version": "1.3.11",
3
+ "version": "1.3.12",
4
4
  "description": "autobots common lib",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util/utils.js CHANGED
@@ -46,12 +46,29 @@ function compareVersion(version1, version2) {
46
46
  return 0;
47
47
  }
48
48
 
49
+ function jsonStringifyWithCircularRef(obj) {
50
+ const seen = new Set();
51
+ try {
52
+ return JSON.stringify(obj, (key, value) => {
53
+ if (typeof value === 'object' && value !== null) {
54
+ if (seen.has(value)) {
55
+ return '[Circular]';
56
+ }
57
+ seen.add(value);
58
+ }
59
+ return value;
60
+ });
61
+ } catch (e) {
62
+ return obj;
63
+ }
64
+ }
65
+
49
66
  function object2String(value) {
50
67
  if (typeof value === 'object' && value !== null && value !== undefined) {
51
68
  try {
52
69
  return JSON.stringify(value)
53
70
  } catch (e) {
54
- return value;
71
+ return jsonStringifyWithCircularRef(value);
55
72
  }
56
73
  } else {
57
74
  return value + '';