Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: reduce bundle size #544

Draft
wants to merge 46 commits into
base: develop
Choose a base branch
from
Draft

Conversation

homura
Copy link
Collaborator

@homura homura commented Jul 24, 2023

Resolve #516

This PR

  • Refactor the require("crypto") to import by demand
  • Unify multiple version dependencies into one version
  • Refactor some oversized third-party libraries with simple functions, such as lodash.isequal

homura added 30 commits May 7, 2023 20:05
- lumos dependencies and modules are really a bit much
- contributors often depend on yarn's auto-hoist to cause some module to not be installed correctlly
# Conflicts:
#	packages/ckb-indexer/package.json
#	packages/common-scripts/package.json
#	packages/debugger/package.json
#	packages/e2e-test/package.json
#	packages/experiment-tx-assembler/package.json
#	packages/hd-cache/package.json
#	packages/helpers/package.json
#	packages/transaction-manager/package.json
homura added 16 commits June 6, 2023 23:40
# Conflicts:
#	.github/workflows/ci.yaml
#	.github/workflows/publish.yml
#	DEVELOPMENT.md
#	README.md
#	commitlint.config.js
#	examples/README.md
#	examples/cardano-lock-namiwallet/package.json
#	examples/exchange-sudt-for-ckb/package.json
#	examples/omni-lock-metamask/package.json
#	examples/omni-lock-secp256k1-blake160/package.json
#	examples/pw-lock-metamask/package.json
#	examples/secp256k1-transfer/package.json
#	package.json
#	packages/bi/package.json
#	packages/ckb-indexer/package.json
#	packages/codec/package.json
#	packages/common-scripts/package.json
#	packages/config-manager/package.json
#	packages/debugger/package.json
#	packages/e2e-test/package.json
#	packages/experiment-tx-assembler/package.json
#	packages/hd-cache/package.json
#	packages/hd/package.json
#	packages/helpers/package.json
#	packages/light-client/package.json
#	packages/lumos/package.json
#	packages/molecule/package.json
#	packages/rpc/package.json
#	packages/runner/package.json
#	packages/testkit/package.json
#	packages/toolkit/package.json
#	packages/transaction-manager/examples/chained-transfer-example/package.json
#	packages/transaction-manager/package.json
#	packages/utils/package.json
#	pnpm-lock.yaml
#	website/package.json
@vercel
Copy link

vercel bot commented Jul 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
lumos-website ✅ Ready (Inspect) Visit Preview Jul 24, 2023 8:51am

@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Merging #544 (9ac391e) into develop (a49c050) will increase coverage by 0.08%.
The diff coverage is 90.69%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #544      +/-   ##
===========================================
+ Coverage    86.35%   86.43%   +0.08%     
===========================================
  Files          114      118       +4     
  Lines        22917    23053     +136     
  Branches      2310     2328      +18     
===========================================
+ Hits         19790    19926     +136     
  Misses        3084     3084              
  Partials        43       43              
Impacted Files Coverage Δ
packages/base/src/utils.ts 73.77% <ø> (-0.54%) ⬇️
packages/crypto/src/scrypt.ts 59.37% <59.37%> (ø)
packages/hd/src/mnemonic/index.ts 35.75% <66.66%> (+0.99%) ⬆️
packages/crypto/src/crypto-browser.ts 95.52% <95.52%> (ø)
packages/crypto/src/crypto.ts 100.00% <100.00%> (ø)
packages/hd/src/crypto.ts 100.00% <100.00%> (ø)
packages/hd/src/keychain.ts 100.00% <100.00%> (ø)
packages/hd/src/keystore.ts 92.05% <100.00%> (+0.26%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a49c050...9ac391e. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce the Lumos bundle size
1 participant