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

Migrate from Yarn / Lerna to pnpm #543

Closed
yyx990803 opened this issue Mar 11, 2024 · 9 comments · Fixed by #577
Closed

Migrate from Yarn / Lerna to pnpm #543

yyx990803 opened this issue Mar 11, 2024 · 9 comments · Fixed by #577
Assignees

Comments

@yyx990803
Copy link
Member

Lerna was used for legacy reasons but is actually no longer necessary.

Yarn was also used for legacy reasons - old versions of pnpm had issues in Docker, but should no longer be an issue according to @Brooooooklyn. We should investigate whether moving to pnpm would improve CI time.

@hyf0
Copy link
Member

hyf0 commented Mar 11, 2024

It's better do this after I finish merging the @rolldown/node-binding and rolldown together. I will cue you in this issue @underfin after finishing.

@Brooooooklyn
Copy link
Contributor

As a reference, oxc-resolver is already using pnpm and it seems to have no problem: https://github.com/oxc-project/oxc-resolver/blob/main/.github/workflows/release_napi.yml

@milesj
Copy link
Contributor

milesj commented Mar 11, 2024

It pnpm's publish/release flow anywhere near as good as lerna's? That's pretty much why everyone still uses lerna.

@trivikr
Copy link
Contributor

trivikr commented Mar 11, 2024

Most package managers have similar features, and the choice should mostly depend on what most contributors are comfortable with.

Personally, I use a yarn modern and changesets in my projects, and have been happy with.
Since rolldown is aimed at consumption in vite which uses pnpm, would that be the best option?

@hyf0
Copy link
Member

hyf0 commented Mar 11, 2024

It's better do this after I finish merging the @rolldown/node-binding and rolldown together. I will cue you in this issue @underfin after finishing.

@underfin Done in #545. I update the napi-rs cli to ^3.0.0-alpha.43. See documents at https://github.com/napi-rs/napi-rs/tree/main/cli/docs.

Commands related to releasing should be no problems, but you might want to checkout out them again.

@jonkoops
Copy link

Let me know if some assistance is required with this, I've ported a couple of projects from Yarn to PNPM, I'd be willing to take this on if that helps.

It pnpm's publish/release flow anywhere near as good as lerna's? That's pretty much why everyone still uses lerna.

Should be pretty decent, are there any specific Lerna features you need that are not in PNPM?

@milesj
Copy link
Contributor

milesj commented Mar 12, 2024

I'm looking into this.

@hyf0
Copy link
Member

hyf0 commented Mar 13, 2024

The migration is finished in #567. But there are some other problems left:

  • Make release flow work with using pnpm
  • Install tree-sitter-go with pnpm cause errors in my m2pro mac

@ghiscoding
Copy link

ghiscoding commented Mar 15, 2024

Side note, you can also use Lerna-Lite with pnpm and workspace: protocol (that is actually what is being used within the project). Lerna-Lite is much smaller and every commands are optional packages. A list of large projects that switched to Lerna-Lite are Jest and Volar. Really excited about rolldown! Cheers

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

Successfully merging a pull request may close this issue.

8 participants