You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Motivation for features / changes
Upgrades Angular 20 → 21 (with matching NgRx, Material, TypeScript,
Node.js, and Bazel-toolchain updates), and fixes the karma test
regressions that surfaced from that upgrade. Following official steps
https://angular.dev/update-guide?v=20.0-21.0&l=3
## Technical description of changes
1. Upgraded `@angular/* core, cdk, material, forms, router, animations,
localize, platform-browser(-dynamic), cli, compiler, compiler-cli,
build, build-angular` and @ngrx/* (store, effects) from 20 to 21 and
TypeScript 5.8.3 to 5.9.3.
2. Upgrade `Node.js 22.23.1 to 24.18.0` in WORKSPACE, updated the pinned
GitHub Actions (checkout, setup-python, setup-node, cache,
upload-artifact) in ci.yml to match and avoid CI checks errors.
3. `tsconfig.json`: switch moduleResolution from node to bundler,
required by Angular 21, disable `@bazel/tsetse` lint rules that crash
under TS 5.9 against concatjs's harcoded tsutils@3.21.0.
4. Patch `@bazel/concatjs` to map each Angular/CDK/NgRx package new
folder structure: types/*.d.ts layout, so Bazel's TS rules can still
resolve type declarations.
5. `app_module.ts`: explicitly add provideZoneChangeDetection(), no
longer implicit in Angular 21.
6. `column_selector_component.ts`: drop the unused ['$event'] arg from
three @HostListener decorators.
7. Test fixes for Angular 21 regressions:
- testing/initialize_testbed.ts, register provideZoneChangeDetection()
globally for TestBed, working around a confirmed Angular 21 regression
(angular/angular-cli#32047)
- header_test.ts, scalar_card_test.ts, scalar_card_line_chart_test.ts:
update hardcoded date-string assertions for DatePipe's new U+202F,
before AM/PM for Angular 21 updated CLDR data.
- testing/material.ts, filter_input_test.ts: query document.body instead
of OverlayContainer.getContainerElement() for autocomplete options since
Angular Material's overlay panel now renders in a separate
cdk-overlay-connected-position-bounding-box.
## Screenshots of UI changes (or N/A)
## Detailed steps to verify changes work correctly (as executed by you)
## Alternate designs / implementations considered (or N/A)
Updated patch from 5.7.0 to 5.8.1. This version already includes the TypeScript 5.x fix and Chrome sandbox fix that we had to patch manually in 5.7.0.
24
-
Added typescript as a direct dependency because the Bazel sandbox can't find it otherwise.
30
+
Three independent changes:
31
+
32
+
1.`compilation.bzl` stops declaring `*.ngfactory.*` and `*.ngsummary.*` outputs
33
+
when `use_angular_plugin = True`. Ivy no longer emits those files, so Bazel
34
+
failed with "declared output was not created".
35
+
2.`tsconfig.bzl` adds `module_roots` entries mapping each Angular, Material,
36
+
CDK and NgRx entry point to its `types/<name>.d.ts` file. Starting with
37
+
Angular 21, APF packaging exposes type definitions only through
38
+
`package.json``"exports"`, which the Bazel `node_modules` path mapping
39
+
cannot resolve.
40
+
3.`package.json` adds `typescript` as a direct dependency because the Bazel
41
+
sandbox cannot find it otherwise.
42
+
43
+
Note that putting the mappings from (2) in the workspace `tsconfig.json` does not
44
+
work: the tsconfig Bazel generates does `extends` the workspace one, but it also
45
+
writes its own `compilerOptions.paths`, and TypeScript replaces `paths` wholesale
46
+
instead of merging it.
25
47
26
48
Why 5.8.1 and not 6.x: rules_nodejs 6.x removed most of the build rules we depend on (concatjs, esbuild, typescript, etc.) and moved them to a separate project (rules_js). This effort will be done in future upgrades.
27
49
50
+
Removal is planned. `@bazel/concatjs` 5.8.1 is the last published version and
51
+
rules_nodejs is archived, so no upstream fix is coming. The near-term plan is to
52
+
move the `tsconfig.bzl` mappings and the `compilation.bzl` outputs override into
53
+
a TensorBoard-owned `ts_library` rule under `tensorboard/defs`, which reuses
54
+
concatjs `compile_ts` without patching it. See the `TODO` in the `tsconfig.bzl`
0 commit comments