Skip to content

Replace clone, deep-clone & friends with native structuredClone #187

@MichaelDeBoey

Description

@MichaelDeBoey

clone, clone-deep, deep-clone, parts of fast-copy (copy & copyStrict) & rfdc could be replaced with the native structuredClone if supporting Node v17 or higher

clone

npx github:Fuzzyma/e18e-tools clone -n 50 -q -o md  -U https://npm.devminer.xyz/registry 
# Downloads Traffic Version Package PR
1 33.04M 192.10 GB ^2.1.2 vinyl
2 17.96M 104.43 GB 2.x node-cache deprecated #188
3 9.29M 54.01 GB ^2.1.2 fontkit
4 3.96M 23.03 GB ^2.1.2 broccoli-babel-transpiler
5 3.96M 23.02 GB ^2.1.2 ember-cli-babel
6 3.37M 19.60 GB ^1.0.4 @foliojs-fork/fontkit
7 2.34M 13.62 GB ^2.1.2 @parcel/core
8 2.11M 12.25 GB ~0.1.9 level-fix-range
9 1.99M 11.55 GB ^2.1.2 json-schema-deref-sync
10 1.41M 8.21 GB ^2.1.2 @parcel/transformer-postcss
11 1.40M 8.14 GB ^2.1.2 @ui5/fs
12 1.30M 7.58 GB ^2.1.1 eth-json-rpc-middleware
13 1.18M 6.87 GB ^2.1.2 jsii-pacmak
14 1.14M 6.65 GB ^2.1.2 json-rules-engine
15 1.12M 6.49 GB ^2.1.1 svg-baker
16 967.62k 5.63 GB ^2.1.2 @web/dev-server-core
17 945.26k 5.50 GB 2.1.2 ganache-core deprecated #189
18 928.68k 5.40 GB ^2.1.2 mocha-suppress-logs
19 844.96k 4.91 GB ^2.0.0 eth-tx-summary
20 823.36k 4.79 GB ^2.1.2 less-openui5
21 783.61k 4.56 GB ^2.1.2 json-schema-walker
22 778.03k 4.52 GB ^2.1.2 vue-docgen-loader
23 776.48k 4.51 GB ^2.1.2 web3-provider-engine
24 706.57k 4.11 GB ^2.1.1 react-d3-tree
25 650.29k 3.78 GB ~0.1.17 transformers deprecated
26 447.66k 2.60 GB ^2.1.2 express-openid-connect
27 427.56k 2.49 GB ~2.1.0 csslint unmaintained #190
28 417.48k 2.43 GB ^2.1.1 parcel-bundler deprecated
29 394.52k 2.29 GB ^2.1.2 forever
30 366.79k 2.13 GB ^2.1.0 dom5
31 355.05k 2.06 GB ^2.1.2 @react-awesome-query-builder/core
32 274.43k 1.60 GB ^2.1.1 @vue/cli-ui maintenance mode
33 258.05k 1.50 GB ^1.0.4 @react-pdf/fontkit
34 193.27k 1.12 GB ^1.0.2 101
35 187.53k 1.09 GB ^1.0.2 flowstate
36 163.23k 949.03 MB ^2.1.2 @nextcloud/vue
37 140.90k 819.17 MB ^2.1.2 react-awesome-query-builder deprecated #191
38 134.02k 779.19 MB 2.1.2 blessed-xterm
39 128.61k 747.72 MB 2.1.2 @node-red/registry
40 128.50k 747.07 MB ^2.1.0 vinyl-item
41 126.07k 732.97 MB ^2.0.0 @trufflesuite/web3-provider-engine
42 126.05k 732.87 MB ^2.1.2 @plasmicapp/react-web
43 125.93k 732.15 MB 2.1.2 @node-red/runtime
44 125.16k 727.67 MB 2.1.2 @node-red/editor-api
45 123.47k 717.87 MB ^2.1.1 @trufflesuite/eth-json-rpc-middleware
46 112.65k 654.93 MB ^2.1.2 @open-wc/building-utils
47 112.27k 652.71 MB ^2.1.1 s3-download-stream
48 110.17k 640.55 MB ^2.1.1 ng-annotate-loader
49 108.07k 628.33 MB ^2.1.2 simpl-schema
50 102.72k 597.21 MB ^2.1.2 remark-disable-tokenizers

clone-deep

