| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent af18632 commit e865fcb
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -117,44 +117,39 @@ level of V8 within Node.js is updated or new patches are floated on V8. | |||
| 117 | 117 | ||
| 118 | 118 | Due to the nature of the JavaScript language, it can often be difficult to | |
| 119 | 119 | 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. | ||
| 143 | 139 | - 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. | ||
| 145 | 141 | - 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. | ||
| 148 | 143 | ||
| 149 | 144 | Exception to each of these points can be made if use or behavior of a given | |
| 150 | 145 | internal API can be demonstrated to be sufficiently relied upon by the Node.js | |
| 151 | 146 | 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 | ||
| 153 | 148 | basis by the TSC. | |
| 154 | 149 | ||
| 155 | 150 | If it is determined that a currently undocumented object, property, method, | |
| 156 | 151 | 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 | ||
| 158 | 153 | API. | |
| 159 | 154 | ||
| 160 | 155 | 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. | |||
| 226 | 221 | ||
| 227 | 222 | #### When breaking changes actually break things | |
| 228 | 223 | ||
| 229 | - 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. | ||
| 240 | 230 | ||
| 241 | 231 | Specifically: | |
| 242 | 232 | ||
@@ -249,7 +239,7 @@ Specifically: | |||
| 249 | 239 | attempt to fix the issue will be made before the next release; If no fix is | |
| 250 | 240 | provided then the commit will be reverted. | |
| 251 | 241 | ||
| 252 | - 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 | ||
| 253 | 243 | changes *do* break existing code, a decision may be made to revert those | |
| 254 | 244 | changes either temporarily or permanently. However, the decision to revert or | |
| 255 | 245 | not can often be based on many complex factors that are not easily codified. It | |
@@ -291,18 +281,18 @@ recommended but not required. | |||
| 291 | 281 | ||
| 292 | 282 | ### Deprecations | |
| 293 | 283 | ||
| 294 | - 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 | ||
| 295 | 285 | 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. | ||
| 298 | 288 | ||
| 299 | - Node.js uses three fundamental Deprecation levels: | ||
| 289 | + Node.js uses three Deprecation levels: | ||
| 300 | 290 | ||
| 301 | 291 | * *Documentation-Only Deprecation* refers to elements of the Public API that are | |
| 302 | 292 | being staged for deprecation in a future Node.js major release. An explicit | |
| 303 | 293 | 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. | ||
| 306 | 296 | ||
| 307 | 297 | * *Runtime Deprecation* refers to the use of process warnings emitted at | |
| 308 | 298 | runtime the first time that a deprecated API is used. A command-line | |
@@ -314,12 +304,11 @@ Node.js uses three fundamental Deprecation levels: | |||
| 314 | 304 | * *End-of-life* refers to APIs that have gone through Runtime Deprecation and | |
| 315 | 305 | are ready to be removed from Node.js entirely. | |
| 316 | 306 | ||
| 317 | - 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. | ||
| 321 | 310 | ||
| 322 | - 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 | ||
| 323 | 312 | handled as semver-major changes unless there is TSC consensus to land the | |
| 324 | 313 | deprecation as a semver-minor. | |
| 325 | 314 | ||
@@ -332,7 +321,7 @@ the documentation for the assigned deprecation identifier must remain in the | |||
| 332 | 321 | Node.js API documentation. | |
| 333 | 322 | ||
| 334 | 323 | <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 | ||
| 336 | 325 | has been in one of the three Deprecation levels. (Note that Documentation-Only | |
| 337 | 326 | Deprecations may land in a Node.js minor release but must not be upgraded to | |
| 338 | 327 | 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 | |||
| 341 | 330 | Runtime Deprecation cycle. | |
| 342 | 331 | ||
| 343 | 332 | 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. | ||
| 348 | 337 | ||
| 349 | 338 | ### Involving the TSC | |
| 350 | 339 | ||
@@ -369,8 +358,8 @@ The TSC should serve as the final arbiter where required. | |||
| 369 | 358 | * The rebase method changes the author. | |
| 370 | 359 | * The squash & merge method has been known to add metadata to the | |
| 371 | 360 | 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. | ||
| 374 | 363 | ||
| 375 | 364 | Always modify the original commit message to include additional meta | |
| 376 | 365 | information regarding the change process: | |
@@ -622,10 +611,10 @@ TSC for further discussion. | |||
| 622 | 611 | #### How are LTS Branches Managed? | |
| 623 | 612 | ||
| 624 | 613 | 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`. | ||
| 626 | 615 | ||
| 627 | - 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 | ||
| 629 | 618 | PR must be opened against the *staging* branch. Commits are selectively | |
| 630 | 619 | pulled from the staging branch into the LTS branch only when a release is | |
| 631 | 620 | being prepared and may be pulled into the LTS branch in a different order | |
| Back | FazBrowse Home | New Git URL |
0 commit comments