-
Notifications
You must be signed in to change notification settings - Fork 130
refactor(ts): refactor proxy
to TS
#960
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
refactor(ts): refactor proxy
to TS
#960
Conversation
…-refactor-db-module
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #960 +/- ##
===========================================
- Coverage 62.54% 50.08% -12.46%
===========================================
Files 50 48 -2
Lines 1842 1711 -131
Branches 0 174 +174
===========================================
- Hits 1152 857 -295
- Misses 690 834 +144
- Partials 0 20 +20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Wonderful PR - thank you @jescalada for picking this up! This has been a thorn in the side of this project for awhile now and very pleased to see typescript finally land. Appreciate this contribution.
I've left a few areas where I think more types can be added as well as a minor dependency change.
@JamieSlome we will need to contact an org admin to modify the required PR status check. It is explicitly set to |
Thanks for the review @coopernetes! I originally bumped the Node CI to 22 due to some ESM errors, but I managed to fix them. That said, there's a |
390de82
to
90a8cab
Compare
Hi @coopernetes, I just fixed up those lines you mentioned, and did some manual testing to make sure the flow still works as expected. I'm a bit confused about this part on -const exec = async (req: any, action: Action): Promise<Action> => {
+async function exec(req: any, action: Action): Promise<Action> { Thanks! |
That's just a style preference. I'm not against the use of arrow functions so long as we have clear typing on the function arguments & return type. |
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.
I will suggest we add an eslint rule to warn on those any
usages so we can clean them up over time. Otherwise, LGTM.
The plugin code could use more strict typing but since it's doing dynamic module loading, this is a good way forward for the rest of the proxy server code.
@jescalada Can you resolve the conflicts and then this can be merged? thanks! |
Head branch was pushed to by a user without write access
@coopernetes Thank you again for the review! The merge conflicts required me to refactor one more file. I didn't manually test the changes, but the unit tests seem to pass. Just to remind you, #805 fixes the proxy tests for more code coverage (quite crucial since the core proxy logic is stubbed!). Maybe we could ping the author to remind them to complete the CLA? Thanks! |
Great job @jescalada and @coopernetes for the review ❤️ I assume this is at least a minor bump, potentially even major? Let me know and I'll schedule a new release 🚀 |
Fixes #965.
This PR refactors most of the proxy logic to TS. It builds on the
db
andconfig
refactor PRs.The tests are passing, but they do not cover the push/pull processor functions (because the logic is stubbed). There's a fix for this in #805, which might be worth looking at!