bunshin-clone 1.0.9 → 1.0.10

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/dist/index.cjs CHANGED
@@ -149,11 +149,17 @@ function cloneError(value, options, ref) {
149
149
  result.name = name;
150
150
  }
151
151
  ref.set(value, result);
152
+ if (value.stack) {
153
+ try {
154
+ result.stack = value.stack;
155
+ } catch {
156
+ }
157
+ }
152
158
  if ("cause" in value && value.cause !== void 0) {
153
159
  result.cause = clone(value.cause, options, ref);
154
160
  }
155
- if (value.stack) {
156
- result.stack = value.stack;
161
+ for (const key of Object.keys(value)) {
162
+ result[key] = clone(value[key], options, ref);
157
163
  }
158
164
  return result;
159
165
  }
@@ -213,7 +219,7 @@ function isUnsafeKey(key) {
213
219
  * High-performance deep clone utility with descriptor support.
214
220
  * Supports circular ref and complex built-in types.
215
221
  *
216
- * @version 1.0.9
222
+ * @version 1.0.10
217
223
  * @author Yusuke Kamiyamane
218
224
  * @license MIT
219
225
  * @copyright Copyright (c) 2026 Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@
3
3
  * High-performance deep clone utility with descriptor support.
4
4
  * Supports circular ref and complex built-in types.
5
5
  *
6
- * @version 1.0.9
6
+ * @version 1.0.10
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) 2026 Yusuke Kamiyamane
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * High-performance deep clone utility with descriptor support.
4
4
  * Supports circular ref and complex built-in types.
5
5
  *
6
- * @version 1.0.9
6
+ * @version 1.0.10
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) 2026 Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -147,11 +147,17 @@ function cloneError(value, options, ref) {
147
147
  result.name = name;
148
148
  }
149
149
  ref.set(value, result);
150
+ if (value.stack) {
151
+ try {
152
+ result.stack = value.stack;
153
+ } catch {
154
+ }
155
+ }
150
156
  if ("cause" in value && value.cause !== void 0) {
151
157
  result.cause = clone(value.cause, options, ref);
152
158
  }
153
- if (value.stack) {
154
- result.stack = value.stack;
159
+ for (const key of Object.keys(value)) {
160
+ result[key] = clone(value[key], options, ref);
155
161
  }
156
162
  return result;
157
163
  }
@@ -211,7 +217,7 @@ function isUnsafeKey(key) {
211
217
  * High-performance deep clone utility with descriptor support.
212
218
  * Supports circular ref and complex built-in types.
213
219
  *
214
- * @version 1.0.9
220
+ * @version 1.0.10
215
221
  * @author Yusuke Kamiyamane
216
222
  * @license MIT
217
223
  * @copyright Copyright (c) 2026 Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunshin-clone",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "High-performance deep clone utility with descriptor support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",