-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
Replace lerna
with turborepo
#1367
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1367 +/- ##
==========================================
+ Coverage 94.90% 96.17% +1.27%
==========================================
Files 175 175
Lines 2904 2904
Branches 778 778
==========================================
+ Hits 2756 2793 +37
Misses 59 59
+ Partials 89 52 -37 ☔ View full report in Codecov by Sentry. |
It would be great to have some new instructions in |
reproductions/index.html
Outdated
<script type="module" src="./index.tsx"></script> | ||
</body> | ||
|
||
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing newline at the end of file
Amazing work! 🚀 |
Description
This is minimal setup of
turborepo
. It replaceslerna
package. I focused on keeping it as simple as possible, so current configuration can be (and should be) updated in the future. For example,eslint
andtypescript
configs can be moved to internal packages (docs).During implementation, I had issues with
reproductions
andwebsite
projects and couldn't make them work. They have been removed for now in order to create this draft pull request. Removed files in thereproductions
,website
anddocs
can be ignored in the code review process.Build process
The biggest change is a new building process. To take full advantage of the new project structure, I changed the build process from incrementally building with
tsc
in the root directory to running each packages'tsc
build script in parallel. It's faster on cold start, but also incredibly fast when it comes to cache utilization. There are results after running it with Nodev22.8.0
and npmv10.8.3
(cold start):build
test
Missing features (to be implemented)
reproductions
projectwebsite
&docs
directories)lerna
had already implemented publishing process (package versioning and publishing them to the NPM registry).turborepo
doesn't have such feature. It is recommended to usechangesets
(docs).I suggest to implement docs and publishing process in other PRs.
List of changes
lerna
packageturbo
packagedevDependencies
and moved some packages fromdependencies
. It can be refactored further though.tsconfig
files to remove incremental buildsimple-schema.d.ts
to theuniforms-bridge-simple-schema-2
. This file was originally located in thewebsite
directory. This directory was temporary removed and missing file was causing type issues during testing process.publish
script as it was based onlerna
How to test changes
Use Node
v22
(check current version in the.nvmrc
) and npmv10
(check current version in thepackage.json -> packageManager
)turborepo
branchnpm run clean
(it deletes packages' builds)npm run reset
(it deletesnode_modules
, turbo cache, etc)npm ci
(it also runsbuild
script)npm run build
npm test