Skip to content

Commit

Permalink
Revert "chore: Upgrade Angular (to 13) and related dependencies (tens…
Browse files Browse the repository at this point in the history
…orflow#6063)"

This reverts commit 471f1f2. It breaks
the sync with the internal repo.
  • Loading branch information
bmd3k committed Nov 23, 2022
1 parent a59e6e9 commit 3f3ff49
Show file tree
Hide file tree
Showing 6 changed files with 302 additions and 344 deletions.
4 changes: 4 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Use the Angular Ivy compiler
# See https://github.com/angular/angular/blob/master/docs/BAZEL.md#various-flags-used-for-tests
build --define=angular_ivy_enabled=True

common --experimental_repo_remote_exec # from TensorFlow

# Use C++ backing implementations for Python proto parsing and deserialization,
Expand Down
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"doc": "docs"
},
"scripts": {
"postinstall": "patch-package",
"postinstall": "ngcc && patch-package",
"build": "bazel build //...",
"test": "ibazel test //...",
"lint": "prettier --check 'tensorboard/**/*.'{css,html,js,ts,scss} .github/**/*.yml",
Expand All @@ -30,9 +30,9 @@
"devDependencies": {
"@angular-devkit/build-angular": "14.0.0-next.3",
"@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": "^12.2.0",
"@angular/compiler": "^12.2.0",
"@angular/compiler-cli": "^12.2.0",
"@babel/core": "^7.16.12",
"@bazel/concatjs": "5.7.0",
"@bazel/esbuild": "5.7.0",
Expand Down Expand Up @@ -65,18 +65,18 @@
"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": "^12.2.0",
"@angular/cdk": "^12.2.0",
"@angular/common": "^12.2.0",
"@angular/core": "^12.2.0",
"@angular/forms": "^12.2.0",
"@angular/localize": "^12.2.0",
"@angular/material": "^12.2.3",
"@angular/platform-browser": "^12.2.0",
"@angular/platform-browser-dynamic": "^12.2.0",
"@angular/router": "^12.2.0",
"@ngrx/effects": "^12.3.0",
"@ngrx/store": "^12.3.0",
"@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": "^11.0.0",
"numeric": "^1.2.6",
"plottable": "^3.9.0",
"postinstall-postinstall": "^2.1.0",
"rxjs": "^7.4.0",
"rxjs": "^7.3.0",
"three": "~0.137.0",
"umap-js": "^1.3.2",
"web-animations-js": "^2.3.2",
"zone.js": "^0.11.6"
"zone.js": "^0.11.4"
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
diff --git a/node_modules/@angular/build-tooling/bazel/app-bundling/esbuild.config-tmpl.mjs b/node_modules/@angular/build-tooling/bazel/app-bundling/esbuild.config-tmpl.mjs
index 618bbc5..05a112f 100755
--- a/node_modules/@angular/build-tooling/bazel/app-bundling/esbuild.config-tmpl.mjs
+++ b/node_modules/@angular/build-tooling/bazel/app-bundling/esbuild.config-tmpl.mjs
@@ -9,9 +9,18 @@
import * as path from 'path';

import {createEsbuildAngularOptimizePlugin} from '@angular/build-tooling/shared-scripts/angular-optimization/esbuild-plugin.mjs';
-import {createEs2015LinkerPlugin} from '@angular/compiler-cli/linker/babel';
-import {ConsoleLogger, NodeJSFileSystem, LogLevel} from '@angular/compiler-cli';
-import {GLOBAL_DEFS_FOR_TERSER_WITH_AOT} from '@angular/compiler-cli/private/tooling';
+// For TensorBoard: Patch the esbuild config template so that imports are
+// grabbed from the correct places. This is just the consequence of some
+// skew using pre-13.X @angular/compiler-cli binaries. This should be resolved
+// once we upgrade to Angular 13+.
+//import {createEs2015LinkerPlugin} from '@angular/compiler-cli/linker/babel';
+import {createEs2015LinkerPlugin} from '@angular/compiler-cli/linker/babel/index.js';
+//import {ConsoleLogger, NodeJSFileSystem, LogLevel} from '@angular/compiler-cli';
+import {NodeJSFileSystem} from '@angular/compiler-cli/src/ngtsc/file_system/src/node_js_file_system.js';
+import {LogLevel} from '@angular/compiler-cli/src/ngtsc/logging/index.js';
+import {ConsoleLogger} from '@angular/compiler-cli/src/ngtsc/logging/src/console_logger.js';
+//import {GLOBAL_DEFS_FOR_TERSER_WITH_AOT} from '@angular/compiler-cli/private/tooling';
+import {GLOBAL_DEFS_FOR_TERSER_WITH_AOT} from '@angular/compiler-cli/src/tooling.js';

/** Root path pointing to the app bundle source entry-point file. */
const entryPointSourceRootPath = path.normalize(`TMPL_ENTRY_POINT_ROOTPATH`);
diff --git a/node_modules/@angular/build-tooling/shared-scripts/angular-optimization/esbuild-plugin.mjs b/node_modules/@angular/build-tooling/shared-scripts/angular-optimization/esbuild-plugin.mjs
index 57cd2b9..2e5eaf1 100755
--- a/node_modules/@angular/build-tooling/shared-scripts/angular-optimization/esbuild-plugin.mjs
Expand Down
1 change: 0 additions & 1 deletion tensorboard/webapp/dev_assets/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ tf_ng_module(
],
deps = [
"//tensorboard/webapp:ng_main",
"@npm//@angular/compiler",
"@npm//@angular/localize",
],
)
Expand Down
1 change: 0 additions & 1 deletion tensorboard/webapp/dev_assets/main_dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
import '@angular/compiler';
import '../bootstrap';
Loading

0 comments on commit 3f3ff49

Please sign in to comment.