-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Multiline input doesn't work if user overrides "eval" in REPL.start #8640
Comments
@zenparsing ... I know it's been a while, but could you provide a simple test case that demonstrates the problem? |
I've run in to the same problem which is caused a number of users of Babel - (#1741) to report the issue. The exact issue is that the finish callback function requires the error passed to have been wrapped in a RecoverableError object which is only available in the repl scope. I'm submitting a pull request to make this more generic allowing the recoverableError check to be passed as an option. This should allow other libraries to modify what passes as recoverable. |
…errides "eval" in REPL.start Overriding default eval will stop multiline inputs on syntax errors because of the current error checking in the finish callback. This fixes that issue and allows for a custom recoverable check function to be passed the the REPL server
Multiline input doesn't work if user overrides "eval" in REPL.start. Overriding default eval will stop multiline inputs on syntax errors because of the current error checking in the finish callback. This fixes that issue and allows for a custom recoverableError check function to be passed the the REPL server for more customisable use. fixes nodejs#8640
@jasnell I created a pull request that has had no traction. Do you know anything about this issue and it being resolved? |
Thanks for submitting a fix, @mikeybox! I hope the pull request gets some attention soon. |
FWIW |
I cannot use babel-node because of this issue. |
As of b517500, multiline input is triggered when the
eval
callback is executed with an instance ofRecoverable
. However,Recoverable
is not exported from the "repl" module. It is therefore no longer possible (AFAICT) to trigger multiline input when overriding "eval" inREPL.start
.The text was updated successfully, but these errors were encountered: