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

Update our package manager tools #1776

Closed
flagrede opened this issue Aug 30, 2023 · 7 comments · Fixed by regen-network/regen-web#2139
Closed

Update our package manager tools #1776

flagrede opened this issue Aug 30, 2023 · 7 comments · Fixed by regen-network/regen-web#2139
Assignees
Labels
dev Engineering tasks

Comments

@flagrede
Copy link

flagrede commented Aug 30, 2023

The scope of this task will be solely on changing our package manager.
There is a second issue with the monorepo tool.


We currently have some tech debt on both our packages manager (Yarn) and our monorepo tool (Lerna)

  • 2/3 major versions behind the latest yarn version. (current: 1.22.19 / latest: 3.6.3 - 4.0.0-rc.50)
  • 4 major versions behind for the later lerna version. (current: 3.18.4 / latest: 7.3.0)

Regarding monorepo tools here's a good resource on the current landscape:
https://monorepo.tools/

For package management, the options are:

  • mpm
  • pnpm
  • yarn
  • bun

Here are some notes on these options.

Package Manager

Bun

Bun is a highly anticipated javascript runtime/toolkit/package manager that has been in development for some years and recently hit v1.0. When used as a package manager it provides real performance gain compared to other solutions.

Private Zenhub Image

Workspace solutions

Lerna

Private Zenhub Image

Lerna is the mono repo tool we are currently using and it's written in TypseScript. The latest version provides a lot of improvements.

Turborepo

Private Zenhub Image

Turborepo is the mono-repo solution maintained by Vercel, targeted for JS/TS projects, and written in Rust. It has good documentation, seems fairly easy to set up, and has good performance well.

https://turbo.build/repo/docs/getting-started/existing-monorepo
https://turbo.build/repo/docs/handbook/sharing-code/internal-packages

@ryanchristo ryanchristo added the dev Engineering tasks label Aug 31, 2023
@ryanchristo
Copy link
Member

We should further discuss this on our standup tomorrow and maybe include in the current sprint.

@flagrede flagrede changed the title Migrate to Yarn 3 and Yarn workspace Update our workspace and package manager tools Sep 14, 2023
@flagrede flagrede changed the title Update our workspace and package manager tools Update our monorepo and package manager tools Sep 14, 2023
@ryanchristo
Copy link
Member

Per architecture call, a couple things to consider when we start trying out some of these alternatives:

  • consistency of tooling across our typescript repositories would be nice, so we would start with regen-web but keep in mind compatibility of the package manager with both netlify and heroku (we previously had issues with pnpm and heroku when prototyping the origination app)
  • we also use lerna for releases, we could replace this incrementally or continue using lerna for releases

@ryanchristo
Copy link
Member

This issue will be focused on using bun and the workspace will be a separate issue.

@ryanchristo
Copy link
Member

Hey team! Please add your planning poker estimate with Zenhub @blushi @flagrede @ryanchristo @wgwz

@blushi
Copy link
Member

blushi commented Sep 19, 2023

This issue will be focused on using bun and the workspace will be a separate issue.

@flagrede could you update the issue title/description accordingly and create the follow-up issue for managing the monorepo separately? thanks

@flagrede flagrede changed the title Update our monorepo and package manager tools Update our package manager tools Sep 19, 2023
@flagrede flagrede self-assigned this Sep 25, 2023
@flagrede
Copy link
Author

flagrede commented Sep 25, 2023

Some updates on this task:

@flagrede
Copy link
Author

Update 2:
I was able to make Bun work in our monorepo! There were several issues that misled me yesterday, like different react versions installed at the same time that were breaking the compilation.
So locally we’re ready, but Bun is not (yet) supported by Netlify but should be soon (https://answers.netlify.com/t/install-and-build-with-bun/101727/12). I’ll put the PR on hold in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Engineering tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants