doc: some fixes in child_process.md#10102
doc: some fixes in child_process.md#10102vsemozhetbyt wants to merge 1 commit intonodejs:masterfrom vsemozhetbyt:child_process.md
Conversation
doc/api/child_process.md
Outdated
There was a problem hiding this comment.
I would say, calling toString explicitly would be clearer.
There was a problem hiding this comment.
I was following this line. Should I change it as well?
There was a problem hiding this comment.
console.log('%s', data)?
There was a problem hiding this comment.
@thefourtheye, @sam-github So which of these two variants should I apply?
There was a problem hiding this comment.
Oh, I see. I think console.log('%s', data) is more idiomatic. Code using console.log() should use its facilities. console.log(data.toString()) just seems a cumbersome version. @thefourtheye, what do you think?
There was a problem hiding this comment.
Personally, I feel like data.toString() has clearer intent, but I'm good either way.
There was a problem hiding this comment.
So we have 3:1 (considering emoji) for data.toString().
doc/api/child_process.md
Outdated
There was a problem hiding this comment.
this is an fd leak, because the fd is never closed
There was a problem hiding this comment.
@thefourtheye, @sam-github I'm not sure how to fix this. It requires rewriting the previous paragraph. Maybe it could be fixed in a separate PR?
There was a problem hiding this comment.
+1 for another PR. The issue is already there, this is just altering indentation.
|
LGTM, despite the unexplained aversion to format strings :-) |
|
ping @nodejs/documentation |
|
LGTM also. |
sam-github
left a comment
There was a problem hiding this comment.
LGTM. Please squash into one commit with a bullet list of changes, I would describe this as "doc: modernize child_process example code".
|
@sam-github I hope I've done it right... I don't know why the bot has added this |
doc/api/child_process.md
Outdated
1. equal => strictEqual. 2. let => const for the variable that is not reassigned. 3. fix spaces. 4. stringify erroneous raw buffer outputs. 5. fix a typo.
1. equal => strictEqual. 2. let => const for the variable that is not reassigned. 3. fix spaces. 4. stringify erroneous raw buffer outputs. 5. fix a typo. PR-URL: nodejs#10102 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
|
Landed in f418a22 |
1. equal => strictEqual. 2. let => const for the variable that is not reassigned. 3. fix spaces. 4. stringify erroneous raw buffer outputs. 5. fix a typo. PR-URL: #10102 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1. equal => strictEqual. 2. let => const for the variable that is not reassigned. 3. fix spaces. 4. stringify erroneous raw buffer outputs. 5. fix a typo. PR-URL: nodejs#10102 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1. equal => strictEqual. 2. let => const for the variable that is not reassigned. 3. fix spaces. 4. stringify erroneous raw buffer outputs. 5. fix a typo. PR-URL: nodejs#10102 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1. equal => strictEqual. 2. let => const for the variable that is not reassigned. 3. fix spaces. 4. stringify erroneous raw buffer outputs. 5. fix a typo. PR-URL: #10102 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1. equal => strictEqual. 2. let => const for the variable that is not reassigned. 3. fix spaces. 4. stringify erroneous raw buffer outputs. 5. fix a typo. PR-URL: nodejs#10102 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1. equal => strictEqual. 2. let => const for the variable that is not reassigned. 3. fix spaces. 4. stringify erroneous raw buffer outputs. 5. fix a typo. PR-URL: nodejs#10102 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1. equal => strictEqual. 2. let => const for the variable that is not reassigned. 3. fix spaces. 4. stringify erroneous raw buffer outputs. 5. fix a typo. PR-URL: #10102 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Checklist
Affected core subsystem(s)
doc, child_process
Description of change
assert.equal=>assert.strictEqual.let=>constfor the variable that is not reassigned.