Skip to content

Commit

Permalink
chore: Upgrade Angular (to 14) and related dependencies (#6066)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bmd3k authored Nov 28, 2022
1 parent 885cd99 commit 65566b6
Show file tree
Hide file tree
Showing 5 changed files with 1,033 additions and 1,451 deletions.
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
},
"homepage": "https://github.com/tensorflow/tensorboard#readme",
"devDependencies": {
"@angular-devkit/build-angular": "14.0.0-next.3",
"@angular-devkit/build-angular": "^14.2.9",
"@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#fb42478534df7d48ec23a6834fea94a776cb89a0",
"@angular/cli": "^13.3.0",
"@angular/compiler": "^13.3.0",
"@angular/compiler-cli": "^13.3.0",
"@angular/cli": "^14.2.9",
"@angular/compiler": "14.2.11",
"@angular/compiler-cli": "^14.2.11",
"@babel/core": "^7.16.12",
"@bazel/concatjs": "5.7.0",
"@bazel/esbuild": "5.7.0",
Expand Down Expand Up @@ -61,22 +61,22 @@
"prettier-plugin-organize-imports": "2.3.4",
"requirejs": "^2.3.6",
"tslib": "^2.3.0",
"typescript": "4.5.4",
"typescript": "4.7.4",
"yarn-deduplicate": "^5.0.0"
},
"dependencies": {
"@angular/animations": "^13.3.0",
"@angular/cdk": "^13.3.0",
"@angular/common": "^13.3.0",
"@angular/core": "^13.3.0",
"@angular/forms": "^13.3.0",
"@angular/localize": "^13.3.0",
"@angular/material": "^13.3.0",
"@angular/platform-browser": "^13.3.0",
"@angular/platform-browser-dynamic": "^13.3.0",
"@angular/router": "^13.3.0",
"@ngrx/effects": "^13.2.0",
"@ngrx/store": "^13.2.0",
"@angular/animations": "^14.2.11",
"@angular/cdk": "^14.2.7",
"@angular/common": "14.2.11",
"@angular/core": "^14.2.11",
"@angular/forms": "^14.2.11",
"@angular/localize": "^14.2.11",
"@angular/material": "^14.2.7",
"@angular/platform-browser": "^14.2.11",
"@angular/platform-browser-dynamic": "^14.2.11",
"@angular/router": "^14.2.11",
"@ngrx/effects": "^14.3.2",
"@ngrx/store": "^14.3.2",
"@polymer/decorators": "^3.0.0",
"@polymer/iron-behaviors": "^3.0.1",
"@polymer/iron-collapse": "^3.0.1",
Expand Down Expand Up @@ -123,14 +123,14 @@
"marked": "^4.0.10",
"monaco-editor-core": "^0.26.0",
"monaco-languages": "^2.6.0",
"ngx-color-picker": "12.0.1",
"ngx-color-picker": "13.0.0",
"numeric": "^1.2.6",
"plottable": "^3.9.0",
"postinstall-postinstall": "^2.1.0",
"rxjs": "^7.4.0",
"rxjs": "^7.5.7",
"three": "~0.137.0",
"umap-js": "^1.3.2",
"web-animations-js": "^2.3.2",
"zone.js": "^0.11.6"
"zone.js": "^0.12.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
public final class Vulcanize {

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

private static final Parser parser = Parser.htmlParser();
private static final Map<Webpath, Path> webfiles = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ describe('notification center', () => {
dateInMs: 1,
title: 'test title',
content: 'test content',
fullNoteLink: "data:text/html,<script>alert('hi');</script>",
fullNoteLink: "javascript:alert('hi')",
},
]);
const fixture = TestBed.createComponent(NotificationCenterContainer);
Expand Down
2 changes: 1 addition & 1 deletion tensorboard/webapp/util/ui_selectors_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
} from '../experiments/store/testing';
import {
buildFeatureFlag,
buildFeatureFlagState as buildFeatureFlagState,
buildFeatureFlagState,
buildState as buildStateFromFeatureFlagState,
} from '../feature_flag/store/testing';
import {
Expand Down
Loading

0 comments on commit 65566b6

Please sign in to comment.