-
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
doc: undocumented entities in code example in repl.md #12686
Comments
The last two should probably be documented. |
@vsemozhetbyt If this hasn't been addressed yet I can take that responsibility. Do you think the |
@anchnk I am not sure, sorry. cc @nodejs/documentation ? If nobody else answers, feel free to open a PR with any decision and we may correct this later in the PR. |
@cjihrig I am curious why |
@lance that's just my opinion because it is a public property without an underscore. If it's going to stick around like that, it should probably be documented. Otherwise, we should move to deprecate/remove it. |
@cjihrig in my opinion, minimizing the public surface area is in the best long term interest, especially in cases like this where it does seem that the property is a leakage of the implementation. Making this property public and documented means that the implementation, or at least this part of it anyway, needs to remain in place in spite of potential needs/changes in the future. I understand that removing something that's public, even if it's not documented, is generally frowned upon - or at least thought about pretty thoroughly. As you said, it's just my opinion. :) |
I completely agree that less surface area is better. These things should have probably never been made public API. But they're still public, and get harder to remove all the time. |
The `REPLServer.bufferedCommand` property was undocumented, except for its usage appearing, unexplained, in an example for `REPLServer.defineCommand`. This commit deprecates that property, privatizes it, and adds a `REPLServer.clearBufferedCommand()` function that will clear the buffer. PR-URL: #13687 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <mhdawson@ibm.com> Reviewed-By: Ruben Bridgewater <ruben.bridgewater@fintura.de> Refs: #12686
Currently, we have 3 undocumented entities in code example in
repl.md
:replServer.lineParser.reset()
replServer.bufferedCommand
replServer.close()
The first one will be gone since Node.js v8.0.0
The second one can be considered as an acceptable ad-hoc internal revelation.
Is it worth to document the third one,
replServer.close()
?The text was updated successfully, but these errors were encountered: