Skip to content
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: replace uses of you and other style nits #12673

Closed
wants to merge 2 commits into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Apr 26, 2017

Replace uses of the pronouns you and your throughout the docs + other minor style nits

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Apr 26, 2017
@@ -713,8 +713,8 @@ added: v0.11.2

The scheduling policy, either `cluster.SCHED_RR` for round-robin or
`cluster.SCHED_NONE` to leave it to the operating system. This is a
global setting and effectively frozen once you spawn the first worker
or call `cluster.setupMaster()`, whatever comes first.
global setting and effectively frozen once wither the first worker is spawned,
Copy link
Contributor

Choose a reason for hiding this comment

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

wither -> either?

Copy link
Member Author

Choose a reason for hiding this comment

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

heh... yes, is should be either

In browsers, the top-level scope is the global scope. This means that
`var something`, within the browser, will define a new global variable. In
Node.js this is different. The top-level scope is not the global scope;
`var something` inside an Node.js module will be local to that module.
Copy link
Contributor

Choose a reason for hiding this comment

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

an Node.js -> a Node.js?

may itself have dependencies, and in some cases, these dependencies may even
collide or form cycles.
Packages can depend on one another. In order to install package `foo`, it
may be necessary to install a specific version of package `bar`. The `bar`
Copy link
Contributor

Choose a reason for hiding this comment

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

Two spaces in succession.

Copy link
Member

@gibfahn gibfahn left a comment

Choose a reason for hiding this comment

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

Some nits (most of them from the existing docs, but while you're there)

responsibility to manage the worker pool for your application's needs.
will be dropped and new connections will be refused. Node.js does not
automatically manage the number of workers, however. It is the application's
responsibility to manage the worker pool based on it's own needs.
Copy link
Member

Choose a reason for hiding this comment

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

it's -> its

created. It is disconnected after the `'disconnect'` event is emitted.
This function returns `true` if the worker is connected to its master via its
IPC channel, `false` otherwise. A worker is connected to its master after it's
been created. It is disconnected after the `'disconnect'` event is emitted.
Copy link
Member

Choose a reason for hiding this comment

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

it's been -> it has been

The boolean `worker.exitedAfterDisconnect` lets you distinguish between voluntary
and accidental exit, the master may choose not to respawn a worker based on
this value.
The boolean `worker.exitedAfterDisconnect` allows distinguishing between
Copy link
Member

Choose a reason for hiding this comment

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

allows distinguishs -> is used to distinguish

allows suggests that's just one of the things it can do right?

@@ -469,7 +467,7 @@ An alias to [`worker.exitedAfterDisconnect`][].

Set by calling `.kill()` or `.disconnect()`. Until then, it is `undefined`.

The boolean `worker.suicide` lets you distinguish between voluntary
The boolean `worker.suicide` allows distinguishs between voluntary
Copy link
Member

Choose a reason for hiding this comment

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

allows distinguishs -> is used to distinguish

as above...

After calling `listen()` from a worker, when the `'listening'` event is emitted on
the server, a `'listening'` event will also be emitted on `cluster` in the master.
After calling `listen()` from a worker, when the `'listening'` event is emitted
on the server, a `'listening'` event will also be emitted on `cluster` in the
Copy link
Member

Choose a reason for hiding this comment

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

server, a -> server a

I think that's easier to parse, happy to be disagreed with though.

@@ -203,8 +200,8 @@ executed multiple times. This is an important feature. With it,
"partially done" objects can be returned, thus allowing transitive
dependencies to be loaded even when they would cause cycles.

If you want to have a module execute code multiple times, then export a
function, and call that function.
To have a module execute code multiple times, then export a function, and call
Copy link
Member

Choose a reason for hiding this comment

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

then

@@ -297,8 +294,8 @@ a done
in main, a.done=true, b.done=true
```

If you have cyclic module dependencies in your program, make sure to
plan accordingly.
Careful planning is required to allow cyclic module dependencies within an
Copy link
Member

Choose a reason for hiding this comment

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

to allow cyclic module dependencies to what? The sentence as is suggests that they won't be allowed unless you plan carefully, but AIUI what will happen is that the application just won't work correctly.

Maybe:

to allow cyclic module dependencies to work correctly within an application.

These are mostly for historic reasons.

*Note*: It is strongly encouraged to place dependencies locally in
`node_modules` folders. These will be loaded faster, and more reliably.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe locally in node_modules folders -> in the local node_modules folder

doc/api/repl.md Outdated
@@ -499,9 +499,9 @@ by the `NODE_REPL_HISTORY` variable, as documented in the

For advanced line-editors, start Node.js with the environmental variable
`NODE_NO_READLINE=1`. This will start the main and debugger REPL in canonical
terminal settings which will allow you to use with `rlwrap`.
terminal settings which will allow use with `rlwrap`.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe settings which -> settings, which

doc/api/net.md Outdated
@@ -650,7 +650,7 @@ added: v0.9.6
-->

The string representation of the local IP address the remote client is
connecting on. For example, if you are listening on `'0.0.0.0'` and the
connecting on. For example, when listening on `'0.0.0.0'` and the
Copy link
Member

Choose a reason for hiding this comment

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

I don't think when...and works here. Can we be more specific about what is listening on '0.0.0.0'?

Sorry for not giving a concrete suggestion, I can't think of a good way to say this.

Replace uses of the pronouns `you` and `your` throughout
the docs + other minor style nits
@jasnell
Copy link
Member Author

jasnell commented Apr 28, 2017

@gibfahn ... updated!

Copy link
Member

@gibfahn gibfahn left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM. Especially impressed by how you fixed the bits where I basically said "this is bad, I have no constructive suggestions, please make better..."

jasnell added a commit that referenced this pull request Apr 28, 2017
Replace uses of the pronouns `you` and `your` throughout
the docs + other minor style nits

PR-URL: #12673
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
@jasnell
Copy link
Member Author

jasnell commented Apr 28, 2017

Landed in 71f22c8

@gibfahn
Copy link
Member

gibfahn commented Jun 18, 2017

Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if no let me know or add the dont-land-on label.

This looks reasonably easy to backport.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants