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

[Re-Architecture] Migrate the Repo to @nrwl/nx with pnpm support. #3048

Merged
merged 149 commits into from
Aug 29, 2022

Conversation

brionmario
Copy link
Member

@brionmario brionmario commented May 23, 2022

Purpose

Lerna

  1. ATM, we are using Lerna as our mono repo management tool in the repo. Lerna has a few issues associated with it when it's used on its own (with the exception of v5 with nx integration support)
  • Lerna builds are generally slow due to a lack of support for multiple scheduled tasks at a given time (Pipeline Support).
  • No ability to cache prior work.
  • Lerna hoist does not support npm ci, which is a security issue.
  • No option to check affected packages to selectively release versions.

npm

Currently, we advise users to use npm as the npm client but the industry has evolved with tools like Yarn and PNPM. For instance, pnpm supports keeping modules in one place and using symlinks to save time and space on consecutive installs.

  • npm installs are generally slow.
  • npm cache gets corrupted sometimes and can lead to hard troubleshooting issues.
  • Less frequent perf and feature updates compared to other alternatives.

Expected Outcome

Nx

  1. Improved build performance and cached subsequent builds.

    Performance Gain: 50%

    Existing Setup New Setup
    No Cache 15+ mins 7m 51s
    With Cache 15+ mins 1s (If no packages have changed. Only build affected packages)
  2. Improved DX with the new nx dev server for react apps that is fast and performant and consume less RAM.

    Performance Gain: 75%

    Existing Setup New Setup
    Dev Server Start Time (No Cache) 279.2484s (4.6 mins +) Less than 1 min
  3. Interactive Dependency Graph

Screenshot 2022-06-14 at 14 16 00

pnpm

  • With pnpm integration, package installs will be fast and will improve DX.
  • With the pnpm upgrade, repos will work with the LTS version of node.

Related Issues

Checklist

  • e2e cypress tests locally verified.
  • Manual test round performed and verified.
  • UX/UI review done on final implementation.
  • Documentation provided. (Add links if there's any)
  • Unit tests provided. (Add links if there's any)
  • Integration tests provided. (Add links if there's any)

Related PRs

  • None

Security checks

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.

3 participants