doc, tools: unify stability signatures

PR-URL: https://github.com/nodejs/node/pull/20552
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Vse Mozhet Byt 2018-05-06 03:59:23 +03:00
parent a76dfd24ec
commit 5f2b67dbcd
2 changed files with 17 additions and 18 deletions

View File

@ -34,24 +34,24 @@ and in the process of being redesigned.
The stability indices are as follows: The stability indices are as follows:
```txt > Stability: 0 - Deprecated. This feature is known to be problematic, and
Stability: 0 - Deprecated. This feature is known to be problematic, and changes > changes may be planned. Do not rely on it. Use of the feature may cause
may be planned. Do not rely on it. Use of the feature may cause warnings to be > warnings to be emitted. Backwards compatibility across major versions should
emitted. Backwards compatibility across major versions should not be expected. > not be expected.
```
```txt <!-- separator -->
Stability: 1 - Experimental. This feature is still under active development and
subject to non-backwards compatible changes, or even removal, in any future
version. Use of the feature is not recommended in production environments.
Experimental features are not subject to the Node.js Semantic Versioning model.
```
```txt > Stability: 1 - Experimental. This feature is still under active development
Stability: 2 - Stable. The API has proven satisfactory. Compatibility with the > and subject to non-backwards compatible changes, or even removal, in any
npm ecosystem is a high priority, and will not be broken unless absolutely > future version. Use of the feature is not recommended in production
necessary. > environments. Experimental features are not subject to the Node.js Semantic
``` > Versioning model.
<!-- separator -->
> Stability: 2 - Stable. The API has proven satisfactory. Compatibility with the
> npm ecosystem is a high priority, and will not be broken unless absolutely
> necessary.
Caution must be used when making use of `Experimental` features, particularly Caution must be used when making use of `Experimental` features, particularly
within modules that may be used as dependencies (or dependencies of within modules that may be used as dependencies (or dependencies of

View File

@ -256,8 +256,7 @@ function preprocessElements(input) {
state = null; state = null;
return; return;
} }
if ((tok.type === 'paragraph' && state === 'MAYBE_STABILITY_BQ') || if (tok.type === 'paragraph' && state === 'MAYBE_STABILITY_BQ') {
tok.type === 'code') {
if (tok.text.match(/Stability:.*/g)) { if (tok.text.match(/Stability:.*/g)) {
const stabilityMatch = tok.text.match(STABILITY_TEXT_REG_EXP); const stabilityMatch = tok.text.match(STABILITY_TEXT_REG_EXP);
const stability = Number(stabilityMatch[2]); const stability = Number(stabilityMatch[2]);