We recognize that you need stability from the Angular framework. Stability ensures that reusable components and libraries, tutorials, tools, and learned practices don't become obsolete unexpectedly. Stability is essential for the ecosystem around Angular to thrive.
We also share with you the desire for Angular to keep evolving. We strive to ensure that the foundation on top of which you are building is continuously improving and enabling you to stay up-to-date with the rest of the web ecosystem and your user needs.
我们也和你一样希望 Angular 能持续演进。我们会努力确保这些你用于构建应用的基础能得到持续的改进,并让你能及时同步到 Web 生态系统的其它部分的最新进展,用户需求也是一样。
This document contains the practices that we follow to provide you with a leading-edge app development platform, balanced with stability. We strive to ensure that future changes are always introduced in a predictable way. We want everyone who depends on Angular to know when and how new features are added, and to be well-prepared when obsolete ones are removed.
See [Updating your projects](guide/updating "Updating your projects") for information about how to update your apps and libraries to the latest version of Angular.
参见[更新你的项目](guide/updating "Updating your projects"),以了解如何把你的应用和库更新到 Angular 的最新版本。
The practices described in this document apply to Angular 2.0 and later. If you are currently using AngularJS, see [Upgrading from AngularJS](guide/upgrade "Upgrading from Angular JS"). _AngularJS_ is the name for all v1.x versions of Angular.
Angular version numbers indicate the level of changes that are introduced by the release. This use of [semantic versioning](https://semver.org/ "Semantic Versioning Specification") helps you understand the potential impact of updating to a new version.
Angular version numbers have three parts: `major.minor.patch`. For example, version 5.2.9 indicates major version 5, minor version 2, and patch version 9.
The version number is incremented based on the level of change included in the release.
版本号是根据本次发布中包含的变更的级别进行递增的。
* Major releases contain significant new features, some but minimal developer assistance is expected during the update. When updating to a new major release, you may need to run update scripts, refactor code, run additional tests, and learn new APIs.
* Minor releases contain new smaller features. Minor releases are fully backward-compatible; no developer assistance is expected during update, but you can optionally modify your apps and libraries to begin using new APIs, features, and capabilities that were added in the release. We update peer dependencies in minor versions by expanding the supported versions, but we do not require projects to update these dependencies.
* Patch releases are low risk, bug fix releases. No developer assistance is expected during update.
补丁版本是风险最低的、修 BUG 的版本。在升级期间完全不需要开发人员的协助。
If you are updating within the same major version, then you can skip any intermediate versions and update directly to the targeted version. For example, if you want to update from 5.0.0 to 5.2.9, then you can update directly; you do not need to update from 5.0.0 to 5.1.0 before updating to 5.2.9.
If you are updating from one major version to another, then we recommend that you don't skip major versions. Follow the instructions to incrementally update to the next major version, testing and validating at each step. For example, if you want to update from version 4.x.x to version 6.x.x, we recommend that you update to the latest 5.x.x release first. After successfully updating to 5.x.x, you can then update to 6.x.x.
Pre-release previews—such as Beta and Release Candidate versions—are indicated by appending a dash and a beta or rc identifier, such as version 5.2.9-rc.3.
We work toward a regular schedule of releases, so that you can plan and coordinate your updates with the continuing evolution of Angular.
我们会定期发布新版本,以便随着 Angular 的不断演进,你可以提前计划并协调这些升级工作。
In general, you can expect the following release cycle:
通常,你可以期待下列发布周期:
* A major release every 6 months
每 6 个月一个主版本
* 1-3 minor releases for each major release
每个主版本中包含 1~3 个小版本
* A patch release almost every week
差不多每周一个补丁版本
We bake quality into our releases—and let you preview what's coming next—by providing Beta releases and release candidates (RCs) for each major and minor release.
This cadence of releases gives you access to new beta features as soon as they are ready, while maintaining the stability and reliability of the platform for production users.
Compatibility note: The primary goal of the backward compatibility promise is to ensure that changes in the core framework and tooling don't break the existing ecosystem of components and applications and don't put undue upgrade/migration burden on Angular application and component authors.
* 6 months of active support, during which regularly-scheduled updates and patches are released, as described above in [Release frequency](#frequency "Release frequency").
Sometimes "breaking changes", such as the removal of support for select APIs and features, are necessary to innovate and stay current with new best practices, changing dependencies, or changes in the (web) platform itself.
"破坏性变更"(比如移除特定的 API 和特性)有时候是必须的,比如创新、让最佳实践与时俱进、变更依赖关系甚至来自 Web 平台自身的变化。
To make these transitions as easy as possible, we make two commitments to you:
要让这些转变尽可能的简单,我们会给你两项保证:
* We work hard to minimize the number of breaking changes and to provide migration tools when possible.
我们会尽量减少破坏性变更的数量,并尽可能提供迁移工具。
* We follow the deprecation policy described here, so you have time to update your apps to the latest APIs and best practices.
我们会遵循这里所讲的弃用策略,让你有时间把应用升级到最新的 API 和最佳实践。
To help ensure that you have sufficient time and a clear path to update, this is our deprecation policy:
* When we announce a deprecation, we also announce a recommended update path.
当我们宣布一项弃用时,我们也会同时宣布建议的升级路径。
* We support existing use of a stable API during the deprecation period, so your code will keep working during that period.
我们会在弃用期间支持使用现有的稳定 API,所以在此期间你的代码仍然能正常工作。
* We support each deprecated API for at least two subsequent major releases, which means at least 12 months after deprecation.
我们会支持每个弃用的 API 至少连续两个主版本,这意味着在弃用之前至少有 12 个月的时间。
* We only make peer dependency updates that require changes to your apps in a major release. In minor releases, we update peer dependencies by expanding the supported versions, but we do not require projects to update these dependencies until a future major version.
Angular is a collection of many packages, sub-projects, and tools. To prevent accidental use of private APIs—and so that you can clearly understand what is covered by the practices described here—we document what is and is not considered our public API surface. For details, see [Supported Public API Surface of Angular](https://github.com/angular/angular/blob/master/docs/PUBLIC_API.md "Supported Public API Surface of Angular").
Angular 是很多包、子项目和工具的集合。为了防止你意外使用私有 API(这样你才能更清楚的理解哪些 API 会被这里所说的实践所覆盖),我们对公开 API 包含以及不包含哪些 API 进行了文档化。要了解详情,参见 [Angular 的公共 API](https://github.com/angular/angular/blob/master/docs/PUBLIC_API.md "Supported Public API Surface of Angular")。
Any changes to the public API surface will be done using the versioning, support, and depreciation policies describe above.
Angular Labs is an initiative to cultivate new features and iterate on them quickly. Angular Labs provides a safe place for exploration and experimentation by the Angular team.
Angular Labs projects are not ready for production use, and no commitment is made to bring them to production. The policies and practices that are described in this document do not apply to Angular Labs projects.