Remove Lerna - #3054
Conversation
| pnpm --recursive exec npm version "$VERSION" --no-git-tag-version | ||
| git add . | ||
| git commit --no-verify -m "v$VERSION" | ||
| git tag -a "v$VERSION" -m "v$VERSION" |
There was a problem hiding this comment.
We don't have any automation but this (entire file) also passes over at https://www.shellcheck.net/
998b040 to
19bc30d
Compare
19bc30d to
240f9d9
Compare
|
turborepo has the potential to be really fast locally and in CI if we persist the .turbo caches along the way, that's pretty compelling. Timings below from a half-baked turbo.json and no project references. It does more overall work in the uncached case, but its in the ballpark of the project reference + pnpm version, and the cached builds become incredibly fast. Update: |
|
I'm going to merge this for the wins, and push the turbo changes in a draft PR in case someone is interested in picking that up and trying to fix the typescript build speed for local dev. I definitely prioritize typechecking at dev time over the speed of running tests across the entire repo. You can run typechecking across the entire repo, and watch mode tests in the package you're changing for instant feedback. The thing you'd miss is any packages that depend on yours having test failures because of the changes. |
Removes the Lerna dependency entirely.
testcommands goes awaylerna versionis only partially replaced bypnpm version, so there's a small wrapper script to commit and tag the specified version./scripts/version.shpnpm test timings on CI:
Local dev experience trying to run
testin all of the packages:pnpm does about half the work of lerna, but does not cache its results leading to slower reruns. It may be worth considering adopting turborepo. Using turbo implies not using project references, and I'm somewhat scared of introducing consistency bugs with an improper turbo.json configuration.
I'm considering merging this to get the CI wins, and then revisiting a migration to turborepo down the road if we decide that the risk of caching issues is worth further speeding up CI and local devex with more caching. As it stands the removal of Lerna in favor of pnpm and TypeScript project references seems to have made CI take about half the time (10->5min).
I think I'm personally de-weighting the impact of a full
pnpm testrun because its already pretty fast for me, and I expect that most of the local testing will be in a specific package instead of repo-wide. One factor worth considering is that although CI can run the tests for pretty quick feedback, outside contributors currently need their CI runs approved by a maintainer before they run.