Skip to content

Commit 65566b6

Browse files
authored
chore: Upgrade Angular (to 14) and related dependencies (#6066)
Upgrade Angular to version 14 and related dependencies appropriately. See: https://github.com/tensorflow/tensorboard/blob/master/DEVELOPMENT.md#updating-angular See: https://update.angular.io/?l=3&v=13.0-14.0 See: https://dev.to/ngrx/announcing-ngrx-v14-action-groups-componentstore-lifecycle-hooks-eslint-package-revamped-ngrx-component-and-more-18ck Highlights: * Upgrade the following set of dependencies: * `typescript`: 4.7.4 * `@angular/*` and `@angular-devkit`: 14.2.X * `@ngrx/*`: 14.3.X * `rxjs`: 7.5.7 * `zone.js` 0.12.0 * `ngx-color-picker`: 13.0.0 * Vulcanize.java had to be updated to be slightly less aggressive for finding sourceMappingUrls. It was not playing well with some JS being output by the build tooling. * A test had to be updated to find another theoretical XSS attack string now that 'data:text/html' is no longer considered a threat by the Angular library. * See: angular/angular#45860 * Impact on binaries and performance: * The '//tensorboard' tb_webapp_binary.js grows slightly from 2,559,890 bytes to 2,858,626 bytes. * The '//tensorboard' polymer binary has same size at 3,169,051 bytes. * The '//tensorboard:dev' tb_webapp_binary.js grows slightly from 7,005,529 bytes to 7,120,348 bytes.
1 parent 885cd99 commit 65566b6

File tree

5 files changed

+1033
-1451
lines changed

5 files changed

+1033
-1451
lines changed

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
},
2929
"homepage": "https://github.com/tensorflow/tensorboard#readme",
3030
"devDependencies": {
31-
"@angular-devkit/build-angular": "14.0.0-next.3",
31+
"@angular-devkit/build-angular": "^14.2.9",
3232
"@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#fb42478534df7d48ec23a6834fea94a776cb89a0",
33-
"@angular/cli": "^13.3.0",
34-
"@angular/compiler": "^13.3.0",
35-
"@angular/compiler-cli": "^13.3.0",
33+
"@angular/cli": "^14.2.9",
34+
"@angular/compiler": "14.2.11",
35+
"@angular/compiler-cli": "^14.2.11",
3636
"@babel/core": "^7.16.12",
3737
"@bazel/concatjs": "5.7.0",
3838
"@bazel/esbuild": "5.7.0",
@@ -61,22 +61,22 @@
6161
"prettier-plugin-organize-imports": "2.3.4",
6262
"requirejs": "^2.3.6",
6363
"tslib": "^2.3.0",
64-
"typescript": "4.5.4",
64+
"typescript": "4.7.4",
6565
"yarn-deduplicate": "^5.0.0"
6666
},
6767
"dependencies": {
68-
"@angular/animations": "^13.3.0",
69-
"@angular/cdk": "^13.3.0",
70-
"@angular/common": "^13.3.0",
71-
"@angular/core": "^13.3.0",
72-
"@angular/forms": "^13.3.0",
73-
"@angular/localize": "^13.3.0",
74-
"@angular/material": "^13.3.0",
75-
"@angular/platform-browser": "^13.3.0",
76-
"@angular/platform-browser-dynamic": "^13.3.0",
77-
"@angular/router": "^13.3.0",
78-
"@ngrx/effects": "^13.2.0",
79-
"@ngrx/store": "^13.2.0",
68+
"@angular/animations": "^14.2.11",
69+
"@angular/cdk": "^14.2.7",
70+
"@angular/common": "14.2.11",
71+
"@angular/core": "^14.2.11",
72+
"@angular/forms": "^14.2.11",
73+
"@angular/localize": "^14.2.11",
74+
"@angular/material": "^14.2.7",
75+
"@angular/platform-browser": "^14.2.11",
76+
"@angular/platform-browser-dynamic": "^14.2.11",
77+
"@angular/router": "^14.2.11",
78+
"@ngrx/effects": "^14.3.2",
79+
"@ngrx/store": "^14.3.2",
8080
"@polymer/decorators": "^3.0.0",
8181
"@polymer/iron-behaviors": "^3.0.1",
8282
"@polymer/iron-collapse": "^3.0.1",
@@ -123,14 +123,14 @@
123123
"marked": "^4.0.10",
124124
"monaco-editor-core": "^0.26.0",
125125
"monaco-languages": "^2.6.0",
126-
"ngx-color-picker": "12.0.1",
126+
"ngx-color-picker": "13.0.0",
127127
"numeric": "^1.2.6",
128128
"plottable": "^3.9.0",
129129
"postinstall-postinstall": "^2.1.0",
130-
"rxjs": "^7.4.0",
130+
"rxjs": "^7.5.7",
131131
"three": "~0.137.0",
132132
"umap-js": "^1.3.2",
133133
"web-animations-js": "^2.3.2",
134-
"zone.js": "^0.11.6"
134+
"zone.js": "^0.12.0"
135135
}
136136
}

tensorboard/java/org/tensorflow/tensorboard/vulcanize/Vulcanize.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
public final class Vulcanize {
6060

6161
private static final Pattern INLINE_SOURCE_MAP_PATTERN =
62-
Pattern.compile("//# sourceMappingURL=.*");
62+
Pattern.compile("[^\"]//# sourceMappingURL=.*[^\"]");
6363

6464
private static final Parser parser = Parser.htmlParser();
6565
private static final Map<Webpath, Path> webfiles = new HashMap<>();

tensorboard/webapp/notification_center/_views/notification_center_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ describe('notification center', () => {
204204
dateInMs: 1,
205205
title: 'test title',
206206
content: 'test content',
207-
fullNoteLink: "data:text/html,<script>alert('hi');</script>",
207+
fullNoteLink: "javascript:alert('hi')",
208208
},
209209
]);
210210
const fixture = TestBed.createComponent(NotificationCenterContainer);

tensorboard/webapp/util/ui_selectors_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
} from '../experiments/store/testing';
2727
import {
2828
buildFeatureFlag,
29-
buildFeatureFlagState as buildFeatureFlagState,
29+
buildFeatureFlagState,
3030
buildState as buildStateFromFeatureFlagState,
3131
} from '../feature_flag/store/testing';
3232
import {

0 commit comments

Comments
 (0)