From cfca30c7578a58cdb6e018c5b38dc444660cbb80 Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Wed, 19 Mar 2025 10:01:04 +0000 Subject: [PATCH 01/15] docs: update ssr docs to use `withRoutes` API (#60465) PR Close #60465 --- .../examples/ssr/src/app/app.config.server.ts | 5 ++--- adev/src/content/guide/ssr.md | 14 ++++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/adev/src/content/examples/ssr/src/app/app.config.server.ts b/adev/src/content/examples/ssr/src/app/app.config.server.ts index 9a4aca219d49..58b5b5ec753b 100644 --- a/adev/src/content/examples/ssr/src/app/app.config.server.ts +++ b/adev/src/content/examples/ssr/src/app/app.config.server.ts @@ -1,11 +1,10 @@ import {mergeApplicationConfig, ApplicationConfig} from '@angular/core'; -import {provideServerRendering} from '@angular/platform-server'; -import {provideServerRouting} from '@angular/ssr'; +import {provideServerRendering, withRoutes} from '@angular/ssr'; import {appConfig} from './app.config'; import {serverRoutes} from './app.routes.server'; const serverConfig: ApplicationConfig = { - providers: [provideServerRendering(), provideServerRouting(serverRoutes)], + providers: [provideServerRendering(withRoutes(serverRoutes))], }; export const config = mergeApplicationConfig(appConfig, serverConfig); diff --git a/adev/src/content/guide/ssr.md b/adev/src/content/guide/ssr.md index 38f5eac28fdc..8ea021c08a90 100644 --- a/adev/src/content/guide/ssr.md +++ b/adev/src/content/guide/ssr.md @@ -51,17 +51,16 @@ export const serverRoutes: ServerRoute[] = [ ]; ``` -You can add this config to your application using the [`provideServerRouting`](api/ssr/provideServerRouting 'API reference') function. +You can add this config to your application with [`provideServerRendering`](api/ssr/provideServerRendering 'API reference') using the [`withRoutes`](api/ssr/withRoutes 'API reference') function: ```typescript -import { provideServerRouting } from '@angular/ssr'; +import { provideServerRendering, withRoutes } from '@angular/ssr'; import { serverRoutes } from './app.routes.server'; // app.config.server.ts const serverConfig: ApplicationConfig = { providers: [ - provideServerRendering(), - provideServerRouting(serverRoutes), + provideServerRendering(withRoutes(serverRoutes)), // ... other providers ... ] }; @@ -70,12 +69,15 @@ const serverConfig: ApplicationConfig = { When using the [App shell pattern](ecosystem/service-workers/app-shell), you must specify the component to be used as the app shell for client-side rendered routes. To do this, use the [`withAppShell`](api/ssr/withAppShell 'API reference') fetaure: ```typescript -import { provideServerRouting, withAppShell } from '@angular/ssr'; +import { provideServerRendering, withRoutes, withAppShell } from '@angular/ssr'; import { AppShellComponent } from './app-shell/app-shell.component'; const serverConfig: ApplicationConfig = { providers: [ - provideServerRouting(serverRoutes, withAppShell(AppShellComponent)), + provideServerRendering( + withRoutes(serverRoutes), + withAppShell(AppShellComponent), + ), // ... other providers ... ] }; From ceb7a9346fb3f482e44373ee323a24709ee6a96c Mon Sep 17 00:00:00 2001 From: Angular Robot Date: Wed, 19 Mar 2025 18:21:10 +0000 Subject: [PATCH 02/15] build: update actions/upload-artifact digest to ea165f8 (#60466) See associated pull request for more information. PR Close #60466 --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index ad99cb492c57..e473e8156a0d 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -78,7 +78,7 @@ jobs: run: yarn test:ci - name: Upload GRPC logs (for debugging of RBE issues) if: always() - uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: path: /tmp/rbe-grpc.log retention-days: 1 From 2637a0cdad97b5a5c9a8223f80320c33e6ebe9a3 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 20 Mar 2025 11:37:23 +0100 Subject: [PATCH 03/15] build: enable strict templates and type checking of host bindings (#60481) Enables strict templates and type checking of host bindings against our own code. PR Close #60481 --- modules/tsconfig.json | 6 ++++-- packages/bazel/test/ngc-wrapped/ivy_enabled/BUILD.bazel | 1 - packages/core/test/playground/zone-signal-input/BUILD.bazel | 1 - packages/tsconfig-build.json | 4 ++++ packages/tsconfig.json | 4 ++++ tools/defaults.bzl | 1 + 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/tsconfig.json b/modules/tsconfig.json index a8968f71b1ca..06843a9c265c 100644 --- a/modules/tsconfig.json +++ b/modules/tsconfig.json @@ -20,7 +20,7 @@ "skipDefaultLibCheck": true, "skipLibCheck": true, "target": "es5", - "types": ["angular"], + "types": ["angular"] }, "exclude": [ "payload_tests", @@ -28,6 +28,8 @@ "benchmarks/" ], "angularCompilerOptions": { - "skipTemplateCodegen": true + "strictTemplates": true, + "skipTemplateCodegen": true, + "typeCheckHostBindings": true } } diff --git a/packages/bazel/test/ngc-wrapped/ivy_enabled/BUILD.bazel b/packages/bazel/test/ngc-wrapped/ivy_enabled/BUILD.bazel index b64202747f92..baff2d7e1ef4 100644 --- a/packages/bazel/test/ngc-wrapped/ivy_enabled/BUILD.bazel +++ b/packages/bazel/test/ngc-wrapped/ivy_enabled/BUILD.bazel @@ -28,7 +28,6 @@ jasmine_node_test( ng_module( name = "test_module_warnings_lib", srcs = ["test_module_warnings.ts"], - strict_templates = True, tags = [], deps = ["//packages/core"], ) diff --git a/packages/core/test/playground/zone-signal-input/BUILD.bazel b/packages/core/test/playground/zone-signal-input/BUILD.bazel index ed86afcacb08..c50d0a895188 100644 --- a/packages/core/test/playground/zone-signal-input/BUILD.bazel +++ b/packages/core/test/playground/zone-signal-input/BUILD.bazel @@ -3,7 +3,6 @@ load("//tools:defaults.bzl", "app_bundle", "http_server", "ng_module") ng_module( name = "test_lib", srcs = ["index.ts"], - strict_templates = True, tags = ["no-cache"], deps = [ "//packages/core", diff --git a/packages/tsconfig-build.json b/packages/tsconfig-build.json index 3ce102aa4e57..64d405252cd0 100644 --- a/packages/tsconfig-build.json +++ b/packages/tsconfig-build.json @@ -33,5 +33,9 @@ }, "bazelOptions": { "suppressTsconfigOverrideWarnings": true + }, + "angularCompilerOptions": { + "strictTemplates": true, + "typeCheckHostBindings": true } } diff --git a/packages/tsconfig.json b/packages/tsconfig.json index 342bf0fbef0a..61360b5fe15f 100644 --- a/packages/tsconfig.json +++ b/packages/tsconfig.json @@ -37,6 +37,10 @@ "bazelOptions": { "suppressTsconfigOverrideWarnings": true }, + "angularCompilerOptions": { + "strictTemplates": true, + "typeCheckHostBindings": true + }, "exclude": [ "common/locales", "compiler-cli/integrationtest", diff --git a/tools/defaults.bzl b/tools/defaults.bzl index 1c510a0e826c..4e15ac8b50fa 100644 --- a/tools/defaults.bzl +++ b/tools/defaults.bzl @@ -184,6 +184,7 @@ def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps deps = deps, compiler = _INTERNAL_NG_MODULE_COMPILER, ng_xi18n = _INTERNAL_NG_MODULE_XI18N, + strict_templates = True, # `module_name` is used for AMD module names within emitted JavaScript files. module_name = module_name, # `package_name` can be set to allow for the Bazel NodeJS linker to run. This From e3014713426d838f466ab5c4ebde8add3fae6462 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 20 Mar 2025 11:38:03 +0100 Subject: [PATCH 04/15] fix(devtools): fix type checking issues (#60481) Fixes type checking issues in the dev tools that weren't showing up, because we had `strictTemplates` turned off. PR Close #60481 --- .../devtools-tabs/devtools-tabs.component.html | 2 +- .../devtools-tabs/devtools-tabs.component.ts | 3 ++- .../lib/devtools-tabs/devtools-tabs.spec.ts | 6 +++++- .../directive-explorer.component.html | 6 +++--- .../directive-forest.component.html | 18 +++++++++++------- .../filter/filter.component.ts | 2 +- .../property-view-body.component.ts | 2 +- .../property-view/property-view.component.html | 8 ++++---- .../injector-providers.component.html | 2 +- .../injector-tree/injector-tree.component.html | 2 +- .../devtools-tabs/profiler/file-api-service.ts | 2 +- .../profiler/profiler.component.ts | 2 +- .../record-formatter/record-formatter.ts | 2 +- .../timeline/timeline-controls.component.html | 2 +- .../profiler/timeline/timeline.component.html | 10 ++++++---- .../router-tree/router-tree.component.ts | 4 ++-- .../lib/component/splitArea.directive.ts | 8 ++++---- 17 files changed, 46 insertions(+), 35 deletions(-) diff --git a/devtools/projects/ng-devtools/src/lib/devtools-tabs/devtools-tabs.component.html b/devtools/projects/ng-devtools/src/lib/devtools-tabs/devtools-tabs.component.html index cb7f46929dc2..6e562879c456 100644 --- a/devtools/projects/ng-devtools/src/lib/devtools-tabs/devtools-tabs.component.html +++ b/devtools/projects/ng-devtools/src/lib/devtools-tabs/devtools-tabs.component.html @@ -22,7 +22,7 @@ diff --git a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/timeline.component.html b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/timeline.component.html index fe7e1f04e5f5..25a4fdaa94bd 100644 --- a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/timeline.component.html +++ b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/timeline.component.html @@ -1,3 +1,5 @@ +@let frame = this.frame(); + @if (!hasFrames() && !visualizing()) { } @@ -7,7 +9,7 @@
- @if (hasFrames() && !frame()) { + @if (hasFrames() && !frame) {

Select a bar to preview a particular change detection cycle.

- } @else if (hasFrames() && frame()) { + } @else if (hasFrames() && frame) { } diff --git a/devtools/projects/ng-devtools/src/lib/devtools-tabs/router-tree/router-tree.component.ts b/devtools/projects/ng-devtools/src/lib/devtools-tabs/router-tree/router-tree.component.ts index ebc2670bd514..2976a1da6317 100644 --- a/devtools/projects/ng-devtools/src/lib/devtools-tabs/router-tree/router-tree.component.ts +++ b/devtools/projects/ng-devtools/src/lib/devtools-tabs/router-tree/router-tree.component.ts @@ -65,9 +65,9 @@ export class RouterTreeComponent { }); } - searchRoutes($event: InputEvent) { + searchRoutes(event: Event) { this.filterRegex = new RegExp( - ($event?.target as HTMLInputElement)?.value?.toLowerCase() || DEFAULT_FILTER, + (event?.target as HTMLInputElement)?.value?.toLowerCase() || DEFAULT_FILTER, ); this.renderGraph(this.routes()); } diff --git a/devtools/projects/ng-devtools/src/lib/vendor/angular-split/lib/component/splitArea.directive.ts b/devtools/projects/ng-devtools/src/lib/vendor/angular-split/lib/component/splitArea.directive.ts index 1118f0597559..d072cb211edf 100644 --- a/devtools/projects/ng-devtools/src/lib/vendor/angular-split/lib/component/splitArea.directive.ts +++ b/devtools/projects/ng-devtools/src/lib/vendor/angular-split/lib/component/splitArea.directive.ts @@ -12,7 +12,7 @@ export class SplitAreaDirective implements OnInit, OnDestroy { private _order: number | null = null; @Input() - set order(v: number | null) { + set order(v: number | string | null) { this._order = getInputPositiveNumber(v, null); this.split.updateArea(this, true, false); @@ -27,7 +27,7 @@ export class SplitAreaDirective implements OnInit, OnDestroy { private _size: number | null = null; @Input() - set size(v: number | null) { + set size(v: number | string | null) { this._size = getInputPositiveNumber(v, null); this.split.updateArea(this, false, true); @@ -42,7 +42,7 @@ export class SplitAreaDirective implements OnInit, OnDestroy { private _minSize: number | null = null; @Input() - set minSize(v: number | null) { + set minSize(v: number | string | null) { this._minSize = getInputPositiveNumber(v, null); this.split.updateArea(this, false, true); @@ -57,7 +57,7 @@ export class SplitAreaDirective implements OnInit, OnDestroy { private _maxSize: number | null = null; @Input() - set maxSize(v: number | null) { + set maxSize(v: number | string | null) { this._maxSize = getInputPositiveNumber(v, null); this.split.updateArea(this, false, true); From 785a1110e603a3573261528f2fda28718f548b4a Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 20 Mar 2025 11:38:29 +0100 Subject: [PATCH 05/15] fix(common): resolve host binding type issues (#60481) Fixes type issues in the host bindings of `NgOptimizedImage`. PR Close #60481 --- goldens/public-api/common/index.api.md | 2 ++ .../ng_optimized_image/ng_optimized_image.ts | 12 ++++-------- .../test/directives/ng_optimized_image_spec.ts | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/goldens/public-api/common/index.api.md b/goldens/public-api/common/index.api.md index e1b9e527cc0c..16e86935ea24 100644 --- a/goldens/public-api/common/index.api.md +++ b/goldens/public-api/common/index.api.md @@ -605,6 +605,7 @@ export class NgOptimizedImage implements OnInit, OnChanges { constructor(); disableOptimizedSrcset: boolean; fill: boolean; + protected generatePlaceholder(placeholderInput: string | boolean): string | boolean | null; height: number | undefined; loaderParams?: { [key: string]: any; @@ -633,6 +634,7 @@ export class NgOptimizedImage implements OnInit, OnChanges { placeholder?: string | boolean; placeholderConfig?: ImagePlaceholderConfig; priority: boolean; + protected shouldBlurPlaceholder(placeholderConfig?: ImagePlaceholderConfig): boolean; sizes?: string; width: number | undefined; // (undocumented) diff --git a/packages/common/src/directives/ng_optimized_image/ng_optimized_image.ts b/packages/common/src/directives/ng_optimized_image/ng_optimized_image.ts index d63440640afc..8390433b8ae7 100644 --- a/packages/common/src/directives/ng_optimized_image/ng_optimized_image.ts +++ b/packages/common/src/directives/ng_optimized_image/ng_optimized_image.ts @@ -111,11 +111,6 @@ const OVERSIZED_IMAGE_TOLERANCE = 1000; const FIXED_SRCSET_WIDTH_LIMIT = 1920; const FIXED_SRCSET_HEIGHT_LIMIT = 1080; -/** - * Default blur radius of the CSS filter used on placeholder images, in pixels - */ -export const PLACEHOLDER_BLUR_AMOUNT = 15; - /** * Placeholder dimension (height or width) limit in pixels. Angular produces a warning * when this limit is crossed. @@ -279,7 +274,8 @@ export interface ImagePlaceholderConfig { '[style.background-position]': 'placeholder ? "50% 50%" : null', '[style.background-repeat]': 'placeholder ? "no-repeat" : null', '[style.background-image]': 'placeholder ? generatePlaceholder(placeholder) : null', - '[style.filter]': `placeholder && shouldBlurPlaceholder(placeholderConfig) ? "blur(${PLACEHOLDER_BLUR_AMOUNT}px)" : null`, + '[style.filter]': + 'placeholder && shouldBlurPlaceholder(placeholderConfig) ? "blur(15px)" : null', }, }) export class NgOptimizedImage implements OnInit, OnChanges { @@ -687,7 +683,7 @@ export class NgOptimizedImage implements OnInit, OnChanges { * * A base64 encoded image, which is wrapped and passed through. * * A boolean. If true, calls the image loader to generate a small placeholder url. */ - private generatePlaceholder(placeholderInput: string | boolean): string | boolean | null { + protected generatePlaceholder(placeholderInput: string | boolean): string | boolean | null { const {placeholderResolution} = this.config; if (placeholderInput === true) { return `url(${this.callImageLoader({ @@ -705,7 +701,7 @@ export class NgOptimizedImage implements OnInit, OnChanges { * Determines if blur should be applied, based on an optional boolean * property `blur` within the optional configuration object `placeholderConfig`. */ - private shouldBlurPlaceholder(placeholderConfig?: ImagePlaceholderConfig): boolean { + protected shouldBlurPlaceholder(placeholderConfig?: ImagePlaceholderConfig): boolean { if (!placeholderConfig || !placeholderConfig.hasOwnProperty('blur')) { return true; } diff --git a/packages/common/test/directives/ng_optimized_image_spec.ts b/packages/common/test/directives/ng_optimized_image_spec.ts index 482e0eff09d7..17857b7841c8 100644 --- a/packages/common/test/directives/ng_optimized_image_spec.ts +++ b/packages/common/test/directives/ng_optimized_image_spec.ts @@ -28,13 +28,14 @@ import { DATA_URL_ERROR_LIMIT, DATA_URL_WARN_LIMIT, NgOptimizedImage, - PLACEHOLDER_BLUR_AMOUNT, RECOMMENDED_SRCSET_DENSITY_CAP, resetImagePriorityCount, } from '../../src/directives/ng_optimized_image/ng_optimized_image'; import {PRECONNECT_CHECK_BLOCKLIST} from '../../src/directives/ng_optimized_image/preconnect_link_checker'; describe('Image directive', () => { + const PLACEHOLDER_BLUR_AMOUNT = 15; + describe('preload element on a server', () => { describe('server', () => { beforeEach(() => { From bdd5e204233eeb79e04a782a51c08429991eb03e Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 20 Mar 2025 11:38:42 +0100 Subject: [PATCH 06/15] fix(forms): resolve host binding type issues (#60481) Fixes some type issues that are being flagged now that we have type checking of host bindings. PR Close #60481 --- packages/forms/src/directives/checkbox_value_accessor.ts | 2 +- packages/forms/src/directives/default_value_accessor.ts | 6 +++--- packages/forms/src/directives/number_value_accessor.ts | 2 +- packages/forms/src/directives/range_value_accessor.ts | 4 ++-- .../forms/src/directives/select_control_value_accessor.ts | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/forms/src/directives/checkbox_value_accessor.ts b/packages/forms/src/directives/checkbox_value_accessor.ts index 922d2b38da8a..8033c9a993f1 100644 --- a/packages/forms/src/directives/checkbox_value_accessor.ts +++ b/packages/forms/src/directives/checkbox_value_accessor.ts @@ -46,7 +46,7 @@ const CHECKBOX_VALUE_ACCESSOR: Provider = { @Directive({ selector: 'input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]', - host: {'(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()'}, + host: {'(change)': 'onChange($any($event.target).checked)', '(blur)': 'onTouched()'}, providers: [CHECKBOX_VALUE_ACCESSOR], standalone: false, }) diff --git a/packages/forms/src/directives/default_value_accessor.ts b/packages/forms/src/directives/default_value_accessor.ts index 24f94943880d..9a1048ee4887 100644 --- a/packages/forms/src/directives/default_value_accessor.ts +++ b/packages/forms/src/directives/default_value_accessor.ts @@ -90,10 +90,10 @@ export const COMPOSITION_BUFFER_MODE = new InjectionToken( // https://github.com/angular/angular/issues/3011 is implemented // selector: '[ngModel],[formControl],[formControlName]', host: { - '(input)': '$any(this)._handleInput($event.target.value)', + '(input)': '_handleInput($any($event.target).value)', '(blur)': 'onTouched()', - '(compositionstart)': '$any(this)._compositionStart()', - '(compositionend)': '$any(this)._compositionEnd($event.target.value)', + '(compositionstart)': '_compositionStart()', + '(compositionend)': '_compositionEnd($any($event.target).value)', }, providers: [DEFAULT_VALUE_ACCESSOR], standalone: false, diff --git a/packages/forms/src/directives/number_value_accessor.ts b/packages/forms/src/directives/number_value_accessor.ts index 2c7627714575..3b6f9df695fb 100644 --- a/packages/forms/src/directives/number_value_accessor.ts +++ b/packages/forms/src/directives/number_value_accessor.ts @@ -47,7 +47,7 @@ const NUMBER_VALUE_ACCESSOR: Provider = { @Directive({ selector: 'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]', - host: {'(input)': 'onChange($event.target.value)', '(blur)': 'onTouched()'}, + host: {'(input)': 'onChange($any($event.target).value)', '(blur)': 'onTouched()'}, providers: [NUMBER_VALUE_ACCESSOR], standalone: false, }) diff --git a/packages/forms/src/directives/range_value_accessor.ts b/packages/forms/src/directives/range_value_accessor.ts index e88a927eb7be..9550e151d933 100644 --- a/packages/forms/src/directives/range_value_accessor.ts +++ b/packages/forms/src/directives/range_value_accessor.ts @@ -48,8 +48,8 @@ const RANGE_VALUE_ACCESSOR: Provider = { selector: 'input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]', host: { - '(change)': 'onChange($event.target.value)', - '(input)': 'onChange($event.target.value)', + '(change)': 'onChange($any($event.target).value)', + '(input)': 'onChange($any($event.target).value)', '(blur)': 'onTouched()', }, providers: [RANGE_VALUE_ACCESSOR], diff --git a/packages/forms/src/directives/select_control_value_accessor.ts b/packages/forms/src/directives/select_control_value_accessor.ts index 0a5a309d8c3b..f7d8200a9ed8 100644 --- a/packages/forms/src/directives/select_control_value_accessor.ts +++ b/packages/forms/src/directives/select_control_value_accessor.ts @@ -102,7 +102,7 @@ function _extractId(valueString: string): string { @Directive({ selector: 'select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]', - host: {'(change)': 'onChange($event.target.value)', '(blur)': 'onTouched()'}, + host: {'(change)': 'onChange($any($event.target).value)', '(blur)': 'onTouched()'}, providers: [SELECT_VALUE_ACCESSOR], standalone: false, }) From b26b0abad694354ec896032538c62bad230017e4 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 20 Mar 2025 11:38:55 +0100 Subject: [PATCH 07/15] fix(docs-infra): host binding type issues (#60481) Resolves typing issues inside host binding in adev. PR Close #60481 --- .../viewers/docs-viewer/docs-viewer.component.ts | 2 +- .../click-outside/click-outside.directive.ts | 10 +++++----- adev/src/app/editor/embedded-editor.component.html | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/adev/shared-docs/components/viewers/docs-viewer/docs-viewer.component.ts b/adev/shared-docs/components/viewers/docs-viewer/docs-viewer.component.ts index 4c17dd08b5e8..3e54131615c2 100644 --- a/adev/shared-docs/components/viewers/docs-viewer/docs-viewer.component.ts +++ b/adev/shared-docs/components/viewers/docs-viewer/docs-viewer.component.ts @@ -79,7 +79,7 @@ export class DocViewer implements OnChanges { private readonly injector = inject(Injector); private readonly appRef = inject(ApplicationRef); - private animateContent = false; + protected animateContent = false; private readonly pendingTasks = inject(PendingTasks); private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID)); diff --git a/adev/shared-docs/directives/click-outside/click-outside.directive.ts b/adev/shared-docs/directives/click-outside/click-outside.directive.ts index abf23af8882b..ca28f3e7e665 100644 --- a/adev/shared-docs/directives/click-outside/click-outside.directive.ts +++ b/adev/shared-docs/directives/click-outside/click-outside.directive.ts @@ -22,23 +22,23 @@ export class ClickOutside { private readonly document = inject(DOCUMENT); private readonly elementRef = inject(ElementRef); - onClick($event: PointerEvent): void { + onClick(event: MouseEvent): void { if ( - !this.elementRef.nativeElement.contains($event.target) && - !this.wasClickedOnIgnoredElement($event) + !this.elementRef.nativeElement.contains(event.target) && + !this.wasClickedOnIgnoredElement(event) ) { this.clickOutside.emit(); } } - private wasClickedOnIgnoredElement($event: PointerEvent): boolean { + private wasClickedOnIgnoredElement(event: MouseEvent): boolean { if (this.ignoredElementsIds.length === 0) { return false; } return this.ignoredElementsIds.some((elementId) => { const element = this.document.getElementById(elementId); - const target = $event.target as Node; + const target = event.target as Node; const contains = element?.contains(target); return contains; }); diff --git a/adev/src/app/editor/embedded-editor.component.html b/adev/src/app/editor/embedded-editor.component.html index 51501d228ca7..68644eaff2b6 100644 --- a/adev/src/app/editor/embedded-editor.component.html +++ b/adev/src/app/editor/embedded-editor.component.html @@ -1,6 +1,6 @@
- + @if (!displayOnlyTerminal()) { @@ -15,13 +15,13 @@ } - + @if (!displayOnlyTerminal()) { @if (!displayPreviewInMatTabGroup()) { - +
@@ -34,7 +34,7 @@ } - + @if (displayPreviewInMatTabGroup()) { From 911ad40067a044a4d55a3305b1555ea1e2414ce7 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 20 Mar 2025 11:41:23 +0100 Subject: [PATCH 08/15] build: fix type checking issues in test code (#60481) Fixes some type checking issues in our own testing code that weren't showing up, because `strictTemplates` was turned off. PR Close #60481 --- .../class_bindings/class_bindings.component.ts | 2 +- .../ng_template_outlet_context/ng2/BUILD.bazel | 3 +-- modules/playground/src/gestures/index.ts | 12 ++++++------ modules/playground/src/jsonp/app/jsonp_comp.ts | 8 ++++++-- modules/playground/src/key_events/index.ts | 2 +- .../acceptance/authoring/signal_inputs_spec.ts | 2 +- .../core/test/bundling/animation_world/index.ts | 16 ++++++++-------- packages/core/test/bundling/todo/index.ts | 4 ++-- packages/core/test/bundling/todo_i18n/index.ts | 8 ++++---- 9 files changed, 30 insertions(+), 27 deletions(-) diff --git a/modules/benchmarks/src/class_bindings/class_bindings.component.ts b/modules/benchmarks/src/class_bindings/class_bindings.component.ts index c751f1c14e83..d692ed991f48 100644 --- a/modules/benchmarks/src/class_bindings/class_bindings.component.ts +++ b/modules/benchmarks/src/class_bindings/class_bindings.component.ts @@ -33,5 +33,5 @@ import {Component, Input} from '@angular/core'; }) export class ClassBindingsComponent { @Input() msg: string = ''; - @Input() list: string[] | null = null; + @Input() list: {i: number; text: string}[] | null = null; } diff --git a/modules/benchmarks/src/ng_template_outlet_context/ng2/BUILD.bazel b/modules/benchmarks/src/ng_template_outlet_context/ng2/BUILD.bazel index 72978f7a71be..e6b60e4ced90 100644 --- a/modules/benchmarks/src/ng_template_outlet_context/ng2/BUILD.bazel +++ b/modules/benchmarks/src/ng_template_outlet_context/ng2/BUILD.bazel @@ -1,12 +1,11 @@ -load("//tools:defaults.bzl", "app_bundle", "http_server", "ng_module") load("@npm//@angular/build-tooling/bazel/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test") +load("//tools:defaults.bzl", "app_bundle", "http_server", "ng_module") package(default_visibility = ["//modules/benchmarks:__subpackages__"]) ng_module( name = "ng2", srcs = glob(["*.ts"]), - strict_templates = True, tsconfig = "//modules/benchmarks:tsconfig-build.json", deps = [ "//modules/benchmarks/src:util_lib", diff --git a/modules/playground/src/gestures/index.ts b/modules/playground/src/gestures/index.ts index f492136b62d4..258e5e663402 100644 --- a/modules/playground/src/gestures/index.ts +++ b/modules/playground/src/gestures/index.ts @@ -20,16 +20,16 @@ class GesturesCmp { pinchScale: number = 1; rotateAngle: number = 0; - onSwipe(event: HammerInput): void { - this.swipeDirection = event.deltaX > 0 ? 'right' : 'left'; + onSwipe(event: Event): void { + this.swipeDirection = (event as unknown as HammerInput).deltaX > 0 ? 'right' : 'left'; } - onPinch(event: HammerInput): void { - this.pinchScale = event.scale; + onPinch(event: Event): void { + this.pinchScale = (event as unknown as HammerInput).scale; } - onRotate(event: HammerInput): void { - this.rotateAngle = event.rotation; + onRotate(event: Event): void { + this.rotateAngle = (event as unknown as HammerInput).rotation; } } diff --git a/modules/playground/src/jsonp/app/jsonp_comp.ts b/modules/playground/src/jsonp/app/jsonp_comp.ts index 7ed923aabb4d..83405978a1ff 100644 --- a/modules/playground/src/jsonp/app/jsonp_comp.ts +++ b/modules/playground/src/jsonp/app/jsonp_comp.ts @@ -9,6 +9,10 @@ import {HttpClient} from '@angular/common/http'; import {Component} from '@angular/core'; +interface Person { + name: string; +} + @Component({ selector: 'jsonp-app', template: ` @@ -20,8 +24,8 @@ import {Component} from '@angular/core'; standalone: false, }) export class JsonpCmp { - people: Object; + people: Person[]; constructor(http: HttpClient) { - http.jsonp('./people.json', 'callback').subscribe((res: Object) => (this.people = res)); + http.jsonp('./people.json', 'callback').subscribe((res: Person[]) => (this.people = res)); } } diff --git a/modules/playground/src/key_events/index.ts b/modules/playground/src/key_events/index.ts index 1cd1dedba666..54fa74c4dc49 100644 --- a/modules/playground/src/key_events/index.ts +++ b/modules/playground/src/key_events/index.ts @@ -35,7 +35,7 @@ export class KeyEventsApp { event.preventDefault(); } - onShiftEnter(event: KeyboardEvent): void { + onShiftEnter(event: Event): void { this.shiftEnter = true; event.preventDefault(); } diff --git a/packages/core/test/acceptance/authoring/signal_inputs_spec.ts b/packages/core/test/acceptance/authoring/signal_inputs_spec.ts index 826dfba81081..fd12868df647 100644 --- a/packages/core/test/acceptance/authoring/signal_inputs_spec.ts +++ b/packages/core/test/acceptance/authoring/signal_inputs_spec.ts @@ -179,7 +179,7 @@ describe('signal inputs', () => { template: 'input:{{input()}}', }) class InputComp { - input = input.required(); + input = input.required(); constructor() { this.input(); diff --git a/packages/core/test/bundling/animation_world/index.ts b/packages/core/test/bundling/animation_world/index.ts index 3b3bb8515dc1..ed4adc516fab 100644 --- a/packages/core/test/bundling/animation_world/index.ts +++ b/packages/core/test/bundling/animation_world/index.ts @@ -25,21 +25,21 @@ import {BrowserModule, platformBrowser} from '@angular/platform-browser'; standalone: false, }) class MakeColorGreyDirective { - @HostBinding('style.background-color') private _backgroundColor: string | null = null; - @HostBinding('style.color') private _textColor: string | null = null; + @HostBinding('style.background-color') protected backgroundColor: string | null = null; + @HostBinding('style.color') protected textColor: string | null = null; on() { - this._backgroundColor = 'grey'; - this._textColor = 'black'; + this.backgroundColor = 'grey'; + this.textColor = 'black'; } off() { - this._backgroundColor = null; - this._textColor = null; + this.backgroundColor = null; + this.textColor = null; } toggle() { - this._backgroundColor ? this.off() : this.on(); + this.backgroundColor ? this.off() : this.on(); } } @@ -57,7 +57,7 @@ class BoxWithOverriddenStylesComponent { this.onInActive(); } - @HostListener('click', ['$event']) + @HostListener('click') toggle() { if (this.active) { this.onInActive(); diff --git a/packages/core/test/bundling/todo/index.ts b/packages/core/test/bundling/todo/index.ts index a1c35c1f190f..65c333e08b9d 100644 --- a/packages/core/test/bundling/todo/index.ts +++ b/packages/core/test/bundling/todo/index.ts @@ -95,7 +95,7 @@ class TodoStore {

todos

+ (keyup)="$event.code == 'Enter' ? addTodo() : newTodoText = $any($event.target).value">
diff --git a/packages/core/test/bundling/todo_i18n/index.ts b/packages/core/test/bundling/todo_i18n/index.ts index 68bf51259a15..c64e92808d06 100644 --- a/packages/core/test/bundling/todo_i18n/index.ts +++ b/packages/core/test/bundling/todo_i18n/index.ts @@ -88,7 +88,7 @@ class TodoStore {

todos

+ (keyup)="$event.code == 'Enter' ? addTodo() : updateNewTodoValue($event)">
@@ -192,8 +192,8 @@ class ToDoAppComponent { this.cdr.detectChanges(); } - updateNewTodoValue(value: string) { - this.newTodoText = value; + updateNewTodoValue(event: Event) { + this.newTodoText = (event.target as HTMLInputElement).value; this.cdr.detectChanges(); } } From aab765fa5eb7d96827c8af1dc5d6a11c8991e10e Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Thu, 20 Mar 2025 11:55:39 +0000 Subject: [PATCH 09/15] build: update cross-repo angular dependencies (#60485) See associated pull request for more information. Closes #60474 as a pr takeover PR Close #60485 --- adev/src/app/app.config.server.ts | 8 +- package.json | 16 +-- yarn.lock | 212 ++++++++++++++---------------- 3 files changed, 108 insertions(+), 128 deletions(-) diff --git a/adev/src/app/app.config.server.ts b/adev/src/app/app.config.server.ts index 7ea5cd3c8b75..c27edbb18452 100644 --- a/adev/src/app/app.config.server.ts +++ b/adev/src/app/app.config.server.ts @@ -7,15 +7,11 @@ */ import {mergeApplicationConfig, ApplicationConfig} from '@angular/core'; -import {provideServerRendering} from '@angular/platform-server'; -import {provideServerRouting, RenderMode} from '@angular/ssr'; +import {provideServerRendering, withRoutes, RenderMode} from '@angular/ssr'; import {appConfig} from './app.config'; const serverConfig: ApplicationConfig = { - providers: [ - provideServerRendering(), - provideServerRouting([{path: '**', renderMode: RenderMode.Prerender}]), - ], + providers: [provideServerRendering(withRoutes([{path: '**', renderMode: RenderMode.Prerender}]))], }; export const config = mergeApplicationConfig(appConfig, serverConfig); diff --git a/package.json b/package.json index c59240affac8..c460d1c607b8 100644 --- a/package.json +++ b/package.json @@ -47,14 +47,14 @@ }, "// 1": "dependencies are used locally and by bazel", "dependencies": { - "@angular-devkit/build-angular": "20.0.0-next.1", - "@angular-devkit/core": "20.0.0-next.1", - "@angular-devkit/schematics": "20.0.0-next.1", - "@angular/build": "20.0.0-next.1", + "@angular-devkit/build-angular": "20.0.0-next.2", + "@angular-devkit/core": "20.0.0-next.2", + "@angular-devkit/schematics": "20.0.0-next.2", + "@angular/build": "20.0.0-next.2", "@angular/cdk": "20.0.0-next.2", - "@angular/cli": "20.0.0-next.1", + "@angular/cli": "20.0.0-next.2", "@angular/material": "20.0.0-next.2", - "@angular/ssr": "20.0.0-next.1", + "@angular/ssr": "20.0.0-next.2", "@babel/cli": "7.26.4", "@babel/core": "7.26.10", "@babel/generator": "7.26.10", @@ -71,7 +71,7 @@ "@rollup/plugin-babel": "^6.0.0", "@rollup/plugin-commonjs": "^28.0.0", "@rollup/plugin-node-resolve": "^13.0.4", - "@schematics/angular": "20.0.0-next.1", + "@schematics/angular": "20.0.0-next.2", "@stackblitz/sdk": "^1.11.0", "@types/angular": "^1.6.47", "@types/babel__core": "7.20.5", @@ -159,7 +159,7 @@ "devDependencies": { "@actions/core": "^1.10.0", "@actions/github": "^6.0.0", - "@angular-devkit/architect-cli": "0.2000.0-next.1", + "@angular-devkit/architect-cli": "0.2000.0-next.2", "@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#ce04ec6cf7604014191821a637e60964a1a3bb4a", "@angular/core": "^20.0.0-next", "@angular/ng-dev": "https://github.com/angular/dev-infra-private-ng-dev-builds.git#d25ced20c12ad010c2b5b560acb78065f8d6564e", diff --git a/yarn.lock b/yarn.lock index 9e4ba6de2191..c479389e22ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -164,13 +164,13 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@angular-devkit/architect-cli@0.2000.0-next.1": - version "0.2000.0-next.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect-cli/-/architect-cli-0.2000.0-next.1.tgz#b599c5ee0a8aa91b4ecf496ef30cc4f86ac684a3" - integrity sha512-6gh1AbnRjs1xuCbz/+g323n2VIH0b9k2OASQGYLEF1EktSHwFHo9qLPdM9ceewoXGq5YzHoYFZfHLZ3+XqdiIA== +"@angular-devkit/architect-cli@0.2000.0-next.2": + version "0.2000.0-next.2" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect-cli/-/architect-cli-0.2000.0-next.2.tgz#b12357722d162498088f8868c9a87bb93547858d" + integrity sha512-fpc0qSx2EGVK1rfRNhgmfcxmRuZsUC9wjA92Ka8hWk3IFTnO54uYggoTvLB55J4MJJELLiFLEzFVH4TTq4e5cw== dependencies: - "@angular-devkit/architect" "0.2000.0-next.1" - "@angular-devkit/core" "20.0.0-next.1" + "@angular-devkit/architect" "0.2000.0-next.2" + "@angular-devkit/core" "20.0.0-next.2" ansi-colors "4.1.3" progress "2.0.3" symbol-observable "4.0.0" @@ -184,24 +184,24 @@ "@angular-devkit/core" "19.1.0-rc.0" rxjs "7.8.1" -"@angular-devkit/architect@0.2000.0-next.1": - version "0.2000.0-next.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.2000.0-next.1.tgz#d862cb8e04b63427200df4a7f77a889c98940030" - integrity sha512-bfYb/DavtcSGQvKouRefvlyYRC+H3J9yk/vA2QYQNlbbSRn4KexfBKE6HEzhYoqVizDpH/kXLGdAkxcuxQWdVg== +"@angular-devkit/architect@0.2000.0-next.2": + version "0.2000.0-next.2" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.2000.0-next.2.tgz#6ba015657f979a48fa01212b2dedb9878e664344" + integrity sha512-h/6VqShV5ayUEdSMdQdYx4/bAil38V/xVDXvgiTWhvdyrwGeMBgvfhpL51/rj5ye4RH2Amy9KFbQ3HQh6xQqEw== dependencies: - "@angular-devkit/core" "20.0.0-next.1" + "@angular-devkit/core" "20.0.0-next.2" rxjs "7.8.2" -"@angular-devkit/build-angular@20.0.0-next.1": - version "20.0.0-next.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-20.0.0-next.1.tgz#e65c101ed86cc55a2829729060d6584322aaef45" - integrity sha512-DHdKBMElzEnNQbkwR7tqBGdK8geYfkiYAzHOarTx7NZ3rCJuwFjVpcCzWODZjCbNo3kII5DvKlXu848TUldy3Q== +"@angular-devkit/build-angular@20.0.0-next.2": + version "20.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-20.0.0-next.2.tgz#717ed264d401ab0e932b8164f7f85cbf4ef12d6a" + integrity sha512-0uKksY0jYd4jOveWfA6BPRJYtrUBOpcOYeTbDei5Eg637JzP3dLxCGbaBThIneVB1XIQOLm9IZoqnFAUBteSFA== dependencies: "@ampproject/remapping" "2.3.0" - "@angular-devkit/architect" "0.2000.0-next.1" - "@angular-devkit/build-webpack" "0.2000.0-next.1" - "@angular-devkit/core" "20.0.0-next.1" - "@angular/build" "20.0.0-next.1" + "@angular-devkit/architect" "0.2000.0-next.2" + "@angular-devkit/build-webpack" "0.2000.0-next.2" + "@angular-devkit/core" "20.0.0-next.2" + "@angular/build" "20.0.0-next.2" "@babel/core" "7.26.10" "@babel/generator" "7.26.10" "@babel/helper-annotate-as-pure" "7.25.9" @@ -212,7 +212,7 @@ "@babel/preset-env" "7.26.9" "@babel/runtime" "7.26.10" "@discoveryjs/json-ext" "0.6.3" - "@ngtools/webpack" "20.0.0-next.1" + "@ngtools/webpack" "20.0.0-next.2" "@vitejs/plugin-basic-ssl" "2.0.0" ansi-colors "4.1.3" autoprefixer "10.4.21" @@ -234,12 +234,12 @@ open "10.1.0" ora "5.4.1" picomatch "4.0.2" - piscina "4.8.0" + piscina "4.9.2" postcss "8.5.3" postcss-loader "8.1.1" resolve-url-loader "5.0.0" rxjs "7.8.2" - sass "1.85.1" + sass "1.86.0" sass-loader "16.0.5" semver "7.7.1" source-map-loader "5.0.0" @@ -265,12 +265,12 @@ typescript "3.2.4" webpack-sources "1.3.0" -"@angular-devkit/build-webpack@0.2000.0-next.1": - version "0.2000.0-next.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.2000.0-next.1.tgz#1e2627c0664ea2e1fa4123db6a1785212074515d" - integrity sha512-VNCIHKRjUIn/9039zKmPNQOcrv7xj04h2hOyXeMYvDIpNqESv+yPAxp3qqkqyLTXsX6W6kavviRRScv0U4nV+Q== +"@angular-devkit/build-webpack@0.2000.0-next.2": + version "0.2000.0-next.2" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.2000.0-next.2.tgz#d2378f92ab4988b10fe98b209180ce3e2390aee6" + integrity sha512-WW0j2MQ9/YCdQXat6jjar9ORTlNFV6VIgnMkMSFVZm5Utdp+cUuD+bkwz2ysxxb4Y3F/HUt8LhlUEoAM1yQYmQ== dependencies: - "@angular-devkit/architect" "0.2000.0-next.1" + "@angular-devkit/architect" "0.2000.0-next.2" rxjs "7.8.2" "@angular-devkit/core@19.1.0-rc.0": @@ -285,10 +285,10 @@ rxjs "7.8.1" source-map "0.7.4" -"@angular-devkit/core@20.0.0-next.1": - version "20.0.0-next.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-20.0.0-next.1.tgz#7dc749f6be923e89bd23ea71cda776fb720947da" - integrity sha512-d+R/1BXCXZBY2d3HQXRjUOslN6Qy1PHynZZMP9+rpKQrUxTgVeGN8JKCYEDCNg3TQO1riDWRb6fLvymDI7AJng== +"@angular-devkit/core@20.0.0-next.2": + version "20.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-20.0.0-next.2.tgz#5bc8dd91a1b21b7803d958419a4c548b74701a62" + integrity sha512-AX5GQDHoVmmOfIH1vl9gRM4lURbmC2xI/JtYb+Q/lAbLlGc3E4wk0LHCQKBTCAM2/0zRreSTgrZBRxBGM5UgNw== dependencies: ajv "8.17.1" ajv-formats "3.0.1" @@ -297,12 +297,12 @@ rxjs "7.8.2" source-map "0.7.4" -"@angular-devkit/schematics@20.0.0-next.1": - version "20.0.0-next.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-20.0.0-next.1.tgz#2a2865928433e5165ae10676ec2cbe805a116481" - integrity sha512-PxQ9+iz5dLDQH/FJZt7HNeeAuWopEfz/NQDZUZm/H9kS2VK9Q59FIhYFQ3LbSF1uUflwGUjVzHJTn451oPbx9Q== +"@angular-devkit/schematics@20.0.0-next.2": + version "20.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-20.0.0-next.2.tgz#9979f875a80a8803e1769223b0696f73a497880f" + integrity sha512-HcOvEVcEzEcUxe4VRxc5m5TJuczXZJ0qNdu9DkbRKUfuT7Y1y2bgDaiSrr9/4r08GilZ9pbUOyyvXUsoyXo3aw== dependencies: - "@angular-devkit/core" "20.0.0-next.1" + "@angular-devkit/core" "20.0.0-next.2" jsonc-parser "3.3.1" magic-string "0.30.17" ora "5.4.1" @@ -387,36 +387,37 @@ optionalDependencies: lmdb "3.2.2" -"@angular/build@20.0.0-next.1": - version "20.0.0-next.1" - resolved "https://registry.yarnpkg.com/@angular/build/-/build-20.0.0-next.1.tgz#a690826195c66f7b8d063061781c772fcb81e015" - integrity sha512-UfKumURdErpWafkyWAIqnmH59GNfJWx5pXjdRcHsxQUj8aa4N0l8/o6ceO91PfGgFf8XETyAyrD454cY8aOI/Q== +"@angular/build@20.0.0-next.2": + version "20.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular/build/-/build-20.0.0-next.2.tgz#0aaae436b3cada18d98feb9c2f29342665cb2804" + integrity sha512-PNSB1e+Q08onVSiIJmQg7KtL4+pVquwmAcDgnpmm0a+C8GhVdgtV4yzlDEe6LX78hdxWVSdgYpSyTzyA8tcMsQ== dependencies: "@ampproject/remapping" "2.3.0" - "@angular-devkit/architect" "0.2000.0-next.1" + "@angular-devkit/architect" "0.2000.0-next.2" "@babel/core" "7.26.10" "@babel/helper-annotate-as-pure" "7.25.9" "@babel/helper-split-export-declaration" "7.24.7" "@babel/plugin-syntax-import-attributes" "7.26.0" - "@inquirer/confirm" "5.1.7" + "@inquirer/confirm" "5.1.8" "@vitejs/plugin-basic-ssl" "2.0.0" beasties "0.2.0" browserslist "^4.23.0" esbuild "0.25.1" https-proxy-agent "7.0.6" istanbul-lib-instrument "6.0.3" + jsonc-parser "3.3.1" listr2 "8.2.5" magic-string "0.30.17" mrmime "2.0.1" parse5-html-rewriting-stream "7.0.0" picomatch "4.0.2" - piscina "4.8.0" - rollup "4.35.0" - sass "1.85.1" + piscina "4.9.2" + rollup "4.36.0" + sass "1.86.0" semver "7.7.1" source-map-support "0.5.21" tinyglobby "0.2.12" - vite "6.2.1" + vite "6.2.2" watchpack "2.4.2" optionalDependencies: lmdb "3.2.6" @@ -430,17 +431,17 @@ optionalDependencies: parse5 "^7.1.2" -"@angular/cli@20.0.0-next.1": - version "20.0.0-next.1" - resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-20.0.0-next.1.tgz#4263bc4657cf9d456bd75f56ba340fc4bda938d2" - integrity sha512-NsVAbWXZstYP7wHPBG3JjdFV3F8JbwDuDPVMEa1SYpkW0GA1lIlUs2b4te8xpoQmGjnmxcxDmcWQMYNabY0VNA== +"@angular/cli@20.0.0-next.2": + version "20.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-20.0.0-next.2.tgz#3e35e6d1161b8ad7bbb49af37ced5b797b947ec0" + integrity sha512-/v6/p6E0swTw+xUpj1VLZP2vD3ys0itdzop+oerLNTw+BLo9AOSTjUPcc3NpMFXvorMSZKOJg32HsWhgJt920A== dependencies: - "@angular-devkit/architect" "0.2000.0-next.1" - "@angular-devkit/core" "20.0.0-next.1" - "@angular-devkit/schematics" "20.0.0-next.1" - "@inquirer/prompts" "7.3.3" + "@angular-devkit/architect" "0.2000.0-next.2" + "@angular-devkit/core" "20.0.0-next.2" + "@angular-devkit/schematics" "20.0.0-next.2" + "@inquirer/prompts" "7.4.0" "@listr2/prompt-adapter-inquirer" "2.0.18" - "@schematics/angular" "20.0.0-next.1" + "@schematics/angular" "20.0.0-next.2" "@yarnpkg/lockfile" "1.1.0" ini "5.0.0" jsonc-parser "3.3.1" @@ -492,10 +493,10 @@ which "^5.0.0" yaml "2.7.0" -"@angular/ssr@20.0.0-next.1": - version "20.0.0-next.1" - resolved "https://registry.yarnpkg.com/@angular/ssr/-/ssr-20.0.0-next.1.tgz#9a3b709ea9b0620ac9bd0653e4251ff7c5fd0155" - integrity sha512-ZOqV63ZKxBbd9IUwMNBsog/hppKsVRG/eqLtVZfx8ERvGNtSlbJTTCBjnp0C5SUJb3+R/jVgUJ7LBr3msz/aLQ== +"@angular/ssr@20.0.0-next.2": + version "20.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular/ssr/-/ssr-20.0.0-next.2.tgz#a0bf1900745b394dc3bb7a2fe12772f204d738f3" + integrity sha512-raddKt7uz0ATyzSMCmno0ec8zu5IOH9TbOg9JF9ZDUXifCpTMnDq4nbzF2/VfWJojyA+YEMWPgiLIAcxJ9ACIA== dependencies: tslib "^2.3.0" @@ -2151,7 +2152,7 @@ local-pkg "^1.0.0" mlly "^1.7.4" -"@inquirer/checkbox@^4.1.3", "@inquirer/checkbox@^4.1.4": +"@inquirer/checkbox@^4.1.4": version "4.1.4" resolved "https://registry.yarnpkg.com/@inquirer/checkbox/-/checkbox-4.1.4.tgz#30c243015670126ac95d9b94cb37f631d5ad3f88" integrity sha512-d30576EZdApjAMceijXA5jDzRQHT/MygbC+J8I7EqA6f/FRpYxlRtRJbHF8gHeWYeSdOuTEJqonn7QLB1ELezA== @@ -2170,15 +2171,7 @@ "@inquirer/core" "^10.1.2" "@inquirer/type" "^3.0.2" -"@inquirer/confirm@5.1.7": - version "5.1.7" - resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.7.tgz#61f970e255b660edf2a0c901c599d7f9d25a58df" - integrity sha512-Xrfbrw9eSiHb+GsesO8TQIeHSMTP0xyvTCeeYevgZ4sKW+iz9w/47bgfG9b0niQm+xaLY2EWPBINUPldLwvYiw== - dependencies: - "@inquirer/core" "^10.1.8" - "@inquirer/type" "^3.0.5" - -"@inquirer/confirm@^5.1.7", "@inquirer/confirm@^5.1.8": +"@inquirer/confirm@5.1.8", "@inquirer/confirm@^5.1.8": version "5.1.8" resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.8.tgz#476af2476cd4867905dcabfca8598da4dd65e923" integrity sha512-dNLWCYZvXDjO3rnQfk2iuJNL4Ivwz/T2+C3+WnNfJKsNGSuOs3wAo2F6e0p946gtSAk31nZMfW+MRmYaplPKsg== @@ -2186,7 +2179,7 @@ "@inquirer/core" "^10.1.9" "@inquirer/type" "^3.0.5" -"@inquirer/core@^10.1.2", "@inquirer/core@^10.1.8", "@inquirer/core@^10.1.9": +"@inquirer/core@^10.1.2", "@inquirer/core@^10.1.9": version "10.1.9" resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.1.9.tgz#9ab672a2d9ca60c5d45c7fa9b63e4fe9e038a02e" integrity sha512-sXhVB8n20NYkUBfDYgizGHlpRVaCRjtuzNZA6xpALIUbkgfd2Hjz+DfEN6+h1BRnuxw0/P4jCIMjMsEOAMwAJw== @@ -2200,7 +2193,7 @@ wrap-ansi "^6.2.0" yoctocolors-cjs "^2.1.2" -"@inquirer/editor@^4.2.8", "@inquirer/editor@^4.2.9": +"@inquirer/editor@^4.2.9": version "4.2.9" resolved "https://registry.yarnpkg.com/@inquirer/editor/-/editor-4.2.9.tgz#4ff0c69b3940428d4549b719803655d7ae2cf2d6" integrity sha512-8HjOppAxO7O4wV1ETUlJFg6NDjp/W2NP5FB9ZPAcinAlNT4ZIWOLe2pUVwmmPRSV0NMdI5r/+lflN55AwZOKSw== @@ -2209,7 +2202,7 @@ "@inquirer/type" "^3.0.5" external-editor "^3.1.0" -"@inquirer/expand@^4.0.10", "@inquirer/expand@^4.0.11": +"@inquirer/expand@^4.0.11": version "4.0.11" resolved "https://registry.yarnpkg.com/@inquirer/expand/-/expand-4.0.11.tgz#d898b2d028def42064eee15f34e2c0bdc4a1ad2c" integrity sha512-OZSUW4hFMW2TYvX/Sv+NnOZgO8CHT2TU1roUCUIF2T+wfw60XFRRp9MRUPCT06cRnKL+aemt2YmTWwt7rOrNEA== @@ -2223,7 +2216,7 @@ resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.11.tgz#4744e6db95288fea1dead779554859710a959a21" integrity sha512-eOg92lvrn/aRUqbxRyvpEWnrvRuTYRifixHkYVpJiygTgVSBIHDqLh0SrMQXkafvULg3ck11V7xvR+zcgvpHFw== -"@inquirer/input@^4.1.7", "@inquirer/input@^4.1.8": +"@inquirer/input@^4.1.8": version "4.1.8" resolved "https://registry.yarnpkg.com/@inquirer/input/-/input-4.1.8.tgz#8e637f1163904d951762abab4584682daf484a91" integrity sha512-WXJI16oOZ3/LiENCAxe8joniNp8MQxF6Wi5V+EBbVA0ZIOpFcL4I9e7f7cXse0HJeIPCWO8Lcgnk98juItCi7Q== @@ -2231,7 +2224,7 @@ "@inquirer/core" "^10.1.9" "@inquirer/type" "^3.0.5" -"@inquirer/number@^3.0.10", "@inquirer/number@^3.0.11": +"@inquirer/number@^3.0.11": version "3.0.11" resolved "https://registry.yarnpkg.com/@inquirer/number/-/number-3.0.11.tgz#b42b7b24e9e1916d26bbdc7c368852fdb626fa9a" integrity sha512-pQK68CsKOgwvU2eA53AG/4npRTH2pvs/pZ2bFvzpBhrznh8Mcwt19c+nMO7LHRr3Vreu1KPhNBF3vQAKrjIulw== @@ -2239,7 +2232,7 @@ "@inquirer/core" "^10.1.9" "@inquirer/type" "^3.0.5" -"@inquirer/password@^4.0.10", "@inquirer/password@^4.0.11": +"@inquirer/password@^4.0.11": version "4.0.11" resolved "https://registry.yarnpkg.com/@inquirer/password/-/password-4.0.11.tgz#f23a632fb9a18c7a7ce1f2ac36d94e8aa0b7229e" integrity sha512-dH6zLdv+HEv1nBs96Case6eppkRggMe8LoOTl30+Gq5Wf27AO/vHFgStTVz4aoevLdNXqwE23++IXGw4eiOXTg== @@ -2248,23 +2241,7 @@ "@inquirer/type" "^3.0.5" ansi-escapes "^4.3.2" -"@inquirer/prompts@7.3.3": - version "7.3.3" - resolved "https://registry.yarnpkg.com/@inquirer/prompts/-/prompts-7.3.3.tgz#788ac2301cebcb2a808949a3e1c78819a27ee1a1" - integrity sha512-QS1AQgJ113iE/nmym03yKZKHvGjVWwkGZT3B1yKrrMG0bJKQg1jUkntFP8aPd2FUQzu/nga7QU2eDpzIP5it0Q== - dependencies: - "@inquirer/checkbox" "^4.1.3" - "@inquirer/confirm" "^5.1.7" - "@inquirer/editor" "^4.2.8" - "@inquirer/expand" "^4.0.10" - "@inquirer/input" "^4.1.7" - "@inquirer/number" "^3.0.10" - "@inquirer/password" "^4.0.10" - "@inquirer/rawlist" "^4.0.10" - "@inquirer/search" "^3.0.10" - "@inquirer/select" "^4.0.10" - -"@inquirer/prompts@^7.0.0": +"@inquirer/prompts@7.4.0", "@inquirer/prompts@^7.0.0": version "7.4.0" resolved "https://registry.yarnpkg.com/@inquirer/prompts/-/prompts-7.4.0.tgz#bd9be38372be8db75afb04776eb0cf096ae9814b" integrity sha512-EZiJidQOT4O5PYtqnu1JbF0clv36oW2CviR66c7ma4LsupmmQlUwmdReGKRp456OWPWMz3PdrPiYg3aCk3op2w== @@ -2280,7 +2257,7 @@ "@inquirer/search" "^3.0.11" "@inquirer/select" "^4.1.0" -"@inquirer/rawlist@^4.0.10", "@inquirer/rawlist@^4.0.11": +"@inquirer/rawlist@^4.0.11": version "4.0.11" resolved "https://registry.yarnpkg.com/@inquirer/rawlist/-/rawlist-4.0.11.tgz#29d74eea2607cbb3d80eac7fca0011d51c74c46d" integrity sha512-uAYtTx0IF/PqUAvsRrF3xvnxJV516wmR6YVONOmCWJbbt87HcDHLfL9wmBQFbNJRv5kCjdYKrZcavDkH3sVJPg== @@ -2289,7 +2266,7 @@ "@inquirer/type" "^3.0.5" yoctocolors-cjs "^2.1.2" -"@inquirer/search@^3.0.10", "@inquirer/search@^3.0.11": +"@inquirer/search@^3.0.11": version "3.0.11" resolved "https://registry.yarnpkg.com/@inquirer/search/-/search-3.0.11.tgz#660b181516acc306cf21dbc1d3d49f662cb7d917" integrity sha512-9CWQT0ikYcg6Ls3TOa7jljsD7PgjcsYEM0bYE+Gkz+uoW9u8eaJCRHJKkucpRE5+xKtaaDbrND+nPDoxzjYyew== @@ -2299,7 +2276,7 @@ "@inquirer/type" "^3.0.5" yoctocolors-cjs "^2.1.2" -"@inquirer/select@^4.0.10", "@inquirer/select@^4.1.0": +"@inquirer/select@^4.1.0": version "4.1.0" resolved "https://registry.yarnpkg.com/@inquirer/select/-/select-4.1.0.tgz#e99f483cb004c0247ced597f2c6015f084223dfb" integrity sha512-z0a2fmgTSRN+YBuiK1ROfJ2Nvrpij5lVN3gPDkQGhavdvIVGHGW29LwYZfM/j42Ai2hUghTI/uoBuTbrJk42bA== @@ -2766,10 +2743,10 @@ "@napi-rs/nice-win32-ia32-msvc" "1.0.1" "@napi-rs/nice-win32-x64-msvc" "1.0.1" -"@ngtools/webpack@20.0.0-next.1": - version "20.0.0-next.1" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-20.0.0-next.1.tgz#dd260ed5d118ea9c76715be72e6862e2fa1f5fa9" - integrity sha512-VlaPAuehAXy4maw6JgkA5bqBF8gJdZWEGa3k1zTA9o54AHn5nX0yIhTLbU3u5NySOGdZm9ByT4UoZaNXxmY5Zw== +"@ngtools/webpack@20.0.0-next.2": + version "20.0.0-next.2" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-20.0.0-next.2.tgz#b93d565874ec3a688e0d27c8b67dd29109e3d985" + integrity sha512-Edr7kfYosxoHKpvABk1A28S2jlJQlz/7vf6E2VOK74d0sIbT+h6CgQulRlNOgi5jyH3qOldEgDm3iE+S5KMXxA== "@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3": version "2.1.8-no-fsevents.3" @@ -3687,13 +3664,13 @@ argparse "~1.0.9" string-argv "~0.3.1" -"@schematics/angular@20.0.0-next.1": - version "20.0.0-next.1" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-20.0.0-next.1.tgz#bbe524cda49e21725a5c89d95053d44e4fcd93b8" - integrity sha512-8J/R0KnO23zr0d7CEBlsMLanEFFguJLwWY3I++zs1YsBbvJ1FhYM9KTYX2SAri2tWZoxtyV0zif0yxduk2JDKQ== +"@schematics/angular@20.0.0-next.2": + version "20.0.0-next.2" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-20.0.0-next.2.tgz#efd509bf2dd4e3c5b64a86229524da13883702af" + integrity sha512-du8Ft+vEGelxt4BNuSHD2PZx+9fNgZpVFtu/4N+unsjImdaK5dOstaRXJkRmBy+DUr5z6V633rN9/q1tE14VPg== dependencies: - "@angular-devkit/core" "20.0.0-next.1" - "@angular-devkit/schematics" "20.0.0-next.1" + "@angular-devkit/core" "20.0.0-next.2" + "@angular-devkit/schematics" "20.0.0-next.2" jsonc-parser "3.3.1" "@shikijs/core@3.2.1": @@ -13852,6 +13829,13 @@ piscina@4.8.0: optionalDependencies: "@napi-rs/nice" "^1.0.1" +piscina@4.9.2: + version "4.9.2" + resolved "https://registry.yarnpkg.com/piscina/-/piscina-4.9.2.tgz#80f2c2375231720337c703e443941adfac8caf75" + integrity sha512-Fq0FERJWFEUpB4eSY59wSNwXD4RYqR+nR/WiEVcZW8IWfVBxJJafcgTEZDQo8k3w0sUarJ8RyVbbUF4GQ2LGbQ== + optionalDependencies: + "@napi-rs/nice" "^1.0.1" + pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -15019,7 +15003,7 @@ rollup@4.35.0: "@rollup/rollup-win32-x64-msvc" "4.35.0" fsevents "~2.3.2" -rollup@^4.23.0, rollup@^4.30.1: +rollup@4.36.0, rollup@^4.23.0, rollup@^4.30.1: version "4.36.0" resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.36.0.tgz#f40f4db47ba3b4f5846d32a47e580c0ed7cd8f02" integrity sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q== @@ -15202,10 +15186,10 @@ sass@1.83.1: optionalDependencies: "@parcel/watcher" "^2.4.1" -sass@1.85.1: - version "1.85.1" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.85.1.tgz#18ab0bb48110ae99163778f06445b406148ca0d5" - integrity sha512-Uk8WpxM5v+0cMR0XjX9KfRIacmSG86RH4DCCZjLU2rFh5tyutt9siAXJ7G+YfxQ99Q6wrRMbMlVl6KqUms71ag== +sass@1.86.0: + version "1.86.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.86.0.tgz#f49464fb6237a903a93f4e8760ef6e37a5030114" + integrity sha512-zV8vGUld/+mP4KbMLJMX7TyGCuUp7hnkOScgCMsWuHtns8CWBoz+vmEhoGMXsaJrbUP8gj+F1dLvVe79sK8UdA== dependencies: chokidar "^4.0.0" immutable "^5.0.2" @@ -17614,10 +17598,10 @@ vite@6.0.7: optionalDependencies: fsevents "~2.3.3" -vite@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/vite/-/vite-6.2.1.tgz#ae865d4bb93a11844be1bc647c8b2dd1856ea180" - integrity sha512-n2GnqDb6XPhlt9B8olZPrgMD/es/Nd1RdChF6CBD/fHW6pUyUTt2sQW2fPRX5GiD9XEa6+8A6A4f2vT6pSsE7Q== +vite@6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/vite/-/vite-6.2.2.tgz#8098b12a6bfd95abe39399aa7d5faa56545d7a1a" + integrity sha512-yW7PeMM+LkDzc7CgJuRLMW2Jz0FxMOsVJ8Lv3gpgW9WLcb9cTW+121UEr1hvmfR7w3SegR5ItvYyzVz1vxNJgQ== dependencies: esbuild "^0.25.0" postcss "^8.5.3" From a7183d8889b8384d78a344bac96486ec63c8d835 Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Thu, 20 Mar 2025 11:55:49 +0000 Subject: [PATCH 10/15] ci: run adev tests before build (#60485) Since tests run faster than the build, executing them first allows for quicker failure detection, improving efficiency. PR Close #60485 --- .github/workflows/ci.yml | 4 ++-- .github/workflows/pr.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2275403265cd..08cd78a61ff7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,10 +83,10 @@ jobs: uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f - name: Install node modules run: yarn install --frozen-lockfile - - name: Build adev in fast mode to ensure it continues to work - run: yarn bazel build //adev:build --config=release - name: Run tests run: yarn bazel test //adev/... + - name: Build adev in fast mode to ensure it continues to work + run: yarn bazel build //adev:build --config=release publish-snapshots: runs-on: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e473e8156a0d..90476f58a1e7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -118,10 +118,10 @@ jobs: uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f - name: Install node modules run: yarn install --frozen-lockfile - - name: Build adev in fast mode to ensure it continues to work - run: yarn bazel build //adev:build --config=release - name: Run tests run: yarn bazel test //adev/... + - name: Build adev in fast mode to ensure it continues to work + run: yarn bazel build //adev:build --config=release zone-js: runs-on: From e0ff321433bfed684b28956adc7af7c3ac514cf1 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 20 Mar 2025 12:11:09 +0000 Subject: [PATCH 11/15] build: prepare testing infrastructure for code splitting of `core` package (#60487) When we switch to relative imports, shared `.d.ts` chunks can be generated. We need to also pull these into our mock virtual FS testing environments. Notably this does not cause a test slow-down because we are talking about very few extra `.d.ts` chunk files. In our experiments before, with no dts bundling, we saw test time increase from e.g. 20seconds to 100seconds. The 20s are still the same locally! In addition, since code for definitions can now reside in shared `.d.ts` chunks, the language service tests need to be adjusted in cases where they assert for code definition locations in `@angular/core`. A new helper prepares for more code to be moved into arbitrary `.d.ts` files; we should simply assert the definition comes out of `node_modules/@angular/core`. PR Close #60487 --- .../src/ngtsc/typecheck/testing/BUILD.bazel | 1 + .../src/ngtsc/typecheck/testing/index.ts | 79 +++++-------------- .../test/type_definitions_spec.ts | 5 +- packages/language-service/testing/src/util.ts | 36 ++++++++- 4 files changed, 58 insertions(+), 63 deletions(-) diff --git a/packages/compiler-cli/src/ngtsc/typecheck/testing/BUILD.bazel b/packages/compiler-cli/src/ngtsc/typecheck/testing/BUILD.bazel index 4f42571d9db5..f1eb155145b7 100644 --- a/packages/compiler-cli/src/ngtsc/typecheck/testing/BUILD.bazel +++ b/packages/compiler-cli/src/ngtsc/typecheck/testing/BUILD.bazel @@ -23,6 +23,7 @@ ts_library( "//packages/compiler-cli/src/ngtsc/typecheck", "//packages/compiler-cli/src/ngtsc/typecheck/api", "//packages/compiler-cli/src/ngtsc/util", + "@npm//tinyglobby", "@npm//typescript", ], ) diff --git a/packages/compiler-cli/src/ngtsc/typecheck/testing/index.ts b/packages/compiler-cli/src/ngtsc/typecheck/testing/index.ts index 7358918e2ffc..5ebbd556e68d 100644 --- a/packages/compiler-cli/src/ngtsc/typecheck/testing/index.ts +++ b/packages/compiler-cli/src/ngtsc/typecheck/testing/index.ts @@ -22,6 +22,7 @@ import { import {readFileSync} from 'fs'; import path from 'path'; import ts from 'typescript'; +import {globSync} from 'tinyglobby'; import { absoluteFrom, @@ -151,19 +152,19 @@ export function typescriptLibDts(): TestFile { }; } +let _angularCoreDts: TestFile[] | null = null; export function angularCoreDtsFiles(): TestFile[] { + if (_angularCoreDts !== null) { + return _angularCoreDts; + } + const directory = resolveFromRunfiles('angular/packages/core/npm_package'); + const dtsFiles = globSync('**/*.d.ts', {cwd: directory}); - return [ - { - name: absoluteFrom('/node_modules/@angular/core/index.d.ts'), - contents: readFileSync(path.join(directory, 'index.d.ts'), 'utf8'), - }, - { - name: absoluteFrom('/node_modules/@angular/core/primitives/signals/index.d.ts'), - contents: readFileSync(path.join(directory, 'primitives/signals/index.d.ts'), 'utf8'), - }, - ]; + return (_angularCoreDts = dtsFiles.map((fileName) => ({ + name: absoluteFrom(`/node_modules/@angular/core/${fileName}`), + contents: readFileSync(path.join(directory, fileName), 'utf8'), + }))); } export function angularAnimationsDts(): TestFile { @@ -246,12 +247,7 @@ export function ngForDts(): TestFile { export function ngForTypeCheckTarget(): TypeCheckingTarget { const dts = ngForDts(); - return { - ...dts, - fileName: dts.name, - source: dts.contents, - templates: {}, - }; + return {...dts, fileName: dts.name, source: dts.contents, templates: {}}; } export const ALL_ENABLED_CONFIG: Readonly = { @@ -425,9 +421,7 @@ export function tcb( checkTwoWayBoundEvents: true, ...config, }; - options = options || { - emitSpans: false, - }; + options = options || {emitSpans: false}; const fileName = absoluteFrom('/type-check-file.ts'); @@ -518,18 +512,12 @@ export function setup( } } - files.push({ - name: target.fileName, - contents, - }); + files.push({name: target.fileName, contents}); if (!target.fileName.endsWith('.d.ts')) { const shimName = TypeCheckShimGenerator.shimFor(target.fileName); shims.set(target.fileName, shimName); - files.push({ - name: shimName, - contents: 'export const MODULE = true;', - }); + files.push({name: shimName, contents: 'export const MODULE = true;'}); } } @@ -538,12 +526,7 @@ export function setup( const {program, host, options} = makeProgram( files, - { - strictNullChecks: true, - skipLibCheck: true, - noImplicitAny: true, - ...opts, - }, + {strictNullChecks: true, skipLibCheck: true, noImplicitAny: true, ...opts}, /* host */ undefined, /* checkForErrors */ false, ); @@ -585,10 +568,7 @@ export function setup( if (shims.has(target.fileName)) { const shimFileName = shims.get(target.fileName)!; const shimSf = getSourceFileOrError(program, shimFileName); - sfExtensionData(shimSf).fileShim = { - extension: 'ngtypecheck', - generatedFrom: target.fileName, - }; + sfExtensionData(shimSf).fileShim = {extension: 'ngtypecheck', generatedFrom: target.fileName}; } for (const className of Object.keys(target.templates)) { @@ -669,10 +649,7 @@ export function setup( if (!scopeMap.has(clazz)) { // This class wasn't part of the target set of components with templates, but is // probably a declaration used in one of them. Return an empty scope. - const emptyScope: ScopeData = { - dependencies: [], - isPoisoned: false, - }; + const emptyScope: ScopeData = {dependencies: [], isPoisoned: false}; return { kind: ComponentScopeKind.NgModule, ngModule, @@ -723,11 +700,7 @@ export function setup( typeCheckScopeRegistry, NOOP_PERF_RECORDER, ); - return { - templateTypeChecker, - program, - programStrategy, - }; + return {templateTypeChecker, program, programStrategy}; } /** @@ -746,14 +719,7 @@ export function diagnose( const sfPath = absoluteFrom('/main.ts'); const {program, templateTypeChecker} = setup( [ - { - fileName: sfPath, - templates: { - 'TestComponent': template, - }, - source, - declarations, - }, + {fileName: sfPath, templates: {'TestComponent': template}, source, declarations}, ...additionalSources.map((testFile) => ({ fileName: testFile.name, source: testFile.contents, @@ -908,10 +874,7 @@ function getDirectiveMetaFromDeclaration( * Synthesize `ScopeData` metadata from an array of `TestDeclaration`s. */ function makeScope(program: ts.Program, sf: ts.SourceFile, decls: TestDeclaration[]): ScopeData { - const scope: ScopeData = { - dependencies: [], - isPoisoned: false, - }; + const scope: ScopeData = {dependencies: [], isPoisoned: false}; for (const decl of decls) { let declSf = sf; diff --git a/packages/language-service/test/type_definitions_spec.ts b/packages/language-service/test/type_definitions_spec.ts index ae4396b59d31..ac169076efcb 100644 --- a/packages/language-service/test/type_definitions_spec.ts +++ b/packages/language-service/test/type_definitions_spec.ts @@ -10,6 +10,7 @@ import {initMockFileSystem} from '@angular/compiler-cli/src/ngtsc/file_system/te import { assertFileNames, + assertFilePaths, assertTextSpans, humanizeDocumentSpanLike, LanguageServiceTestEnv, @@ -119,7 +120,7 @@ describe('type definitions', () => { expect(definitions!.length).toEqual(1); assertTextSpans(definitions, ['OutputEmitterRef']); - assertFileNames(definitions, ['index.d.ts']); + assertFilePaths(definitions, [/node_modules\/@angular\/core\/.*\.d\.ts/]); }); }); @@ -158,7 +159,7 @@ describe('type definitions', () => { expect(definitions!.length).toEqual(1); assertTextSpans(definitions, ['OutputRef']); - assertFileNames(definitions, ['index.d.ts']); + assertFilePaths(definitions, [/node_modules\/@angular\/core\/.*\.d\.ts/]); }); }); diff --git a/packages/language-service/testing/src/util.ts b/packages/language-service/testing/src/util.ts index 5fe31df2d9ad..e32ae3d39779 100644 --- a/packages/language-service/testing/src/util.ts +++ b/packages/language-service/testing/src/util.ts @@ -22,6 +22,38 @@ export function assertFileNames(refs: Array<{fileName: string}>, expectedFileNam expect(new Set(actualFileNames)).toEqual(new Set(expectedFileNames)); } +/** + * Expect that a list of objects with a `fileName` property matches a set + * of file paths. + * + * This assertion is independent of the order of either list. + */ +export function assertFilePaths(refs: Array<{fileName: string}>, expectedPaths: RegExp[]) { + const actualPaths = Array.from(new Set(refs.map((r) => r.fileName))); + + if (actualPaths.length !== expectedPaths.length) { + expect(actualPaths.length) + .withContext('Expected expected paths to be the same size.') + .toBe(expectedPaths.length); + return; + } + + for (const pattern of expectedPaths) { + const matching = actualPaths.findIndex((p) => pattern.test(p)); + if (matching !== -1) { + actualPaths.splice(matching, 1); + } else { + expect(true) + .withContext( + `Expected ${pattern} to match a file path. ` + + `Remaining unmatched paths: ${actualPaths.join(', ')}`, + ) + .toBe(false); + return; + } + } +} + export function assertTextSpans(items: Array<{textSpan: string}>, expectedTextSpans: string[]) { const actualSpans = items.map((item) => item.textSpan); expect(new Set(actualSpans)).toEqual(new Set(expectedTextSpans)); @@ -97,9 +129,7 @@ export function humanizeDocumentSpanLike( : undefined, }; } -type Stringy = { - [P in keyof T]: string; -}; +type Stringy = {[P in keyof T]: string}; export function getText(contents: string, textSpan: ts.TextSpan) { return contents.slice(textSpan.start, textSpan.start + textSpan.length); From 4b312aeb43f085e81fd13e151ae769c32a250d56 Mon Sep 17 00:00:00 2001 From: Jessica Janiuk Date: Thu, 20 Mar 2025 15:00:57 -0400 Subject: [PATCH 12/15] ci: fix over extraction of init symbols in symbol tests (#60493) This omits including any init_ symbols in the symbol tests that were unnecessary and causing friction. PR Close #60493 --- .../bundling/defer/bundle.golden_symbols.json | 398 ------------------ tools/symbol-extractor/symbol_extractor.ts | 27 +- 2 files changed, 26 insertions(+), 399 deletions(-) diff --git a/packages/core/test/bundling/defer/bundle.golden_symbols.json b/packages/core/test/bundling/defer/bundle.golden_symbols.json index 55dd9a78b018..6a2ea8cee535 100644 --- a/packages/core/test/bundling/defer/bundle.golden_symbols.json +++ b/packages/core/test/bundling/defer/bundle.golden_symbols.json @@ -353,404 +353,6 @@ "importProvidersFrom", "includeViewProviders", "incrementInitPhaseFlags", - "init_BehaviorSubject", - "init_NotificationFactories", - "init_ObjectUnsubscribedError", - "init_Observable", - "init_OperatorSubscriber", - "init_Subject", - "init_Subscriber", - "init_Subscription", - "init_UnsubscriptionError", - "init_action_resolver", - "init_advance", - "init_after_render_effect", - "init_all", - "init_annotate", - "init_api", - "init_api2", - "init_api3", - "init_api4", - "init_api5", - "init_api_flags", - "init_application_config", - "init_application_init", - "init_application_module", - "init_application_ngmodule_factory_compiler", - "init_application_ref", - "init_application_tokens", - "init_apply_value_input_field", - "init_arrRemove", - "init_array_utils", - "init_assert", - "init_assert2", - "init_asserts", - "init_async_stack_tagging", - "init_attach_source_locations", - "init_attribute", - "init_attribute2", - "init_attribute_interpolation", - "init_attrs_utils", - "init_authoring", - "init_bindings", - "init_bootstrap", - "init_bootstrap_app_scoped", - "init_bypass", - "init_cache", - "init_cached_injector_service", - "init_callback_scheduler", - "init_chained_injector", - "init_change_detection", - "init_change_detection2", - "init_change_detection3", - "init_change_detection_utils", - "init_change_detector_ref", - "init_char", - "init_class_differ", - "init_class_map_interpolation", - "init_cleanup", - "init_cleanup2", - "init_closure", - "init_coercion", - "init_collect_native_nodes", - "init_comparison", - "init_compiler", - "init_compiler_facade", - "init_compiler_facade_interface", - "init_component", - "init_component_factory", - "init_component_factory_resolver", - "init_component_instance", - "init_component_ref", - "init_compression", - "init_computed", - "init_computed2", - "init_config", - "init_console", - "init_constants", - "init_construction", - "init_container", - "init_container2", - "init_context", - "init_context_discovery", - "init_contextual", - "init_control_flow", - "init_copy_definition_feature", - "init_core", - "init_core2", - "init_core_private_export", - "init_core_reactivity_export", - "init_core_reactivity_export_internal", - "init_core_render3_private_export", - "init_createErrorClass", - "init_create_application", - "init_create_injector", - "init_debug_node", - "init_decorators", - "init_def_getters", - "init_default_iterable_differ", - "init_default_keyvalue_differ", - "init_defer", - "init_defer_component", - "init_definition", - "init_definition_factory", - "init_defs", - "init_deps_tracker", - "init_destroy_ref", - "init_di", - "init_di2", - "init_di3", - "init_di4", - "init_di5", - "init_di6", - "init_di_attr", - "init_di_setup", - "init_directive", - "init_directive_outputs", - "init_directives", - "init_directives2", - "init_discovery", - "init_discovery_utils", - "init_dispatcher", - "init_document", - "init_dom", - "init_dom_node_manipulation", - "init_dom_triggers", - "init_dynamic_bindings", - "init_earlyeventcontract", - "init_effect", - "init_element", - "init_element_container", - "init_element_ref", - "init_element_validation", - "init_elements", - "init_empty", - "init_environment", - "init_environment2", - "init_equality", - "init_errorContext", - "init_error_details_base_url", - "init_error_handler", - "init_error_handling", - "init_errors", - "init_errors2", - "init_errors3", - "init_errors_di", - "init_esm", - "init_event", - "init_event_contract_container", - "init_event_contract_defines", - "init_event_delegation_utils", - "init_event_dispatch", - "init_event_dispatcher", - "init_event_emitter", - "init_event_info", - "init_event_replay", - "init_event_type", - "init_eventcontract", - "init_exhaustive_check_no_changes", - "init_external_styles_feature", - "init_fields", - "init_flags", - "init_forward_ref", - "init_framework_injector_profiler", - "init_get_closest_component_name", - "init_get_current_view", - "init_global", - "init_global_utils", - "init_graph", - "init_hmr", - "init_hooks", - "init_hooks2", - "init_host_attribute_token", - "init_host_directives_feature", - "init_host_property", - "init_host_tag_name_token", - "init_html_sanitizer", - "init_i18n", - "init_i18n2", - "init_i18n3", - "init_i18n_apply", - "init_i18n_debug", - "init_i18n_icu_container_visitor", - "init_i18n_insert_before_index", - "init_i18n_locale_id", - "init_i18n_parse", - "init_i18n_postprocess", - "init_i18n_tree_shaking", - "init_i18n_util", - "init_identity", - "init_idle_scheduler", - "init_iframe_attrs_validation", - "init_image_performance_warning", - "init_inert_body", - "init_inherit_definition_feature", - "init_initializer_token", - "init_inject_switch", - "init_injectable", - "init_injectable2", - "init_injection_token", - "init_injector", - "init_injector2", - "init_injector3", - "init_injector_compatibility", - "init_injector_discovery_utils", - "init_injector_profiler", - "init_injector_token", - "init_injector_utils", - "init_input", - "init_input_flags", - "init_input_signal", - "init_input_signal_node", - "init_instructions", - "init_interfaces", - "init_interfaces2", - "init_internal_tokens", - "init_interpolation", - "init_isFunction", - "init_is_dev_mode", - "init_iterable", - "init_iterable_differs", - "init_jit_options", - "init_key_code", - "init_keyvalue_differs", - "init_lang", - "init_let_declaration", - "init_lift", - "init_linked_signal", - "init_linked_signal2", - "init_linker", - "init_list_reconciliation", - "init_listener", - "init_listeners", - "init_local_compilation", - "init_locale_data_api", - "init_locale_en", - "init_localization", - "init_lview_tracking", - "init_manager", - "init_map", - "init_mark_view_dirty", - "init_metadata", - "init_metadata2", - "init_metadata3", - "init_metadata_attr", - "init_misc_utils", - "init_model", - "init_model_signal", - "init_module", - "init_module_patch", - "init_namespace", - "init_namespaces", - "init_next_context", - "init_ng_dev_mode", - "init_ng_i18n_closure_mode", - "init_ng_jit_mode", - "init_ng_module", - "init_ng_module_factory", - "init_ng_module_factory_loader", - "init_ng_module_factory_loader_impl", - "init_ng_module_ref", - "init_ng_module_registration", - "init_ng_onchanges_feature", - "init_ng_reflect", - "init_ng_server_mode", - "init_ng_zone", - "init_ng_zone_scheduling", - "init_node", - "init_node_assert", - "init_node_lookup_utils", - "init_node_manipulation", - "init_node_manipulation_i18n", - "init_node_selector_matcher", - "init_noop", - "init_noop2", - "init_not_found", - "init_null_injector", - "init_observable", - "init_operators", - "init_output", - "init_output_emitter_ref", - "init_partial", - "init_pending_tasks", - "init_performance", - "init_pipe", - "init_pipe2", - "init_pipe3", - "init_platform", - "init_platform_core_providers", - "init_platform_destroy_listeners", - "init_platform_ref", - "init_platform_tokens", - "init_profiler", - "init_profiler2", - "init_projection", - "init_property", - "init_property2", - "init_property3", - "init_property_interpolation", - "init_provider", - "init_provider_collection", - "init_provider_flags", - "init_providers_feature", - "init_public_api", - "init_pure_function", - "init_queries", - "init_queries2", - "init_queries_signals", - "init_query", - "init_query_execution", - "init_query_list", - "init_query_reactive", - "init_r3_injector", - "init_r3_symbols", - "init_reactive_lview_consumer", - "init_reflection_capabilities", - "init_registry", - "init_render", - "init_render2", - "init_render3", - "init_rendering", - "init_reportUnhandledError", - "init_resource", - "init_resource2", - "init_resource_loading", - "init_restriction", - "init_root_effect_scheduler", - "init_sanitization", - "init_sanitizer", - "init_schema", - "init_scope", - "init_scope2", - "init_security", - "init_set_debug_info", - "init_shared", - "init_signal", - "init_signal2", - "init_signal_debug", - "init_signals", - "init_simple_change", - "init_skip_hydration", - "init_standalone_service", - "init_state", - "init_static_styling", - "init_storage", - "init_stringify", - "init_stringify_utils", - "init_style_binding_list", - "init_style_map_interpolation", - "init_style_prop_interpolation", - "init_styling", - "init_styling2", - "init_styling_parser", - "init_template", - "init_template_ref", - "init_testability", - "init_text", - "init_text_interpolation", - "init_timeoutProvider", - "init_timer_scheduler", - "init_tnode_manipulation", - "init_tokens", - "init_tokens2", - "init_tokens3", - "init_tracing", - "init_transfer_state", - "init_triggering", - "init_trusted_types", - "init_trusted_types_bypass", - "init_two_way", - "init_type", - "init_type_checks", - "init_types", - "init_untracked", - "init_untracked2", - "init_url_sanitizer", - "init_util", - "init_util2", - "init_utils", - "init_utils2", - "init_utils3", - "init_version", - "init_view", - "init_view2", - "init_view3", - "init_view_container_ref", - "init_view_context", - "init_view_effect_runner", - "init_view_engine_compatibility_prebound", - "init_view_manipulation", - "init_view_ref", - "init_view_ref2", - "init_view_traversal_utils", - "init_view_utils", - "init_views", - "init_watch", - "init_weak_ref", - "init_write_to_directive_input", - "init_zone", - "init_zoneless_scheduling", - "init_zoneless_scheduling_impl", "inject", "injectArgs", "injectDestroyRef", diff --git a/tools/symbol-extractor/symbol_extractor.ts b/tools/symbol-extractor/symbol_extractor.ts index c746e6f01ccb..f44bb9b9d2c1 100644 --- a/tools/symbol-extractor/symbol_extractor.ts +++ b/tools/symbol-extractor/symbol_extractor.ts @@ -44,7 +44,9 @@ export class SymbolExtractor { // by omitting the initializer completely. We capture such declarations as well. // https://github.com/terser/terser/blob/86ea74d5c12ae51b64468/CHANGELOG.md#v540. if (fnRecurseDepth !== 0) { - symbols.push(stripSuffix(varDecl.name.getText())); + if (!isEsmInitFunction(varDecl)) { + symbols.push(stripSuffix(varDecl.name.getText())); + } } break; case ts.SyntaxKind.FunctionDeclaration: @@ -120,3 +122,26 @@ function stripSuffix(text: string): string { const index = text.lastIndexOf('$'); return index > -1 ? text.substring(0, index) : text; } + +/** + * This function detects a specific pattern that represents ESM modules + * in the generated code. Those symbols are not really needed for the purposes + * of symbol checking, since they only represent a module graph and all + * nested symbols are being captured by the logic already. The pattern that + * this function detects looks like this: + * ``` + * var init_testability = __esm({ + * "packages/core/src/testability/testability.mjs"() { + * // ... + * } + * }); + * ``` + */ +function isEsmInitFunction(varDecl: ts.VariableDeclaration) { + return ( + varDecl.name.getText().startsWith('init_') && + varDecl.initializer && + ts.isCallExpression(varDecl.initializer) && + (varDecl.initializer.expression as ts.Identifier).escapedText === '___esm' + ); +} From 6890eab22090138101c4f26fa3fe395302e8b5e9 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 20 Mar 2025 14:18:18 +0000 Subject: [PATCH 13/15] test: add integration test to ensure all exported modules can be imported (#60489) This commit adds a new integration test which will help ensure that all exported `@NgModule`'s of framework packages can be imported by users without any errors. This test is generally useful, but with our upcoming changes with relative imports, this is a good safety-net. Relative imports could break re-exported NgModules inside NgModule's. For more details, see: https://github.com/angular/components/pull/30667 Notably we don't expect any issues for framework package as re-exporting `@NgModule`'s inside `@NgModule`'s is seemingly a rather rare pattern for APF libraries (confirmed by Material only having like 4-5 instances). PR Close #60489 --- .../ng-modules-importability/BUILD.bazel | 33 +++++++ .../ng-modules-importability/README.md | 9 ++ .../find-all-modules.ts | 70 +++++++++++++++ .../ng-modules-importability/index.bzl | 23 +++++ integration/ng-modules-importability/index.ts | 86 +++++++++++++++++++ 5 files changed, 221 insertions(+) create mode 100644 integration/ng-modules-importability/BUILD.bazel create mode 100644 integration/ng-modules-importability/README.md create mode 100644 integration/ng-modules-importability/find-all-modules.ts create mode 100644 integration/ng-modules-importability/index.bzl create mode 100644 integration/ng-modules-importability/index.ts diff --git a/integration/ng-modules-importability/BUILD.bazel b/integration/ng-modules-importability/BUILD.bazel new file mode 100644 index 000000000000..1633fe8e771d --- /dev/null +++ b/integration/ng-modules-importability/BUILD.bazel @@ -0,0 +1,33 @@ +load("//integration/ng-modules-importability:index.bzl", "module_test") +load("//tools:defaults.bzl", "ts_library") + +ts_library( + name = "test_lib", + testonly = True, + srcs = glob(["*.ts"]), + deps = [ + "//packages/compiler-cli", + "@npm//typescript", + ], +) + +module_test( + name = "test", + npm_packages = { + "//packages/animations:npm_package": "packages/animations/npm_package", + "//packages/common:npm_package": "packages/common/npm_package", + "//packages/core:npm_package": "packages/core/npm_package", + "//packages/elements:npm_package": "packages/elements/npm_package", + "//packages/forms:npm_package": "packages/forms/npm_package", + "//packages/localize:npm_package": "packages/localize/npm_package", + "//packages/platform-browser-dynamic:npm_package": "packages/platform-browser-dynamic/npm_package", + "//packages/platform-browser:npm_package": "packages/platform-browser/npm_package", + "//packages/router:npm_package": "packages/router/npm_package", + "//packages/service-worker:npm_package": "packages/service-worker/npm_package", + "//packages/upgrade:npm_package": "packages/upgrade/npm_package", + }, + skipped_entry_points = [ + # Core does not expose any modules and just needs to be made available. + "@angular/core", + ], +) diff --git a/integration/ng-modules-importability/README.md b/integration/ng-modules-importability/README.md new file mode 100644 index 000000000000..f65d657e31be --- /dev/null +++ b/integration/ng-modules-importability/README.md @@ -0,0 +1,9 @@ +This test is a safety check, ensuring that all `@NgModule`'s exported by Angular framework +packages can be imported in user code without causing any build errors. + +Occasionally, an `@NgModule` might re-export another module. This is fine, but there are +cases, especially with relative imports being used, where the compiler (in consuming projects) +is not able to find a working import to these re-exported symbols. + +The re-exported symbols simply need to be re-exported from the entry-point. For more details +on this, see: https://github.com/angular/components/pull/30667. diff --git a/integration/ng-modules-importability/find-all-modules.ts b/integration/ng-modules-importability/find-all-modules.ts new file mode 100644 index 000000000000..349de45e34af --- /dev/null +++ b/integration/ng-modules-importability/find-all-modules.ts @@ -0,0 +1,70 @@ +import * as fs from 'node:fs/promises'; +import * as path from 'node:path'; +import * as ts from 'typescript'; + +export async function findAllEntryPointsAndExportedModules(packagePath: string) { + const packageJsonRaw = await fs.readFile(path.join(packagePath, 'package.json'), 'utf8'); + const packageJson = JSON.parse(packageJsonRaw) as { + name: string; + exports: Record>; + }; + const tasks: Promise<{importPath: string; symbolName: string}[]>[] = []; + + for (const [subpath, conditions] of Object.entries(packageJson.exports)) { + if (conditions['types'] === undefined) { + continue; + } + + // Skip wild-card conditions. Those are not entry-points. e.g. common/locales. + if (conditions['types'].includes('*')) { + continue; + } + + tasks.push( + (async () => { + const dtsFile = path.join(packagePath, conditions['types']); + const dtsBundleFile = ts.createSourceFile( + dtsFile, + await fs.readFile(dtsFile, 'utf8'), + ts.ScriptTarget.ESNext, + false, + ); + + return scanExportsForModules(dtsBundleFile).map((e) => ({ + importPath: path.posix.join(packageJson.name, subpath), + symbolName: e, + })); + })(), + ); + } + + const moduleExports = (await Promise.all(tasks)).flat(); + + return {name: packageJson.name, packagePath, moduleExports}; +} + +function scanExportsForModules(sf: ts.SourceFile): string[] { + const moduleExports: string[] = []; + const visit = (node: ts.Node) => { + if ( + ts.isExportDeclaration(node) && + node.exportClause !== undefined && + ts.isNamedExports(node.exportClause) + ) { + moduleExports.push( + ...node.exportClause.elements + .filter( + (e) => + e.name.text.endsWith('Module') && + // Check if the first letter is upper-case. + e.name.text[0].toLowerCase() !== e.name.text[0], + ) + .map((e) => e.name.text), + ); + } + }; + + ts.forEachChild(sf, visit); + + return moduleExports; +} diff --git a/integration/ng-modules-importability/index.bzl b/integration/ng-modules-importability/index.bzl new file mode 100644 index 000000000000..691841274b8b --- /dev/null +++ b/integration/ng-modules-importability/index.bzl @@ -0,0 +1,23 @@ +load("@bazel_skylib//rules:write_file.bzl", "write_file") +load("//tools:defaults.bzl", "nodejs_test") + +def module_test(name, npm_packages, skipped_entry_points = [], additional_deps = []): + write_file( + name = "%s_config" % name, + out = "%s_config.json" % name, + content = [json.encode({ + "packages": [pkg[1] for pkg in npm_packages.items()], + "skipEntryPoints": skipped_entry_points, + })], + ) + + nodejs_test( + name = "test", + data = [ + ":%s_config" % name, + "//integration/ng-modules-importability:test_lib", + ] + additional_deps + [pkg[0] for pkg in npm_packages.items()], + entry_point = "//integration/ng-modules-importability:index.ts", + enable_linker = True, + templated_args = ["$(rootpath :%s_config)" % name], + ) diff --git a/integration/ng-modules-importability/index.ts b/integration/ng-modules-importability/index.ts new file mode 100644 index 000000000000..07c693e2220c --- /dev/null +++ b/integration/ng-modules-importability/index.ts @@ -0,0 +1,86 @@ +import {performCompilation} from '@angular/compiler-cli'; +import * as fs from 'fs/promises'; +import * as path from 'path'; +import * as os from 'os'; +import ts from 'typescript'; +import {findAllEntryPointsAndExportedModules} from './find-all-modules'; + +async function main() { + const [configPath] = process.argv.slice(2); + const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), 'ng-module-test-')); + const config = JSON.parse(await fs.readFile(configPath, 'utf8')) as { + packages: string[]; + skipEntryPoints: string[]; + }; + + const packages = await Promise.all( + config.packages.map((pkgPath) => findAllEntryPointsAndExportedModules(pkgPath)), + ); + + const exports = packages + .map((p) => p.moduleExports) + .flat() + .filter((e) => !config.skipEntryPoints.includes(e.importPath)); + + const testFile = ` + import {NgModule, Component} from '@angular/core'; + ${exports.map((e) => `import {${e.symbolName}} from '${e.importPath}';`).join('\n')} + + @NgModule({ + exports: [ + ${exports.map((e) => e.symbolName).join(', ')} + ] + }) + export class TestModule {} + + @Component({imports: [TestModule], template: ''}) + export class TestComponent {} + `; + + await fs.writeFile(path.join(tmpDir, 'test.ts'), testFile); + + // Prepare node modules to resolve e.g. `@angular/core` + await fs.symlink(path.resolve('./node_modules'), path.join(tmpDir, 'node_modules')); + // Prepare node modules to resolve e.g. `@angular/cdk`. This is possible + // as we are inside the sandbox, inside our test runfiles directory. + for (const {packagePath, name} of packages) { + await fs.symlink(path.resolve(packagePath), `./node_modules/${name}`); + } + + const result = performCompilation({ + options: { + rootDir: tmpDir, + skipLibCheck: true, + noEmit: true, + module: ts.ModuleKind.ESNext, + moduleResolution: ts.ModuleResolutionKind.Bundler, + strictTemplates: true, + preserveSymlinks: true, + strict: true, + // Note: HMR is needed as it will disable the Angular compiler's tree-shaking of used + // directives/components. This is critical for this test as it allows us to simply all + // modules and automatically validate that all symbols are reachable/importable. + _enableHmr: true, + }, + rootNames: [path.join(tmpDir, 'test.ts')], + }); + + console.error( + ts.formatDiagnosticsWithColorAndContext(result.diagnostics, { + getCanonicalFileName: (f) => f, + getCurrentDirectory: () => '/', + getNewLine: () => '\n', + }), + ); + + await fs.rm(tmpDir, {recursive: true, force: true, maxRetries: 2}); + + if (result.diagnostics.length > 0) { + process.exitCode = 1; + } +} + +main().catch((e) => { + console.error('Error', e); + process.exitCode = 1; +}); From 70bdb88b0c9937ecb6d1adce5f02da32681782b3 Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Thu, 20 Mar 2025 08:54:48 +0000 Subject: [PATCH 14/15] fix(platform-browser): ensure `platformBrowserTesting` includes `platformBrowser` providers (#60480) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, `platformBrowserTesting` did not include any `platformBrowser` providers, causing an inconsistency with `platformBrowserDynamicTesting`. This update resolves the issue by restructuring platform inheritance to ensure proper provider inclusion: - `platformCore → platformBrowser → platformBrowserTesting` - `platformBrowser → platformBrowserDynamic → platformBrowserDynamicTesting` Now, `platformBrowserTesting` correctly inherits from `platformBrowser`, aligning with the expected behavior. PR Close #60480 --- .../platform-browser-dynamic/index.api.md | 5 ++-- .../testing/index.api.md | 8 +++--- .../platform-server/testing/index.api.md | 3 ++- .../src/platform-browser-dynamic.ts | 16 ++--------- .../src/platform_core_dynamic.ts | 26 ------------------ .../src/platform_providers.ts | 27 ++++++++++++------- .../src/private_export.ts | 1 - .../src/platform_core_dynamic_testing.ts | 18 ------------- .../testing/src/private_export_testing.ts | 10 ------- .../testing/src/testing.ts | 9 ++----- packages/platform-browser/src/browser.ts | 2 +- .../platform-browser/src/private_export.ts | 4 --- .../platform-browser/testing/src/browser.ts | 18 ++----------- .../testing/src/private_export_testing.ts | 9 ------- .../platform-browser/testing/src/testing.ts | 1 - packages/platform-server/testing/BUILD.bazel | 1 + .../platform-server/testing/src/server.ts | 17 +++++++----- 17 files changed, 45 insertions(+), 130 deletions(-) delete mode 100644 packages/platform-browser-dynamic/src/platform_core_dynamic.ts delete mode 100644 packages/platform-browser-dynamic/testing/src/platform_core_dynamic_testing.ts delete mode 100644 packages/platform-browser-dynamic/testing/src/private_export_testing.ts delete mode 100644 packages/platform-browser/testing/src/private_export_testing.ts diff --git a/goldens/public-api/platform-browser-dynamic/index.api.md b/goldens/public-api/platform-browser-dynamic/index.api.md index 4e8ac3a179d8..cc5f45d1fad5 100644 --- a/goldens/public-api/platform-browser-dynamic/index.api.md +++ b/goldens/public-api/platform-browser-dynamic/index.api.md @@ -4,10 +4,11 @@ ```ts -import * as _angular_core from '@angular/core'; import { Compiler } from '@angular/core'; import { CompilerFactory } from '@angular/core'; import { CompilerOptions } from '@angular/core'; +import * as i0 from '@angular/core'; +import { StaticProvider } from '@angular/core'; import { Version } from '@angular/core'; // @public @deprecated (undocumented) @@ -17,7 +18,7 @@ export class JitCompilerFactory implements CompilerFactory { } // @public (undocumented) -export const platformBrowserDynamic: (extraProviders?: _angular_core.StaticProvider[]) => _angular_core.PlatformRef; +export const platformBrowserDynamic: (extraProviders?: StaticProvider[]) => i0.PlatformRef; // @public (undocumented) export const VERSION: Version; diff --git a/goldens/public-api/platform-browser-dynamic/testing/index.api.md b/goldens/public-api/platform-browser-dynamic/testing/index.api.md index 6ec165a64d38..fbc1ef4f5d05 100644 --- a/goldens/public-api/platform-browser-dynamic/testing/index.api.md +++ b/goldens/public-api/platform-browser-dynamic/testing/index.api.md @@ -4,7 +4,7 @@ ```ts -import * as _angular_core from '@angular/core'; +import * as i0 from '@angular/core'; import * as i1 from '@angular/platform-browser/testing'; import { PlatformRef } from '@angular/core'; import { StaticProvider } from '@angular/core'; @@ -12,11 +12,11 @@ import { StaticProvider } from '@angular/core'; // @public export class BrowserDynamicTestingModule { // (undocumented) - static ɵfac: _angular_core.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; // (undocumented) - static ɵinj: _angular_core.ɵɵInjectorDeclaration; + static ɵinj: i0.ɵɵInjectorDeclaration; // (undocumented) - static ɵmod: _angular_core.ɵɵNgModuleDeclaration; + static ɵmod: i0.ɵɵNgModuleDeclaration; } // @public (undocumented) diff --git a/goldens/public-api/platform-server/testing/index.api.md b/goldens/public-api/platform-server/testing/index.api.md index 74a84c321515..8d2d87e65053 100644 --- a/goldens/public-api/platform-server/testing/index.api.md +++ b/goldens/public-api/platform-server/testing/index.api.md @@ -6,9 +6,10 @@ import * as i0 from '@angular/core'; import * as i1 from '@angular/platform-browser-dynamic/testing'; +import { StaticProvider } from '@angular/core'; // @public -export const platformServerTesting: (extraProviders?: i0.StaticProvider[]) => i0.PlatformRef; +export const platformServerTesting: (extraProviders?: StaticProvider[]) => i0.PlatformRef; // @public export class ServerTestingModule { diff --git a/packages/platform-browser-dynamic/src/platform-browser-dynamic.ts b/packages/platform-browser-dynamic/src/platform-browser-dynamic.ts index 988c5142d65b..9d40b04947ec 100644 --- a/packages/platform-browser-dynamic/src/platform-browser-dynamic.ts +++ b/packages/platform-browser-dynamic/src/platform-browser-dynamic.ts @@ -6,20 +6,8 @@ * found in the LICENSE file at https://angular.dev/license */ -import {createPlatformFactory} from '@angular/core'; - -import {platformCoreDynamic} from './platform_core_dynamic'; -import {INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS} from './platform_providers'; - -export * from './private_export'; export {VERSION} from './version'; export {JitCompilerFactory} from './compiler_factory'; +export {platformBrowserDynamic} from './platform_providers'; -/** - * @publicApi - */ -export const platformBrowserDynamic = createPlatformFactory( - platformCoreDynamic, - 'browserDynamic', - INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, -); +export * from './private_export'; diff --git a/packages/platform-browser-dynamic/src/platform_core_dynamic.ts b/packages/platform-browser-dynamic/src/platform_core_dynamic.ts deleted file mode 100644 index bf7777123093..000000000000 --- a/packages/platform-browser-dynamic/src/platform_core_dynamic.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.dev/license - */ - -import { - COMPILER_OPTIONS, - CompilerFactory, - createPlatformFactory, - platformCore, -} from '@angular/core'; - -import {JitCompilerFactory} from './compiler_factory'; - -/** - * A platform that included corePlatform and the compiler. - * - * @publicApi - */ -export const platformCoreDynamic = createPlatformFactory(platformCore, 'coreDynamic', [ - {provide: COMPILER_OPTIONS, useValue: {}, multi: true}, - {provide: CompilerFactory, useClass: JitCompilerFactory, deps: [COMPILER_OPTIONS]}, -]); diff --git a/packages/platform-browser-dynamic/src/platform_providers.ts b/packages/platform-browser-dynamic/src/platform_providers.ts index 9b2b9f2369ba..8eee1ce7b224 100644 --- a/packages/platform-browser-dynamic/src/platform_providers.ts +++ b/packages/platform-browser-dynamic/src/platform_providers.ts @@ -6,22 +6,31 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ɵPLATFORM_BROWSER_ID as PLATFORM_BROWSER_ID} from '@angular/common'; +import { + COMPILER_OPTIONS, + CompilerFactory, + createPlatformFactory, + StaticProvider, +} from '@angular/core'; +import {platformBrowser} from '@angular/platform-browser'; import {ResourceLoader} from '@angular/compiler'; -import {COMPILER_OPTIONS, PLATFORM_ID, StaticProvider} from '@angular/core'; -import {ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS as INTERNAL_BROWSER_PLATFORM_PROVIDERS} from '@angular/platform-browser'; - import {ResourceLoaderImpl} from './resource_loader/resource_loader_impl'; +import {JitCompilerFactory} from './compiler_factory'; -/** - * @publicApi - */ export const INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: StaticProvider[] = [ - INTERNAL_BROWSER_PLATFORM_PROVIDERS, { provide: COMPILER_OPTIONS, useValue: {providers: [{provide: ResourceLoader, useClass: ResourceLoaderImpl, deps: []}]}, multi: true, }, - {provide: PLATFORM_ID, useValue: PLATFORM_BROWSER_ID}, + {provide: CompilerFactory, useClass: JitCompilerFactory, deps: [COMPILER_OPTIONS]}, ]; + +/** + * @publicApi + */ +export const platformBrowserDynamic = createPlatformFactory( + platformBrowser, + 'browserDynamic', + INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, +); diff --git a/packages/platform-browser-dynamic/src/private_export.ts b/packages/platform-browser-dynamic/src/private_export.ts index 0e8e4ad0eb1f..a51836db85a7 100644 --- a/packages/platform-browser-dynamic/src/private_export.ts +++ b/packages/platform-browser-dynamic/src/private_export.ts @@ -6,5 +6,4 @@ * found in the LICENSE file at https://angular.dev/license */ -export {platformCoreDynamic as ɵplatformCoreDynamic} from './platform_core_dynamic'; export {INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS} from './platform_providers'; diff --git a/packages/platform-browser-dynamic/testing/src/platform_core_dynamic_testing.ts b/packages/platform-browser-dynamic/testing/src/platform_core_dynamic_testing.ts deleted file mode 100644 index dd143ae7de0e..000000000000 --- a/packages/platform-browser-dynamic/testing/src/platform_core_dynamic_testing.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.dev/license - */ - -import {createPlatformFactory, PlatformRef} from '@angular/core'; -import {ɵplatformCoreDynamic as platformCoreDynamic} from '@angular/platform-browser-dynamic'; - -/** - * Platform for dynamic tests - * - * @publicApi - */ -export const platformCoreDynamicTesting: (extraProviders?: any[]) => PlatformRef = - createPlatformFactory(platformCoreDynamic, 'coreDynamicTesting', []); diff --git a/packages/platform-browser-dynamic/testing/src/private_export_testing.ts b/packages/platform-browser-dynamic/testing/src/private_export_testing.ts deleted file mode 100644 index ef9a808981da..000000000000 --- a/packages/platform-browser-dynamic/testing/src/private_export_testing.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.dev/license - */ - -export {platformCoreDynamicTesting as ɵplatformCoreDynamicTesting} from './platform_core_dynamic_testing'; -export {ɵDOMTestComponentRenderer} from '@angular/platform-browser/testing'; diff --git a/packages/platform-browser-dynamic/testing/src/testing.ts b/packages/platform-browser-dynamic/testing/src/testing.ts index 254bc86e905d..85ceee513d4a 100644 --- a/packages/platform-browser-dynamic/testing/src/testing.ts +++ b/packages/platform-browser-dynamic/testing/src/testing.ts @@ -7,20 +7,15 @@ */ import {createPlatformFactory, NgModule, PlatformRef, StaticProvider} from '@angular/core'; -import {ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS as INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS} from '@angular/platform-browser-dynamic'; +import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; import {BrowserTestingModule} from '@angular/platform-browser/testing'; -import {platformCoreDynamicTesting} from './platform_core_dynamic_testing'; - -export * from './private_export_testing'; - /** * @publicApi */ export const platformBrowserDynamicTesting = createPlatformFactory( - platformCoreDynamicTesting, + platformBrowserDynamic, 'browserDynamicTesting', - INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, ); /** diff --git a/packages/platform-browser/src/browser.ts b/packages/platform-browser/src/browser.ts index 7e663ecb6bc5..12d8fc90dc65 100644 --- a/packages/platform-browser/src/browser.ts +++ b/packages/platform-browser/src/browser.ts @@ -183,7 +183,7 @@ export function _document(): any { return document; } -export const INTERNAL_BROWSER_PLATFORM_PROVIDERS: StaticProvider[] = [ +const INTERNAL_BROWSER_PLATFORM_PROVIDERS: StaticProvider[] = [ {provide: PLATFORM_ID, useValue: PLATFORM_BROWSER_ID}, {provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true}, {provide: DOCUMENT, useFactory: _document, deps: []}, diff --git a/packages/platform-browser/src/private_export.ts b/packages/platform-browser/src/private_export.ts index 486be163e2fc..7aae7820c764 100644 --- a/packages/platform-browser/src/private_export.ts +++ b/packages/platform-browser/src/private_export.ts @@ -7,10 +7,6 @@ */ export {ɵgetDOM} from '@angular/common'; -export { - initDomAdapter as ɵinitDomAdapter, - INTERNAL_BROWSER_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, -} from './browser'; export {BrowserDomAdapter as ɵBrowserDomAdapter} from './browser/browser_adapter'; export {BrowserGetTestability as ɵBrowserGetTestability} from './browser/testability'; export {DomRendererFactory2 as ɵDomRendererFactory2} from './dom/dom_renderer'; diff --git a/packages/platform-browser/testing/src/browser.ts b/packages/platform-browser/testing/src/browser.ts index fd69a5f658ad..657ae43aeac8 100644 --- a/packages/platform-browser/testing/src/browser.ts +++ b/packages/platform-browser/testing/src/browser.ts @@ -11,35 +11,21 @@ import { APP_ID, createPlatformFactory, NgModule, - PLATFORM_INITIALIZER, - platformCore, StaticProvider, ɵinternalProvideZoneChangeDetection as internalProvideZoneChangeDetection, ɵChangeDetectionScheduler as ChangeDetectionScheduler, ɵChangeDetectionSchedulerImpl as ChangeDetectionSchedulerImpl, } from '@angular/core'; import {TestComponentRenderer} from '@angular/core/testing'; -import {BrowserModule, ɵBrowserDomAdapter as BrowserDomAdapter} from '@angular/platform-browser'; +import {BrowserModule, platformBrowser} from '@angular/platform-browser'; import {DOMTestComponentRenderer} from './dom_test_component_renderer'; -function initBrowserTests() { - BrowserDomAdapter.makeCurrent(); -} - -const _TEST_BROWSER_PLATFORM_PROVIDERS: StaticProvider[] = [ - {provide: PLATFORM_INITIALIZER, useValue: initBrowserTests, multi: true}, -]; - /** * Platform for testing * * @publicApi */ -export const platformBrowserTesting = createPlatformFactory( - platformCore, - 'browserTesting', - _TEST_BROWSER_PLATFORM_PROVIDERS, -); +export const platformBrowserTesting = createPlatformFactory(platformBrowser, 'browserTesting'); /** * NgModule for testing. diff --git a/packages/platform-browser/testing/src/private_export_testing.ts b/packages/platform-browser/testing/src/private_export_testing.ts deleted file mode 100644 index 690770bf8f76..000000000000 --- a/packages/platform-browser/testing/src/private_export_testing.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.dev/license - */ - -export {DOMTestComponentRenderer as ɵDOMTestComponentRenderer} from './dom_test_component_renderer'; diff --git a/packages/platform-browser/testing/src/testing.ts b/packages/platform-browser/testing/src/testing.ts index cc8c478c49ef..0249250c0e2f 100644 --- a/packages/platform-browser/testing/src/testing.ts +++ b/packages/platform-browser/testing/src/testing.ts @@ -12,4 +12,3 @@ * Entry point for all public APIs of the platform-browser/testing package. */ export * from './browser'; -export * from './private_export_testing'; diff --git a/packages/platform-server/testing/BUILD.bazel b/packages/platform-server/testing/BUILD.bazel index 39dff822fbf1..e6b878fc310c 100644 --- a/packages/platform-server/testing/BUILD.bazel +++ b/packages/platform-server/testing/BUILD.bazel @@ -9,6 +9,7 @@ ng_module( srcs = glob(["**/*.ts"]), deps = [ "//packages/core", + "//packages/platform-browser-dynamic", "//packages/platform-browser-dynamic/testing", "//packages/platform-server", ], diff --git a/packages/platform-server/testing/src/server.ts b/packages/platform-server/testing/src/server.ts index 6d899ace6543..ac0f995af72d 100644 --- a/packages/platform-server/testing/src/server.ts +++ b/packages/platform-server/testing/src/server.ts @@ -6,25 +6,28 @@ * found in the LICENSE file at https://angular.dev/license */ -import {createPlatformFactory, NgModule} from '@angular/core'; -import { - BrowserDynamicTestingModule, - ɵplatformCoreDynamicTesting as platformCoreDynamicTesting, -} from '@angular/platform-browser-dynamic/testing'; +import {createPlatformFactory, NgModule, platformCore, StaticProvider} from '@angular/core'; +import {ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS as INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS} from '@angular/platform-browser-dynamic'; +import {BrowserDynamicTestingModule} from '@angular/platform-browser-dynamic/testing'; import { ɵINTERNAL_SERVER_PLATFORM_PROVIDERS as INTERNAL_SERVER_PLATFORM_PROVIDERS, ɵSERVER_RENDER_PROVIDERS as SERVER_RENDER_PROVIDERS, } from '@angular/platform-server'; +const INTERNAL_SERVER_DYNAMIC_PLATFORM_TESTING_PROVIDERS: StaticProvider[] = [ + ...INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, + ...INTERNAL_SERVER_PLATFORM_PROVIDERS, +]; + /** * Platform for testing * * @publicApi */ export const platformServerTesting = createPlatformFactory( - platformCoreDynamicTesting, + platformCore, 'serverTesting', - INTERNAL_SERVER_PLATFORM_PROVIDERS, + INTERNAL_SERVER_DYNAMIC_PLATFORM_TESTING_PROVIDERS, ); /** From 9ffeff91ea10901fecf35b0b0ef2b8b3489e3184 Mon Sep 17 00:00:00 2001 From: Angular Robot Date: Thu, 20 Mar 2025 19:53:05 +0000 Subject: [PATCH 15/15] build: update cross-repo angular dependencies (#60490) See associated pull request for more information. PR Close #60490 --- .github/actions/saucelabs-legacy/action.yml | 4 +- .github/workflows/adev-preview-build.yml | 8 ++-- .github/workflows/adev-preview-deploy.yml | 2 +- .../assistant-to-the-branch-manager.yml | 2 +- .github/workflows/benchmark-compare.yml | 2 +- .github/workflows/ci.yml | 40 +++++++++---------- .github/workflows/dev-infra.yml | 4 +- .github/workflows/google-internal-tests.yml | 2 +- .github/workflows/manual.yml | 8 ++-- .github/workflows/merge-ready-status.yml | 2 +- .github/workflows/perf.yml | 6 +-- .github/workflows/pr.yml | 36 ++++++++--------- .github/workflows/update-cli-help.yml | 2 +- package.json | 2 +- yarn.lock | 8 ++-- 15 files changed, 64 insertions(+), 64 deletions(-) diff --git a/.github/actions/saucelabs-legacy/action.yml b/.github/actions/saucelabs-legacy/action.yml index fbc7eae58977..066789554c04 100644 --- a/.github/actions/saucelabs-legacy/action.yml +++ b/.github/actions/saucelabs-legacy/action.yml @@ -5,9 +5,9 @@ runs: using: 'composite' steps: - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Saucelabs Variables - uses: angular/dev-infra/github-actions/saucelabs@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/saucelabs@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Starting Saucelabs tunnel service shell: bash run: ./tools/saucelabs/sauce-service.sh run & diff --git a/.github/workflows/adev-preview-build.yml b/.github/workflows/adev-preview-build.yml index 541b733bd338..237c040f9d11 100644 --- a/.github/workflows/adev-preview-build.yml +++ b/.github/workflows/adev-preview-build.yml @@ -21,16 +21,16 @@ jobs: (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'adev: preview')) steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/configure-remote@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Install node modules run: yarn install --frozen-lockfile - name: Build adev to ensure it continues to work run: yarn bazel build //adev:build --full_build_adev --config=release - - uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@27078026111b01a7202449e9788ce38f2b2e103f + - uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: workflow-artifact-name: 'adev-preview' pull-number: '${{github.event.pull_request.number}}' diff --git a/.github/workflows/adev-preview-deploy.yml b/.github/workflows/adev-preview-deploy.yml index 6d427ac52f3c..103e11755d44 100644 --- a/.github/workflows/adev-preview-deploy.yml +++ b/.github/workflows/adev-preview-deploy.yml @@ -40,7 +40,7 @@ jobs: npx -y firebase-tools@latest target:clear --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs npx -y firebase-tools@latest target:apply --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs ${{env.PREVIEW_SITE}} - - uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@27078026111b01a7202449e9788ce38f2b2e103f + - uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: github-token: '${{secrets.GITHUB_TOKEN}}' workflow-artifact-name: 'adev-preview' diff --git a/.github/workflows/assistant-to-the-branch-manager.yml b/.github/workflows/assistant-to-the-branch-manager.yml index c07379bfd3bc..9cd2e2d37ae8 100644 --- a/.github/workflows/assistant-to-the-branch-manager.yml +++ b/.github/workflows/assistant-to-the-branch-manager.yml @@ -16,6 +16,6 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false - - uses: angular/dev-infra/github-actions/branch-manager@27078026111b01a7202449e9788ce38f2b2e103f + - uses: angular/dev-infra/github-actions/branch-manager@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} diff --git a/.github/workflows/benchmark-compare.yml b/.github/workflows/benchmark-compare.yml index 050960717f46..39e031218ad3 100644 --- a/.github/workflows/benchmark-compare.yml +++ b/.github/workflows/benchmark-compare.yml @@ -38,7 +38,7 @@ jobs: - uses: ./.github/actions/yarn-install - - uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f + - uses: angular/dev-infra/github-actions/bazel/configure-remote@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: bazelrc: ./.bazelrc.user diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08cd78a61ff7..f97fa6e30064 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: cache-node-modules: true - name: Install node modules @@ -41,13 +41,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: cache-node-modules: true - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/configure-remote@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Install node modules run: yarn install --frozen-lockfile - name: Run unit tests @@ -59,13 +59,13 @@ jobs: runs-on: ubuntu-latest-4core steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: cache-node-modules: true - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel Remote Caching - uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/configure-remote@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Install node modules run: yarn install --frozen-lockfile --network-timeout 100000 - name: Run CI tests for framework @@ -76,11 +76,11 @@ jobs: labels: ubuntu-latest-4core steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/configure-remote@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Install node modules run: yarn install --frozen-lockfile - name: Run tests @@ -93,13 +93,13 @@ jobs: labels: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: cache-node-modules: true - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/configure-remote@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Install node modules run: yarn install --frozen-lockfile - run: echo "https://${{secrets.SNAPSHOT_BUILDS_GITHUB_TOKEN}}:@github.com" > ${HOME}/.git_credentials @@ -111,7 +111,7 @@ jobs: labels: ubuntu-latest-4core steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: cache-node-modules: true node-module-directories: | @@ -119,9 +119,9 @@ jobs: ./packages/zone.js/node_modules ./packages/zone.js/test/typings/node_modules - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/configure-remote@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Install node modules run: yarn install --frozen-lockfile - run: | @@ -158,7 +158,7 @@ jobs: SAUCE_TUNNEL_IDENTIFIER: angular-framework-${{ github.run_number }} steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: cache-node-modules: true - name: Install node modules @@ -171,11 +171,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/configure-remote@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Install node modules run: yarn install --frozen-lockfile - name: Build adev to ensure it continues to work diff --git a/.github/workflows/dev-infra.yml b/.github/workflows/dev-infra.yml index 83a9c371e4a9..47bc1588061e 100644 --- a/.github/workflows/dev-infra.yml +++ b/.github/workflows/dev-infra.yml @@ -13,13 +13,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: angular/dev-infra/github-actions/commit-message-based-labels@27078026111b01a7202449e9788ce38f2b2e103f + - uses: angular/dev-infra/github-actions/commit-message-based-labels@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} post_approval_changes: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: angular/dev-infra/github-actions/post-approval-changes@27078026111b01a7202449e9788ce38f2b2e103f + - uses: angular/dev-infra/github-actions/post-approval-changes@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} diff --git a/.github/workflows/google-internal-tests.yml b/.github/workflows/google-internal-tests.yml index 376298845376..fbe4afa9adda 100644 --- a/.github/workflows/google-internal-tests.yml +++ b/.github/workflows/google-internal-tests.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: angular/dev-infra/github-actions/google-internal-tests@27078026111b01a7202449e9788ce38f2b2e103f + - uses: angular/dev-infra/github-actions/google-internal-tests@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: run-tests-guide-url: http://go/angular-g3sync-start github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index d1a08299c42f..78c601f58b7a 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -13,17 +13,17 @@ jobs: JOBS: 2 steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: cache-node-modules: true - name: Install node modules run: yarn install --frozen-lockfile - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel Remote Caching - uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/configure-remote@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Saucelabs Variables - uses: angular/dev-infra/github-actions/saucelabs@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/saucelabs@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Set up Sauce Tunnel Daemon run: yarn bazel run //tools/saucelabs-daemon/background-service -- $JOBS & env: diff --git a/.github/workflows/merge-ready-status.yml b/.github/workflows/merge-ready-status.yml index 317d52599d0b..993af47b19f8 100644 --- a/.github/workflows/merge-ready-status.yml +++ b/.github/workflows/merge-ready-status.yml @@ -9,6 +9,6 @@ jobs: status: runs-on: ubuntu-latest steps: - - uses: angular/dev-infra/github-actions/unified-status-check@27078026111b01a7202449e9788ce38f2b2e103f + - uses: angular/dev-infra/github-actions/unified-status-check@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 29254652d591..7503d057ac42 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -21,7 +21,7 @@ jobs: workflows: ${{ steps.workflows.outputs.workflows }} steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Install node modules run: yarn -s install --frozen-lockfile - id: workflows @@ -36,9 +36,9 @@ jobs: workflow: ${{ fromJSON(needs.list.outputs.workflows) }} steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Install node modules run: yarn -s install --frozen-lockfile # We utilize the google-github-actions/auth action to allow us to get an active credential using workflow diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 90476f58a1e7..7ed825ef7170 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: cache-node-modules: true - name: Install node modules @@ -39,7 +39,7 @@ jobs: - name: Check code format run: yarn ng-dev format changed --check ${{ github.event.pull_request.base.sha }} - name: Check Package Licenses - uses: angular/dev-infra/github-actions/linting/licenses@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/linting/licenses@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: allow-dependencies-licenses: 'pkg:npm/google-protobuf@' @@ -47,13 +47,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: cache-node-modules: true - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/configure-remote@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Install node modules run: yarn install --frozen-lockfile - name: Run unit tests @@ -65,13 +65,13 @@ jobs: runs-on: ubuntu-latest-4core steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: cache-node-modules: true - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel Remote Caching - uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/configure-remote@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Install node modules run: yarn install --frozen-lockfile --network-timeout 100000 - name: Run CI tests for framework @@ -89,13 +89,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: cache-node-modules: true - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel Remote Caching - uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/configure-remote@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Install node modules run: yarn install --frozen-lockfile --network-timeout 100000 - name: Run CI tests for framework @@ -111,11 +111,11 @@ jobs: labels: ubuntu-latest-4core steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/configure-remote@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Install node modules run: yarn install --frozen-lockfile - name: Run tests @@ -128,7 +128,7 @@ jobs: labels: ubuntu-latest-4core steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: cache-node-modules: true node-module-directories: | @@ -136,9 +136,9 @@ jobs: ./packages/zone.js/node_modules ./packages/zone.js/test/typings/node_modules - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/setup@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/bazel/configure-remote@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a - name: Install node modules run: yarn install --frozen-lockfile - run: | @@ -175,7 +175,7 @@ jobs: SAUCE_TUNNEL_IDENTIFIER: angular-framework-${{ github.run_number }} steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: cache-node-modules: true - name: Install node modules diff --git a/.github/workflows/update-cli-help.yml b/.github/workflows/update-cli-help.yml index 87fb7c54c501..3c10f35b2578 100644 --- a/.github/workflows/update-cli-help.yml +++ b/.github/workflows/update-cli-help.yml @@ -32,7 +32,7 @@ jobs: env: ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN: ${{ secrets.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN }} - name: Create a PR (if necessary) - uses: angular/dev-infra/github-actions/create-pr-for-changes@27078026111b01a7202449e9788ce38f2b2e103f + uses: angular/dev-infra/github-actions/create-pr-for-changes@78bd12c8526c396fc85e5ac3d72c039dc7e0a51a with: branch-prefix: update-cli-help pr-title: 'docs: update Angular CLI help [${{github.ref_name}}]' diff --git a/package.json b/package.json index c460d1c607b8..7555bf3d951d 100644 --- a/package.json +++ b/package.json @@ -162,7 +162,7 @@ "@angular-devkit/architect-cli": "0.2000.0-next.2", "@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#ce04ec6cf7604014191821a637e60964a1a3bb4a", "@angular/core": "^20.0.0-next", - "@angular/ng-dev": "https://github.com/angular/dev-infra-private-ng-dev-builds.git#d25ced20c12ad010c2b5b560acb78065f8d6564e", + "@angular/ng-dev": "https://github.com/angular/dev-infra-private-ng-dev-builds.git#3e60055cec07598ad7160ba36dd08bf57ae2be98", "@babel/plugin-proposal-async-generator-functions": "7.20.7", "@bazel/bazelisk": "^1.7.5", "@bazel/buildifier": "^8.0.0", diff --git a/yarn.lock b/yarn.lock index c479389e22ca..a55dd634574f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -475,10 +475,10 @@ dependencies: tslib "^2.3.0" -"@angular/ng-dev@https://github.com/angular/dev-infra-private-ng-dev-builds.git#d25ced20c12ad010c2b5b560acb78065f8d6564e": - version "0.0.0-27078026111b01a7202449e9788ce38f2b2e103f" - uid d25ced20c12ad010c2b5b560acb78065f8d6564e - resolved "https://github.com/angular/dev-infra-private-ng-dev-builds.git#d25ced20c12ad010c2b5b560acb78065f8d6564e" +"@angular/ng-dev@https://github.com/angular/dev-infra-private-ng-dev-builds.git#3e60055cec07598ad7160ba36dd08bf57ae2be98": + version "0.0.0-78bd12c8526c396fc85e5ac3d72c039dc7e0a51a" + uid "3e60055cec07598ad7160ba36dd08bf57ae2be98" + resolved "https://github.com/angular/dev-infra-private-ng-dev-builds.git#3e60055cec07598ad7160ba36dd08bf57ae2be98" dependencies: "@google-cloud/spanner" "7.19.0" "@octokit/rest" "21.1.1"