metamask-extension
metamask-extension copied to clipboard
build: add alternative build process to enable faster developer builds
Closes https://github.com/MetaMask/MetaMask-planning/issues/1477 and https://github.com/MetaMask/MetaMask-planning/issues/1903
Prereq PR: https://github.com/MetaMask/metamask-extension/pull/25456
About this PR
This PR adds an alternative build process that is much faster than the gulp build we have now, which is quite slow and doesn't make use of modern build system improvements. The speed up is possible by making use of the SWC compiler, and more modern build system. The build system is also a bit simpler and hopefully more maintainable.
This build doesn't yet support:
- HMR/chromereload (requires we get rid of our circular dependencies)
- lavamoat (neither running the build system in lavamoat, or adding lavamoat protections)
- production builds (because of not supporting lavamoat)
- MV3 (requires writing a webpack plugin)
Proposed Review Tactics
There is a lot to review in this PR. Depending on your own review methodologies, you might like the idea of breaking up review into several review passes, each one in a different categories/tactics. Some useful categories may cover things like:
- Style (eslint customizations, exports, imports, use of require)
- Architecture & Organization (naming, files and folder location, code separation)
- Accuracy (are there bugs, unhandled exceptions, etc?)
- Comments, Documentation, etc. (typos, inaccuracies, missing information?)
- API (the new cli as well as yarn scripts)
- Test Coverage and Test Organization, CI decisions (are tests lacking, are tests themselves maintainable and extensible, are there any unnecessary or missing tests?)
What's bad and should be discussed:
- We now have to maintain 2 build systems
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.
๐จ Potential security issues detected. Learn more about Socket for GitHub โ๏ธ
To accept the risk, merge this PR and you will not be notified again.
Next steps
What is network access?
This module accesses the network.
Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.
What is shell access?
This module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Packages should avoid accessing the shell which can reduce portability, and make it easier for malicious shell access to be introduced.
Take a deeper look at the dependency
Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.
Remove the package
If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.
Mark a package as acceptable risk
To ignore an alert, reply with a comment starting with @SocketSecurity ignore
followed by a space separated list of ecosystem/package-name@version
specifiers. e.g. @SocketSecurity ignore npm/[email protected]
or ignore all packages with @SocketSecurity ignore-all
@SocketSecurity ignore npm/[email protected]
@SocketSecurity ignore npm/[email protected]
@SocketSecurity ignore npm/[email protected]
@SocketSecurity ignore npm/[email protected]
@SocketSecurity ignore npm/[email protected]
@SocketSecurity ignore npm/[email protected]
@SocketSecurity ignore npm/[email protected]
@SocketSecurity ignore npm/[email protected]
@SocketSecurity ignore npm/@lydell/[email protected]
@SocketSecurity ignore npm/@metamask/[email protected]
New and removed dependencies detected. Learn more about Socket for GitHub โ๏ธ
๐ฎ Removed packages: npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]
Builds ready [bf5809e]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (612 ยฑ 450 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 61 | 128 | 92 | 17 | 8 |
domContentLoaded | 8 | 17 | 10 | 2 | 1 | ||
load | 55 | 2407 | 612 | 937 | 450 | ||
domInteractive | 8 | 17 | 10 | 2 | 1 |
Bundle size diffs [๐ Bundle size reduced!]
- background: 22 Bytes (0.00%)
- ui: -11 Bytes (-0.00%)
- common: -462 Bytes (-0.01%)
Codecov Report
Attention: Patch coverage is 61.81818%
with 21 lines
in your changes missing coverage. Please review.
Project coverage is 69.99%. Comparing base (
80ac1b2
) to head (27872ae
). Report is 7 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #22506 +/- ##
===========================================
+ Coverage 69.97% 69.99% +0.02%
===========================================
Files 1409 1428 +19
Lines 49905 50036 +131
Branches 13787 13837 +50
===========================================
+ Hits 34920 35021 +101
- Misses 14985 15015 +30
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Builds ready [bf5809e]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (702 ยฑ 517 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 64 | 171 | 105 | 29 | 14 |
domContentLoaded | 8 | 19 | 12 | 3 | 2 | ||
load | 60 | 2850 | 702 | 1077 | 517 | ||
domInteractive | 8 | 19 | 12 | 3 | 2 |
Bundle size diffs [๐ Bundle size reduced!]
- background: 22 Bytes (0.00%)
- ui: -11 Bytes (-0.00%)
- common: -462 Bytes (-0.01%)
Builds ready [1613ae8]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (224 ยฑ 234 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 69 | 191 | 102 | 34 | 16 |
domContentLoaded | 9 | 48 | 16 | 10 | 5 | ||
load | 42 | 1906 | 224 | 488 | 234 | ||
domInteractive | 9 | 48 | 16 | 10 | 5 |
Builds ready [692f0df]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (122 ยฑ 158 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 69 | 202 | 86 | 27 | 13 |
domContentLoaded | 8 | 20 | 10 | 3 | 1 | ||
load | 41 | 1557 | 122 | 329 | 158 | ||
domInteractive | 8 | 20 | 10 | 3 | 1 |
Builds ready [0b12a65]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (52 ยฑ 5 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 68 | 107 | 82 | 9 | 4 |
domContentLoaded | 9 | 18 | 11 | 2 | 1 | ||
load | 43 | 94 | 52 | 11 | 5 | ||
domInteractive | 9 | 18 | 11 | 2 | 1 |
Builds ready [8f15900]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (148 ยฑ 192 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 71 | 122 | 91 | 14 | 7 |
domContentLoaded | 9 | 28 | 13 | 5 | 2 | ||
load | 47 | 1890 | 148 | 400 | 192 | ||
domInteractive | 9 | 28 | 13 | 5 | 2 |
Builds ready [4bbb14a]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (42 ยฑ 2 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 64 | 130 | 76 | 14 | 7 |
domContentLoaded | 8 | 16 | 9 | 2 | 1 | ||
load | 40 | 51 | 42 | 3 | 2 | ||
domInteractive | 8 | 16 | 9 | 2 | 1 |
Builds ready [c3875b3]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (51 ยฑ 4 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 74 | 124 | 85 | 11 | 5 |
domContentLoaded | 9 | 14 | 10 | 1 | 1 | ||
load | 45 | 79 | 51 | 8 | 4 | ||
domInteractive | 9 | 14 | 10 | 1 | 1 |
Builds ready [1bce76e]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (52 ยฑ 4 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 70 | 109 | 86 | 10 | 5 |
domContentLoaded | 9 | 28 | 11 | 4 | 2 | ||
load | 44 | 71 | 52 | 8 | 4 | ||
domInteractive | 9 | 28 | 11 | 4 | 2 |
Builds ready [5531c59]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (233 ยฑ 251 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 75 | 105 | 90 | 8 | 4 |
domContentLoaded | 10 | 28 | 15 | 5 | 3 | ||
load | 45 | 1938 | 233 | 523 | 251 | ||
domInteractive | 10 | 28 | 15 | 5 | 3 |
Bundle size diffs [๐ Bundle size reduced!]
- background: -16.22 KiB (-0.47%)
- ui: -11 Bytes (-0.00%)
- common: -16.61 KiB (-0.26%)
Builds ready [bef1e90]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (196 ยฑ 302 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 68 | 104 | 87 | 9 | 5 |
domContentLoaded | 9 | 20 | 12 | 2 | 1 | ||
load | 41 | 2936 | 196 | 629 | 302 | ||
domInteractive | 9 | 20 | 12 | 2 | 1 |
Bundle size diffs [๐ Bundle size reduced!]
- background: -16.22 KiB (-0.49%)
- ui: -11 Bytes (-0.00%)
- common: -16.61 KiB (-0.27%)
Builds ready [27cd36e]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (61 ยฑ 8 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 71 | 133 | 91 | 18 | 8 |
domContentLoaded | 9 | 27 | 14 | 5 | 2 | ||
load | 42 | 99 | 61 | 17 | 8 | ||
domInteractive | 8 | 27 | 14 | 5 | 2 |
Bundle size diffs [๐ Bundle size reduced!]
- background: -16.22 KiB (-0.49%)
- ui: -11 Bytes (-0.00%)
- common: -16.61 KiB (-0.27%)
Webpack testing update
- [x] Compilation Test: Validated that the webpack compiles without errors.
- [x] Source Maps: Ensure source maps are generated for development builds.
- [x] Code Splitting: Test that code splitting and dynamic imports work as expected.
- [ ] Cross-Environment Compatibility: Generate the different build for cross browser on Mac operating systems and performed below testing.
- [x] Generate the different build for firefox browser and perform below smoke test.
- [x] Generate the build for Chrome browser and perform below smoke test.
- [ ] Generate build for Opera browser and perform below smoke test.
- [x] Generate build for Brave browser and perform below smoke test.
- [ ] Generate build for Flask build and perform below smoke test.
- [ ] Generate build for mmi build and perform below smoke test.
- [x] Validation of the helpers and the corresponding options are working as expected.
- [x] Performance: Analyzed bundle size and time taken to build is faster
- [x] Output Verification: Check that output files are correctly placed and named.
- [x] Zip file validation: Webpack build is able to produce a zip file with the corresponding browser and perform quick smoke test.
- [ ] Error Handling: Introduce errors to confirm that Webpack displays them appropriately.
- [x] Continuous Integration: Ensure the Webpack build process integrates smoothly with CI/CD pipelines.
- [x] Documentation: Validate that Webpack configuration and customizations are well-documented for future reference.
SmokeTest checklist
- [ ] Loading times to ensure performance targets are met.
- [ ] Load the extension app
- [ ] Connect to Test Dapp
- [ ] Validate loading of the icons, text, error message appears.
- [ ] Validate a basic send transactions
- [ ] Validate a hardware wallet
- [ ] Validate the Snaps
Builds ready [ef60531]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (224 ยฑ 249 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 67 | 114 | 86 | 10 | 5 |
domContentLoaded | 10 | 22 | 12 | 3 | 1 | ||
load | 44 | 1971 | 224 | 519 | 249 | ||
domInteractive | 10 | 22 | 12 | 3 | 1 |
Bundle size diffs [๐จ Warning! Bundle size has increased!]
- background: 40.91 KiB (1.19%)
- ui: -11 Bytes (-0.00%)
- common: -12.75 KiB (-0.20%)
Builds ready [a0cf359]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (41 ยฑ 3 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 56 | 83 | 70 | 9 | 4 |
domContentLoaded | 7 | 16 | 9 | 2 | 1 | ||
load | 36 | 57 | 41 | 6 | 3 | ||
domInteractive | 7 | 16 | 9 | 2 | 1 |
Bundle size diffs [๐จ Warning! Bundle size has increased!]
- background: 40.91 KiB (1.19%)
- ui: -11 Bytes (-0.00%)
- common: -12.75 KiB (-0.20%)
Notes from group review:
- Skip empty string for env var when building `yarn webpack metamask-extension/development/build/set-environment-variables.js:203 throw new Error( ^
Error: Invalid phishing warning page URL: '/' `
Builds ready [c30f6a6]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (397 ยฑ 396 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 64 | 133 | 91 | 22 | 10 |
domContentLoaded | 9 | 32 | 15 | 7 | 4 | ||
load | 39 | 2417 | 397 | 825 | 396 | ||
domInteractive | 9 | 32 | 14 | 7 | 3 |
Bundle size diffs [๐จ Warning! Bundle size has increased!]
- background: 40.91 KiB (1.19%)
- ui: -11 Bytes (-0.00%)
- common: -12.75 KiB (-0.20%)
Builds ready [9f07cde]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (147 ยฑ 168 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 60 | 135 | 97 | 21 | 10 |
domContentLoaded | 9 | 50 | 25 | 13 | 6 | ||
load | 39 | 1673 | 147 | 351 | 168 | ||
domInteractive | 9 | 50 | 25 | 13 | 6 |
Bundle size diffs [๐ Bundle size reduced!]
- background: 22 Bytes (0.00%)
- ui: -11 Bytes (-0.00%)
- common: -278 Bytes (-0.00%)
Builds ready [67d4ba8]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (66 ยฑ 15 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 62 | 354 | 101 | 60 | 29 |
domContentLoaded | 9 | 75 | 27 | 16 | 8 | ||
load | 38 | 183 | 66 | 31 | 15 | ||
domInteractive | 9 | 75 | 27 | 16 | 8 |
Bundle size diffs [๐จ Warning! Bundle size has increased!]
- background: 40.52 KiB (1.24%)
- ui: -11 Bytes (-0.00%)
- common: -12.62 KiB (-0.19%)
Builds ready [43ddf5a]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (151 ยฑ 147 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 64 | 380 | 115 | 64 | 31 |
domContentLoaded | 9 | 180 | 41 | 36 | 17 | ||
load | 38 | 1465 | 151 | 306 | 147 | ||
domInteractive | 9 | 180 | 41 | 36 | 17 |
Bundle size diffs [๐จ Warning! Bundle size has increased!]
- background: 40.52 KiB (1.24%)
- ui: -11 Bytes (-0.00%)
- common: -12.62 KiB (-0.19%)
Builds ready [43ddf5a]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (151 ยฑ 147 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 64 | 380 | 115 | 64 | 31 |
domContentLoaded | 9 | 180 | 41 | 36 | 17 | ||
load | 38 | 1465 | 151 | 306 | 147 | ||
domInteractive | 9 | 180 | 41 | 36 | 17 |
Bundle size diffs [๐จ Warning! Bundle size has increased!]
- background: 40.52 KiB (1.24%)
- ui: -11 Bytes (-0.00%)
- common: -12.62 KiB (-0.19%)
Builds ready [14ba18c]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (161 ยฑ 160 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 72 | 305 | 114 | 49 | 23 |
domContentLoaded | 9 | 104 | 34 | 22 | 10 | ||
load | 41 | 1602 | 161 | 334 | 160 | ||
domInteractive | 9 | 104 | 34 | 22 | 10 |
Bundle size diffs [๐จ Warning! Bundle size has increased!]
- background: 40.52 KiB (1.24%)
- ui: -11 Bytes (-0.00%)
- common: -12.62 KiB (-0.19%)
Builds ready [ee37392]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (80 ยฑ 16 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 71 | 290 | 117 | 45 | 22 |
domContentLoaded | 9 | 76 | 30 | 18 | 9 | ||
load | 41 | 194 | 80 | 33 | 16 | ||
domInteractive | 9 | 76 | 30 | 18 | 9 |
Bundle size diffs [๐จ Warning! Bundle size has increased!]
- background: 40.52 KiB (1.24%)
- ui: -11 Bytes (-0.00%)
- common: -12.62 KiB (-0.19%)
Overall, the PR looks really great. Looking at style, at first I thought the use of require
in TS files was strange, but the alternative (dynamic imports) makes things less readable imo. I think it's a good decision to keep require for now, but if there's an opportunity in the future to replace require with imports without reducing readability, we should look into it. Thanks for all the comments and documentation @davidmurdoch!
Overall, the PR looks really great. Looking at style, at first I thought the use of
require
in TS files was strange, but the alternative (dynamic imports) makes things less readable imo. I think it's a good decision to keep require for now, but if there's an opportunity in the future to replace require with imports without reducing readability, we should look into it. Thanks for all the comments and documentation @davidmurdoch!
I did some really naive perf testing and synchronous require
was slightly faster (like 2 milliseconds) than await import
, so that didn't really matter so much in the end, BUT the verbosity of dynamic import is the real killer here, as you discovered. If we could bump our prettier line length to 120 our codebase would be exactly 40% more readable (for everyone except @legobeat who uses a TUI for code editing ๐).
New and removed dependencies detected. Learn more about Socket for GitHub โ๏ธ
๐ฎ Removed packages: npm/@mantine/[email protected], npm/@mantine/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@swc/[email protected], npm/@swc/[email protected], npm/@swc/[email protected], npm/@swc/[email protected], npm/@swc/[email protected], npm/@swc/[email protected], npm/@swc/[email protected], npm/@swc/[email protected], npm/@swc/[email protected], npm/@swc/[email protected], npm/@swc/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@xstate/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]
Builds ready [8a83684]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (437 ยฑ 341 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 88 | 246 | 128 | 41 | 20 |
domContentLoaded | 10 | 184 | 31 | 38 | 18 | ||
load | 43 | 2136 | 437 | 710 | 341 | ||
domInteractive | 10 | 184 | 31 | 38 | 18 |
Bundle size diffs [๐จ Warning! Bundle size has increased!]
- background: 81.68 KiB (2.36%)
- ui: -11 Bytes (-0.00%)
- common: 31.38 KiB (0.45%)