From e35e92bc726ce9637a182876ecb6422e6f10f71c Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 29 Oct 2024 18:05:37 +0100 Subject: [PATCH] build: update `@angular/bazel` to latest (#29937) --- package.json | 2 +- src/bazel-tsconfig-build.json | 2 -- .../popover-edit/popover-edit.spec.ts | 1 + .../patches/@angular+bazel+16.0.0-next.6.patch | 18 +++++++++--------- yarn.lock | 6 +++--- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 79e6b977c08c..40420cc0eb5d 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "@angular-devkit/build-angular": "^19.0.0-next.10", "@angular-devkit/core": "^19.0.0-next.10", "@angular-devkit/schematics": "^19.0.0-next.10", - "@angular/bazel": "https://github.com/angular/bazel-builds.git#9e6140d1eef8ddf7113d00738f603e9cc3c310f1", + "@angular/bazel": "https://github.com/angular/bazel-builds.git#d9a8ea4f9e62cb475eff89519426a38631b2704d", "@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#74e0e7b090c6e16056290836b2d936ca7820b86f", "@angular/build": "^19.0.0-next.10", "@angular/cli": "^19.0.0-next.10", diff --git a/src/bazel-tsconfig-build.json b/src/bazel-tsconfig-build.json index ea425fb5bc38..f8cae066f05a 100644 --- a/src/bazel-tsconfig-build.json +++ b/src/bazel-tsconfig-build.json @@ -21,8 +21,6 @@ "importHelpers": true, "strictBindCallApply": true, "esModuleInterop": true, - // Keep the below in sync with https://github.com/angular/angular/blob/f9b821f07d8dba57a6a7e5fc127dc096247424aa/packages/bazel/src/ng_module/ng_module.bzl#L214 - "useDefineForClassFields": false, "newLine": "lf", // Bazel either uses "umd" or "esnext". We replicate this here for IDE support. // https://github.com/bazelbuild/rules_typescript/blob/master/internal/common/tsconfig.bzl#L199 diff --git a/src/cdk-experimental/popover-edit/popover-edit.spec.ts b/src/cdk-experimental/popover-edit/popover-edit.spec.ts index 03ee73cd6fa0..6ad6476cdde2 100644 --- a/src/cdk-experimental/popover-edit/popover-edit.spec.ts +++ b/src/cdk-experimental/popover-edit/popover-edit.spec.ts @@ -403,6 +403,7 @@ describe('CDK Popover Edit', () => { }); fixture = TestBed.createComponent(componentClass); component = fixture.componentInstance; + component.renderData(); fixture.detectChanges(); tick(10); fixture.detectChanges(); diff --git a/tools/postinstall/patches/@angular+bazel+16.0.0-next.6.patch b/tools/postinstall/patches/@angular+bazel+16.0.0-next.6.patch index 75d5af2208d6..c253e05ab2dd 100644 --- a/tools/postinstall/patches/@angular+bazel+16.0.0-next.6.patch +++ b/tools/postinstall/patches/@angular+bazel+16.0.0-next.6.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@angular/bazel/src/ng_module/ng_module.bzl b/node_modules/@angular/bazel/src/ng_module/ng_module.bzl -index 99d7f6d..3ea60ea 100755 +index 5e82bcb..3c239f8 100755 --- a/node_modules/@angular/bazel/src/ng_module/ng_module.bzl +++ b/node_modules/@angular/bazel/src/ng_module/ng_module.bzl @@ -18,6 +18,7 @@ load( @@ -22,7 +22,7 @@ index 99d7f6d..3ea60ea 100755 if not ctx.attr.type_check and ctx.attr.strict_templates: fail("Cannot set type_check = False and strict_templates = True for ng_module()") -@@ -359,11 +360,11 @@ def _compile_action( +@@ -355,11 +356,11 @@ def _compile_action( def _prodmode_compile_action(ctx, inputs, outputs, tsconfig_file, node_opts): outs = _expected_outs(ctx) @@ -36,7 +36,7 @@ index 99d7f6d..3ea60ea 100755 _compile_action(ctx, inputs, compile_action_outputs, tsconfig_file, node_opts, "devmode") # Note: We need to define `label` and `srcs_files` as `tsc_wrapped` passes -@@ -417,9 +418,13 @@ def _ng_module_impl(ctx): +@@ -413,9 +414,13 @@ def _ng_module_impl(ctx): # and issue https://github.com/bazelbuild/rules_nodejs/issues/57 for more details. ts_providers["providers"].extend([ js_module_info( @@ -51,7 +51,7 @@ index 99d7f6d..3ea60ea 100755 js_ecma_script_module_info( sources = ts_providers["typescript"]["es6_sources"], deps = ctx.attr.deps, -@@ -435,7 +440,7 @@ def _ng_module_impl(ctx): +@@ -431,7 +436,7 @@ def _ng_module_impl(ctx): package_name = ctx.attr.package_name, package_path = ctx.attr.package_path, path = path, @@ -61,7 +61,7 @@ index 99d7f6d..3ea60ea 100755 return ts_providers_dict_to_struct(ts_providers) diff --git a/node_modules/@angular/bazel/src/ng_package/packager.mjs b/node_modules/@angular/bazel/src/ng_package/packager.mjs -index 12d5f0c..8868e27 100755 +index 7184fd9..ef3e508 100755 --- a/node_modules/@angular/bazel/src/ng_package/packager.mjs +++ b/node_modules/@angular/bazel/src/ng_package/packager.mjs @@ -7,7 +7,7 @@ @@ -74,7 +74,7 @@ index 12d5f0c..8868e27 100755 * List of known `package.json` fields which provide information about * supported package formats and their associated entry paths. diff --git a/node_modules/@angular/bazel/src/ngc-wrapped/index.mjs b/node_modules/@angular/bazel/src/ngc-wrapped/index.mjs -index 09deff8..00d24be 100755 +index def2972..3de33ba 100755 --- a/node_modules/@angular/bazel/src/ngc-wrapped/index.mjs +++ b/node_modules/@angular/bazel/src/ngc-wrapped/index.mjs @@ -12,7 +12,7 @@ import tscw from '@bazel/concatjs/internal/tsc_wrapped/index.js'; @@ -86,7 +86,7 @@ index 09deff8..00d24be 100755 // FIXME: we should be able to add the assets to the tsconfig so FileLoader // knows about them const NGC_ASSETS = /\.(css|html)$/; -@@ -348,6 +348,12 @@ function gatherDiagnosticsForInputsOnly(options, bazelOpts, ngProgram) { +@@ -349,6 +349,12 @@ function gatherDiagnosticsForInputsOnly(options, bazelOpts, ngProgram) { } return diagnostics; } @@ -100,12 +100,12 @@ index 09deff8..00d24be 100755 * @deprecated * Kept here just for compatibility with 1P tools. To be removed soon after 1P update. diff --git a/node_modules/@angular/bazel/src/ngc-wrapped/ngc-wrapped-main.mjs b/node_modules/@angular/bazel/src/ngc-wrapped/ngc-wrapped-main.mjs -index ccf82d2..daaa783 100755 +index 8efba56..d420348 100755 --- a/node_modules/@angular/bazel/src/ngc-wrapped/ngc-wrapped-main.mjs +++ b/node_modules/@angular/bazel/src/ngc-wrapped/ngc-wrapped-main.mjs @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license + * found in the LICENSE file at https://angular.dev/license */ -import { main } from './index'; +import { main } from './index.mjs'; diff --git a/yarn.lock b/yarn.lock index 5c34449c83f4..69abf8117b9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -139,9 +139,9 @@ dependencies: tslib "^2.3.0" -"@angular/bazel@https://github.com/angular/bazel-builds.git#9e6140d1eef8ddf7113d00738f603e9cc3c310f1": - version "19.0.0-next.1" - resolved "https://github.com/angular/bazel-builds.git#9e6140d1eef8ddf7113d00738f603e9cc3c310f1" +"@angular/bazel@https://github.com/angular/bazel-builds.git#d9a8ea4f9e62cb475eff89519426a38631b2704d": + version "19.1.0-next.0" + resolved "https://github.com/angular/bazel-builds.git#d9a8ea4f9e62cb475eff89519426a38631b2704d" dependencies: "@microsoft/api-extractor" "^7.24.2" magic-string "^0.30.0"