From 85b889e6fbf5540ac720682a5db4592ab0919d4e Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Sun, 30 Jan 2022 14:59:57 +0100 Subject: [PATCH] build: update postinstall patch to account for benchmark macro changes (#44911) Updates the postinstall patch for the benchmark macro rule from dev-infra. We moved the ZoneJS setup to the bundler. This was necessary in order to switch away from the Go-based (windows-incompatible, m1-incompatible) concatjs devserver to a rather basic HTTP server (also provided by dev-infra now). PR Close #44911 --- packages/zone.js/dist/BUILD.bazel | 12 ++++++++++-- tools/postinstall-patches.js | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/zone.js/dist/BUILD.bazel b/packages/zone.js/dist/BUILD.bazel index e88b3e20166..85d995353e1 100644 --- a/packages/zone.js/dist/BUILD.bazel +++ b/packages/zone.js/dist/BUILD.bazel @@ -1,7 +1,8 @@ -package(default_visibility = ["//visibility:public"]) - +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") load("//packages/zone.js/dist:tools.bzl", "copy_es2015_to_dist", "copy_es5_to_dist") +package(default_visibility = ["//visibility:public"]) + copy_es2015_to_dist() copy_es5_to_dist() @@ -34,6 +35,13 @@ genrule( cmd = "cp $< $@", ) +js_library( + name = "zone", + srcs = [":zone.js"], + package_name = "zone.js/dist", + visibility = ["//modules/benchmarks:__subpackages__"], +) + filegroup( name = "dist_bundle_group", srcs = [ diff --git a/tools/postinstall-patches.js b/tools/postinstall-patches.js index 07aaefde346..f294825e8ae 100644 --- a/tools/postinstall-patches.js +++ b/tools/postinstall-patches.js @@ -81,7 +81,7 @@ captureNgDevPatches( [ ['@npm//@angular/platform-browser', '@angular//packages/platform-browser'], ['@npm//@angular/core', '@angular//packages/core'], - ['@npm//:node_modules/zone.js/bundles/zone.umd.js', '//packages/zone.js/bundles:zone.umd.js'], + ['@npm//zone.js', '//packages/zone.js/dist:zone'], [ 'load\\("@npm//@angular/bazel:index.bzl", "ng_module"\\)', 'load\("@angular//tools:defaults.bzl", "ng_module"\)'