Skip to content
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

Expose and hook into REPL eval #20531

Closed
blakeembrey opened this issue May 5, 2018 · 3 comments
Closed

Expose and hook into REPL eval #20531

blakeembrey opened this issue May 5, 2018 · 3 comments
Labels
feature request Issues that request new features to be added to Node.js. repl Issues and PRs related to the REPL subsystem.

Comments

@blakeembrey
Copy link
Contributor

While building the REPL for https://github.com/TypeStrong/ts-node, I'd love to be able to push people toward using node -r ts-node/register for any advanced node.js usage and the one remaining feature to support the REPL. Would it make sense to expose the "default" REPL eval for override and createInternalRepl in some way so projects like the babel CLI and ts-node can hook into and replace the default eval and/or replicate createInternalRepl?

@addaleax addaleax added the repl Issues and PRs related to the REPL subsystem. label May 5, 2018
@addaleax
Copy link
Member

addaleax commented May 5, 2018

Just to make sure I’m understanding this correctly, what you would like is essentially for just running ts-node (no args) to be equivalent to running node -r ts-node/register (no further args) – right?

@blakeembrey
Copy link
Contributor Author

@addaleax Yes, that's the idea 👍 Right now it'd kick into the node.js REPL, so it'd be great to hook into that behaviour and wrap evaluation. One thing that would be relevant to the implementation would be support for chaining the evaluations, so the current "default" might need to be exposed somehow like require.extensions is. This would allow node -r ts-node/register -r babel-register to act the same in the REPL as with module code (if both modules support the new API).

@apapirovski apapirovski added the feature request Issues that request new features to be added to Node.js. label Nov 29, 2018
@BridgeAR
Copy link
Member

BridgeAR commented Mar 5, 2019

There has not been no further traction since opening the PR. Therefore I am going to close this as it is not foreseeable that we implement anything like it soon. Please reopen / leave a comment if you believe this should stay open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants