doc: edit COLLABORATORS_GUIDE.md for readability · nodejs/node@e865fcb

@@ -117,44 +117,39 @@ level of V8 within Node.js is updated or new patches are floated on V8.

117117118118

Due to the nature of the JavaScript language, it can often be difficult to

119119

establish a clear distinction between which parts of the Node.js implementation

120-

represent the "public" API Node.js users should assume to be stable and which

121-

are considered part of the "internal" implementation detail of Node.js itself.

122-

A general rule of thumb has been to base the determination off what

123-

functionality is actually *documented* in the official Node.js API

124-

documentation. However, it has been repeatedly demonstrated that either the

125-

documentation does not completely cover implemented behavior or that Node.js

126-

users have come to rely heavily on undocumented aspects of the Node.js

127-

implementation.

128-129-

While there are numerous exceptions, the following general rules should be

130-

followed to determine which aspects of the Node.js API are considered

131-

"internal":

132-133-

- Any and all functionality exposed via `process.binding(...)` is considered to

134-

be internal and *not* part of the Node.js Public API.

135-

- Any and all functionality implemented in `lib/internal/**/*.js` that is not

136-

re-exported by code in `lib/*.js`, or is not documented as part of the

137-

Node.js Public API, is considered to be internal.

138-

- Any object property or method whose key is a non-exported `Symbol` is

139-

considered to be an internal property.

140-

- Any object property or method whose key begins with the underscore `_` prefix,

141-

and is not documented as part of the Node.js Public API, is considered to be

142-

an internal property.

120+

represent the public API Node.js users should assume to be stable and which

121+

are part of the internal implementation details of Node.js itself. A rule of

122+

thumb is to base the determination off what functionality is actually

123+

documented in the official Node.js API documentation. However, it has been

124+

repeatedly demonstrated that either the documentation does not completely cover

125+

implemented behavior or that Node.js users have come to rely heavily on

126+

undocumented aspects of the Node.js implementation.

127+128+

The following general rules should be followed to determine which aspects of the

129+

Node.js API are internal:

130+131+

- All functionality exposed via `process.binding(...)` is internal.

132+

- All functionality implemented in `lib/internal/**/*.js` is internal unless it

133+

is re-exported by code in `lib/*.js` or documented as part of the Node.js

134+

Public API.

135+

- Any object property or method whose key is a non-exported `Symbol` is an

136+

internal property.

137+

- Any object property or method whose key begins with the underscore `_` prefix

138+

is internal unless it is documented as part of the Node.js Public API.

143139

- Any object, property, method, argument, behavior, or event not documented in

144-

the Node.js documentation is considered to be internal.

140+

the Node.js documentation is internal.

145141

- Any native C/C++ APIs/ABIs exported by the Node.js `*.h` header files that

146-

are hidden behind the `NODE_WANT_INTERNALS` flag are considered to be

147-

internal.

142+

are hidden behind the `NODE_WANT_INTERNALS` flag are internal.

148143149144

Exception to each of these points can be made if use or behavior of a given

150145

internal API can be demonstrated to be sufficiently relied upon by the Node.js

151146

ecosystem such that any changes would cause too much breakage. The threshold

152-

for what qualifies as "too much breakage" is to be decided on a case-by-case

147+

for what qualifies as too much breakage is to be decided on a case-by-case

153148

basis by the TSC.

154149155150

If it is determined that a currently undocumented object, property, method,

156151

argument, or event *should* be documented, then a pull request adding the

157-

documentation is required in order for it to be considered part of the "public"

152+

documentation is required in order for it to be considered part of the public

158153

API.

159154160155

Making a determination about whether something *should* be documented can be

@@ -226,17 +221,12 @@ handling may have been made. Additional CI testing may be required.

226221227222

#### When breaking changes actually break things

228223229-

Breaking changes are difficult primarily because they change the fundamental

230-

assumptions a user of Node.js has when writing their code and can cause

231-

existing code to stop functioning as expected -- costing developers and users

232-

time and energy to fix.

233-234-

Because breaking (semver-major) changes are permitted to land in master at any

235-

time, it should be *understood and expected* that at least some subset of the

236-

user ecosystem *may* be adversely affected *in the short term* when attempting

237-

to build and use Node.js directly from master. This potential instability is

238-

precisely why Node.js offers distinct Current and LTS release streams that

239-

offer explicit stability guarantees.

224+

Because breaking (semver-major) changes are permitted to land on the master

225+

branch at any time, at least some subset of the user ecosystem may be adversely

226+

affected in the short term when attempting to build and use Node.js directly

227+

from the master branch. This potential instability is why Node.js offers

228+

distinct Current and LTS release streams that offer explicit stability

229+

guarantees.

240230241231

Specifically:

242232

@@ -249,7 +239,7 @@ Specifically:

249239

attempt to fix the issue will be made before the next release; If no fix is

250240

provided then the commit will be reverted.

251241252-

When any change is landed in master, and it is determined that the such

