FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: some fixes in child_process.md by vsemozhetbyt · Pull Request #10102 · nodejs/node · GitHub

/ node Public

doc: some fixes in child_process.md - #10102

Closed
vsemozhetbyt wants to merge 1 commit into
nodejs:masterfrom
vsemozhetbyt:child_process.md
Closed

doc: some fixes in child_process.md#10102
vsemozhetbyt wants to merge 1 commit into
nodejs:masterfrom
vsemozhetbyt:child_process.md

Conversation

vsemozhetbyt commented Dec 3, 2016
edited
Loading

Copy link
Copy Markdown
Contributor
Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc, child_process

Description of change
  1. assert.equal => assert.strictEqual.
  2. let => const for the variable that is not reassigned.
  3. Fix indentation and internal spaces in code bits.
  4. Stringify buffers in code examples to prevent erroneous raw buffer outputs.
  5. Fix a typo.

nodejs-github-bot added child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations. labels Dec 3, 2016
vsemozhetbyt changed the title Child process.md doc: some fixes in child_process.md Dec 3, 2016
Comment thread doc/api/child_process.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I would say, calling toString explicitly would be clearer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I was following this line. Should I change it as well?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

yes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

console.log('%s', data)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@thefourtheye, @sam-github So which of these two variants should I apply?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

what two variants?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Personally, I feel like data.toString() has clearer intent, but I'm good either way.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

So we have 3:1 (considering emoji) for data.toString().

Comment thread doc/api/child_process.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

this is an fd leak, because the fd is never closed

vsemozhetbyt Dec 4, 2016
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

+1 for another PR. The issue is already there, this is just altering indentation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

ok by me

Copy link
Copy Markdown
Contributor

LGTM, despite the unexplained aversion to format strings :-)

Copy link
Copy Markdown
Contributor Author

ping @nodejs/documentation

Qard commented Dec 9, 2016

Copy link
Copy Markdown
Member

LGTM also.

sam-github left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM. Please squash into one commit with a bullet list of changes, I would describe this as "doc: modernize child_process example code".

Copy link
Copy Markdown
Contributor Author

@sam-github I hope I've done it right... I don't know why the bot has added this dont-land-on-v7.x label after squashing, though.

Comment thread doc/api/child_process.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nit: parent's

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.
sam-github pushed a commit to sam-github/node that referenced this pull request Dec 12, 2016
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>

Copy link
Copy Markdown
Contributor

Landed in f418a22

sam-github closed this Dec 12, 2016
vsemozhetbyt deleted the child_process.md branch December 12, 2016 15:58
MylesBorins pushed a commit that referenced this pull request Jan 16, 2017
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>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 18, 2017
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>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 19, 2017
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>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
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>
MylesBorins mentioned this pull request Jan 24, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 24, 2017
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>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 27, 2017
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>
italoacasas mentioned this pull request Jan 29, 2017
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants


Back | FazBrowse Home | New Git URL