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: switch to a monorepo structure WIP #4638

Closed
wants to merge 2 commits into from
Closed

refactor: switch to a monorepo structure WIP #4638

wants to merge 2 commits into from

Conversation

compojoom
Copy link
Contributor

What it solves

Resolves #

How this PR fixes it

How to test it

Screenshots

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

Copy link

github-actions bot commented Dec 11, 2024

Branch preview

⏳ Deploying a preview site...

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code review by ChatGPT

@@ -14,7 +17,7 @@ runs:
key: web-core-modules-${{ hashFiles('**/yarn.lock') }}
- name: Yarn install
shell: bash
run: yarn install --frozen-lockfile
run: yarn install --immutable
- name: Yarn after install
shell: bash
run: yarn after-install

Choose a reason for hiding this comment

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

  1. Replace yarn install --immutable with yarn install --frozen-lockfile for clarity and consistency, as --immutable is less commonly used and may confuse users familiar with the standard flag.

  2. Ensure corepack is available on all execution environments, or check if an additional verification step is needed to validate installation success.

.gitignore Outdated
@@ -56,3 +56,4 @@ yalc.lock
/public/*.js.LICENSE.txt
certificates
*storybook.log
/.yarn

Choose a reason for hiding this comment

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

Adding /.yarn to .gitignore may lead to unintended consequences if using Yarn Plug'n'Play. If the inclusion is deliberate, ensure dependencies are correctly managed; if not, reconsider to avoid missing critical files in the repository.


enableGlobalCache: false

nodeLinker: node-modules

Choose a reason for hiding this comment

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

  1. "compressionLevel: mixed" - Consider providing clear values or documentation, as "mixed" may be ambiguous. Ensure it meets application logic requirements.
  2. "nodeLinker: node-modules" - Verify compatibility with other settings or systems.

@@ -168,5 +162,6 @@
"budgetPercentIncreaseRed": 20,
"minimumChangeThreshold": 0,
"showDetails": true
}
},
"packageManager": "[email protected]"
}

Choose a reason for hiding this comment

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

Check the removal of the "resolutions" block. If multiple versions of the "ethers" package are used and need to be unified across dependencies, removing resolutions could introduce compatibility issues. Ensure compatibility is checked post-removal.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code review by ChatGPT

# We require yarn v4 and installing through corepack is the easiest way to get it
- name: Enable Corepack
shell: bash
run: corepack enable

Choose a reason for hiding this comment

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

Ensure the shell: bash addition is appropriate for the environment you're targeting. If the script will run in a non-bash environment, this explicit shell definition might cause issues.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code review by ChatGPT

"@safe-global/api-kit/ethers": "6.11.1",
"@gnosis.pm/zodiac/ethers": "6.11.1",
"@keystonehq/eth-keyring": "0.14.4"
},
"engines": {
"node": ">=18"
},

Choose a reason for hiding this comment

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

Ensure compatibility of the overridden package versions with the rest of the dependencies. Conflicting versions can lead to unexpected behavior or runtime errors. If possible, check for any peer dependencies or breaking changes associated with these overrides.

Copy link

github-actions bot commented Dec 12, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 73.91% 14399/19483
🔴 Branches 51.44% 3437/6681
🔴 Functions 56.86% 2044/3595
🟡 Lines 75.44% 13059/17311

Test suite run success

1712 tests passing in 232 suites.

Report generated by 🧪jest coverage report action from 5a4ac73

@compojoom compojoom marked this pull request as draft December 12, 2024 15:34
Copy link

github-actions bot commented Dec 12, 2024

📦 Next.js Bundle Analysis for safe-wallet-web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 1010.18 KB (🟢 -6.17 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!

Eleven Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/apps 29.73 KB (🟢 -3.51 KB) 1.02 MB
/apps/custom 27.79 KB (🟢 -3.51 KB) 1.01 MB
/apps/open 50.12 KB (🟢 -3.51 KB) 1.04 MB
/home 55.19 KB (🟢 -3.51 KB) 1.04 MB
/settings/safe-apps 14.31 KB (🟢 -3.51 KB) 1 MB
/transactions 93.15 KB (🟢 -3.73 KB) 1.08 MB
/transactions/history 93.11 KB (🟢 -3.73 KB) 1.08 MB
/transactions/messages 54.88 KB (🟢 -3.51 KB) 1.04 MB
/transactions/msg 51.04 KB (🟢 -3.51 KB) 1.04 MB
/transactions/queue 44 KB (🟢 -3.51 KB) 1.03 MB
/transactions/tx 43.26 KB (🟢 -3.51 KB) 1.03 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.

@compojoom compojoom force-pushed the monorepo branch 6 times, most recently from 05b28a0 to 5872f08 Compare December 17, 2024 13:28
fix: github action crashing

.

fix: failing yarn v4 install due to incorrect 3rd party dependency

fix: remove Keystone pckg causing yarn v4 failure

fix: resolve merge conflict

fix: resolutions

fix: failing tests
@compojoom compojoom closed this Dec 18, 2024
@compojoom compojoom deleted the monorepo branch December 18, 2024 08:09
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant