@abtnode/util 1.17.7-beta-20251223-090654-55d57623 → 1.17.7-beta-20251224-045844-3c7f459a

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/lib/deep-clone.js CHANGED
@@ -2,7 +2,14 @@ function deepClone(o) {
2
2
  if (typeof o === 'undefined') {
3
3
  return undefined;
4
4
  }
5
- return JSON.parse(JSON.stringify(o));
5
+
6
+ // 优先使用 structuredClone(性能更好,支持更多类型)
7
+ // structuredClone(Node.js 17+ / 现代浏览器)
8
+ try {
9
+ return structuredClone(o);
10
+ } catch {
11
+ return JSON.parse(JSON.stringify(o));
12
+ }
6
13
  }
7
14
 
8
15
  module.exports = deepClone;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.17.7-beta-20251223-090654-55d57623",
6
+ "version": "1.17.7-beta-20251224-045844-3c7f459a",
7
7
  "description": "ArcBlock's JavaScript utility",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -18,14 +18,14 @@
18
18
  "author": "polunzh <polunzh@gmail.com> (http://github.com/polunzh)",
19
19
  "license": "Apache-2.0",
20
20
  "dependencies": {
21
- "@abtnode/constant": "1.17.7-beta-20251223-090654-55d57623",
22
- "@abtnode/db-cache": "1.17.7-beta-20251223-090654-55d57623",
21
+ "@abtnode/constant": "1.17.7-beta-20251224-045844-3c7f459a",
22
+ "@abtnode/db-cache": "1.17.7-beta-20251224-045844-3c7f459a",
23
23
  "@arcblock/did": "^1.27.15",
24
24
  "@arcblock/event-hub": "^1.27.15",
25
25
  "@arcblock/pm2": "^6.0.12",
26
- "@blocklet/constant": "1.17.7-beta-20251223-090654-55d57623",
26
+ "@blocklet/constant": "1.17.7-beta-20251224-045844-3c7f459a",
27
27
  "@blocklet/error": "^0.3.5",
28
- "@blocklet/meta": "1.17.7-beta-20251223-090654-55d57623",
28
+ "@blocklet/meta": "1.17.7-beta-20251224-045844-3c7f459a",
29
29
  "@blocklet/xss": "^0.3.14",
30
30
  "@ocap/client": "^1.27.15",
31
31
  "@ocap/mcrypto": "^1.27.15",
@@ -90,5 +90,5 @@
90
90
  "express": "^4.18.2",
91
91
  "fs-extra": "^11.2.0"
92
92
  },
93
- "gitHead": "00a82b6f4ef5818d6ec37d74be404031c693247c"
93
+ "gitHead": "e30dc1736187fc9d8136f146badfd5b521af16f2"
94
94
  }