Angular upgrade from version 16 to 17#7085
Conversation
… packages 5.7.0 to 5.8.1
… and restore explicit node 18.20.8 registration since 5.8.1 doesn't ship node 18.x, also patch concatjs to declare typescript as a dependency for Bazel sandbox resolution.
…built-ins as external in browser bundle
| }); | ||
|
|
||
| it('closes the snackbar on click', async () => { | ||
| it('closes the snackbar on click', fakeAsync(() => { |
There was a problem hiding this comment.
Replaced async/await with fakeAsync/flush(). Angular Material 17 no longer triggers immediate change detection when dismissing the snackbar. Since the snackbar lives in an overlay outside the test component, fixture.detectChanges() doesn't reach it. flush() forces all pending tasks to complete globally, including the overlay
| @@ -9,24 +9,24 @@ index d5a8645..4b57378 100755 | |||
| + "@npm//@babel/helper-split-export-declaration", | |||
There was a problem hiding this comment.
Updated for the Angular 17 version of build-tooling, adding the missing Babel dependency
| + {[launcher]: {base: browser, flags: ['--no-sandbox', ...additionalArgs]}}; | ||
| conf.browsers.push(launcher); | ||
| } | ||
| } |
There was a problem hiding this comment.
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
| "source-map-support": "0.5.9", | ||
| - "tsutils": "3.21.0" | ||
| + "tsutils": "3.21.0", | ||
| + "typescript": "5.2.2" |
There was a problem hiding this comment.
Added typescript as a direct dependency because the Bazel sandbox can't find it otherwise.
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
| "buffer", | ||
| "punycode", | ||
| "string_decoder", | ||
| ], |
There was a problem hiding this comment.
This vz_projector plugin depends on @tensorflow/tfjs library.
tfjs is designed to run in the browser and in Node.js server, so it includes node-fetch for the Node.js side.
When esbuild bundles everything for the browser, it tries to include node-fetch and fails because it can't resolve Node.js built-ins. The external list just tells esbuild to ignore those server only packages since they'll never be used in the browser.
|
|
||
|
|
||
| exceptions = frozenset([]) | ||
| # @TODO: Remove this exception when the patch file is no longer needed. |
There was a problem hiding this comment.
The format we use is usually one of:
# TODO(<username or bug>): blah, blah...
OR
# TODO: <username or bug> - blah, blah...
Let's follow this format.
Motivation for features / changes
This PR is the second step in a planned major Angular upgrade cycle, where each major version will be delivered in a separate PR, incrementally progressing until the project reaches Angular 21. This specific PR upgrades TensorBoard from Angular 16 to Angular 17
Technical description of changes
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)