-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: Use tsx instead of ts-node #6214
Conversation
|
✅ Deploy Preview for opstack-docs canceled.
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
Looks broken atm but this pr is still open because feedback on the approach is still important |
4abd518
to
810ea14
Compare
hmm not sure why this is broke these are wierd failures draft for now |
seems like a versioning thing? could prob drop ledger support if necessary |
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This pr failing is odd gonna rebase and try again |
810ea14
to
8c6e521
Compare
Hey @roninjin10! This PR has merge conflicts. Please fix them before continuing review. |
@roninjin10 I think 1 more rebase should fix the issues we were seeing previously |
8c6e521
to
5bddd3a
Compare
hardhat is very fragile it appears. Will need to pull pr down locallyt to debug. The failures are unrelated to tsx and have to do more with how type resolution changed after uninstalling ts-node. |
Hey @roninjin10! This PR has merge conflicts. Please fix them before continuing review. |
Hey @roninjin10! This PR has merge conflicts. Please fix them before continuing review. |
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Got catching up to do likely will get to this pr next week. I think by now it might "just work". If I remember correctly it was failing before because hardhat types depended on some peer deps installed by ts-node. The failures were actually good failures in the sense of typescript was correctly being conservative where before it was too loose |
thanks for thinking of this PR will, would be nice to get this in, it still throws errors for me but i haven't rebased |
Just a bump on this PR @roninjin10 |
167373b
to
8fb9f70
Compare
15dc954
to
c36c1f1
Compare
c36c1f1
to
47a077e
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #6214 +/- ##
===========================================
- Coverage 44.77% 44.76% -0.01%
===========================================
Files 375 375
Lines 29468 29476 +8
Branches 1688 1692 +4
===========================================
+ Hits 13194 13195 +1
- Misses 14832 14841 +9
+ Partials 1442 1440 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
47a077e
to
5a214f7
Compare
Why?
Tsx is much much much faster
At the core, tsx is powered by esbuild for blazing fast TypeScript compilation, whereas ts-node (by default) uses the TypeScript compiler. Because esbuild doesn't type check, tsx is similar to ts-node --esm --swc (which uses the SWC compiler).
Tsx is much lower maintenence cost
Compared to alternatives things tend to "just work" when it comes to tsx. As an concrete example, if we added viem to any of our packages and tried to use ts-node things would fall over until a JavaScript nerd who understands ESM modules fixed it.