@visulima/deep-clone 2.1.8 → 2.1.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/CHANGELOG.md +22 -0
- package/README.md +2 -1
- package/dist/handler.cjs +2 -2
- package/dist/handler.d.ts +1 -1
- package/dist/handler.mjs +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +4 -4
- package/dist/packem_shared/{copyArrayBuffer-RMfO5nNu.cjs → copyArrayBuffer-CCGJtx0g.cjs} +1 -1
- package/dist/packem_shared/{copyArrayBuffer-ClXU6N_V.mjs → copyArrayBuffer-DnYU3Ab_.mjs} +1 -1
- package/dist/packem_shared/{copyDataView-xL-RicuC.mjs → copyDataView-BJMKTRTm.mjs} +1 -1
- package/dist/packem_shared/{copyDataView-BfhmLiTi.cjs → copyDataView-DHMi5seB.cjs} +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +2 -74
- /package/dist/packem_shared/{types-_Qve7nv8.d.mjs → types-_Qve7nv8.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## @visulima/deep-clone [2.1.10](https://github.com/visulima/visulima/compare/@visulima/deep-clone@2.1.9...@visulima/deep-clone@2.1.10) (2025-03-07)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* updated @visulima/packem and other dev deps, for better bundling size ([e940581](https://github.com/visulima/visulima/commit/e9405812201594e54dd81d17ddb74177df5f3c24))
|
|
6
|
+
|
|
7
|
+
### Miscellaneous Chores
|
|
8
|
+
|
|
9
|
+
* updated dev dependencies ([487a976](https://github.com/visulima/visulima/commit/487a976932dc7c39edfc19ffd3968960ff338066))
|
|
10
|
+
|
|
11
|
+
## @visulima/deep-clone [2.1.9](https://github.com/visulima/visulima/compare/@visulima/deep-clone@2.1.8...@visulima/deep-clone@2.1.9) (2025-01-25)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* fixed wrong node version range in package.json ([4ae2929](https://github.com/visulima/visulima/commit/4ae292984681c71a770e4d4560432f7b7c5a141a))
|
|
16
|
+
|
|
17
|
+
### Miscellaneous Chores
|
|
18
|
+
|
|
19
|
+
* fixed typescript url ([fe65a8c](https://github.com/visulima/visulima/commit/fe65a8c0296ece7ee26474c70d065b06d4d0da89))
|
|
20
|
+
* updated all dev dependencies ([37fb298](https://github.com/visulima/visulima/commit/37fb298b2af7c63be64252024e54bb3af6ddabec))
|
|
21
|
+
* updated all dev dependencies and all dependencies in the app folder ([87f4ccb](https://github.com/visulima/visulima/commit/87f4ccbf9f7900ec5b56f3c1477bc4a0ef571bcf))
|
|
22
|
+
|
|
1
23
|
## @visulima/deep-clone [2.1.8](https://github.com/visulima/visulima/compare/@visulima/deep-clone@2.1.7...@visulima/deep-clone@2.1.8) (2025-01-12)
|
|
2
24
|
|
|
3
25
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -215,7 +215,8 @@ If you would like to help take a look at the [list of issues](https://github.com
|
|
|
215
215
|
The visulima deep-clone is open-sourced software licensed under the [MIT][license-url]
|
|
216
216
|
|
|
217
217
|
[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
|
|
218
|
-
|
|
218
|
+
|
|
219
|
+
[typescript-url]: https://www.typescriptlang.org/ "TypeScript" "typescript"
|
|
219
220
|
[license-image]: https://img.shields.io/npm/l/@visulima/deep-clone?color=blueviolet&style=for-the-badge
|
|
220
221
|
[license-url]: LICENSE.md "license"
|
|
221
222
|
[npm-image]: https://img.shields.io/npm/v/@visulima/deep-clone/latest.svg?style=for-the-badge&logo=npm
|
package/dist/handler.cjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
4
|
|
|
5
5
|
const copyArrayLoose = require('./packem_shared/copyArrayLoose-jv5B0O8W.cjs');
|
|
6
|
-
const copyArrayBuffer = require('./packem_shared/copyArrayBuffer-
|
|
6
|
+
const copyArrayBuffer = require('./packem_shared/copyArrayBuffer-CCGJtx0g.cjs');
|
|
7
7
|
const copyBlob = require('./packem_shared/copyBlob-B8SnIatQ.cjs');
|
|
8
|
-
const copyDataView = require('./packem_shared/copyDataView-
|
|
8
|
+
const copyDataView = require('./packem_shared/copyDataView-DHMi5seB.cjs');
|
|
9
9
|
const copyDate = require('./packem_shared/copyDate-CSIVko_l.cjs');
|
|
10
10
|
const copyError = require('./packem_shared/copyError-C1oK1eBT.cjs');
|
|
11
11
|
const copyMapLoose = require('./packem_shared/copyMapLoose-DpoR0LmV.cjs');
|
package/dist/handler.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as State, T as TypedArray } from './packem_shared/types-_Qve7nv8.
|
|
1
|
+
import { S as State, T as TypedArray } from './packem_shared/types-_Qve7nv8.js';
|
|
2
2
|
|
|
3
3
|
declare const copyArrayLoose: <Value extends unknown[]>(array: Value, state: State) => Value;
|
|
4
4
|
declare const copyArrayStrict: <Value extends unknown[]>(array: Value, state: State) => Value;
|
package/dist/handler.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { copyArrayLoose, copyArrayStrict } from './packem_shared/copyArrayLoose-DutO2eEt.mjs';
|
|
2
|
-
export { default as copyArrayBuffer } from './packem_shared/copyArrayBuffer-
|
|
2
|
+
export { default as copyArrayBuffer } from './packem_shared/copyArrayBuffer-DnYU3Ab_.mjs';
|
|
3
3
|
export { default as copyBlob } from './packem_shared/copyBlob-ChzBsdC1.mjs';
|
|
4
|
-
export { default as copyDataView } from './packem_shared/copyDataView-
|
|
4
|
+
export { default as copyDataView } from './packem_shared/copyDataView-BJMKTRTm.mjs';
|
|
5
5
|
export { default as copyDate } from './packem_shared/copyDate-Bgbm3mwe.mjs';
|
|
6
6
|
export { default as copyError } from './packem_shared/copyError-8k5J3dj4.mjs';
|
|
7
7
|
export { copyMapLoose, copyMapStrict } from './packem_shared/copyMapLoose-6OISt6H6.mjs';
|
package/dist/index.cjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
4
|
|
|
5
5
|
const copyArrayLoose = require('./packem_shared/copyArrayLoose-jv5B0O8W.cjs');
|
|
6
|
-
const copyArrayBuffer = require('./packem_shared/copyArrayBuffer-
|
|
6
|
+
const copyArrayBuffer = require('./packem_shared/copyArrayBuffer-CCGJtx0g.cjs');
|
|
7
7
|
const copyBlob = require('./packem_shared/copyBlob-B8SnIatQ.cjs');
|
|
8
|
-
const copyDataView = require('./packem_shared/copyDataView-
|
|
8
|
+
const copyDataView = require('./packem_shared/copyDataView-DHMi5seB.cjs');
|
|
9
9
|
const copyDate = require('./packem_shared/copyDate-CSIVko_l.cjs');
|
|
10
10
|
const copyError = require('./packem_shared/copyError-C1oK1eBT.cjs');
|
|
11
11
|
const copyMapLoose = require('./packem_shared/copyMapLoose-DpoR0LmV.cjs');
|
|
@@ -63,10 +63,10 @@ const deepClone = /* @__PURE__ */ __name((originalData, options) => {
|
|
|
63
63
|
if (Array.isArray(value)) {
|
|
64
64
|
return cloner.Array(value, state);
|
|
65
65
|
}
|
|
66
|
-
if (typeof value === "object" && value.constructor === Object && value.nodeType ===
|
|
66
|
+
if (typeof value === "object" && value.constructor === Object && value.nodeType === void 0) {
|
|
67
67
|
return cloner.Object(value, state);
|
|
68
68
|
}
|
|
69
|
-
if (value.nodeType !==
|
|
69
|
+
if (value.nodeType !== void 0 && value.cloneNode !== void 0) {
|
|
70
70
|
return value.cloneNode(true);
|
|
71
71
|
}
|
|
72
72
|
if (value instanceof Date) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Options } from './packem_shared/types-_Qve7nv8.
|
|
2
|
-
export { S as State } from './packem_shared/types-_Qve7nv8.
|
|
1
|
+
import { O as Options } from './packem_shared/types-_Qve7nv8.js';
|
|
2
|
+
export { S as State } from './packem_shared/types-_Qve7nv8.js';
|
|
3
3
|
|
|
4
4
|
type DeepReadwrite<T> = T extends object | [] ? {
|
|
5
5
|
-readonly [P in keyof T]: DeepReadwrite<T[P]>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { copyArrayStrict, copyArrayLoose } from './packem_shared/copyArrayLoose-DutO2eEt.mjs';
|
|
2
|
-
import copyArrayBuffer from './packem_shared/copyArrayBuffer-
|
|
2
|
+
import copyArrayBuffer from './packem_shared/copyArrayBuffer-DnYU3Ab_.mjs';
|
|
3
3
|
import copyBlob from './packem_shared/copyBlob-ChzBsdC1.mjs';
|
|
4
|
-
import copyDataView from './packem_shared/copyDataView-
|
|
4
|
+
import copyDataView from './packem_shared/copyDataView-BJMKTRTm.mjs';
|
|
5
5
|
import copyDate from './packem_shared/copyDate-Bgbm3mwe.mjs';
|
|
6
6
|
import copyError from './packem_shared/copyError-8k5J3dj4.mjs';
|
|
7
7
|
import { copyMapStrict, copyMapLoose } from './packem_shared/copyMapLoose-6OISt6H6.mjs';
|
|
@@ -59,10 +59,10 @@ const deepClone = /* @__PURE__ */ __name((originalData, options) => {
|
|
|
59
59
|
if (Array.isArray(value)) {
|
|
60
60
|
return cloner.Array(value, state);
|
|
61
61
|
}
|
|
62
|
-
if (typeof value === "object" && value.constructor === Object && value.nodeType ===
|
|
62
|
+
if (typeof value === "object" && value.constructor === Object && value.nodeType === void 0) {
|
|
63
63
|
return cloner.Object(value, state);
|
|
64
64
|
}
|
|
65
|
-
if (value.nodeType !==
|
|
65
|
+
if (value.nodeType !== void 0 && value.cloneNode !== void 0) {
|
|
66
66
|
return value.cloneNode(true);
|
|
67
67
|
}
|
|
68
68
|
if (value instanceof Date) {
|
|
@@ -26,7 +26,7 @@ const copyArrayBuffer = /* @__PURE__ */ __name((arrayBuffer) => {
|
|
|
26
26
|
newView.set(origView);
|
|
27
27
|
return newBuffer;
|
|
28
28
|
}
|
|
29
|
-
const Ctor = typeHandlers[arrayBuffer.constructor.name] ??
|
|
29
|
+
const Ctor = typeHandlers[arrayBuffer.constructor.name] ?? void 0;
|
|
30
30
|
if (Ctor) {
|
|
31
31
|
return new Ctor(arrayBuffer);
|
|
32
32
|
}
|
|
@@ -24,7 +24,7 @@ const copyArrayBuffer = /* @__PURE__ */ __name((arrayBuffer) => {
|
|
|
24
24
|
newView.set(origView);
|
|
25
25
|
return newBuffer;
|
|
26
26
|
}
|
|
27
|
-
const Ctor = typeHandlers[arrayBuffer.constructor.name] ??
|
|
27
|
+
const Ctor = typeHandlers[arrayBuffer.constructor.name] ?? void 0;
|
|
28
28
|
if (Ctor) {
|
|
29
29
|
return new Ctor(arrayBuffer);
|
|
30
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const copyArrayBuffer = require('./copyArrayBuffer-
|
|
3
|
+
const copyArrayBuffer = require('./copyArrayBuffer-CCGJtx0g.cjs');
|
|
4
4
|
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
6
6
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
package/dist/utils.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/deep-clone",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.10",
|
|
4
4
|
"description": "Fastest deep clone implementation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -115,51 +115,8 @@
|
|
|
115
115
|
"CHANGELOG.md",
|
|
116
116
|
"LICENSE.md"
|
|
117
117
|
],
|
|
118
|
-
"devDependencies": {
|
|
119
|
-
"@anolilab/eslint-config": "^15.0.3",
|
|
120
|
-
"@anolilab/prettier-config": "^5.0.14",
|
|
121
|
-
"@anolilab/semantic-release-pnpm": "^1.1.6",
|
|
122
|
-
"@anolilab/semantic-release-preset": "^9.0.3",
|
|
123
|
-
"@arethetypeswrong/cli": "^0.17.2",
|
|
124
|
-
"@mfederczuk/deeptools": "2.1.0-indev01",
|
|
125
|
-
"@rushstack/eslint-plugin-security": "^0.8.3",
|
|
126
|
-
"@total-typescript/ts-reset": "^0.6.1",
|
|
127
|
-
"@types/lodash.clonedeep": "^4.5.9",
|
|
128
|
-
"@types/node": "18.19.15",
|
|
129
|
-
"@ungap/structured-clone": "^1.2.1",
|
|
130
|
-
"@visulima/packem": "1.10.7",
|
|
131
|
-
"@vitest/coverage-v8": "^2.1.8",
|
|
132
|
-
"@vitest/ui": "^2.1.8",
|
|
133
|
-
"clone-deep": "^4.0.1",
|
|
134
|
-
"conventional-changelog-conventionalcommits": "8.0.0",
|
|
135
|
-
"cross-env": "^7.0.3",
|
|
136
|
-
"deep-copy": "^1.4.2",
|
|
137
|
-
"esbuild": "0.24.2",
|
|
138
|
-
"eslint": "8.57.0",
|
|
139
|
-
"eslint-plugin-deprecation": "^3.0.0",
|
|
140
|
-
"eslint-plugin-etc": "^2.0.3",
|
|
141
|
-
"eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
|
|
142
|
-
"eslint-plugin-mdx": "^3.1.5",
|
|
143
|
-
"eslint-plugin-tsdoc": "^0.4.0",
|
|
144
|
-
"eslint-plugin-vitest": "^0.4.1",
|
|
145
|
-
"eslint-plugin-vitest-globals": "^1.5.0",
|
|
146
|
-
"fast-copy": "^3.0.2",
|
|
147
|
-
"jsdom": "^26.0.0",
|
|
148
|
-
"lodash.clonedeep": "^4.5.0",
|
|
149
|
-
"nano-copy": "^0.1.1",
|
|
150
|
-
"nanoclone": "^1.0.2",
|
|
151
|
-
"plain-object-clone": "^2.0.0",
|
|
152
|
-
"prettier": "^3.4.2",
|
|
153
|
-
"ramda": "^0.30.1",
|
|
154
|
-
"rfdc": "^1.4.1",
|
|
155
|
-
"rimraf": "6.0.1",
|
|
156
|
-
"semantic-release": "24.2.1",
|
|
157
|
-
"standard": "^17.1.2",
|
|
158
|
-
"typescript": "5.7.3",
|
|
159
|
-
"vitest": "^2.1.8"
|
|
160
|
-
},
|
|
161
118
|
"engines": {
|
|
162
|
-
"node": ">=18
|
|
119
|
+
"node": ">=18.0.0 <=23.x"
|
|
163
120
|
},
|
|
164
121
|
"os": [
|
|
165
122
|
"darwin",
|
|
@@ -169,34 +126,5 @@
|
|
|
169
126
|
"publishConfig": {
|
|
170
127
|
"access": "public",
|
|
171
128
|
"provenance": true
|
|
172
|
-
},
|
|
173
|
-
"anolilab": {
|
|
174
|
-
"eslint-config": {
|
|
175
|
-
"plugin": {
|
|
176
|
-
"tsdoc": false
|
|
177
|
-
},
|
|
178
|
-
"warn_on_unsupported_typescript_version": false,
|
|
179
|
-
"info_on_disabling_jsx_react_rule": false,
|
|
180
|
-
"info_on_disabling_prettier_conflict_rule": false,
|
|
181
|
-
"info_on_disabling_jsonc_sort_keys_rule": false,
|
|
182
|
-
"info_on_disabling_etc_no_deprecated": false
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
"scripts": {
|
|
186
|
-
"build": "cross-env NODE_ENV=development packem build",
|
|
187
|
-
"build:prod": "cross-env NODE_ENV=production packem build",
|
|
188
|
-
"clean": "rimraf node_modules dist .eslintcache",
|
|
189
|
-
"dev": "pnpm run build --watch",
|
|
190
|
-
"lint:attw": "attw --pack",
|
|
191
|
-
"lint:eslint": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs",
|
|
192
|
-
"lint:eslint:fix": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs --fix",
|
|
193
|
-
"lint:package-json": "publint --strict",
|
|
194
|
-
"lint:prettier": "prettier --config=.prettierrc.cjs --check .",
|
|
195
|
-
"lint:prettier:fix": "prettier --config=.prettierrc.cjs --write .",
|
|
196
|
-
"lint:types": "tsc --noEmit",
|
|
197
|
-
"test": "vitest run",
|
|
198
|
-
"test:coverage": "vitest run --coverage",
|
|
199
|
-
"test:ui": "vitest --ui --coverage.enabled=true",
|
|
200
|
-
"test:watch": "vitest"
|
|
201
129
|
}
|
|
202
130
|
}
|
|
File without changes
|