稳定性指标
¥Stability index
在文档中都有章节稳定性的标志。有些 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.
¥Stability: 3 - Legacy. Although this feature is unlikely to be removed and is still covered by semantic versioning guarantees, it is no longer actively maintained, and other alternatives are available.
如果特性的使用没有害处并且其在 npm 生态系统中被广泛依赖,则标记为旧版而不是弃用。旧版特性中发现的缺陷不太可能被修复。
¥Features are marked as legacy rather than being deprecated if their use does no harm, and they are widely relied upon within the npm ecosystem. Bugs found in legacy features are unlikely to be fixed.
使用实验性功能时要小心,尤其是在模块内。用户可能不知道正在使用实验的特性。当实验的 API 发生修改时,故障或行为的变化可能会让用户感到诧异。为避免诧异,使用实验的特性可能需要命令行标志。实验性功能也可能会触发 警告。
¥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.