-
Notifications
You must be signed in to change notification settings - Fork 30k
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: add autocomplete for filesystem modules #26648
Conversation
bc9a014
to
d4fec28
Compare
@devsnek @richardlau @nodejs/repl PTAL.. |
d4fec28
to
20e96d1
Compare
20e96d1
to
76b01ec
Compare
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.
This is overall looking very promising. I believe this should be good to go after addressing my comments.
76b01ec
to
8b666b2
Compare
@BridgeAR Thanks much for the follow up and I'm sorry for being late here. I have fixed up the comments, could you please have a look at them? |
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.
LGTM with my comment addressed.
8b666b2
to
b8cebd3
Compare
@BridgeAR Have fixed your comments, PTAL. |
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.
LGTM. I found one more small thing that won't change the behavior but filter should always be a string or undefined. Using false
adds another map
(internal V8 type, also called hidden class) to it.
Thanks for following up on the comments!
lib/repl.js
Outdated
|
||
let filePath = match[1]; | ||
let fileList; | ||
filter = false; |
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.
filter = false; | |
filter = ''; |
b8cebd3
to
01102c4
Compare
@BridgeAR @nodejs/repl PTAL.. Thanks! |
@nodejs/repl Can I get one more review, please. Planning to land by April 29th if there are no objections. |
@BridgeAR I have addressed your comments regarding |
Still LGTM |
Landed in d69f004 🎉 |
PR-URL: #26648 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #26648 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Notable changes: * deps: * Updated llhttp to 1.1.3. This fixes a bug that made Node.js' HTTP parser refuse any request URL that contained the "|" (vertical bar) character. #27595 * tls: * Added an `enableTrace()` method to `TLSSocket` and an `enableTrace` option to `tls.createServer()`. When enabled, TSL packet trace information is written to `stderr`. This can be used to debug TLS connection problems. #27497 #27376 * cli: * Added a `--trace-tls` command-line flag that enables tracing of TLS connections without the need to modify existing application code. #27497 * Added a `--cpu-prof-interval` command-line flag. It can be used to specify the sampling interval for the CPU profiles generated by `--cpu-prof`. #27535 * module: * Added the `createRequire()` method. It allows to create a require function from a file URL object, a file URL string or an absolute path string. The existing `createRequireFromPath()` method is now deprecated #27405. * Throw on `require('./path.mjs')`. This is technically a breaking change that should have landed with Node.js 12.0.0. It is necessary to have this to keep the possibility for a future minor version to load ES Modules with the require function. #27417 * repl: * The REPL now supports multi-line statements using `BigInt` literals as well as public and private class fields and methods. #27400 * The REPL now supports tab autocompletion of file paths with `fs` methods. #26648 * meta: * Added Christian Clauss (https://github.com/cclauss) to collaborators. #27554 PR-URL: #27578
Notable changes: * deps: * Updated llhttp to 1.1.3. This fixes a bug that made Node.js' HTTP parser refuse any request URL that contained the "|" (vertical bar) character. #27595 * tls: * Added an `enableTrace()` method to `TLSSocket` and an `enableTrace` option to `tls.createServer()`. When enabled, TSL packet trace information is written to `stderr`. This can be used to debug TLS connection problems. #27497 #27376 * cli: * Added a `--trace-tls` command-line flag that enables tracing of TLS connections without the need to modify existing application code. #27497 * Added a `--cpu-prof-interval` command-line flag. It can be used to specify the sampling interval for the CPU profiles generated by `--cpu-prof`. #27535 * module: * Added the `createRequire()` method. It allows to create a require function from a file URL object, a file URL string or an absolute path string. The existing `createRequireFromPath()` method is now deprecated #27405. * Throw on `require('./path.mjs')`. This is technically a breaking change that should have landed with Node.js 12.0.0. It is necessary to have this to keep the possibility for a future minor version to load ES Modules with the require function. #27417 * repl: * The REPL now supports multi-line statements using `BigInt` literals as well as public and private class fields and methods. #27400 * The REPL now supports tab autocompletion of file paths with `fs` methods. #26648 * meta: * Added Christian Clauss (https://github.com/cclauss) to collaborators. #27554 PR-URL: #27578
Small bug on macOS (when, e.g., in
|
Not sure if it counts as a bug, but it doesn't work with |
This is a implementation of: #17764
There are other few things to be done like handling autocompletion for filenames etc.Marking it as WIP. But would love to get feedback from @nodejs/repl