242+

When any changes are landed on the master branch and it is determined that the

253243

changes *do* break existing code, a decision may be made to revert those

254244

changes either temporarily or permanently. However, the decision to revert or

255245

not can often be based on many complex factors that are not easily codified. It

@@ -291,18 +281,18 @@ recommended but not required.

291281292282

### Deprecations

293283294-

Deprecation refers to the identification of Public APIs that should no longer

284+

_Deprecation_ refers to the identification of Public APIs that should no longer

295285

be used and that may be removed or modified in non-backwards compatible ways in

296-

a future major release of Node.js. Deprecation *may* be used with internal APIs

297-

if there is expected impact on the user community.

286+

a future major release of Node.js. Deprecation may be used with internal APIs if

287+

there is expected impact on the user community.

298288299-

Node.js uses three fundamental Deprecation levels:

289+

Node.js uses three Deprecation levels:

300290301291

* *Documentation-Only Deprecation* refers to elements of the Public API that are

302292

being staged for deprecation in a future Node.js major release. An explicit

303293

notice indicating the deprecated status is added to the API documentation

304-

*but no functional changes are implemented in the code*. There will be no

305-

runtime deprecation warning emitted for such deprecations.

294+

but no functional changes are implemented in the code. There will be no

295+

runtime deprecation warnings emitted for such deprecations.

306296307297

* *Runtime Deprecation* refers to the use of process warnings emitted at

308298

runtime the first time that a deprecated API is used. A command-line

@@ -314,12 +304,11 @@ Node.js uses three fundamental Deprecation levels:

314304

* *End-of-life* refers to APIs that have gone through Runtime Deprecation and

315305

are ready to be removed from Node.js entirely.

316306317-

Documentation-Only Deprecations *may* be handled as semver-minor or

318-

semver-major changes. Such deprecations have no impact on the successful

319-

operation of running code and therefore should not be viewed as breaking

320-

changes.

307+

Documentation-Only Deprecations may be handled as semver-minor or semver-major

308+

changes. Such deprecations have no impact on the successful operation of running

309+

code and therefore should not be viewed as breaking changes.

321310322-

Runtime Deprecations and End-of-life APIs (internal or public) *must* be

311+

Runtime Deprecations and End-of-life APIs (internal or public) must be

323312

handled as semver-major changes unless there is TSC consensus to land the

324313

deprecation as a semver-minor.

325314

@@ -332,7 +321,7 @@ the documentation for the assigned deprecation identifier must remain in the

332321

Node.js API documentation.

333322334323

<a id="deprecation-cycle"></a>

335-

A "Deprecation cycle" is one full Node.js major release during which an API

324+

A _Deprecation cycle_ is one full Node.js major release during which an API

336325

has been in one of the three Deprecation levels. (Note that Documentation-Only

337326

Deprecations may land in a Node.js minor release but must not be upgraded to

338327

a Runtime Deprecation until the next major release.)

@@ -341,10 +330,10 @@ No API can be moved to End-of-life without first having gone through a

341330

Runtime Deprecation cycle.

342331343332

A best effort will be made to communicate pending deprecations and associated

344-

mitigations with the ecosystem as soon as possible (preferably *before* the pull

345-

request adding the deprecation lands in master). All deprecations included in

346-

a Node.js release should be listed prominently in the "Notable Changes" section

347-

of the release notes.

333+

mitigations with the ecosystem as soon as possible (preferably before the pull

334+

request adding the deprecation lands on the master branch). All deprecations

335+

included in a Node.js release should be listed prominently in the "Notable

336+

Changes" section of the release notes.

348337349338

### Involving the TSC

350339

@@ -369,8 +358,8 @@ The TSC should serve as the final arbiter where required.

369358

* The rebase method changes the author.

370359

* The squash & merge method has been known to add metadata to the

371360

commit title.

372-

* If more than one author has contributed to the PR, only the

373-

latest author will be considered during the squashing.

361+

* If more than one author has contributed to the PR, keep the most recent

362+

author when squashing.

374363375364

Always modify the original commit message to include additional meta

376365

information regarding the change process:

@@ -622,10 +611,10 @@ TSC for further discussion.

622611

#### How are LTS Branches Managed?

623612624613

There are currently two LTS branches: `v6.x` and `v4.x`. Each of these is paired

625-

with a "staging" branch: `v6.x-staging` and `v4.x-staging`.

614+

with a staging branch: `v6.x-staging` and `v4.x-staging`.

626615627-

As commits land in `master`, they are cherry-picked back to each staging

628-

branch as appropriate. If the commit applies only to the LTS branch, the

616+

As commits land on the master branch, they are cherry-picked back to each

617+

staging branch as appropriate. If the commit applies only to the LTS branch, the

629618

PR must be opened against the *staging* branch. Commits are selectively

630619

pulled from the staging branch into the LTS branch only when a release is

631620

being prepared and may be pulled into the LTS branch in a different order