npx github:Fuzzyma/e18e-tools clone-deep -n 21 -q -o md  -U https://npm.devminer.xyz/registry
# Downloads Traffic Version Package PR
1 64.48M 206.02 GB ^4.0.1 webpack-merge
2 37.61M 120.15 GB ^4.0.1 @babel/register
3 9.16M 29.27 GB 4.0.1 lerna lerna/lerna#4216
4 8.86M 28.30 GB 4.0.1 @lerna/create lerna/lerna#4216
5 7.81M 24.96 GB ^0.2.4 merge-deep
6 5.13M 16.39 GB ^4.0.1 @lerna/command deprecated
7 1.46M 4.65 GB ^4.0.1 npm-api doowb/npm-api#23
8 767.13k 2.45 GB ^4.0.1 factory.ts
9 734.83k 2.35 GB 4.0.1 @lerna/legacy-package-management lerna/lerna#4216
10 645.32k 2.06 GB ^4.0.0 i18next-scanner
11 377.39k 1.21 GB ^0.2.4 question-cache
12 365.89k 1.17 GB ^4.0.0 prompt-choices
13 365.56k 1.17 GB ^1.0.0 prompt-question
14 348.13k 1.11 GB ^4.0.1 socketcluster-client
15 307.89k 983.71 MB ^4.0.1 @nuxtjs/pwa
16 200.38k 640.23 MB ^4.0.1 lambda-event-mock
17 173.45k 554.19 MB ^4.0.1 @lerna-lite/core lerna-lite/lerna-lite#1105
18 163.59k 522.66 MB ^0.2.4 base-questions
19 161.80k 516.95 MB ^4.0.1 api-schema-builder
20 119.61k 382.17 MB ^4.0.1 @redhat-developer/page-objects
21 114.97k 367.33 MB ^4.0.1 next-with-less

deep-clone

npx github:Fuzzyma/e18e-tools deep-clone -n 11 -q -o md  -U https://npm.devminer.xyz/registry
# Downloads Traffic Version Package PR
1 44.37k 130.80 MB ^3.0.3 @iobroker/db-objects-jsonl
2 44.10k 130.00 MB ^3.0.3 @iobroker/js-controller-common-db
3 44.03k 129.81 MB ^3.0.3 @iobroker/db-base
4 43.99k 129.68 MB ^3.0.3 @iobroker/db-objects-redis
5 43.96k 129.60 MB ^3.0.3 @iobroker/db-objects-file
6 43.73k 128.91 MB ^3.0.3 iobroker.js-controller
7 42.91k 126.50 MB ^3.0.3 @iobroker/js-controller-adapter
8 42.37k 124.92 MB ^3.0.3 @iobroker/js-controller-cli
9 7.83k 23.09 MB ^4.0.0 @adewaskar/lms-common
10 3.90k 11.50 MB ^3.0.3 @lifeomic/abac
11 1.20k 3.55 MB ^3.0.3 @asigloo/vue-dynamic-forms

fast-copy

npx github:Fuzzyma/e18e-tools fast-copy -n 100 -q -o md  -U https://npm.devminer.xyz/registry
# Downloads Traffic Version Package PR
1 22.11M 687.68 GB ^3.0.2 pino-pretty
2 4.87M 151.38 GB ^3.0.2 contentful-sdk-core
3 2.94M 91.50 GB ^2.1.7 contentful-resolve-response
4 2.66M 82.88 GB ^3.0.0 contentful-management
5 585.47k 18.21 GB ^3.0.2 json-schema-library
6 32.47k 1.01 GB ^3.0.2 wdio-electron-service
7 23.27k 724.01 MB ^3.0.2 @morev/utils
8 20.43k 635.57 MB ^3.0.1 @douyinfe/semi-foundation
9 20.39k 634.17 MB ^3.0.1 @douyinfe/semi-ui
10 12.06k 375.10 MB ^2.1.0 @arkecosystem/utils
11 10.30k 320.29 MB ^2.1.1 @viron/lib

rfdc

npx github:Fuzzyma/e18e-tools rfdc -n 21 -q -o md  -U https://npm.devminer.xyz/registry
# Downloads Traffic Version Package PR
1 97.43M 665.23 GB ^1.4.1 listr2
2 28.59M 195.24 GB ^1.3.0 log4js
3 14.73M 100.57 GB ^1.4.1 dd-trace
4 13.07M 89.27 GB ^1.2.0 fast-json-stringify
5 11.46M 78.24 GB ^1.3.1 fastify
6 7.14M 48.73 GB ^1.4.1 @vue/devtools-shared
7 5.66M 38.62 GB ^1.4.1 mqtt
8 4.25M 29.01 GB ^1.3.0 mssql
9 2.33M 15.94 GB ^1.1.4 json-schema-resolver
10 2.14M 14.60 GB ^1.3.1 @fastify/swagger
11 1.58M 10.76 GB ^1.3.1 @fastify/swagger-ui
12 803.96k 5.49 GB ^1.3.0 @netlify/build
13 743.94k 5.08 GB ^1.4.1 string-left-right
14 678.43k 4.63 GB ^1.3.0 react-lottie-player
15 554.33k 3.78 GB ^1.4.1 codsen-utils
16 277.44k 1.89 GB ^1.3.0 @metamask/snaps-utils
17 146.21k 998.32 MB ^1.4.1 promptfoo
18 125.93k 859.84 MB ^1.3.1 @node-red/runtime
19 123.42k 842.73 MB ^1.4.1 object-boolean-combinations
20 112.91k 770.98 MB ^1.4.1 @uniformdev/context
21 108.35k 739.81 MB ^1.4.1 test-mixer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions