Closed meetmangukiya closed 1 year ago
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Didn't know node repl did this, TIL, thanks 👍
Still not the same as node repl, you need to do twice on empty line on node to exit, but figured this was simpler and got the main feature done which is just clearing current line input
That one I'm aware of, but bun REPL is also its own thing and doesn't have to match everything Node's REPL does 1:1, the line clearing one is useful, but the double-ctrl+c to exit just doesn't feel necessary.
We do still need though is to make ctrl+c be able to break a long-running script like an infinite loop and stuff, if you'd like to help out and take this on let me know, PRs always welcome, otherwise I'll probably get to it tomorrow or the day after.
Was just checking if this created a bug for multiline inputs like functions or classes. I don't think it is accepting that yet right? or did this break it?
Nah it doesn't have multiline input yet, don't worry. Multiline input is actually harder than it seems because the way it works in Node is they check for specific errors based on their message/code and decide if that error is "recoverable" by allowing more input on further lines, but Bun and thus JSC errors are different from Node/V8 ones so the mapping has to be remade from scratch, plus we have the added layer of transpiler-sourced errors to account for too. So it'll probably be one of the later features to be added.
…d SIGINT