Skip to content

Commit 26e0dfb

Browse files
committed
docs(faq): clarify the versioning stratgey
- When do breaking changes appear - Semver - Compatibility of modules
1 parent 54cfd06 commit 26e0dfb

File tree

1 file changed

+40
-10
lines changed

1 file changed

+40
-10
lines changed

docs/content/misc/faq.ngdoc

+40-10
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,47 @@ So it's definitely not a plugin or some other native browser extension.
2525
In AngularJS we do not allow intentional breaking changes to appear in versions where only the "patch"
2626
number changes. For example between 1.3.12 and 1.3.13 there can be no breaking changes. We do allow
2727
breaking changes happen between "minor" number changes. For example between 1.3.15 and 1.4.0 there
28-
will be a number of breaking changes. We also allow breaking changes between beta releases of AngularJS.
28+
are a number of breaking changes. That means AngularJS does not follow
29+
[semantic versioning (semver)](http://semver.org/) where breaking changes are only
30+
allowed when the "major" version changes.
31+
32+
We also allow breaking changes between beta releases of AngularJS.
2933
For example between 1.4.0-beta.4 and 1.4.0-beta.5 there may be breaking changes. We try hard to minimize
3034
these kinds of change only to those where there is a strong use case such as a strongly requested feature
31-
improvement, a considerable simplification of the code or a measurable performance improvement.
35+
improvement, a considerable simplification of the code, a measurable performance improvement, or a better
36+
developer experience (especially with regard to updating to Angular).
37+
38+
When we are making a release we generate updates to the changelog directly from the commits. This
39+
generated update contains a highlighted section that contains all the breaking changes that have been
40+
extracted from the commits. We can quickly see in the new changelog exactly what commits contain breaking
41+
changes and so can application developers when they are deciding whether to update to a new version of
42+
AngularJS.
43+
44+
Features with non-breaking changes can also appear in the "patch" version, e.g. in version 1.6.3 there might
45+
be a feature that is not available in 1.6.2.
46+
47+
Finally, deprecation of features might also appear in "minor" version updates. That means the features
48+
will still work in this version, but sometimes must be activated specifically.
49+
50+
#### What is the version compatibility between AngularJS main and optional modules?
51+
52+
AngularJS code is separated into a main module ("angular"), and a few different optional modules
53+
("angular-animate", "angular-route" etc) that are dependant on the main module.
54+
When a new AngularJS version is released, all modules are updated to the new version.
55+
This means that the main module and the optional modules must always have the exact same version,
56+
down the patch number, otherwise your application might break.
57+
58+
Therefore you must always explicitly lock down your dependencies, for example in the package.json,
59+
the following ensures that "angular" and "angular-animate" are always updated to the same version.
60+
61+
```
62+
{
63+
"angular": "~1.6.0",
64+
"angular-animate": "~1.6.0"
65+
}
66+
```
67+
68+
#### How does AngularJS ensure code quality and guard against regressions?
3269

3370
When adding new code to branches of AngularJS, have a very stringent commit policy:
3471

@@ -37,8 +74,7 @@ tests must pass;
3774
- Commit messages must be written in a specific manner that allows us to parse them and extract the changes
3875
for release notes.
3976

40-
The AngularJS code base has a very large set of unit tests (over 4000) and end to end tests, which are pretty
41-
comprehensive. This means that a breaking change will require one or more tests to be changed to allow the
77+
The AngularJS code base has a very large set of unit tests and end-to-end tests. This means that a breaking change will require one or more tests to be changed to allow the
4278
tests to pass. So when a commit includes tests that are being removed or modified, this is a flag that the
4379
code might include a breaking change. When reviewing the commit we can then decide whether there really is
4480
a breaking change and if it is appropriate for the branch to which it is being merged. If so, then we
@@ -49,12 +85,6 @@ over 2000 applications using the test suites of these applications. This allows
4985
quickly before a release. We've had a pretty good experience with this setup. Only bugs that affect features
5086
not used at Google or without sufficient test coverage, have a chance of making it through.
5187

52-
Lastly, when we are making a release we generate updates to the changelog directly from the commits. This
53-
generated update contains a highlighted section that contains all the breaking changes that have been
54-
extracted from the commits. We can quickly see in the new changelog exactly what commits contain breaking
55-
changes and so can application developers when they are deciding whether to update to a new version of
56-
AngularJS.
57-
5888

5989
### Is AngularJS a templating system?
6090

0 commit comments

Comments
 (0)