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

Fix and make smaller browser script #1209

Merged
merged 6 commits into from
Jun 7, 2021
Merged

Conversation

davidyuk
Copy link
Member

@davidyuk davidyuk commented Jun 5, 2021

before:

$ ls -lah dist 
2.1M aepp-sdk.browser-script.js
6.6M aepp-sdk.browser-script.js.map
328K aepp-sdk.browser.js
1.1M aepp-sdk.browser.js.map
325K aepp-sdk.js
1.1M aepp-sdk.js.map

after this and #1208:

$ ls -lah dist
955K aepp-sdk.browser-script.js
3.5M aepp-sdk.browser-script.js.map
327K aepp-sdk.browser.js
1.1M aepp-sdk.browser.js.map
325K aepp-sdk.js
1.1M aepp-sdk.js.map

fixes aepp-sdk.browser-script.js package, discussed in https://forum.aeternity.com/t/issues-with-sdk8-0-0/9453/8

also should fix this issue: browserify/pbkdf2#48 (comment) 😃

reverts 03c2dcb
node_modules/rlp/dist/index.js doesn't contain `const` anymore, but this processing was breaking import of commonjs module
Fixes error: ReferenceError: process is not defined
`process` referenced in pbkdf2 package
Fixes error: ReferenceError: Buffer is not defined
@davidyuk davidyuk requested a review from mradkov June 5, 2021 19:59
@davidyuk davidyuk changed the title Feature/fix browser script Fix and make smaller browser script Jun 5, 2021
@codecov
Copy link

codecov bot commented Jun 5, 2021

Codecov Report

Merging #1209 (1ce4640) into develop (ef3b505) will decrease coverage by 22.80%.
The diff coverage is n/a.

❗ Current head 1ce4640 differs from pull request most recent head 24f946f. Consider uploading reports for the commit 24f946f to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##           develop    #1209       +/-   ##
============================================
- Coverage    93.59%   70.79%   -22.81%     
============================================
  Files           54       54               
  Lines         2609     2609               
  Branches        24       24               
============================================
- Hits          2442     1847      -595     
- Misses         155      759      +604     
+ Partials        12        3        -9     
Impacted Files Coverage Δ
src/utils/keystore.js 16.00% <0.00%> (-84.00%) ⬇️
src/channel/index.js 7.92% <0.00%> (-81.19%) ⬇️
src/channel/handlers.js 1.66% <0.00%> (-79.17%) ⬇️
src/utils/hd-wallet.js 20.00% <0.00%> (-76.00%) ⬇️
src/channel/internal.js 19.32% <0.00%> (-75.64%) ⬇️
src/utils/bytes.js 43.33% <0.00%> (-56.67%) ⬇️
src/utils/mptree.ts 22.03% <0.00%> (-55.94%) ⬇️
src/utils/string.js 60.00% <0.00%> (-40.00%) ⬇️
src/tx/tx-object.js 58.62% <0.00%> (-36.21%) ⬇️
src/utils/amount-formatter.ts 46.42% <0.00%> (-35.72%) ⬇️
... and 11 more

Continue to review full report at Codecov.

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

@davidyuk davidyuk force-pushed the feature/fix-browser-script branch from 5e01694 to 24f946f Compare June 5, 2021 20:28
Copy link
Contributor

@mradkov mradkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Perhaps we can gradually refactor to drop the R usage across the whole SDK?

@davidyuk davidyuk merged commit 6e5e9ac into develop Jun 7, 2021
@davidyuk davidyuk deleted the feature/fix-browser-script branch June 7, 2021 19:17
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.

2 participants