-
-
Notifications
You must be signed in to change notification settings - Fork 8k
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: update lerna to v6.0.3 #8318
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the deploy preview of this PR
|
8e5a260
to
1251f8b
Compare
d10e51c
to
92c9e33
Compare
@slorber Those e2e test failures don't appear to be related to these changes. Are they something that you have seen before? |
Thanks for working on this. Honestly, despite your comments, I'm still not 100% sure to understand everything of this config that doesn't really feel intuitive to me, and I don't really spend 1 day learning all this in-depth right now 😅
It looks like it's indeed improving rebuild times. Now what I also need is the dev experience. With If we adopt this, I need to keep a decent DX to work myself on Docusaurus, so that any change in any subpackage can be used as soon as possible on my local Docusaurus site (with hot reload for theme changes). |
Hey @slorber! Thanks for the questions. Here are some answers 😄
Regarding the changed output from |
Following up on that last bit, you should be able to add |
One other thing that you may run into with watch, is that by default when using Nx the maximum number of tasks ran in parallel is a bit lower. This is normally ideal for build and similar tasks, but if you are running watch scripts its not ideal as it would limit the number of tasks ran at the same time. You can add |
Thanks I tried There's also warning also displaying temporarily that we didn't have before, and I don't know what's the impact of it:
Will have to invest more time to review if things work properly. Note: I'm not totally satisfied with our previous setup which consists of running each project independently in tsc watch mode. If you have better to suggest I'm open to change our maintainer workflow. I guess you have more experience on a TS repo build than me 😅 Using lerna + tsc --watch was just a quickfix I added 2 years ago, because at that time we only had full uncached (but incremental) tsc builds: not a great DX. We have many e2e tests failing unfortunately. That seems related to our tests that publish our packages to a local Verdaccio npm repository, using lerna publish See e2e Github Actions, they run I don't know how Lerna publish works with Nx and what makes it fail compared to before 😅 Note I'm also using Lerna to release Docusaurus so this part should rather work quite as before otherwise it might block me in an upcoming release See our release process in I'm concerned by:
We also have a GitHub action that publishes canary releases for each commit on main. It is a quite hacky setup to make Lerna work the way I wanted.
We should make sure it also keeps working. I don't know if the failures are related to using Lerna v6, or the activation of Nx. Maybe it could be safer to upgrade Lerna without using Nx first? I'd prefer to not troubleshoot 2 things at once 🤪 |
Hey @slorber! Sorry for the longer lapse of communication there. Holidays + Illness had me knocked out for a bit. I hadn't noticed that the failures were related to publishing, that part should not have been affected, but I'll spend some time seeing whats going on if for some reason that was the case. I can definitely split this up into either 2 or 3 PR's if you'd like. The 3 would look like:
If 2, the last 2 would be combined. |
np, I'm also busy on my side ;) The smaller the PRs, the more likely they are to pass CI and be merged asap 😄 |
I'm going to close this one out, split into smaller PRs. |
Pre-flight checklist
Motivation
@juristr talked over upgrading lerna to v6 with @slorber and @yangshun. v6 includes local caching and faster task execution via Nx by default 🎉 .
Configuration Explanation
This PR adds some configuration in
nx.json
, as well aswebsite/package.json
. I've copied the relevant sections here, with some explanation.Test Plan
Played around a bit with this, running targets, deleting outputs, changing code and making sure it still worked etc. Here's some screenshots:
Test links
Deploy preview: https://deploy-preview-8318--docusaurus-2.netlify.app/ -- note: no code changes, so this is not changed.
Related issues/PRs
#7333 -- Lerna 6 enables Nx for caching by default, so I think this would close out.