-
Notifications
You must be signed in to change notification settings - Fork 456
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
Chore: monorepo setup #4690
Chore: monorepo setup #4690
Conversation
Branch preview✅ Deploy successful! Website: Storybook: |
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🟡 | Statements | 74.09% | 14565/19659 |
🔴 | Branches | 51.63% | 3468/6717 |
🔴 | Functions | 57.07% | 2062/3613 |
🟡 | Lines | 75.63% | 13211/17468 |
Test suite run success
1752 tests passing in 237 suites.
Report generated by 🧪jest coverage report action from 7825b1c
📦 Next.js Bundle Analysis for @safe-global/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
1 MB (🟡 +12.25 KB) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Thirty-eight Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
Page | Size (compressed) | First Load |
---|---|---|
/ |
509 B (🟢 -1 B) |
1 MB |
/404 |
704 B (🟡 +1 B) |
1 MB |
/_offline |
1.1 KB (🟡 +3 B) |
1 MB |
/addOwner |
560 B (🟢 -4 B) |
1 MB |
/address-book |
22.96 KB (🟢 -108 B) |
1.02 MB |
/apps |
35.79 KB (🟡 +2.07 KB) |
1.04 MB |
/apps/bookmarked |
474 B (🟢 -1 B) |
1 MB |
/apps/custom |
33.87 KB (🟡 +2.08 KB) |
1.03 MB |
/apps/open |
55.69 KB (🟡 +2.08 KB) |
1.06 MB |
/balances |
29.61 KB (🟢 -102 B) |
1.03 MB |
/balances/nfts |
9.54 KB (🟢 -3 B) |
1.01 MB |
/bridge |
2.55 KB (🟢 -6 B) |
1 MB |
/cookie |
8.8 KB (🟡 +32 B) |
1.01 MB |
/home |
61.41 KB (🟡 +2.15 KB) |
1.06 MB |
/imprint |
1.41 KB (🟢 -1 B) |
1 MB |
/licenses |
2.46 KB (🟢 -4 B) |
1 MB |
/new-safe/advanced-create |
26.47 KB (🟡 +18 B) |
1.03 MB |
/new-safe/create |
25.61 KB (🟡 +19 B) |
1.03 MB |
/new-safe/load |
6.09 KB (🟡 +1 B) |
1.01 MB |
/settings/appearance |
2.25 KB (🟡 +2 B) |
1 MB |
/settings/environment-variables |
3.27 KB (🟢 -1 B) |
1 MB |
/settings/modules |
4.06 KB (🟡 +3 B) |
1 MB |
/settings/notifications |
21 KB (🟢 -318 B) |
1.02 MB |
/settings/safe-apps |
20.35 KB (🟡 +2.08 KB) |
1.02 MB |
/settings/security |
2.34 KB (🟡 +2 B) |
1 MB |
/settings/setup |
30.63 KB (🟢 -107 B) |
1.03 MB |
/share/safe-app |
7.56 KB (🟢 -4 B) |
1.01 MB |
/swap |
756 B (🟢 -4 B) |
1 MB |
/terms |
12.93 KB (🟡 +1 B) |
1.01 MB |
/transactions |
98.77 KB (🟡 +2.2 KB) |
1.1 MB |
/transactions/history |
98.73 KB (🟡 +2.19 KB) |
1.1 MB |
/transactions/messages |
60.38 KB (🟡 +2.08 KB) |
1.06 MB |
/transactions/msg |
56.63 KB (🟡 +2.08 KB) |
1.06 MB |
/transactions/queue |
49.48 KB (🟡 +2.08 KB) |
1.05 MB |
/transactions/tx |
48.84 KB (🟡 +2.08 KB) |
1.05 MB |
/wc |
701 B (🟢 -6 B) |
1 MB |
/welcome |
6.92 KB (🟢 -6 B) |
1.01 MB |
/welcome/accounts |
408 B (🟡 +1 B) |
1 MB |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link
is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.
- **Add a dependency to a specific workspace:** | ||
|
||
```bash | ||
yarn workspace <workspace-name> add <package-name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a difference to navigating into an app and running yarn add <package-name>
there directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. When you execute the command it would run in the package directory context (meaning root will be the directory). Sometimes the output coloring is a bit off and yarn is adding some prefixes to every line (but I can't tell you when this exactly occurs)
What it solves
This PR restructures the repository into a monorepo format to facilitate code sharing between the mobile app and web app. The mobile app code will be added in a subsequent update.
While this PR touches many files, the changes are straightforward and easy to review commit by commit:
How to test it
From the root directory:
yarn workspace @safe-global/web start
From the apps/web directory:
yarn start
Screenshots
Checklist