Uh oh!
There was an error while loading. Please reload this page.
repl: convert to ES2015 class - #54838
Conversation
avivkeller
commented
Sep 7, 2024
Right now, despite this change, most of the logic for the REPL remains in the |
avivkeller
commented
Sep 7, 2024
CC @nodejs/repl |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #54838 +/- ##
========================================
Coverage 87.61% 87.62% ========================================
Files 650 651 +1 Lines 182945 183326 +381 Branches 35394 35445 +51 ========================================
+ Hits 160282 160632 +350 - Misses 15918 15953 +35 + Partials 6745 6741 -4
|
jasnell
left a comment
There was a problem hiding this comment.
I'm not against this change but I think we need to take it through a deprecation cycle first given the breaking change.
Uh oh!
There was an error while loading. Please reload this page.
aduh95
commented
Sep 8, 2024
Typo in the commit title |
|
doc deprecation needs to be followed by a runtime deprecation (emit a warning) which is semver major. The runtime deprecation needs to land before refactoring and removing the constructor without |
@redyetidev We might want to consider landing this (possibly temporarily) with a solution similar to what some of the test-runner reporters implemented to solve this semver-major issue: Lines 34 to 42 in a65105e Lines 52 to 60 in a65105e This would potentially allow landing this PR without needing to wait for the entire deprecation cycle to complete, and handle the deprecation separately |
avivkeller
commented
Sep 14, 2024
The issue with that is: constreporters=require("node:test/reporters");(newreporters.spec())instanceofreporters.spec// falseSidenote: This is blocked by #54869 |
avivkeller
commented
Sep 23, 2024
Closing until the runtime deprecation is done (which won't be for a while) |
This PR modifies the REPL to use an ES5 class.
It will (hopefully) be one of many in series to refactor the REPL's code, as IMO it is currently hard to read as is. My plan is to first convert the REPL to ECMAScript classes, and then move away from using the the
domainmodule. IMO keeping the internal codebase up-to-date with deprecations and additions is a great way to maintain longevity.