稳定性指标


¥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:

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

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

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

¥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.

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

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

稳定性: 3 - 旧版的。尽管此功能不太可能被删除并且仍受语义版本控制保证的保护,但它不再被积极维护,并且有其他替代方案可用。

¥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.