稳定性指数


在文档中都有章节稳定性的标志。 有些 API 已被证明和依赖,因此它们几乎不可能改变。 有些则是全新的和实验的、或者已知是危险的。

稳定性指数如下:

稳定性: 0 - 弃用。 该特性可能会触发警告。 不保证向后的兼容性。

稳定性: 1 - 实验。 该特性不受语义版本控制规范的约束。 在任何未来的版本中都可能发生非向后兼容的更改或删除。 不建议在生产环境中使用该特性。

Stability: 2 - 稳定。 与 npm 生态系统的兼容性是重中之重。

当使用实验的特性时要小心,尤其是在模块中。 用户可能不知道正在使用实验的特性。 当实验的 API 发生修改时,故障或行为的变化可能会让用户感到诧异。 为避免诧异,使用实验的特性可能需要命令行标志。 实验的特性也可能触发警告

Throughout the documentation are indications of a section's stability. Some APIs are so proven and so relied upon that they are unlikely to ever change at all. Others are brand new and experimental, or known to be hazardous.

The stability indices are as follows:

Stability: 0 - Deprecated. The feature may emit warnings. Backward compatibility is not guaranteed.

Stability: 1 - Experimental. The feature is not subject to Semantic Versioning rules. Non-backward compatible changes or removal may occur in any future release. Use of the feature is not recommended in production environments.

Stability: 2 - Stable. Compatibility with the npm ecosystem is a high priority.

Use caution when making use of Experimental features, particularly within modules. Users may not be aware that experimental features are being used. Bugs or behavior changes may surprise users when Experimental API modifications occur. To avoid surprises, use of an Experimental feature may need a command-line flag. Experimental features may also emit a warning.