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

Use Yarn 3 to manage monorepo installation #5833

Merged
merged 27 commits into from
Dec 20, 2021
Merged

Use Yarn 3 to manage monorepo installation #5833

merged 27 commits into from
Dec 20, 2021

Conversation

laurent22
Copy link
Owner

@laurent22 laurent22 commented Dec 6, 2021

Since Lerna is getting slower and slower, and is now almost discontinued, we can try to use Yarn 3 Workspaces instead.

It's way faster on cold install, and extremely fast on warm install. It also seems to handle errors better than npm as it creates a text files about the specific error when something happens (instead of 50 pages of meaningless warnings and errors as is common with npm). Hopefully it can also solve our issues with package-lock files.

  • CLI and desktop apps seem to work fine, mobile and server are still to be done
  • We can't use Yarn Plug and Play (which would make things even faster) because React Native and Electron don't support it for now
  • Most changes are about copying assets outside of the node_modules directories since they no longer exists
  • We'll probably still use Lerna for certain tasks, like publishing all the packages in one command, or for "npm run watch" that applies to all the packages. But hopefully we can get rid of the bootstrap command.

TODO

  • Fix clean function so that it doesn't depend on any other package
  • Replace calls to npm with yarn

packages/app-cli/package.json Show resolved Hide resolved
packages/app-desktop/package.json Outdated Show resolved Hide resolved
packages/lib/package.json Show resolved Hide resolved
packages/plugin-repo-cli/package.json Show resolved Hide resolved
@laurent22
Copy link
Owner Author

All green now, so looks like we can try this for 2.7

@tessus
Copy link
Collaborator

tessus commented Dec 11, 2021

What has to be done after the move to yarn? e.g. deleting all node_modules dirs?

@tessus
Copy link
Collaborator

tessus commented Dec 11, 2021

We might have to update the plugin repo updater VM. I've created a snapshot of the VM so we can always rollback....

@laurent22
Copy link
Owner Author

I'll add a post on the forum about this. It should just be npm run clean && yarn install. And the plugin repo script should not be affected.

@laurent22
Copy link
Owner Author

Ok let's merge as it's too big to let this PR lie around. I expect there will be some problems but hopefully nothing too bad.

@laurent22 laurent22 merged commit 7f64fbf into dev Dec 20, 2021
@pihug12 pihug12 mentioned this pull request Jan 3, 2022
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.

None yet

2 participants