-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
repl: refactor for readability #54824
Conversation
CC @nodejs/repl |
This is quite subjective, and may or may not be true for others – as a point of data, I don't find the PR very easy to review, so I'm not sure the code is much more readable or easy to understand. Given the size of the PR, I don't think it's worth it, it's very easy to miss something. |
Is there any specific reason for that? I'm trying to figure out how to best improve the readability. If this PR is too big, I can break it down into smaller parts. |
d810d58
to
03817d4
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #54824 +/- ##
==========================================
+ Coverage 87.61% 87.62% +0.01%
==========================================
Files 650 651 +1
Lines 182945 183311 +366
Branches 35394 35437 +43
==========================================
+ Hits 160282 160634 +352
- Misses 15918 15940 +22
+ Partials 6745 6737 -8
|
03817d4
to
ae7dffd
Compare
Drafting to resolve the test conflicts, allowing this to be a non-semver-major change. |
I can't seem to narrow down what caused this to happen. I'm going to follow your advise and open a smaller PR. |
This PR updates the
repl
class to leverage modern EcmaScript features, including the use of classes.I refactored the code to make it more readable and accessible for new contributors (I found it quite difficult to understand before the refactor).
Oddly enough, even though the core logic hasn't changed, one test is now failing. I'm submitting this as a draft to invite feedback and help troubleshoot the issue. Currently, the test has been modified to pass.
I'd love to get some feedback on this change.