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

chore: use yarn workspaces #1134

Closed
wants to merge 10 commits into from
Closed

chore: use yarn workspaces #1134

wants to merge 10 commits into from

Conversation

ludofischer
Copy link
Collaborator

As we've discussed, lerna does not work very well for us. The alternatives I have seen rely workspaces.
so move to yarn workspaces to prepare removing lerna completely. We are still using lerna, but with useWorkspaces option turned on.

Since this recreates the whole dependency tree, it had the effect of bumping Browserslist which caused the integration tests to fail for cssnano-preset-advanced (also happens on the dependabot PR). So to check whether workspaces themselves break something, I have first updated all dependencies, and then moved to workspaces in separate commits.

The problem with workspaces is that since everything is hoisted to the root, a package can import a dependency which is not in its package.json more easily, but I could not find a solution except switching to pnpm, so I guess we need to be careful if we merge this.

Regenerate integration test to take into account
prefix changes.
This package is not imported anywhere and docusaurus handles
publishing now.
To prepare removing lerna, keep lerna but enable workspaces.
All lerna alternatives (changesets, rush) rely on workspaces.
yarn hoists all dependencies to the root node_modules with a single
yarn.lock.

Install and testing is much faster. The issue with hoisting might cause phantom
dependencies (a package is able to import packages not in their
own `package.json`).
@ludofischer
Copy link
Collaborator Author

Closing this as I have the impression there are too many bugs with the lerna + Yarn 1 workspaces (also yarn 1 is not being developed any more, so the workspace feature might not see any bug fix).

@ludofischer ludofischer deleted the workspaces branch May 25, 2021 20:48
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

1 participant