Skip to content

Commit f0630c2

Browse files
authored
Add documentation for upgrading Angular dependencies. (#6067)
1 parent bdaad84 commit f0630c2

File tree

1 file changed

+51
-2
lines changed

1 file changed

+51
-2
lines changed

DEVELOPMENT.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ to be edited by hand.
247247
4. Rebuild and test TensorBoard to make sure it works:
248248
* `rm -rf node_modules; bazel clean --expunge; yarn`
249249
* `bazel run tensorboard --logdir <your favorite logdir>`
250-
* `bazel test --test_output=errors tensorboard/webapp/...`
250+
* `bazel test --test_output=errors tensorboard/webapp/... tensorboard/components/... tensorboard/plugins/...`
251251
252252
## Updating rules_nodejs
253253
@@ -293,7 +293,7 @@ Sample upgrade: https://github.com/tensorflow/tensorboard/pull/5977
293293
6. Attempt to rebuild and test TensorBoard to make sure it works:
294294
* `rm -rf node_modules; bazel clean --expunge; yarn`
295295
* `bazel run tensorboard --logdir <your favorite logdir>`
296-
* `bazel test --test_output=errors tensorboard/webapp/...`
296+
* `bazel test --test_output=errors tensorboard/webapp/... tensorboard/components/... tensorboard/plugins/...`
297297
298298
7. The first attempt to rebuild and test TensorBoard rarely works. Investigate
299299
the problems and fix them. At this point, some of the special instructions in
@@ -302,3 +302,52 @@ Sample upgrade: https://github.com/tensorflow/tensorboard/pull/5977
302302
8. Generate mirrors for the new versions of rules_nodejs and rules_sass and
303303
update the WORKSPACE file with the new "http://mirror.tensorflow.org/" URLs.
304304
Googlers, see information at go/tensorboard-tf-mirror.
305+
306+
## Updating Angular
307+
308+
Angular is the UI framework we use for most new UI functionality. A new major
309+
version of Angular is released every 6 months and, so, we try to upgrade our
310+
Angular dependency at least twice a year.
311+
312+
Helpful documents, especially for determining correct versions of dependencies:
313+
* Angular upgrade docs at https://update.angular.io/
314+
* For example: [Angular 13 to 14 upgrade](https://update.angular.io/?l=3&v=13.0-14.0 )
315+
* Ngrx upgrade docs at https://dev.to/ngrx
316+
* For example, [Ngrx 14 upgrade announcement](https://dev.to/ngrx/announcing-ngrx-v14-action-groups-componentstore-lifecycle-hooks-eslint-package-revamped-ngrx-component-and-more-18ck)
317+
* Npm website at https://www.npmjs.com/
318+
* For example, [lookup the available versions of `@angular/core`](https://www.npmjs.com/package/@angular/core)
319+
320+
When upgrading Angular we generally must consider upgrading the following
321+
dependencies listed in `package.json`. They should be upgraded using
322+
`yarn upgrade` as described
323+
[in this section](#adding-updating-or-removing-frontend-dependencies).
324+
325+
* All `@angular/*` and `@angular-devkit/*` dependencies.
326+
* Except `@angular/build-tooling`, for which we currently don't have any
327+
upgrade policy/guidance. It is acceptable to leave this alone unless you
328+
discover a need to upgrade it.
329+
* Most of these should be upgraded to the ~same version. The easiest is to
330+
upgrade to the latest version for each subdependency (within the major
331+
series being upgraded to).
332+
* `typescript`
333+
* The Angular and Ngrx upgrade documents will explain which version is
334+
expected.
335+
* All `@ngrx/*` dependencies.
336+
* Ngrx should be on the same major version as Angular.
337+
* `rxjs`
338+
* The Ngrx upgrade documentation will explain which version of rxjs to
339+
upgrade to.
340+
* `zone.js`
341+
* This is generally not well documented. You can attempt to upgrade to
342+
the latest version but sometimes you have to guess at the most recent
343+
version that is compatible with the version of Angular.
344+
* `ngx-color-picker`
345+
* Similarly, the latest version might be fine but you also might have to guess
346+
at the most recent version that is compatible with the version fo Angular.
347+
348+
Sample upgrades:
349+
* Angular 13: https://github.com/tensorflow/tensorboard/pull/6063.
350+
* Angular 14: https://github.com/tensorflow/tensorboard/pull/6066.
351+
352+
The builds and tests are unlikely to work on the first try and you will have to
353+
investigate and fix breakages due to changes in behavior.

0 commit comments

Comments
 (0)