Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: update @angular/bazel to latest #29937

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions src/bazel-tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that we now have useDefineForClassFields enabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for this? I remember it had an impact on the bundle size.

Copy link
Contributor Author

@alan-agius4 alan-agius4 Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It did increase the bundle size of on older Safari versions that are no longer supported.

However, this option does improve DCE in general.

For context: angular/angular#58297

"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
Expand Down
1 change: 1 addition & 0 deletions src/cdk-experimental/popover-edit/popover-edit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ describe('CDK Popover Edit', () => {
});
fixture = TestBed.createComponent<BaseTestComponent>(componentClass);
component = fixture.componentInstance;
component.renderData();
fixture.detectChanges();
tick(10);
fixture.detectChanges();
Expand Down
18 changes: 9 additions & 9 deletions tools/postinstall/patches/@angular+bazel+16.0.0-next.6.patch
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -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)
Expand All @@ -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(
Expand All @@ -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,
Expand All @@ -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 @@
Expand All @@ -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';
Expand All @@ -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;
}
Expand All @@ -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';
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading