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
Polish @babel/node
REPL
#12786
Polish @babel/node
REPL
#12786
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/40085/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love when improvements are just a few lines of code 😂
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit db1be54:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow nice!
my q with creating files is wondering how big they get without clearing (reminded of babel register cache, tho I'm sure this is much smaller)
@hzoo The Note that if users do not want
|
Does this need to wait for a minor version? |
@nicolo-ribaudo I think it can be shipped in patch. |
This PR polishes the
@babel/node
REPL.preview: true
REPL options: it will output the preview (like Chrome DevTools did) of evaluation result on supported node.js version (v13.4.0, v12.17.0)process.env.NODE_REPL_HISOTRY
, if it is not given, Node.js will default to~/.node_repl_history
(v11.10.0). Although we could implement REPL history support for lower versions, I don't think it is worthy since Babel 8 will drop Node < 12 support. Thanks for @0xdevalias offering a detailed report (babel-node should support NODE_REPL_HISTORY #10739) on this feature!I marked this PR as Polish because there is no new options/methods added.