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 Lerna 6 with pnpm instead of yarn workspaces #4632

Open
web-padawan opened this issue Sep 22, 2022 · 1 comment
Open

Use Lerna 6 with pnpm instead of yarn workspaces #4632

web-padawan opened this issue Sep 22, 2022 · 1 comment
Labels

Comments

@web-padawan
Copy link
Member

web-padawan commented Sep 22, 2022

Describe your motivation

We had a few cases when some npm dependency was missing:

This is a known issue of Lerna known as "phantom dependencies".
It comes from the way how bootstrapping works when using Lerna + Yarn workspaces.

Describe the solution you'd like

Consider using Lerna 5.5.0 that added pnpm support for workspaces.

One thing that pnpm provides with its symlinked module structrue (if you don't use --shamefully-hoist) is that it isolates modules well, so there is no phantom dependency problem. We need to check if this feature can be used with Lerna.

@web-padawan web-padawan added needs research More information needed to estimate internal labels Sep 22, 2022
@web-padawan web-padawan added v24 To be done in V24 and removed needs research More information needed to estimate labels Oct 13, 2022
@web-padawan
Copy link
Member Author

web-padawan commented Oct 13, 2022

Prototype branch with Lerna 6 + pnpm: https://github.com/vaadin/web-components/tree/pnpm

Summary

Confirmed that this setup reports all the missing packages when running tests with web-test-runner.
Based on this research, the following PRs have been submitted to address various findings:

One remaining problem when using pnpm is test/typings folder that imports legacy component packages.
We should remove that folder completely, alongside with removal of deprecated packages in Vaadin 24.

Conclusion

I propose to implement pnpm support after 24.0 is out, so that we no longer need to maintain 23.2 branch.
Otherwise, we would have to manually backport some of the PRs listed above (missing dependencies).

See also

@web-padawan web-padawan changed the title Investigate using Lerna 5 with pnpm instead of yarn workspaces Use Lerna 6 with pnpm instead of yarn workspaces Oct 13, 2022
@web-padawan web-padawan removed the v24 To be done in V24 label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant