-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
return this
from public/external method
#22950
Conversation
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.
Thanks for the PR!
Would you be able to make the commit message a bit more precise, e.g. refer to setRawMode
(and start the message with tty:
, since this module is being changed)?
@addaleax sure, how about:
? |
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 but we should update the docs accordingly.
@BridgeAR sure if the docs are in the same repo I can update those while I change the commit message, can you link to the right docs page? |
@ORESoftware It’s usually only The docs are in |
It seems this needs to be documented in |
@addaleax Ok updated docs and fixed commit message, lmk if that looks good |
doc/api/tty.md
Outdated
@@ -63,7 +63,7 @@ added: v0.7.7 | |||
* `mode` {boolean} If `true`, configures the `tty.ReadStream` to operate as a | |||
raw device. If `false`, configures the `tty.ReadStream` to operate in its | |||
default mode. The `readStream.isRaw` property will be set to the resulting | |||
mode. | |||
mode. Returns `this` - the read stream instance. |
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.
Needs to be on a separate line:
* Returns: {this} - the read stream instance.
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.
fml lol
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.
so it needs to be {this} not this
, is that right?
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.
yes correct.
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.
please check the new commit to see if it's right, thanks
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.
It should be what @vsemozhetbyt put in his comment, verbatim :)
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 @vsemozhetbyt's nit addressed.
doc/api/tty.md
Outdated
mode. | ||
mode. | ||
|
||
Returns {this} - the read stream instance. |
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.
s/Returns/Returns:/
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.
Sorry, I did not explain: our docs are parsed and processed with tools (converters into HTML and JSON), so some format unification is needed. This should be literally:
* Returns: {this} - the read stream instance.
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.
yeah I wasn't sure, will fix, I get it
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.
Just re-affirming my existing LGTM :)
CI: https://ci.nodejs.org/job/node-test-pull-request/17357/ Whoever lands this, please add “Fixes: https://github.com/nodejs/node/issues/22916” to the commit message |
PR-URL: #22950 Fixes: #22916 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Landed in 1f4d4c0 (with "Fixes:" added and some doc nits fixed). Thank you, @ORESoftware! |
PR-URL: #22950 Fixes: #22916 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
return
this
fromReadStream.prototype.setRawMode()
.