-
-
Notifications
You must be signed in to change notification settings - Fork 140
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 patch affects scripts #202
Comments
This will mainly be fixed via #205 Currently, it seems the patch affects custom REPL instances. Do you think it's expected for them to get TypeScript when executed with tsx? I'm thinking not, and that the patch should only be applied to the Node.js REPL. |
I agree. While REPL instances are probably mainly going to be used for JS, they can also be used for other purposes when defining a custom evaluation function, which is why the patch should only be applied to the Node.js REPL. |
Also even ignoring that, there should not be a noticeable difference between running code through |
I just hit a similar bug using tsx version 4.11.0 . The bug I'm seeing is that input from the repl is transformed. If I use a very simple script to see the output:
And I try entering input with dashes like: I'm expecting it to print:
What I actually see when running this inside TSX:
|
Bug description
I was trying out making a custom REPL using Node's
repl
module when I came across this bug that was presumably introduced in #125. When running a file using tsx the patch affects the script that was run.Screenshot of expected and actual behaviour (
repl.ts
is the reproduction code below)Reproduction
Environment
Can you work on a fix?
The text was updated successfully, but these errors were encountered: