From e6736c77a07dee913490dce3541ff2da6ab128a6 Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Thu, 16 Mar 2023 16:38:16 +0000 Subject: [PATCH 01/23] docs: Intercept requests - insert updated link. (#49446) PR Close #49446 --- aio/content/guide/http-intercept-requests-and-responses.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aio/content/guide/http-intercept-requests-and-responses.md b/aio/content/guide/http-intercept-requests-and-responses.md index 18a1c479e62e..eeebc2ab5815 100644 --- a/aio/content/guide/http-intercept-requests-and-responses.md +++ b/aio/content/guide/http-intercept-requests-and-responses.md @@ -40,7 +40,7 @@ The `next` object represents the next interceptor in the chain of interceptors. The final `next` in the chain is the `HttpClient` backend handler that sends the request to the server and receives the server's response. Most interceptors call `next.handle()` so that the request flows through to the next interceptor and, eventually, the backend handler. -An interceptor *could* skip calling `next.handle()`, short-circuit the chain, and return its own `Observable` with an artificial server response. +An interceptor *could* skip calling `next.handle()`, short-circuit the chain, and [return its own `Observable`](guide/http-interceptor-use-cases#caching) with an artificial server response. This is a common middleware pattern found in frameworks such as Express.js. @@ -186,4 +186,4 @@ newReq = req.clone({ body: null }); // clear the body -@reviewed 2023-02-27 +@reviewed 2023-03-16 From bb2753decb114d6ce61cf5707096732961a09864 Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Thu, 16 Mar 2023 02:48:58 +0000 Subject: [PATCH 02/23] docs: Track and show request progress - insert updated link. (#49439) PR Close #49439 --- aio/content/guide/http-track-show-request-progress.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/http-track-show-request-progress.md b/aio/content/guide/http-track-show-request-progress.md index d7ea9c7f4a2b..9185185c688d 100644 --- a/aio/content/guide/http-track-show-request-progress.md +++ b/aio/content/guide/http-track-show-request-progress.md @@ -19,7 +19,7 @@ When using `HttpClient.request()` with an HTTP method, configure the method with ## Track request progress -Next, pass this request object to the `HttpClient.request()` method, which returns an `Observable` of `HttpEvents` \(the same events processed by interceptors)\. +Next, pass this request object to the `HttpClient.request()` method, which returns an `Observable` of `HttpEvents` \(the same events processed by [interceptors](guide/http-intercept-requests-and-responses#interceptor-events)\). From 2e37e2365bd899ac526d7b2e5955b363074c1abf Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Thu, 16 Mar 2023 02:04:18 +0000 Subject: [PATCH 03/23] docs: Optimize server interaction - insert updated link. (#49438) PR Close #49438 --- aio/content/guide/http-optimize-server-interaction.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aio/content/guide/http-optimize-server-interaction.md b/aio/content/guide/http-optimize-server-interaction.md index 3625f28d0166..c364326ae44a 100644 --- a/aio/content/guide/http-optimize-server-interaction.md +++ b/aio/content/guide/http-optimize-server-interaction.md @@ -37,6 +37,12 @@ Rather than forward every `searchText` value directly to the injected `PackageSe The code sets `packages$` to this re-composed `Observable` of search results. The template subscribes to `packages$` with the [AsyncPipe](api/common/AsyncPipe) and displays search results as they arrive. +
+ +See [Using interceptors to request multiple values](guide/http-interceptor-use-cases#cache-refresh) for more about the `withRefresh` option. + +
+ ## Using the `switchMap()` operator The `switchMap()` operator takes a function argument that returns an `Observable`. From c807a324d116b6f524f8e309ff1c5679962d6b5f Mon Sep 17 00:00:00 2001 From: Angular Robot Date: Fri, 17 Mar 2023 06:05:43 +0000 Subject: [PATCH 04/23] build: update actions/checkout digest to 24cb908 (#49436) See associated pull request for more information. PR Close #49436 --- .github/workflows/aio-preview-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/aio-preview-deploy.yml b/.github/workflows/aio-preview-deploy.yml index 2f48960d2125..229a28bd35ad 100644 --- a/.github/workflows/aio-preview-deploy.yml +++ b/.github/workflows/aio-preview-deploy.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag=v3 + - uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3 - name: Configure Firebase deploy target working-directory: aio/ From 8f6cbb66a2caae16e466872362d3dc21076d4f66 Mon Sep 17 00:00:00 2001 From: Matthieu Riegler Date: Tue, 14 Mar 2023 12:51:45 +0100 Subject: [PATCH 05/23] docs: remove bazel builder section (#49423) PR Close #49423 --- aio/content/guide/deprecations.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/aio/content/guide/deprecations.md b/aio/content/guide/deprecations.md index 228be996e060..a8e9b4459ac8 100644 --- a/aio/content/guide/deprecations.md +++ b/aio/content/guide/deprecations.md @@ -273,14 +273,6 @@ In the [API reference section](api) of this site, deprecated APIs are indicated This section lists all deprecated features, which includes template syntax, configuration options, and any other deprecations not listed in the [Deprecated APIs](#deprecated-apis) section. It also includes deprecated API usage scenarios or API combinations, to augment the information above. - - -### Bazel builder and schematics - -Bazel builder and schematics were introduced in Angular Labs to let users try out Bazel without having to manage Bazel version and BUILD files. -This feature has been deprecated. -For more information, please refer to the [migration doc](https://github.com/angular/angular/blob/main/packages/bazel/docs/BAZEL_SCHEMATICS.md). - ### Web Tracing Framework integration From 868dcabdeeffc34a91f4da710cab9b318cb98057 Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Thu, 16 Mar 2023 16:58:23 +0000 Subject: [PATCH 06/23] docs: Send data to server - insert updated links. (#49447) PR Close #49447 --- aio/content/guide/http-send-data-to-server.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aio/content/guide/http-send-data-to-server.md b/aio/content/guide/http-send-data-to-server.md index edb66c482a84..a7281768db76 100644 --- a/aio/content/guide/http-send-data-to-server.md +++ b/aio/content/guide/http-send-data-to-server.md @@ -20,6 +20,8 @@ The method takes a resource URL and two additional parameters: | body | The data to POST in the body of the request. | | options | An object containing method options which, in this case, specify required headers. | +The example catches errors as [described above](guide/http-handle-request-errors#error-details). + The `HeroesComponent` initiates the actual POST operation by subscribing to the `Observable` returned by this service method. @@ -57,7 +59,7 @@ The following `HeroesService` example, like the POST example, replaces a resourc -As for any of the HTTP methods that return an observable, the caller, `HeroesComponent.update()` must `subscribe()` to the observable returned from the `HttpClient.put()` in order to initiate the request. +As for any of the HTTP methods that return an observable, the caller, `HeroesComponent.update()` [must `subscribe()`](guide/http-request-data-from-server#always-subscribe "Why you must always subscribe.") to the observable returned from the `HttpClient.put()` in order to initiate the request. ## Add and updating headers @@ -82,4 +84,4 @@ The following example shows how, when an old token expires, you can update the a -@reviewed 2023-03-02 +@reviewed 2023-03-16 From bae6b5ceb16bd87c8146aa29564a8d29135a6f95 Mon Sep 17 00:00:00 2001 From: Matthieu Riegler Date: Sat, 18 Mar 2023 20:06:05 +0100 Subject: [PATCH 07/23] fix(core): Allow `TestBed.configureTestingModule` to work with recursive cycle of standalone components. (#49473) When having a recursive circle of imports on standalone components, `queueTypesFromModulesArrayRecur` triggered a `Maximum call stack size exceeded` error. This commit fixes this. Fixes #49469 PR Close #49473 --- .../core/test/acceptance/standalone_spec.ts | 34 +++++++++++++++++++ .../core/testing/src/test_bed_compiler.ts | 19 +++++++---- 2 files changed, 47 insertions(+), 6 deletions(-) diff --git a/packages/core/test/acceptance/standalone_spec.ts b/packages/core/test/acceptance/standalone_spec.ts index 4ee8f144a3f4..b148f3734bd1 100644 --- a/packages/core/test/acceptance/standalone_spec.ts +++ b/packages/core/test/acceptance/standalone_spec.ts @@ -910,5 +910,39 @@ describe('standalone components, directives, and pipes', () => { expect(isStandalone(Module)).toBeFalse(); }); + + it('should render a recursive cycle of standalone components', () => { + @Component({ + selector: 'cmp-a', + standalone: true, + template: 'A', + imports: [forwardRef(() => StandaloneCmpC)], + }) + class StandaloneCmpA { + } + + @Component({ + selector: 'cmp-b', + standalone: true, + template: '()B', + imports: [StandaloneCmpA], + }) + class StandaloneCmpB { + } + + @Component({ + selector: 'cmp-c', + standalone: true, + template: '()C', + imports: [StandaloneCmpB], + }) + class StandaloneCmpC { + } + + TestBed.configureTestingModule({imports: [StandaloneCmpC]}); + const fixture = TestBed.createComponent(StandaloneCmpC); + fixture.detectChanges(); + expect(fixture.nativeElement.textContent).toBe('((A)B)C'); + }); }); }); diff --git a/packages/core/testing/src/test_bed_compiler.ts b/packages/core/testing/src/test_bed_compiler.ts index f526c1d20133..b5706e7737bd 100644 --- a/packages/core/testing/src/test_bed_compiler.ts +++ b/packages/core/testing/src/test_bed_compiler.ts @@ -580,20 +580,21 @@ export class TestBedCompiler { } private queueTypesFromModulesArray(arr: any[]): void { - // Because we may encounter the same NgModule while processing the imports and exports of an - // NgModule tree, we cache them in this set so we can skip ones that have already been seen - // encountered. In some test setups, this caching resulted in 10X runtime improvement. - const processedNgModuleDefs = new Set(); + // Because we may encounter the same NgModule or a standalone Component while processing + // the dependencies of an NgModule or a standalone Component, we cache them in this set so we + // can skip ones that have already been seen encountered. In some test setups, this caching + // resulted in 10X runtime improvement. + const processedDefs = new Set(); const queueTypesFromModulesArrayRecur = (arr: any[]): void => { for (const value of arr) { if (Array.isArray(value)) { queueTypesFromModulesArrayRecur(value); } else if (hasNgModuleDef(value)) { const def = value.ɵmod; - if (processedNgModuleDefs.has(def)) { + if (processedDefs.has(def)) { continue; } - processedNgModuleDefs.add(def); + processedDefs.add(def); // Look through declarations, imports, and exports, and queue // everything found there. this.queueTypeArray(maybeUnwrapFn(def.declarations), value); @@ -604,6 +605,12 @@ export class TestBedCompiler { } else if (isStandaloneComponent(value)) { this.queueType(value, null); const def = getComponentDef(value); + + if (processedDefs.has(def)) { + continue; + } + processedDefs.add(def); + const dependencies = maybeUnwrapFn(def.dependencies ?? []); dependencies.forEach((dependency) => { // Note: in AOT, the `dependencies` might also contain regular From 0f0c0a9452e1de42088d70dbd255e70e9a2894f0 Mon Sep 17 00:00:00 2001 From: avmaxim Date: Fri, 10 Mar 2023 18:28:08 +0300 Subject: [PATCH 08/23] docs(docs-infra): improve docs for @angular/localize package. (#49393) This PR adds missing documentation for `@angular/localize` package and fixes a tiny one-word typo in the `README.md` file for `@angular/localize schematic`. Fixes #49219. PR Close #49393 --- aio/content/guide/i18n-common-add-package.md | 25 +++++++++++++++---- packages/localize/schematics/ng-add/README.md | 2 +- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/aio/content/guide/i18n-common-add-package.md b/aio/content/guide/i18n-common-add-package.md index 29402631bb3d..dfdeacdf12a9 100644 --- a/aio/content/guide/i18n-common-add-package.md +++ b/aio/content/guide/i18n-common-add-package.md @@ -2,22 +2,31 @@ To take advantage of the localization features of Angular, use the [Angular CLI][AioCliMain] to add the `@angular/localize` package to your project. -To add the `@angular/localize` package, use the following command to update the `package.json` and `polyfills.ts` files in your project. +To add the `@angular/localize` package, use the following command to update the `package.json` and TypeScript configuration files in your project. +It adds `types: ["@angular/localize"]` in the TypeScript configuration files as well as the reference to the type definition of `@angular/localize` at the top of the `main.ts` file. +
-For more information about `package.json` and `polyfill.ts` files, see [Workspace npm dependencies][AioGuideNpmPackages]. +For more information about `package.json` and `tsconfig.json` files, see [Workspace npm dependencies][AioGuideNpmPackages] and [TypeScript Configuraiton][AioGuideTsConfig].
-If `@angular/localize` is not installed and you try to build a localized version of your project, the [Angular CLI][AioCliMain] generates an error. +If `@angular/localize` is not installed and you try to build a localized version of your project (for example, while using the `i18n` attributes in templates), the [Angular CLI][AioCliMain] will generate an error, which would contain the steps that you can take to enable i18n for your project. + +## Options - +| OPTION | DESCRIPTION | VALUE TYPE | DEFAULT VALUE +|:--- |:--- |:------ |:------ +| `--project` | The name of the project. | `string` | +| `--use-at-runtime` | If set, then `$localize` can be used at runtime. Also `@angular/localize` gets included in the `dependencies` section of `package.json`, rather than `devDependencies`, which is the default. | `boolean` | `false` +For more available options, see [ng add][AioCliAdd] in [Angular CLI][AioCliMain]. ## What's next +* [@angular/localize API][AioApiLocalize] * [Refer to locales by ID][AioGuideI18nCommonLocaleId] @@ -28,8 +37,14 @@ If `@angular/localize` is not installed and you try to build a localized version [AioGuideNpmPackages]: guide/npm-packages "Workspace npm dependencies | Angular" +[AioGuideTsConfig]: guide/typescript-configuration "TypeScript Configuration | Angular" + +[AioCliAdd]: cli/add "ng add | CLI | Angular" + +[AioApiLocalize]: api/localize "$localize | @angular/localize - API | Angular" + -@reviewed 2021-10-07 +@reviewed 2023-03-10 diff --git a/packages/localize/schematics/ng-add/README.md b/packages/localize/schematics/ng-add/README.md index 026f88343f69..cbc77e998467 100644 --- a/packages/localize/schematics/ng-add/README.md +++ b/packages/localize/schematics/ng-add/README.md @@ -6,5 +6,5 @@ It will search their `angular.json` file, and add `types: ["@angular/localize"]` configuration files of the project. If the user specifies that they want to use `$localize` at runtime then the dependency will be -added to the `depdendencies` section of `package.json` rather than in the `devDependencies` which +added to the `dependencies` section of `package.json` rather than in the `devDependencies` which is the default. From 087f4412afe9ccdefe7d63012af749b79f3e84d0 Mon Sep 17 00:00:00 2001 From: Masaoki Kobayashi Date: Tue, 31 Jan 2023 09:21:23 +0900 Subject: [PATCH 09/23] fix(core): more accurate matching of classes during content projection (#48888) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Showing a minimum app to reproduce the bug. 1. Create the app and add angular material. ``` ng new project cd project ng add @angular/material ``` 1. Overwrite the src/app/app.component.html with minimal content. ``` ``` 1. Run the app. The button is not shown because of an exception. ``` main.ts:6 ERROR TypeError: item.toLowerCase is not a function at isCssClassMatching (core.mjs:8726:35) at isNodeMatchingSelector (core.mjs:8814:22) at isNodeMatchingSelectorList (core.mjs:8931:13) at matchingProjectionSlotIndex (core.mjs:14179:13) at Module.ɵɵprojectionDef (core.mjs:14222:49) at MatButton_Template (button.mjs:113:99) at executeTemplate (core.mjs:10534:9) at renderView (core.mjs:10356:13) at renderComponent (core.mjs:11529:5) at renderChildComponents (core.mjs:10216:9) ``` Because isCssClassMatching() function does not take care if the value is not string, while attrs[] may contain AttributeMarker which is actually numbers, item.toLowerCase() throws the exception. Just inserted a check if the item is string. Created a testcase for the original fix. It causes an exception without the fix. fix(core): add a check code to avoid an exception inside isCssClassMatching Showing a minimum app to reproduce the bug. 1. Create the app and add angular material. ``` ng new project cd project ng add @angular/material ``` 1. Add `import { MatButtonModule } from '@angular/material/button'`, and also MatButtonModule inside @NgModule imports in src/app/app.module.ts to use MatButtonModule. 1. Overwrite the src/app/app.component.html with minimal content. ``` ``` 1. Run the app. The button is not shown because of an exception. ``` main.ts:6 ERROR TypeError: item.toLowerCase is not a function at isCssClassMatching (core.mjs:8726:35) at isNodeMatchingSelector (core.mjs:8814:22) at isNodeMatchingSelectorList (core.mjs:8931:13) at matchingProjectionSlotIndex (core.mjs:14179:13) at Module.ɵɵprojectionDef (core.mjs:14222:49) at MatButton_Template (button.mjs:113:99) at executeTemplate (core.mjs:10534:9) at renderView (core.mjs:10356:13) at renderComponent (core.mjs:11529:5) at renderChildComponents (core.mjs:10216:9) ``` Because isCssClassMatching() function does not take care if the value is not string, while attrs[] may contain AttributeMarker which is actually numbers, item.toLowerCase() throws the exception. Just inserted a check if the item is string. PR Close #48888 --- .../core/src/render3/node_selector_matcher.ts | 19 ++++++-- packages/core/test/acceptance/content_spec.ts | 45 +++++++++++++++++++ 2 files changed, 60 insertions(+), 4 deletions(-) diff --git a/packages/core/src/render3/node_selector_matcher.ts b/packages/core/src/render3/node_selector_matcher.ts index 77beac2b7dbd..68120f447f66 100644 --- a/packages/core/src/render3/node_selector_matcher.ts +++ b/packages/core/src/render3/node_selector_matcher.ts @@ -35,12 +35,19 @@ function isCssClassMatching( assertEqual( cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.'); let i = 0; + // Indicates whether we are processing value from the implicit + // attribute section (i.e. before the first marker in the array). + let isImplicitAttrsSection = true; while (i < attrs.length) { let item = attrs[i++]; - if (isProjectionMode && item === 'class') { - item = attrs[i] as string; - if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) { - return true; + if (typeof item === 'string' && isImplicitAttrsSection) { + const value = attrs[i++] as string; + if (isProjectionMode && item === 'class') { + // We found a `class` attribute in the implicit attribute section, + // check if it matches the value of the `cssClassToMatch` argument. + if (classIndexOf(value.toLowerCase(), cssClassToMatch, 0) !== -1) { + return true; + } } } else if (item === AttributeMarker.Classes) { // We found the classes section. Start searching for the class. @@ -49,6 +56,10 @@ function isCssClassMatching( if (item.toLowerCase() === cssClassToMatch) return true; } return false; + } else if (typeof item === 'number') { + // We've came across a first marker, which indicates + // that the implicit attribute section is over. + isImplicitAttrsSection = false; } } return false; diff --git a/packages/core/test/acceptance/content_spec.ts b/packages/core/test/acceptance/content_spec.ts index b7d7b7f3bd0a..2ececb98d9b7 100644 --- a/packages/core/test/acceptance/content_spec.ts +++ b/packages/core/test/acceptance/content_spec.ts @@ -1321,6 +1321,51 @@ describe('projection', () => { expect(fixture.nativeElement).toHaveText('Hello world!'); expect(xDirectives).toEqual(1); }); + + it('should work without exception when subelement has both ngIf and class as interpolation', + () => { + @Component( + {selector: 'child-comp', template: ''}) + class ChildComp { + } + + @Component({ + selector: 'parent-comp', + template: `` + }) + class ParentComp { + } + + TestBed.configureTestingModule({declarations: [ParentComp, ChildComp]}); + const fixture = TestBed.createComponent(ParentComp); + + fixture.detectChanges(); + expect(fixture.nativeElement.innerHTML).toBe(''); + }); + }); + + it('selection of child element should properly work even with confusing attribute names', () => { + @Component({selector: 'child-comp', template: ''}) + class ChildComp { + } + + @Component({ + selector: 'parent-comp', + template: + `` + }) + class ParentComp { + } + + TestBed.configureTestingModule({declarations: [ParentComp, ChildComp]}); + const fixture = TestBed.createComponent(ParentComp); + + fixture.detectChanges(); + // tNode.attrs will be ['id', '5', 'jjj', 'class', 3 /* AttributeMarker.Bindings */, 'class', + // 'title', 4 /* AttributeMarker.Template */, 'ngIf'] isNodeMatchingSelector() must not + // confuse it as 'class=title' attribute. should not match the + // child. + expect(fixture.nativeElement.innerHTML).toBe(''); }); }); }); From 97d58ec0917bd1389d0cd818ad29b758338fc9ba Mon Sep 17 00:00:00 2001 From: Aditya Srinivasan Date: Sun, 19 Mar 2023 19:08:07 -0400 Subject: [PATCH 10/23] docs: fix link ngFor documentation link (#49479) Fix the `ngFor` API link under the "Structural directive shorthand" section PR Close #49479 --- aio/content/guide/structural-directives.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/structural-directives.md b/aio/content/guide/structural-directives.md index cdc1f086cb3b..8186de3a5076 100644 --- a/aio/content/guide/structural-directives.md +++ b/aio/content/guide/structural-directives.md @@ -59,7 +59,7 @@ named `$implicit`. Angular sets `let-hero` to the value of the context's `$implicit` property, which `NgFor` has initialized with the hero for the current iteration. -For more information, see the [NgFor API](api/common/NgForOf "API: NgFor") and [NgForOf API](api/common/NgForOf) documentation. +For more information, see the [NgFor API](api/common/NgFor "API: NgFor") and [NgForOf API](api/common/NgForOf) documentation.
From cd5d7b6615fc986ab23e0ca2ddf00a85fc025f35 Mon Sep 17 00:00:00 2001 From: Thomas Pischke Date: Mon, 20 Mar 2023 16:23:13 +0100 Subject: [PATCH 11/23] docs: update deprecated exponential backoff example (#49494) PR Close #49494 --- .../practical-observable-usage/src/backoff.ts | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/aio/content/examples/practical-observable-usage/src/backoff.ts b/aio/content/examples/practical-observable-usage/src/backoff.ts index 888c2b13d159..9d50a12e13cb 100644 --- a/aio/content/examples/practical-observable-usage/src/backoff.ts +++ b/aio/content/examples/practical-observable-usage/src/backoff.ts @@ -1,20 +1,17 @@ // #docplaster // #docregion -import { of, pipe, range, throwError, timer, zip } from 'rxjs'; +import { pipe, timer } from 'rxjs'; import { ajax } from 'rxjs/ajax'; -import { map, mergeMap, retryWhen } from 'rxjs/operators'; +import { retry } from 'rxjs/operators'; -export function backoff(maxTries: number, delay: number) { - return pipe( - retryWhen(attempts => - zip(range(1, maxTries + 1), attempts).pipe( - mergeMap(([i, err]) => (i > maxTries) ? throwError(err) : of(i)), - map(i => i * i), - mergeMap(v => timer(v * delay)), - ), - ), - ); -} +export function backoff(maxTries: number, initialDelay: number) { + return pipe( + retry({ + count: maxTries, + delay: (error, retryCount) => timer(initialDelay * retryCount ** 2), + }) + ); + } // #enddocregion /* From 3c75f981178a07f52e8d5c7752f17f4eb4372488 Mon Sep 17 00:00:00 2001 From: Thomas Pischke Date: Mon, 20 Mar 2023 18:01:44 +0100 Subject: [PATCH 12/23] docs: remove pipe in exponential backoff (#49494) PR Close #49494 --- .../examples/practical-observable-usage/src/backoff.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/aio/content/examples/practical-observable-usage/src/backoff.ts b/aio/content/examples/practical-observable-usage/src/backoff.ts index 9d50a12e13cb..671e40318d7e 100644 --- a/aio/content/examples/practical-observable-usage/src/backoff.ts +++ b/aio/content/examples/practical-observable-usage/src/backoff.ts @@ -1,16 +1,14 @@ // #docplaster // #docregion -import { pipe, timer } from 'rxjs'; +import { timer } from 'rxjs'; import { ajax } from 'rxjs/ajax'; import { retry } from 'rxjs/operators'; export function backoff(maxTries: number, initialDelay: number) { - return pipe( - retry({ + return retry({ count: maxTries, delay: (error, retryCount) => timer(initialDelay * retryCount ** 2), - }) - ); + }); } // #enddocregion From 6c9886b1ca85df3f1c107a3bcd2881376c5c9a6d Mon Sep 17 00:00:00 2001 From: Angular Robot Date: Tue, 21 Mar 2023 07:07:03 +0000 Subject: [PATCH 13/23] build: update cross-repo angular dependencies (#49517) See associated pull request for more information. PR Close #49517 --- .github/workflows/aio-preview-build.yml | 4 +- .github/workflows/aio-preview-deploy.yml | 2 +- .../assistant-to-the-branch-manager.yml | 2 +- .github/workflows/dev-infra.yml | 4 +- .github/workflows/feature-requests.yml | 2 +- .github/workflows/google-internal-tests.yml | 2 +- .github/workflows/lock-closed.yml | 2 +- .github/workflows/merge-ready-status.yml | 2 +- .github/workflows/update-cli-help.yml | 2 +- .github/workflows/update-events.yml | 2 +- aio/package.json | 2 +- aio/yarn.lock | 334 ++++++++++++------ package.json | 4 +- yarn.lock | 289 +++++++++++---- 14 files changed, 458 insertions(+), 195 deletions(-) diff --git a/.github/workflows/aio-preview-build.yml b/.github/workflows/aio-preview-build.yml index 26c0399eaf68..ec209406cca5 100644 --- a/.github/workflows/aio-preview-build.yml +++ b/.github/workflows/aio-preview-build.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - uses: ./.github/actions/yarn-install - - uses: angular/dev-infra/github-actions/setup-bazel-remote-exec@a9312d38d24c94636b7e135b58828c5732eb5212 + - uses: angular/dev-infra/github-actions/setup-bazel-remote-exec@462f716ef571b2b41fff90aaa5bb10897693efcc with: bazelrc: ./.bazelrc.user @@ -34,7 +34,7 @@ jobs: # the number of concurrent actions is determined based on the host resources. - run: bazel build //aio:build --jobs=32 --announce_rc --verbose_failures - - uses: angular/dev-infra/github-actions/deploy-previews/pack-and-upload-artifact@a9312d38d24c94636b7e135b58828c5732eb5212 + - uses: angular/dev-infra/github-actions/deploy-previews/pack-and-upload-artifact@462f716ef571b2b41fff90aaa5bb10897693efcc with: workflow-artifact-name: 'aio' pull-number: '${{github.event.pull_request.number}}' diff --git a/.github/workflows/aio-preview-deploy.yml b/.github/workflows/aio-preview-deploy.yml index 229a28bd35ad..f23e1e2bf0f3 100644 --- a/.github/workflows/aio-preview-deploy.yml +++ b/.github/workflows/aio-preview-deploy.yml @@ -34,7 +34,7 @@ jobs: npx -y firebase-tools@latest target:clear --project ${{env.PREVIEW_PROJECT}} hosting aio npx -y firebase-tools@latest target:apply --project ${{env.PREVIEW_PROJECT}} hosting aio ${{env.PREVIEW_SITE}} - - uses: angular/dev-infra/github-actions/deploy-previews/upload-artifacts-to-firebase@a9312d38d24c94636b7e135b58828c5732eb5212 + - uses: angular/dev-infra/github-actions/deploy-previews/upload-artifacts-to-firebase@462f716ef571b2b41fff90aaa5bb10897693efcc with: github-token: '${{secrets.GITHUB_TOKEN}}' workflow-artifact-name: 'aio' diff --git a/.github/workflows/assistant-to-the-branch-manager.yml b/.github/workflows/assistant-to-the-branch-manager.yml index 8e44790d0de3..879de4eb91d2 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@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - - uses: angular/dev-infra/github-actions/branch-manager@a9312d38d24c94636b7e135b58828c5732eb5212 + - uses: angular/dev-infra/github-actions/branch-manager@462f716ef571b2b41fff90aaa5bb10897693efcc with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} diff --git a/.github/workflows/dev-infra.yml b/.github/workflows/dev-infra.yml index 11b73d46dc5f..083c062f21e8 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@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - uses: angular/dev-infra/github-actions/commit-message-based-labels@a9312d38d24c94636b7e135b58828c5732eb5212 + - uses: angular/dev-infra/github-actions/commit-message-based-labels@462f716ef571b2b41fff90aaa5bb10897693efcc with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} post_approval_changes: runs-on: ubuntu-latest steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - uses: angular/dev-infra/github-actions/post-approval-changes@a9312d38d24c94636b7e135b58828c5732eb5212 + - uses: angular/dev-infra/github-actions/post-approval-changes@462f716ef571b2b41fff90aaa5bb10897693efcc with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} diff --git a/.github/workflows/feature-requests.yml b/.github/workflows/feature-requests.yml index d01beed9b318..676f1afb6d8c 100644 --- a/.github/workflows/feature-requests.yml +++ b/.github/workflows/feature-requests.yml @@ -14,6 +14,6 @@ jobs: if: github.repository == 'angular/angular' runs-on: ubuntu-latest steps: - - uses: angular/dev-infra/github-actions/feature-request@a9312d38d24c94636b7e135b58828c5732eb5212 + - uses: angular/dev-infra/github-actions/feature-request@462f716ef571b2b41fff90aaa5bb10897693efcc 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 8ba491062de5..15cf14ad13b2 100644 --- a/.github/workflows/google-internal-tests.yml +++ b/.github/workflows/google-internal-tests.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - uses: angular/dev-infra/github-actions/google-internal-tests@a9312d38d24c94636b7e135b58828c5732eb5212 + - uses: angular/dev-infra/github-actions/google-internal-tests@462f716ef571b2b41fff90aaa5bb10897693efcc with: run-tests-guide-url: http://go/angular/g3sync github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lock-closed.yml b/.github/workflows/lock-closed.yml index 31d97a2d4942..d91fe94df1a8 100644 --- a/.github/workflows/lock-closed.yml +++ b/.github/workflows/lock-closed.yml @@ -14,6 +14,6 @@ jobs: if: github.repository == 'angular/angular' runs-on: ubuntu-latest steps: - - uses: angular/dev-infra/github-actions/lock-closed@a9312d38d24c94636b7e135b58828c5732eb5212 + - uses: angular/dev-infra/github-actions/lock-closed@462f716ef571b2b41fff90aaa5bb10897693efcc with: lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }} diff --git a/.github/workflows/merge-ready-status.yml b/.github/workflows/merge-ready-status.yml index af6834ff36e4..5e3e95e602f5 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@a9312d38d24c94636b7e135b58828c5732eb5212 + - uses: angular/dev-infra/github-actions/unified-status-check@462f716ef571b2b41fff90aaa5bb10897693efcc with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} diff --git a/.github/workflows/update-cli-help.yml b/.github/workflows/update-cli-help.yml index 97c2dec162c5..b8cd50c7c0b5 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@a9312d38d24c94636b7e135b58828c5732eb5212 + uses: angular/dev-infra/github-actions/create-pr-for-changes@462f716ef571b2b41fff90aaa5bb10897693efcc with: branch-prefix: update-cli-help pr-title: 'docs: update Angular CLI help [${{github.ref_name}}]' diff --git a/.github/workflows/update-events.yml b/.github/workflows/update-events.yml index 1612f6ffe2e7..f990748fa0e2 100644 --- a/.github/workflows/update-events.yml +++ b/.github/workflows/update-events.yml @@ -35,7 +35,7 @@ jobs: - name: Generate `events.json` run: node aio/scripts/generate-events/index.mjs --ignore-invalid-dates - name: Create a PR (if necessary) - uses: angular/dev-infra/github-actions/create-pr-for-changes@a9312d38d24c94636b7e135b58828c5732eb5212 + uses: angular/dev-infra/github-actions/create-pr-for-changes@462f716ef571b2b41fff90aaa5bb10897693efcc with: branch-prefix: docs-update-events pr-title: 'docs: update events' diff --git a/aio/package.json b/aio/package.json index 37e462d871b4..354a7edf0429 100644 --- a/aio/package.json +++ b/aio/package.json @@ -85,7 +85,7 @@ "@angular-eslint/eslint-plugin": "^15.0.0", "@angular-eslint/eslint-plugin-template": "^15.0.0", "@angular-eslint/template-parser": "^15.0.0", - "@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#789ce23bb8f63294e28756dae703bf997c8fb7c5", + "@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#4c7d40592a36f061c23dd08f437f734081f9979d", "@angular/cli": "15.2.0-next.4", "@angular/compiler-cli": "15.2.0-next.4", "@bazel/bazelisk": "^1.7.5", diff --git a/aio/yarn.lock b/aio/yarn.lock index 17e15bce438e..a33c5885f824 100644 --- a/aio/yarn.lock +++ b/aio/yarn.lock @@ -30,12 +30,12 @@ "@angular-devkit/core" "15.2.0-next.4" rxjs "6.6.7" -"@angular-devkit/architect@0.1600.0-next.3": - version "0.1600.0-next.3" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1600.0-next.3.tgz#b4eb9741981de4e26dabaa482f53276b24abf37c" - integrity sha512-W7oGMQrBZQa+N93/d4bUW/5c6OSiB9GcTYoRsZT7R7GkeX4GIeV846Wkl5aq/Rmc8IfgAHBuaWGjAVuXYN8E6g== +"@angular-devkit/architect@0.1600.0-next.4": + version "0.1600.0-next.4" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1600.0-next.4.tgz#c9a5196e5a9437a1db5ad9ec2ba8a24b44721fe4" + integrity sha512-TSljR4EiHeSxMwnK3kgMHPQfrPGLLk0HVADSJnYWcBFUsj051QYMbWkPMOnLvfTIgujyPrXc5iPStWsMl9MMKw== dependencies: - "@angular-devkit/core" "16.0.0-next.3" + "@angular-devkit/core" "16.0.0-next.4" rxjs "7.8.0" "@angular-devkit/build-angular@15.2.0-next.4": @@ -105,17 +105,17 @@ optionalDependencies: esbuild "0.17.6" -"@angular-devkit/build-angular@16.0.0-next.3": - version "16.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-16.0.0-next.3.tgz#2309d588673da3398795ab79a713351174207214" - integrity sha512-AH2M9UV5d/xPVdjyoljZ+9areYxuYYvz1CeorsGIH/oqpI4rZSqXiLnr199cEf8MqoU85ZyKOwF5LdMN4lYveA== +"@angular-devkit/build-angular@16.0.0-next.4": + version "16.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-16.0.0-next.4.tgz#cfb34fda22dec7dd6e4c30d74beec99a13491380" + integrity sha512-4BZJWjKmHBrzE2mntqxqw16TGLnzIlGUwcJiLsPnrTL0UFNqxp4NGL91bzQDGcoXQcHWENhOaO1kJmKtzWBM/g== dependencies: "@ampproject/remapping" "2.2.0" - "@angular-devkit/architect" "0.1600.0-next.3" - "@angular-devkit/build-webpack" "0.1600.0-next.3" - "@angular-devkit/core" "16.0.0-next.3" - "@babel/core" "7.21.0" - "@babel/generator" "7.21.1" + "@angular-devkit/architect" "0.1600.0-next.4" + "@angular-devkit/build-webpack" "0.1600.0-next.4" + "@angular-devkit/core" "16.0.0-next.4" + "@babel/core" "7.21.3" + "@babel/generator" "7.21.3" "@babel/helper-annotate-as-pure" "7.18.6" "@babel/helper-split-export-declaration" "7.18.6" "@babel/plugin-proposal-async-generator-functions" "7.20.7" @@ -125,9 +125,9 @@ "@babel/runtime" "7.21.0" "@babel/template" "7.20.7" "@discoveryjs/json-ext" "0.5.7" - "@ngtools/webpack" "16.0.0-next.3" + "@ngtools/webpack" "16.0.0-next.4" ansi-colors "4.1.3" - autoprefixer "10.4.13" + autoprefixer "10.4.14" babel-loader "9.1.2" babel-plugin-istanbul "6.1.1" browserslist "4.21.5" @@ -147,7 +147,7 @@ license-webpack-plugin "4.0.2" loader-utils "3.2.1" magic-string "0.30.0" - mini-css-extract-plugin "2.7.2" + mini-css-extract-plugin "2.7.3" open "8.4.2" ora "5.4.1" parse5-html-rewriting-stream "7.0.0" @@ -156,18 +156,18 @@ postcss-loader "7.0.2" resolve-url-loader "5.0.0" rxjs "7.8.0" - sass "1.58.3" + sass "1.59.3" sass-loader "13.2.0" semver "7.3.8" source-map-loader "4.0.1" source-map-support "0.5.21" - terser "5.16.5" + terser "5.16.6" text-table "0.2.0" tree-kill "1.2.2" tslib "2.5.0" - webpack "5.75.0" + webpack "5.76.1" webpack-dev-middleware "6.0.1" - webpack-dev-server "4.11.1" + webpack-dev-server "4.12.0" webpack-merge "5.8.0" webpack-subresource-integrity "5.1.0" optionalDependencies: @@ -181,12 +181,12 @@ "@angular-devkit/architect" "0.1502.0-next.4" rxjs "6.6.7" -"@angular-devkit/build-webpack@0.1600.0-next.3": - version "0.1600.0-next.3" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1600.0-next.3.tgz#2de2fd3119a1bc1b8a4b0a10a033656f94130116" - integrity sha512-0UszSL9EHFc8NXUDFq/8oTVRRGHXwlpmY7UNSEqO2PvpSkjV4ujEi39l+bKOAqUXTISp3Mb0vEhwCXgZz3WFdQ== +"@angular-devkit/build-webpack@0.1600.0-next.4": + version "0.1600.0-next.4" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1600.0-next.4.tgz#9ade9f2ee67a57cab440cba38a5a290b4d6f8097" + integrity sha512-NTCJCvLOtVL+iHavbiKFLmwHAPiA0eVrcAL0ffpcMY66yq2uco3Epm33wQlGUFrhMtYbtEXVUAf/T6z3uGsFHw== dependencies: - "@angular-devkit/architect" "0.1600.0-next.3" + "@angular-devkit/architect" "0.1600.0-next.4" rxjs "7.8.0" "@angular-devkit/core@15.2.0-next.4": @@ -200,10 +200,10 @@ rxjs "6.6.7" source-map "0.7.4" -"@angular-devkit/core@16.0.0-next.3": - version "16.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-16.0.0-next.3.tgz#03bb8b31918325dab8716ad6a9fdc86dc9a41e82" - integrity sha512-wTgUrr8En+Y44shi5JV3F1JyJ85Lh9ovRGBPEAC+F2i/7bqzFwbwasZ1Gp/UCd5kihyfUpBMNUZYycTlxQVuIA== +"@angular-devkit/core@16.0.0-next.4": + version "16.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-16.0.0-next.4.tgz#a43e5e9949752e1cff51121b3e437277c3a05dff" + integrity sha512-4zSKzyL2MxjGhWlV6pPdbh2iYDXL0MX8gjpjlnVkQFkGAtfdV3FqRREilicUIXLU1c6SdP9tf7IBEJ0ldTksYg== dependencies: ajv "8.12.0" ajv-formats "2.1.1" @@ -283,11 +283,11 @@ "@angular/core" "^13.0.0 || ^14.0.0-0" reflect-metadata "^0.1.13" -"@angular/build-tooling@https://github.com/angular/dev-infra-private-build-tooling-builds.git#789ce23bb8f63294e28756dae703bf997c8fb7c5": - version "0.0.0-a9312d38d24c94636b7e135b58828c5732eb5212" - resolved "https://github.com/angular/dev-infra-private-build-tooling-builds.git#789ce23bb8f63294e28756dae703bf997c8fb7c5" +"@angular/build-tooling@https://github.com/angular/dev-infra-private-build-tooling-builds.git#4c7d40592a36f061c23dd08f437f734081f9979d": + version "0.0.0-462f716ef571b2b41fff90aaa5bb10897693efcc" + resolved "https://github.com/angular/dev-infra-private-build-tooling-builds.git#4c7d40592a36f061c23dd08f437f734081f9979d" dependencies: - "@angular-devkit/build-angular" "16.0.0-next.3" + "@angular-devkit/build-angular" "16.0.0-next.4" "@angular/benchpress" "0.3.0" "@babel/core" "^7.16.0" "@babel/helper-annotate-as-pure" "^7.18.6" @@ -569,21 +569,21 @@ json5 "^2.2.2" semver "^6.3.0" -"@babel/core@7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.0.tgz#1341aefdcc14ccc7553fcc688dd8986a2daffc13" - integrity sha512-PuxUbxcW6ZYe656yL3EAhpy7qXKq0DmYsrJLpbB8XrsCP9Nm+XCg9XFMb5vIDliPD7+U/+M+QJlH17XOcB7eXA== +"@babel/core@7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.3.tgz#cf1c877284a469da5d1ce1d1e53665253fae712e" + integrity sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.21.0" + "@babel/generator" "^7.21.3" "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-module-transforms" "^7.21.0" + "@babel/helper-module-transforms" "^7.21.2" "@babel/helpers" "^7.21.0" - "@babel/parser" "^7.21.0" + "@babel/parser" "^7.21.3" "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.0" - "@babel/types" "^7.21.0" + "@babel/traverse" "^7.21.3" + "@babel/types" "^7.21.3" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -591,24 +591,24 @@ semver "^6.3.0" "@babel/core@^7.12.3", "@babel/core@^7.16.0": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.2.tgz#8dc9b1620a673f92d3624bd926dc49a52cf25b92" - integrity sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g== + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.0.tgz#1341aefdcc14ccc7553fcc688dd8986a2daffc13" + integrity sha512-PuxUbxcW6ZYe656yL3EAhpy7qXKq0DmYsrJLpbB8XrsCP9Nm+XCg9XFMb5vIDliPD7+U/+M+QJlH17XOcB7eXA== dependencies: - "@ampproject/remapping" "^2.1.0" + "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.2" - "@babel/helper-compilation-targets" "^7.20.0" - "@babel/helper-module-transforms" "^7.20.2" - "@babel/helpers" "^7.20.1" - "@babel/parser" "^7.20.2" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.2" + "@babel/generator" "^7.21.0" + "@babel/helper-compilation-targets" "^7.20.7" + "@babel/helper-module-transforms" "^7.21.0" + "@babel/helpers" "^7.21.0" + "@babel/parser" "^7.21.0" + "@babel/template" "^7.20.7" + "@babel/traverse" "^7.21.0" + "@babel/types" "^7.21.0" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.2.1" + json5 "^2.2.2" semver "^6.3.0" "@babel/generator@7.20.14": @@ -620,12 +620,12 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" -"@babel/generator@7.21.1", "@babel/generator@^7.21.0", "@babel/generator@^7.21.1": - version "7.21.1" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.1.tgz#951cc626057bc0af2c35cd23e9c64d384dea83dd" - integrity sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA== +"@babel/generator@7.21.3", "@babel/generator@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.3.tgz#232359d0874b392df04045d72ce2fd9bb5045fce" + integrity sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA== dependencies: - "@babel/types" "^7.21.0" + "@babel/types" "^7.21.3" "@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" @@ -639,7 +639,7 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" -"@babel/generator@^7.20.1", "@babel/generator@^7.20.2": +"@babel/generator@^7.20.1": version "7.20.4" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.4.tgz#4d9f8f0c30be75fd90a0562099a26e5839602ab8" integrity sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA== @@ -648,6 +648,16 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" +"@babel/generator@^7.21.0", "@babel/generator@^7.21.1": + version "7.21.1" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.1.tgz#951cc626057bc0af2c35cd23e9c64d384dea83dd" + integrity sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA== + dependencies: + "@babel/types" "^7.21.0" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@7.18.6", "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" @@ -766,7 +776,7 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.19.6", "@babel/helper-module-transforms@^7.20.2": +"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.19.6": version "7.20.2" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz#ac53da669501edd37e658602a21ba14c08748712" integrity sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA== @@ -794,7 +804,7 @@ "@babel/traverse" "^7.20.10" "@babel/types" "^7.20.7" -"@babel/helper-module-transforms@^7.21.0": +"@babel/helper-module-transforms@^7.21.0", "@babel/helper-module-transforms@^7.21.2": version "7.21.2" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz#160caafa4978ac8c00ac66636cb0fa37b024e2d2" integrity sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ== @@ -896,15 +906,6 @@ "@babel/traverse" "^7.20.7" "@babel/types" "^7.20.7" -"@babel/helpers@^7.20.1": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.1.tgz#2ab7a0fcb0a03b5bf76629196ed63c2d7311f4c9" - integrity sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg== - dependencies: - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.0" - "@babel/helpers@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.0.tgz#9dd184fb5599862037917cdc9eecb84577dc4e7e" @@ -923,7 +924,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2", "@babel/parser@^7.9.4": +"@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.20.1", "@babel/parser@^7.9.4": version "7.20.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.3.tgz#5358cf62e380cf69efcb87a7bb922ff88bfac6e2" integrity sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg== @@ -938,6 +939,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.2.tgz#dacafadfc6d7654c3051a66d6fe55b6cb2f2a0b3" integrity sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ== +"@babel/parser@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.3.tgz#1d285d67a19162ff9daa358d4cb41d50c06220b3" + integrity sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" @@ -1652,7 +1658,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2": +"@babel/traverse@^7.21.0": version "7.21.2" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.2.tgz#ac7e1f27658750892e815e60ae90f382a46d8e75" integrity sha512-ts5FFU/dSUPS13tv8XiEObDu9K+iagEKME9kAbaP7r0Y9KtZJZ+NGndDvWoRAYNpeWafbpFeki3q9QoMD6gxyw== @@ -1668,7 +1674,23 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.4.4": +"@babel/traverse@^7.21.2", "@babel/traverse@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.3.tgz#4747c5e7903d224be71f90788b06798331896f67" + integrity sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.21.3" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.21.0" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.21.3" + "@babel/types" "^7.21.3" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.18.10", "@babel/types@^7.19.0": version "7.20.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.2.tgz#67ac09266606190f496322dbaff360fdaa5e7842" integrity sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog== @@ -1677,19 +1699,19 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" -"@babel/types@^7.19.3", "@babel/types@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.7.tgz#54ec75e252318423fc07fb644dc6a58a64c09b7f" - integrity sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg== +"@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.3", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.4.4": + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.0.tgz#1da00d89c2f18b226c9207d96edbeb79316a1819" + integrity sha512-uR7NWq2VNFnDi7EYqiRz2Jv/VQIu38tu64Zy8TX2nQFQ6etJ9V/Rr2msW8BS132mum2rL645qpDrLtAJtVpuow== dependencies: "@babel/helper-string-parser" "^7.19.4" "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" -"@babel/types@^7.21.0", "@babel/types@^7.21.2": - version "7.21.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.2.tgz#92246f6e00f91755893c2876ad653db70c8310d1" - integrity sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw== +"@babel/types@^7.21.2", "@babel/types@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.3.tgz#4865a5357ce40f64e3400b0f3b737dc6d4f64d05" + integrity sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg== dependencies: "@babel/helper-string-parser" "^7.19.4" "@babel/helper-validator-identifier" "^7.19.1" @@ -2994,10 +3016,10 @@ resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-15.2.0-next.4.tgz#354d6096329a7f33e787d218385dbb610ad42bee" integrity sha512-Ftqqo9AHVVbDLKS5q5AzN+InimGwCZQTCPfnA5WoDOPHjEDoA0Ekg+7IaRjRWpOd7lPYr9fh62KQLXVc2vIydg== -"@ngtools/webpack@16.0.0-next.3": - version "16.0.0-next.3" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-16.0.0-next.3.tgz#0233bb7dfbf48c765ec62bcf025bf6f075d8d155" - integrity sha512-jgW1uhzujKY7ESeTbj12PY59xQZ/UwwGX6XJsKJs9dK+XJYrpV+ojBVGKie/qCszXVZbrF77yBBwZgXijMS5/g== +"@ngtools/webpack@16.0.0-next.4": + version "16.0.0-next.4" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-16.0.0-next.4.tgz#8522c5a5af187e55fa6f61540b96cbb7f9bf76f2" + integrity sha512-dQGhpT5Qq51arUDzoaXQU8jyKekOw2Tu1qZicvlsSAJHLdVbRwP1BA2WaJb5QgcVJ0QAbfAxYSFOk3L6JPYivA== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -4394,6 +4416,18 @@ autoprefixer@10.4.13: picocolors "^1.0.0" postcss-value-parser "^4.2.0" +autoprefixer@10.4.14: + version "10.4.14" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.14.tgz#e28d49902f8e759dd25b153264e862df2705f79d" + integrity sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ== + dependencies: + browserslist "^4.21.5" + caniuse-lite "^1.0.30001464" + fraction.js "^4.2.0" + normalize-range "^0.1.2" + picocolors "^1.0.0" + postcss-value-parser "^4.2.0" + available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" @@ -4711,7 +4745,7 @@ browser-sync@^2.27.7: ua-parser-js "1.0.2" yargs "^17.3.1" -browserslist@4.21.5: +browserslist@4.21.5, browserslist@^4.21.5: version "4.21.5" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.5.tgz#75c5dae60063ee641f977e00edd3cfb2fb7af6a7" integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== @@ -4933,10 +4967,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001426, caniuse-lite@^1.0.30001449: - version "1.0.30001451" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001451.tgz" - integrity sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w== +caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001426, caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001464: + version "1.0.30001469" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001469.tgz" + integrity sha512-Rcp7221ScNqQPP3W+lVOYDyjdR6dC+neEQCttoNr5bAyz54AboB4iwpnWgyi8P4YUsPybVzT4LgWiBbI3drL4g== canonical-path@1.0.0, canonical-path@^1.0.0: version "1.0.0" @@ -9497,6 +9531,14 @@ latest-version@^5.0.0, latest-version@^5.1.0: dependencies: package-json "^6.3.0" +launch-editor@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/launch-editor/-/launch-editor-2.6.0.tgz#4c0c1a6ac126c572bd9ff9a30da1d2cae66defd7" + integrity sha512-JpDCcQnyAAzZZaZ7vEiSqL690w7dAEyLao+KC96zBplnYbJS7TYNjvM3M7y3dGz+v7aIsJk3hllWuc0kWAjyRQ== + dependencies: + picocolors "^1.0.0" + shell-quote "^1.7.3" + lazystream@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638" @@ -10204,6 +10246,13 @@ mini-css-extract-plugin@2.7.2: dependencies: schema-utils "^4.0.0" +mini-css-extract-plugin@2.7.3: + version "2.7.3" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.3.tgz#794aa4d598bf178a66b2a35fe287c3df3eac394e" + integrity sha512-CD9cXeKeXLcnMw8FZdtfrRrLaM7gwCl4nKuKn2YkY2Bw5wdlB8zU2cCzw+w2zS9RFvbrufTBkMCJACNPwqQA0w== + dependencies: + schema-utils "^4.0.0" + minimalistic-assert@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -12250,10 +12299,10 @@ sass@1.58.0: immutable "^4.0.0" source-map-js ">=0.6.2 <2.0.0" -sass@1.58.3: - version "1.58.3" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.58.3.tgz#2348cc052061ba4f00243a208b09c40e031f270d" - integrity sha512-Q7RaEtYf6BflYrQ+buPudKR26/lH+10EmO9bBqbmPh/KeLqv8bjpTNqxe71ocONqXq+jYiCbpPUmQMS+JJPk4A== +sass@1.59.3: + version "1.59.3" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.59.3.tgz#a1ddf855d75c70c26b4555df4403e1bbf8e4403f" + integrity sha512-QCq98N3hX1jfTCoUAsF3eyGuXLsY7BCnCEg9qAact94Yc21npG2/mVOqoDvE0fCbWDqiM4WlcJQla0gWG2YlxQ== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" @@ -12537,10 +12586,10 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shell-quote@^1.6.1: - version "1.7.4" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.4.tgz#33fe15dee71ab2a81fcbd3a52106c5cfb9fb75d8" - integrity sha512-8o/QEhSSRb1a5i7TFR0iM4G16Z0vYB2OQVs4G3aAFXjn3T6yEx8AZxy1PgDF7I00LZHYA3WxaSYIf5e5sAX8Rw== +shell-quote@^1.6.1, shell-quote@^1.7.3: + version "1.8.0" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.0.tgz#20d078d0eaf71d54f43bd2ba14a1b5b9bfa5c8ba" + integrity sha512-QHsz8GgQIGKlRi24yFc6a6lN69Idnx634w49ay6+jA5yFh7a1UY+4Rp6HPx/L/1zcEDPEij8cIsiqR6bQsE5VQ== shelljs@^0.8.5: version "0.8.5" @@ -13201,10 +13250,10 @@ terser@5.16.3: commander "^2.20.0" source-map-support "~0.5.20" -terser@5.16.5: - version "5.16.5" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.5.tgz#1c285ca0655f467f92af1bbab46ab72d1cb08e5a" - integrity sha512-qcwfg4+RZa3YvlFh0qjifnzBHjKGNbtDo9yivMqMFDy9Q6FSaQWSB/j1xKhsoUFJIqDOM3TsN6D5xbrMrFcHbg== +terser@5.16.6: + version "5.16.6" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.6.tgz#f6c7a14a378ee0630fbe3ac8d1f41b4681109533" + integrity sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg== dependencies: "@jridgewell/source-map" "^0.3.2" acorn "^8.5.0" @@ -14234,6 +14283,42 @@ webpack-dev-server@4.11.1: webpack-dev-middleware "^5.3.1" ws "^8.4.2" +webpack-dev-server@4.12.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.12.0.tgz#e2dcad4d43e486c3bac48ddbf346e77ef03c7428" + integrity sha512-XRN9YRnvOj3TQQ5w/0pR1y1xDcVnbWtNkTri46kuEbaWUPTHsWUvOyAAI7PZHLY+hsFki2kRltJjKMw7e+IiqA== + dependencies: + "@types/bonjour" "^3.5.9" + "@types/connect-history-api-fallback" "^1.3.5" + "@types/express" "^4.17.13" + "@types/serve-index" "^1.9.1" + "@types/serve-static" "^1.13.10" + "@types/sockjs" "^0.3.33" + "@types/ws" "^8.5.1" + ansi-html-community "^0.0.8" + bonjour-service "^1.0.11" + chokidar "^3.5.3" + colorette "^2.0.10" + compression "^1.7.4" + connect-history-api-fallback "^2.0.0" + default-gateway "^6.0.3" + express "^4.17.3" + graceful-fs "^4.2.6" + html-entities "^2.3.2" + http-proxy-middleware "^2.0.3" + ipaddr.js "^2.0.1" + launch-editor "^2.6.0" + open "^8.0.9" + p-retry "^4.5.0" + rimraf "^3.0.2" + schema-utils "^4.0.0" + selfsigned "^2.1.1" + serve-index "^1.9.1" + sockjs "^0.3.24" + spdy "^4.0.2" + webpack-dev-middleware "^5.3.1" + ws "^8.13.0" + webpack-merge@5.8.0: version "5.8.0" resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" @@ -14284,6 +14369,36 @@ webpack@5.75.0: watchpack "^2.4.0" webpack-sources "^3.2.3" +webpack@5.76.1: + version "5.76.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.76.1.tgz#7773de017e988bccb0f13c7d75ec245f377d295c" + integrity sha512-4+YIK4Abzv8172/SGqObnUjaIHjLEuUasz9EwQj/9xmPPkYJy2Mh03Q/lJfSD3YLzbxy5FeTq5Uw0323Oh6SJQ== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^0.0.51" + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/wasm-edit" "1.11.1" + "@webassemblyjs/wasm-parser" "1.11.1" + acorn "^8.7.1" + acorn-import-assertions "^1.7.6" + browserslist "^4.14.5" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.10.0" + es-module-lexer "^0.9.0" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.9" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.1.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.1.3" + watchpack "^2.4.0" + webpack-sources "^3.2.3" + websocket-driver@>=0.5.1, websocket-driver@^0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" @@ -14480,7 +14595,7 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -ws@8.11.0, ws@^8.11.0, ws@^8.4.2: +ws@8.11.0, ws@^8.4.2: version "8.11.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== @@ -14490,7 +14605,7 @@ ws@8.5.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== -ws@>=8.11.0: +ws@>=8.11.0, ws@^8.11.0: version "8.12.1" resolved "https://registry.yarnpkg.com/ws/-/ws-8.12.1.tgz#c51e583d79140b5e42e39be48c934131942d4a8f" integrity sha512-1qo+M9Ba+xNhPB+YTWUlK6M17brTut5EXbcBaMRN5pH5dFrXz7lzz1ChFSUq3bOUl8yEvSenhHmYUNJxFzdJew== @@ -14500,6 +14615,11 @@ ws@^7.0.0, ws@^7.2.3, ws@^7.3.1: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== +ws@^8.13.0: + version "8.13.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" + integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== + ws@~8.2.3: version "8.2.3" resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba" diff --git a/package.json b/package.json index 83f16a95b754..9f5b2b9bf35d 100644 --- a/package.json +++ b/package.json @@ -171,8 +171,8 @@ }, "// 2": "devDependencies are not used under Bazel. Many can be removed after test.sh is deleted.", "devDependencies": { - "@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#789ce23bb8f63294e28756dae703bf997c8fb7c5", - "@angular/ng-dev": "https://github.com/angular/dev-infra-private-ng-dev-builds.git#6c097ef5901b39a14841463f5854f40c1a1a0690", + "@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#4c7d40592a36f061c23dd08f437f734081f9979d", + "@angular/ng-dev": "https://github.com/angular/dev-infra-private-ng-dev-builds.git#052850d27f6c36226e1a62ab04af799746decd9a", "@bazel/bazelisk": "^1.7.5", "@bazel/buildifier": "^5.0.0", "@bazel/ibazel": "^0.16.0", diff --git a/yarn.lock b/yarn.lock index fd79b861aa91..09ca60c1115c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,12 +18,12 @@ "@angular-devkit/core" "15.2.0-next.4" rxjs "6.6.7" -"@angular-devkit/architect@0.1600.0-next.3": - version "0.1600.0-next.3" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1600.0-next.3.tgz#b4eb9741981de4e26dabaa482f53276b24abf37c" - integrity sha512-W7oGMQrBZQa+N93/d4bUW/5c6OSiB9GcTYoRsZT7R7GkeX4GIeV846Wkl5aq/Rmc8IfgAHBuaWGjAVuXYN8E6g== +"@angular-devkit/architect@0.1600.0-next.4": + version "0.1600.0-next.4" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1600.0-next.4.tgz#c9a5196e5a9437a1db5ad9ec2ba8a24b44721fe4" + integrity sha512-TSljR4EiHeSxMwnK3kgMHPQfrPGLLk0HVADSJnYWcBFUsj051QYMbWkPMOnLvfTIgujyPrXc5iPStWsMl9MMKw== dependencies: - "@angular-devkit/core" "16.0.0-next.3" + "@angular-devkit/core" "16.0.0-next.4" rxjs "7.8.0" "@angular-devkit/build-angular@15.2.0-next.4": @@ -93,17 +93,17 @@ optionalDependencies: esbuild "0.17.6" -"@angular-devkit/build-angular@16.0.0-next.3": - version "16.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-16.0.0-next.3.tgz#2309d588673da3398795ab79a713351174207214" - integrity sha512-AH2M9UV5d/xPVdjyoljZ+9areYxuYYvz1CeorsGIH/oqpI4rZSqXiLnr199cEf8MqoU85ZyKOwF5LdMN4lYveA== +"@angular-devkit/build-angular@16.0.0-next.4": + version "16.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-16.0.0-next.4.tgz#cfb34fda22dec7dd6e4c30d74beec99a13491380" + integrity sha512-4BZJWjKmHBrzE2mntqxqw16TGLnzIlGUwcJiLsPnrTL0UFNqxp4NGL91bzQDGcoXQcHWENhOaO1kJmKtzWBM/g== dependencies: "@ampproject/remapping" "2.2.0" - "@angular-devkit/architect" "0.1600.0-next.3" - "@angular-devkit/build-webpack" "0.1600.0-next.3" - "@angular-devkit/core" "16.0.0-next.3" - "@babel/core" "7.21.0" - "@babel/generator" "7.21.1" + "@angular-devkit/architect" "0.1600.0-next.4" + "@angular-devkit/build-webpack" "0.1600.0-next.4" + "@angular-devkit/core" "16.0.0-next.4" + "@babel/core" "7.21.3" + "@babel/generator" "7.21.3" "@babel/helper-annotate-as-pure" "7.18.6" "@babel/helper-split-export-declaration" "7.18.6" "@babel/plugin-proposal-async-generator-functions" "7.20.7" @@ -113,9 +113,9 @@ "@babel/runtime" "7.21.0" "@babel/template" "7.20.7" "@discoveryjs/json-ext" "0.5.7" - "@ngtools/webpack" "16.0.0-next.3" + "@ngtools/webpack" "16.0.0-next.4" ansi-colors "4.1.3" - autoprefixer "10.4.13" + autoprefixer "10.4.14" babel-loader "9.1.2" babel-plugin-istanbul "6.1.1" browserslist "4.21.5" @@ -135,7 +135,7 @@ license-webpack-plugin "4.0.2" loader-utils "3.2.1" magic-string "0.30.0" - mini-css-extract-plugin "2.7.2" + mini-css-extract-plugin "2.7.3" open "8.4.2" ora "5.4.1" parse5-html-rewriting-stream "7.0.0" @@ -144,18 +144,18 @@ postcss-loader "7.0.2" resolve-url-loader "5.0.0" rxjs "7.8.0" - sass "1.58.3" + sass "1.59.3" sass-loader "13.2.0" semver "7.3.8" source-map-loader "4.0.1" source-map-support "0.5.21" - terser "5.16.5" + terser "5.16.6" text-table "0.2.0" tree-kill "1.2.2" tslib "2.5.0" - webpack "5.75.0" + webpack "5.76.1" webpack-dev-middleware "6.0.1" - webpack-dev-server "4.11.1" + webpack-dev-server "4.12.0" webpack-merge "5.8.0" webpack-subresource-integrity "5.1.0" optionalDependencies: @@ -179,12 +179,12 @@ "@angular-devkit/architect" "0.1502.0-next.4" rxjs "6.6.7" -"@angular-devkit/build-webpack@0.1600.0-next.3": - version "0.1600.0-next.3" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1600.0-next.3.tgz#2de2fd3119a1bc1b8a4b0a10a033656f94130116" - integrity sha512-0UszSL9EHFc8NXUDFq/8oTVRRGHXwlpmY7UNSEqO2PvpSkjV4ujEi39l+bKOAqUXTISp3Mb0vEhwCXgZz3WFdQ== +"@angular-devkit/build-webpack@0.1600.0-next.4": + version "0.1600.0-next.4" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1600.0-next.4.tgz#9ade9f2ee67a57cab440cba38a5a290b4d6f8097" + integrity sha512-NTCJCvLOtVL+iHavbiKFLmwHAPiA0eVrcAL0ffpcMY66yq2uco3Epm33wQlGUFrhMtYbtEXVUAf/T6z3uGsFHw== dependencies: - "@angular-devkit/architect" "0.1600.0-next.3" + "@angular-devkit/architect" "0.1600.0-next.4" rxjs "7.8.0" "@angular-devkit/core@15.2.0-next.4": @@ -198,10 +198,10 @@ rxjs "6.6.7" source-map "0.7.4" -"@angular-devkit/core@16.0.0-next.3": - version "16.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-16.0.0-next.3.tgz#03bb8b31918325dab8716ad6a9fdc86dc9a41e82" - integrity sha512-wTgUrr8En+Y44shi5JV3F1JyJ85Lh9ovRGBPEAC+F2i/7bqzFwbwasZ1Gp/UCd5kihyfUpBMNUZYycTlxQVuIA== +"@angular-devkit/core@16.0.0-next.4": + version "16.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-16.0.0-next.4.tgz#a43e5e9949752e1cff51121b3e437277c3a05dff" + integrity sha512-4zSKzyL2MxjGhWlV6pPdbh2iYDXL0MX8gjpjlnVkQFkGAtfdV3FqRREilicUIXLU1c6SdP9tf7IBEJ0ldTksYg== dependencies: ajv "8.12.0" ajv-formats "2.1.1" @@ -235,11 +235,11 @@ "@angular/core" "^13.0.0 || ^14.0.0-0" reflect-metadata "^0.1.13" -"@angular/build-tooling@https://github.com/angular/dev-infra-private-build-tooling-builds.git#789ce23bb8f63294e28756dae703bf997c8fb7c5": - version "0.0.0-a9312d38d24c94636b7e135b58828c5732eb5212" - resolved "https://github.com/angular/dev-infra-private-build-tooling-builds.git#789ce23bb8f63294e28756dae703bf997c8fb7c5" +"@angular/build-tooling@https://github.com/angular/dev-infra-private-build-tooling-builds.git#4c7d40592a36f061c23dd08f437f734081f9979d": + version "0.0.0-462f716ef571b2b41fff90aaa5bb10897693efcc" + resolved "https://github.com/angular/dev-infra-private-build-tooling-builds.git#4c7d40592a36f061c23dd08f437f734081f9979d" dependencies: - "@angular-devkit/build-angular" "16.0.0-next.3" + "@angular-devkit/build-angular" "16.0.0-next.4" "@angular/benchpress" "0.3.0" "@babel/core" "^7.16.0" "@babel/helper-annotate-as-pure" "^7.18.6" @@ -389,9 +389,9 @@ "@material/typography" "15.0.0-canary.684e33d25.0" tslib "^2.3.0" -"@angular/ng-dev@https://github.com/angular/dev-infra-private-ng-dev-builds.git#6c097ef5901b39a14841463f5854f40c1a1a0690": - version "0.0.0-a9312d38d24c94636b7e135b58828c5732eb5212" - resolved "https://github.com/angular/dev-infra-private-ng-dev-builds.git#6c097ef5901b39a14841463f5854f40c1a1a0690" +"@angular/ng-dev@https://github.com/angular/dev-infra-private-ng-dev-builds.git#052850d27f6c36226e1a62ab04af799746decd9a": + version "0.0.0-462f716ef571b2b41fff90aaa5bb10897693efcc" + resolved "https://github.com/angular/dev-infra-private-ng-dev-builds.git#052850d27f6c36226e1a62ab04af799746decd9a" dependencies: "@yarnpkg/lockfile" "^1.1.0" typescript "~4.9.0" @@ -536,21 +536,21 @@ json5 "^2.2.2" semver "^6.3.0" -"@babel/core@7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.0.tgz#1341aefdcc14ccc7553fcc688dd8986a2daffc13" - integrity sha512-PuxUbxcW6ZYe656yL3EAhpy7qXKq0DmYsrJLpbB8XrsCP9Nm+XCg9XFMb5vIDliPD7+U/+M+QJlH17XOcB7eXA== +"@babel/core@7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.3.tgz#cf1c877284a469da5d1ce1d1e53665253fae712e" + integrity sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.21.0" + "@babel/generator" "^7.21.3" "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-module-transforms" "^7.21.0" + "@babel/helper-module-transforms" "^7.21.2" "@babel/helpers" "^7.21.0" - "@babel/parser" "^7.21.0" + "@babel/parser" "^7.21.3" "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.0" - "@babel/types" "^7.21.0" + "@babel/traverse" "^7.21.3" + "@babel/types" "^7.21.3" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -596,12 +596,12 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" -"@babel/generator@7.21.1", "@babel/generator@^7.21.0", "@babel/generator@^7.21.1": - version "7.21.1" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.1.tgz#951cc626057bc0af2c35cd23e9c64d384dea83dd" - integrity sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA== +"@babel/generator@7.21.3", "@babel/generator@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.3.tgz#232359d0874b392df04045d72ce2fd9bb5045fce" + integrity sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA== dependencies: - "@babel/types" "^7.21.0" + "@babel/types" "^7.21.3" "@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" @@ -669,6 +669,16 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" +"@babel/generator@^7.21.1": + version "7.21.1" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.1.tgz#951cc626057bc0af2c35cd23e9c64d384dea83dd" + integrity sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA== + dependencies: + "@babel/types" "^7.21.0" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@7.18.6", "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" @@ -919,7 +929,7 @@ "@babel/traverse" "^7.20.10" "@babel/types" "^7.20.7" -"@babel/helper-module-transforms@^7.21.0": +"@babel/helper-module-transforms@^7.21.2": version "7.21.2" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz#160caafa4978ac8c00ac66636cb0fa37b024e2d2" integrity sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ== @@ -1171,11 +1181,16 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.7.tgz#66fe23b3c8569220817d5feb8b9dcdc95bb4f71b" integrity sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg== -"@babel/parser@^7.21.0", "@babel/parser@^7.21.2": +"@babel/parser@^7.21.2": version "7.21.2" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.2.tgz#dacafadfc6d7654c3051a66d6fe55b6cb2f2a0b3" integrity sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ== +"@babel/parser@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.3.tgz#1d285d67a19162ff9daa358d4cb41d50c06220b3" + integrity sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" @@ -2170,7 +2185,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2": +"@babel/traverse@^7.21.0": version "7.21.2" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.2.tgz#ac7e1f27658750892e815e60ae90f382a46d8e75" integrity sha512-ts5FFU/dSUPS13tv8XiEObDu9K+iagEKME9kAbaP7r0Y9KtZJZ+NGndDvWoRAYNpeWafbpFeki3q9QoMD6gxyw== @@ -2186,6 +2201,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.21.2", "@babel/traverse@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.3.tgz#4747c5e7903d224be71f90788b06798331896f67" + integrity sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.21.3" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.21.0" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.21.3" + "@babel/types" "^7.21.3" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@7.19.4", "@babel/types@^7.19.4": version "7.19.4" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.4.tgz#0dd5c91c573a202d600490a35b33246fed8a41c7" @@ -2256,7 +2287,7 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" -"@babel/types@^7.21.0", "@babel/types@^7.21.2": +"@babel/types@^7.21.0": version "7.21.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.2.tgz#92246f6e00f91755893c2876ad653db70c8310d1" integrity sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw== @@ -2265,6 +2296,15 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" +"@babel/types@^7.21.2", "@babel/types@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.3.tgz#4865a5357ce40f64e3400b0f3b737dc6d4f64d05" + integrity sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg== + dependencies: + "@babel/helper-string-parser" "^7.19.4" + "@babel/helper-validator-identifier" "^7.19.1" + to-fast-properties "^2.0.0" + "@bazel/bazelisk@^1.7.5": version "1.12.0" resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.12.0.tgz#f08aebbf4afcb12684422450b0845dd6ef5cfe50" @@ -3576,10 +3616,10 @@ resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-15.2.0-next.4.tgz#354d6096329a7f33e787d218385dbb610ad42bee" integrity sha512-Ftqqo9AHVVbDLKS5q5AzN+InimGwCZQTCPfnA5WoDOPHjEDoA0Ekg+7IaRjRWpOd7lPYr9fh62KQLXVc2vIydg== -"@ngtools/webpack@16.0.0-next.3": - version "16.0.0-next.3" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-16.0.0-next.3.tgz#0233bb7dfbf48c765ec62bcf025bf6f075d8d155" - integrity sha512-jgW1uhzujKY7ESeTbj12PY59xQZ/UwwGX6XJsKJs9dK+XJYrpV+ojBVGKie/qCszXVZbrF77yBBwZgXijMS5/g== +"@ngtools/webpack@16.0.0-next.4": + version "16.0.0-next.4" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-16.0.0-next.4.tgz#8522c5a5af187e55fa6f61540b96cbb7f9bf76f2" + integrity sha512-dQGhpT5Qq51arUDzoaXQU8jyKekOw2Tu1qZicvlsSAJHLdVbRwP1BA2WaJb5QgcVJ0QAbfAxYSFOk3L6JPYivA== "@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3": version "2.1.8-no-fsevents.3" @@ -5415,6 +5455,18 @@ autoprefixer@10.4.13: picocolors "^1.0.0" postcss-value-parser "^4.2.0" +autoprefixer@10.4.14: + version "10.4.14" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.14.tgz#e28d49902f8e759dd25b153264e862df2705f79d" + integrity sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ== + dependencies: + browserslist "^4.21.5" + caniuse-lite "^1.0.30001464" + fraction.js "^4.2.0" + normalize-range "^0.1.2" + picocolors "^1.0.0" + postcss-value-parser "^4.2.0" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -5793,7 +5845,7 @@ browser-sync@^2.27.7: ua-parser-js "1.0.2" yargs "^17.3.1" -browserslist@4.21.5: +browserslist@4.21.5, browserslist@^4.21.5: version "4.21.5" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.5.tgz#75c5dae60063ee641f977e00edd3cfb2fb7af6a7" integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== @@ -6124,11 +6176,16 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001359, caniuse-lite@^1.0.30001370, caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001426: +caniuse-lite@^1.0.30001359, caniuse-lite@^1.0.30001370, caniuse-lite@^1.0.30001400: version "1.0.30001434" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001434.tgz" integrity sha512-aOBHrLmTQw//WFa2rcF1If9fa3ypkC1wzqqiKHgfdrXTWcU8C4gKVZT77eQAPWN1APys3+uQ0Df07rKauXGEYA== +caniuse-lite@^1.0.30001426, caniuse-lite@^1.0.30001464: + version "1.0.30001469" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001469.tgz#3dd505430c8522fdc9f94b4a19518e330f5c945a" + integrity sha512-Rcp7221ScNqQPP3W+lVOYDyjdR6dC+neEQCttoNr5bAyz54AboB4iwpnWgyi8P4YUsPybVzT4LgWiBbI3drL4g== + caniuse-lite@^1.0.30001449: version "1.0.30001451" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001451.tgz#2e197c698fc1373d63e1406d6607ea4617c613f1" @@ -11501,6 +11558,14 @@ latest-version@^5.0.0, latest-version@^5.1.0: dependencies: package-json "^6.3.0" +launch-editor@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/launch-editor/-/launch-editor-2.6.0.tgz#4c0c1a6ac126c572bd9ff9a30da1d2cae66defd7" + integrity sha512-JpDCcQnyAAzZZaZ7vEiSqL690w7dAEyLao+KC96zBplnYbJS7TYNjvM3M7y3dGz+v7aIsJk3hllWuc0kWAjyRQ== + dependencies: + picocolors "^1.0.0" + shell-quote "^1.7.3" + lazystream@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638" @@ -12281,6 +12346,13 @@ mini-css-extract-plugin@2.7.2: dependencies: schema-utils "^4.0.0" +mini-css-extract-plugin@2.7.3: + version "2.7.3" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.3.tgz#794aa4d598bf178a66b2a35fe287c3df3eac394e" + integrity sha512-CD9cXeKeXLcnMw8FZdtfrRrLaM7gwCl4nKuKn2YkY2Bw5wdlB8zU2cCzw+w2zS9RFvbrufTBkMCJACNPwqQA0w== + dependencies: + schema-utils "^4.0.0" + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -14783,10 +14855,10 @@ sass@1.58.0: immutable "^4.0.0" source-map-js ">=0.6.2 <2.0.0" -sass@1.58.3: - version "1.58.3" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.58.3.tgz#2348cc052061ba4f00243a208b09c40e031f270d" - integrity sha512-Q7RaEtYf6BflYrQ+buPudKR26/lH+10EmO9bBqbmPh/KeLqv8bjpTNqxe71ocONqXq+jYiCbpPUmQMS+JJPk4A== +sass@1.59.3: + version "1.59.3" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.59.3.tgz#a1ddf855d75c70c26b4555df4403e1bbf8e4403f" + integrity sha512-QCq98N3hX1jfTCoUAsF3eyGuXLsY7BCnCEg9qAact94Yc21npG2/mVOqoDvE0fCbWDqiM4WlcJQla0gWG2YlxQ== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" @@ -15123,6 +15195,11 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +shell-quote@^1.7.3: + version "1.8.0" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.0.tgz#20d078d0eaf71d54f43bd2ba14a1b5b9bfa5c8ba" + integrity sha512-QHsz8GgQIGKlRi24yFc6a6lN69Idnx634w49ay6+jA5yFh7a1UY+4Rp6HPx/L/1zcEDPEij8cIsiqR6bQsE5VQ== + shelljs@^0.8.5: version "0.8.5" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" @@ -15907,10 +15984,10 @@ terser@5.16.3, terser@^5.0.0, terser@^5.7.2, terser@^5.8.0: commander "^2.20.0" source-map-support "~0.5.20" -terser@5.16.5: - version "5.16.5" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.5.tgz#1c285ca0655f467f92af1bbab46ab72d1cb08e5a" - integrity sha512-qcwfg4+RZa3YvlFh0qjifnzBHjKGNbtDo9yivMqMFDy9Q6FSaQWSB/j1xKhsoUFJIqDOM3TsN6D5xbrMrFcHbg== +terser@5.16.6: + version "5.16.6" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.6.tgz#f6c7a14a378ee0630fbe3ac8d1f41b4681109533" + integrity sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg== dependencies: "@jridgewell/source-map" "^0.3.2" acorn "^8.5.0" @@ -17056,6 +17133,42 @@ webpack-dev-server@4.11.1: webpack-dev-middleware "^5.3.1" ws "^8.4.2" +webpack-dev-server@4.12.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.12.0.tgz#e2dcad4d43e486c3bac48ddbf346e77ef03c7428" + integrity sha512-XRN9YRnvOj3TQQ5w/0pR1y1xDcVnbWtNkTri46kuEbaWUPTHsWUvOyAAI7PZHLY+hsFki2kRltJjKMw7e+IiqA== + dependencies: + "@types/bonjour" "^3.5.9" + "@types/connect-history-api-fallback" "^1.3.5" + "@types/express" "^4.17.13" + "@types/serve-index" "^1.9.1" + "@types/serve-static" "^1.13.10" + "@types/sockjs" "^0.3.33" + "@types/ws" "^8.5.1" + ansi-html-community "^0.0.8" + bonjour-service "^1.0.11" + chokidar "^3.5.3" + colorette "^2.0.10" + compression "^1.7.4" + connect-history-api-fallback "^2.0.0" + default-gateway "^6.0.3" + express "^4.17.3" + graceful-fs "^4.2.6" + html-entities "^2.3.2" + http-proxy-middleware "^2.0.3" + ipaddr.js "^2.0.1" + launch-editor "^2.6.0" + open "^8.0.9" + p-retry "^4.5.0" + rimraf "^3.0.2" + schema-utils "^4.0.0" + selfsigned "^2.1.1" + serve-index "^1.9.1" + sockjs "^0.3.24" + spdy "^4.0.2" + webpack-dev-middleware "^5.3.1" + ws "^8.13.0" + webpack-merge@5.8.0: version "5.8.0" resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" @@ -17114,6 +17227,36 @@ webpack@5.75.0: watchpack "^2.4.0" webpack-sources "^3.2.3" +webpack@5.76.1: + version "5.76.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.76.1.tgz#7773de017e988bccb0f13c7d75ec245f377d295c" + integrity sha512-4+YIK4Abzv8172/SGqObnUjaIHjLEuUasz9EwQj/9xmPPkYJy2Mh03Q/lJfSD3YLzbxy5FeTq5Uw0323Oh6SJQ== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^0.0.51" + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/wasm-edit" "1.11.1" + "@webassemblyjs/wasm-parser" "1.11.1" + acorn "^8.7.1" + acorn-import-assertions "^1.7.6" + browserslist "^4.14.5" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.10.0" + es-module-lexer "^0.9.0" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.9" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.1.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.1.3" + watchpack "^2.4.0" + webpack-sources "^3.2.3" + websocket-driver@>=0.5.1, websocket-driver@^0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" @@ -17291,10 +17434,10 @@ ws@^7.2.3: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.8.tgz#ac2729881ab9e7cbaf8787fe3469a48c5c7f636a" integrity sha512-ri1Id1WinAX5Jqn9HejiGb8crfRio0Qgu8+MtL36rlTA6RLsMdWt1Az/19A2Qij6uSHUMphEFaTKa4WG+UNHNw== -ws@^8.4.2: - version "8.8.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.0.tgz#8e71c75e2f6348dbf8d78005107297056cb77769" - integrity sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ== +ws@^8.13.0, ws@^8.4.2: + version "8.13.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" + integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== ws@~8.2.3: version "8.2.3" From a404587615f9282b76cd58e799d9a2ff4cb6f2a4 Mon Sep 17 00:00:00 2001 From: Angular Robot Date: Tue, 21 Mar 2023 15:08:29 +0000 Subject: [PATCH 14/23] build: update scorecard action dependencies (#49508) See associated pull request for more information. PR Close #49508 --- .github/workflows/scorecard.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 45d5028cd04b..fc4fc2d8fc99 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -25,7 +25,7 @@ jobs: steps: - name: 'Checkout code' - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: persist-credentials: false @@ -47,6 +47,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: 'Upload to code-scanning' - uses: github/codeql-action/upload-sarif@16964e90ba004cdf0cd845b866b5df21038b7723 # v2.2.6 + uses: github/codeql-action/upload-sarif@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2.2.7 with: sarif_file: results.sarif From b5e68e42c1e01ef57b8fba11f3010ce58c33e0c1 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 21 Mar 2023 13:19:29 +0000 Subject: [PATCH 15/23] build: exclude draft PRs from triage queue (#49515) Excludes draft PRs from triage queue. Note that we cannot use `draft:false` as otherwise all issues would be filtered. Rather we need to negate `draft:true` which matches non-draft PRs and normal issues. PR Close #49515 --- .ng-dev/caretaker.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ng-dev/caretaker.mts b/.ng-dev/caretaker.mts index f4140c2aee5c..a8f884d4a2d0 100644 --- a/.ng-dev/caretaker.mts +++ b/.ng-dev/caretaker.mts @@ -14,7 +14,7 @@ export const caretaker: CaretakerConfig = { }, { name: 'Initial Triage Queue', - query: `is:open no:milestone`, + query: `is:open no:milestone -draft:true`, }, ], caretakerGroup: 'angular-caretaker', From 951a3474d61023264fa2d1d369e09ece75703528 Mon Sep 17 00:00:00 2001 From: Alex Rickabaugh Date: Tue, 21 Mar 2023 11:10:54 -0700 Subject: [PATCH 16/23] test: increase size tracking threshold to 5K / 5% (#49520) This commit increases the threshold of payload size tracking tests from 500 bytes to 5,000 bytes, and from 1% to 5%. This is done to minimize merge conflicts while still catching real regressions. PR Close #49520 --- scripts/ci/payload-size.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/ci/payload-size.js b/scripts/ci/payload-size.js index 7bb24e66f523..950527cc3cc4 100644 --- a/scripts/ci/payload-size.js +++ b/scripts/ci/payload-size.js @@ -15,6 +15,9 @@ const path = require('path'); // Get limit file, project name and commit SHA from command line arguments. const [, , limitFile, project, commit] = process.argv; +const THRESHOLD_BYTES = 5000; +const THRESHOLD_PERCENT = 5; + // Load sizes. const currentSizes = JSON.parse(fs.readFileSync('/tmp/current.log', 'utf8')); const allLimitSizes = JSON.parse(fs.readFileSync(limitFile, 'utf8')); @@ -41,8 +44,9 @@ for (const compressionType in limitSizes) { 'Maybe the file was renamed or removed.'); } else { const absoluteSizeDiff = Math.abs(actualSize - expectedSize); - // If size diff is larger than 1% or 500 bytes... - if (absoluteSizeDiff > 500 || absoluteSizeDiff > expectedSize / 100) { + // If size diff is larger than THRESHOLD_BYTES or THRESHOLD_PERCENT... + if (absoluteSizeDiff > THRESHOLD_BYTES || + absoluteSizeDiff > (expectedSize * THRESHOLD_PERCENT / 100)) { failed = true; // We must also catch when the size is significantly lower than the payload limit, so // we are forced to update the expected payload number when the payload size reduces. @@ -51,13 +55,14 @@ for (const compressionType in limitSizes) { const operator = actualSize > expectedSize ? 'exceeded' : 'fell below'; failureMessages.push( - `FAIL: Commit ${commit} ${compressionType} ${filename} ${ - operator} expected size by 500 bytes or >1% ` + + `FAIL: Commit ${commit} ${compressionType} ${filename} ${operator} expected size by ${ + THRESHOLD_BYTES} bytes or >${THRESHOLD_PERCENT}% ` + `(expected: ${expectedSize}, actual: ${actualSize}).`); } else { successMessages.push( `SUCCESS: Commit ${commit} ${compressionType} ${ - filename} did NOT cross size threshold of 500 bytes or >1% ` + + filename} did NOT cross size threshold of ${THRESHOLD_BYTES} bytes or >${ + THRESHOLD_PERCENT} ` + `(expected: ${expectedSize}, actual: ${actualSize}).`); } } @@ -75,5 +80,6 @@ if (failed) { `If this is a desired change, please update the size limits in file '${limitFileRelPath}'.`); process.exit(1); } else { - console.info(`Payload size check passed. All diffs are less than 1% or 500 bytes.`); + console.info(`Payload size check passed. All diffs are less than ${THRESHOLD_PERCENT}% or ${ + THRESHOLD_BYTES} bytes.`); } From b293c6a77c974483185a98ef4b9a1aea58f87eeb Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Mon, 20 Mar 2023 13:28:27 -0700 Subject: [PATCH 17/23] refactor(core): Remove VE/Render3 aliases from ViewRef code (#49499) These aliases were used while we needed to maintain compatibility with ViewEngine PR Close #49499 --- .../core/src/change_detection/change_detector_ref.ts | 6 +++--- packages/core/src/render3/view_ref.ts | 10 ++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/core/src/change_detection/change_detector_ref.ts b/packages/core/src/change_detection/change_detector_ref.ts index a06f6e921ba6..006bc9f7a2a3 100644 --- a/packages/core/src/change_detection/change_detector_ref.ts +++ b/packages/core/src/change_detection/change_detector_ref.ts @@ -13,7 +13,7 @@ import {isComponentHost} from '../render3/interfaces/type_checks'; import {DECLARATION_COMPONENT_VIEW, LView} from '../render3/interfaces/view'; import {getCurrentTNode, getLView} from '../render3/state'; import {getComponentLViewByIndex} from '../render3/util/view_utils'; -import {ViewRef as R3_ViewRef} from '../render3/view_ref'; +import {ViewRef} from '../render3/view_ref'; /** * Base class that provides change detection functionality. @@ -146,12 +146,12 @@ function createViewRef(tNode: TNode, lView: LView, isPipe: boolean): ChangeDetec // The LView represents the location where the component is declared. // Instead we want the LView for the component View and so we need to look it up. const componentView = getComponentLViewByIndex(tNode.index, lView); // look down - return new R3_ViewRef(componentView, componentView); + return new ViewRef(componentView, componentView); } else if (tNode.type & (TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Icu)) { // The LView represents the location where the injection is requested from. // We need to locate the containing LView (in case where the `lView` is an embedded view) const hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up - return new R3_ViewRef(hostComponentView, lView); + return new ViewRef(hostComponentView, lView); } return null!; } diff --git a/packages/core/src/render3/view_ref.ts b/packages/core/src/render3/view_ref.ts index cfc63a42ebe1..c2cdc61a0e78 100644 --- a/packages/core/src/render3/view_ref.ts +++ b/packages/core/src/render3/view_ref.ts @@ -6,9 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ -import {ChangeDetectorRef as viewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref'; +import {ChangeDetectorRef} from '../change_detection/change_detector_ref'; import {RuntimeError, RuntimeErrorCode} from '../errors'; -import {EmbeddedViewRef as viewEngine_EmbeddedViewRef, InternalViewRef as viewEngine_InternalViewRef, ViewRefTracker} from '../linker/view_ref'; +import {EmbeddedViewRef, InternalViewRef, ViewRefTracker} from '../linker/view_ref'; import {removeFromArray} from '../util/array_utils'; import {assertEqual} from '../util/assert'; @@ -20,14 +20,12 @@ import {CONTEXT, FLAGS, LView, LViewFlags, PARENT, TVIEW} from './interfaces/vie import {destroyLView, detachView, renderDetachView} from './node_manipulation'; - // Needed due to tsickle downleveling where multiple `implements` with classes creates // multiple @extends in Closure annotations, which is illegal. This workaround fixes // the multiple @extends by making the annotation @implements instead -export interface viewEngine_ChangeDetectorRef_interface extends viewEngine_ChangeDetectorRef {} +interface ChangeDetectorRefInterface extends ChangeDetectorRef {} -export class ViewRef implements viewEngine_EmbeddedViewRef, viewEngine_InternalViewRef, - viewEngine_ChangeDetectorRef_interface { +export class ViewRef implements EmbeddedViewRef, InternalViewRef, ChangeDetectorRefInterface { private _appRef: ViewRefTracker|null = null; private _attachedToViewContainer = false; From 9c57b656a149b51e8b7f256015376993d0a7f1e4 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Mon, 20 Mar 2023 15:44:19 -0700 Subject: [PATCH 18/23] refactor(router): Update router export location for deprecated interfaces (#49504) Moving these exports to a separate file will allow easier local patches internally. PR Close #49504 --- packages/router/src/index.ts | 3 ++- packages/router/src/models_deprecated.ts | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 packages/router/src/models_deprecated.ts diff --git a/packages/router/src/index.ts b/packages/router/src/index.ts index c0dc153765ce..d1c6fbec6dee 100644 --- a/packages/router/src/index.ts +++ b/packages/router/src/index.ts @@ -12,7 +12,8 @@ export {RouterLink, RouterLinkWithHref} from './directives/router_link'; export {RouterLinkActive} from './directives/router_link_active'; export {RouterOutlet, RouterOutletContract} from './directives/router_outlet'; export {ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, Event, EventType, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationCancellationCode as NavigationCancellationCode, NavigationEnd, NavigationError, NavigationSkipped, NavigationSkippedCode, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll} from './events'; -export {CanActivate, CanActivateChild, CanActivateChildFn, CanActivateFn, CanDeactivate, CanDeactivateFn, CanLoad, CanLoadFn, CanMatch, CanMatchFn, Data, DefaultExport, DeprecatedGuard, LoadChildren, LoadChildrenCallback, NavigationBehaviorOptions, OnSameUrlNavigation, QueryParamsHandling, Resolve, ResolveData, ResolveFn, Route, Routes, RunGuardsAndResolvers, UrlMatcher, UrlMatchResult} from './models'; +export {CanActivateChildFn, CanActivateFn, CanDeactivateFn, CanLoadFn, CanMatchFn, Data, DefaultExport, LoadChildren, LoadChildrenCallback, NavigationBehaviorOptions, OnSameUrlNavigation, QueryParamsHandling, ResolveData, ResolveFn, Route, Routes, RunGuardsAndResolvers, UrlMatcher, UrlMatchResult} from './models'; +export * from './models_deprecated'; export {Navigation, NavigationExtras, UrlCreationOptions} from './navigation_transition'; export {DefaultTitleStrategy, TitleStrategy} from './page_title_strategy'; export {DebugTracingFeature, DisabledInitialNavigationFeature, EnabledBlockingInitialNavigationFeature, InitialNavigationFeature, InMemoryScrollingFeature, NavigationErrorHandlerFeature, PreloadingFeature, provideRouter, provideRoutes, RouterConfigurationFeature, RouterFeature, RouterFeatures, RouterHashLocationFeature, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig} from './provide_router'; diff --git a/packages/router/src/models_deprecated.ts b/packages/router/src/models_deprecated.ts new file mode 100644 index 000000000000..2d3de228eedc --- /dev/null +++ b/packages/router/src/models_deprecated.ts @@ -0,0 +1,13 @@ +/** + * @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.io/license + */ + +// This file contains re-exports of deprecated interfaces in `models.ts` +// The public API re-exports everything from this file, which can be patched +// locally in g3 to prevent regressions after cleanups complete. + +export {CanActivate, CanActivateChild, CanDeactivate, CanLoad, CanMatch, DeprecatedGuard, Resolve} from './models'; From be2db59a5568fddccb5bc99a03b578b29eedeb77 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Mon, 20 Mar 2023 15:47:24 -0700 Subject: [PATCH 19/23] refactor(router): Remove deprecated loadChildren file (#49504) This file was used while migrations were happening internally. All code is now updated to the callback PR Close #49504 --- .../router/src/deprecated_load_children.ts | 18 ------------------ packages/router/src/router_config_loader.ts | 13 ++----------- 2 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 packages/router/src/deprecated_load_children.ts diff --git a/packages/router/src/deprecated_load_children.ts b/packages/router/src/deprecated_load_children.ts deleted file mode 100644 index b9b9e50ed484..000000000000 --- a/packages/router/src/deprecated_load_children.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.io/license - */ - -import {Injector, NgModuleFactory} from '@angular/core'; -import {Observable} from 'rxjs'; - -// This file exists to support the legacy `loadChildren: string` behavior being patched back into -// Angular. - -export function deprecatedLoadChildrenString( - injector: Injector, loadChildren: unknown): Observable>|null { - return null; -} diff --git a/packages/router/src/router_config_loader.ts b/packages/router/src/router_config_loader.ts index 0211a98d5ee8..f95f8755864e 100644 --- a/packages/router/src/router_config_loader.ts +++ b/packages/router/src/router_config_loader.ts @@ -6,11 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {Compiler, EnvironmentInjector, Injectable, InjectFlags, InjectionToken, Injector, NgModuleFactory, Type} from '@angular/core'; +import {Compiler, EnvironmentInjector, inject, Injectable, InjectFlags, InjectionToken, Injector, NgModuleFactory, Type} from '@angular/core'; import {ConnectableObservable, from, Observable, of, Subject} from 'rxjs'; import {catchError, finalize, map, mergeMap, refCount, tap} from 'rxjs/operators'; -import {deprecatedLoadChildrenString} from './deprecated_load_children'; import {DefaultExport, LoadChildren, LoadChildrenCallback, LoadedRouterConfig, Route, Routes} from './models'; import {flatten, wrapIntoObservable} from './utils/collection'; import {assertStandalone, standardizeConfig, validateConfig} from './utils/config'; @@ -38,11 +37,7 @@ export class RouterConfigLoader { private childrenLoaders = new WeakMap>(); onLoadStartListener?: (r: Route) => void; onLoadEndListener?: (r: Route) => void; - - constructor( - private injector: Injector, - private compiler: Compiler, - ) {} + private readonly compiler = inject(Compiler); loadComponent(route: Route): Observable> { if (this.componentLoaders.get(route)) { @@ -124,10 +119,6 @@ export class RouterConfigLoader { private loadModuleFactoryOrRoutes(loadChildren: LoadChildren): Observable|Routes> { - const deprecatedResult = deprecatedLoadChildrenString(this.injector, loadChildren); - if (deprecatedResult) { - return deprecatedResult; - } return wrapIntoObservable((loadChildren as LoadChildrenCallback)()) .pipe( map(maybeUnwrapDefaultExport), From 3bb76768a617b512f1436ff8687ddc6270e1d488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20G=C3=B6tz?= Date: Tue, 21 Mar 2023 21:44:03 +0100 Subject: [PATCH 20/23] docs: remove ticks in code sample to generate components (#49525) These ticks appear in the actual documentation and when copied verbatim while following the tutorial, running this command in the terminal simply does nothing. PR Close #49525 --- aio/content/start/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/start/index.md b/aio/content/start/index.md index dd8dc5210792..c97cfcfb9f88 100644 --- a/aio/content/start/index.md +++ b/aio/content/start/index.md @@ -195,7 +195,7 @@ This section walks you through creating a child component, `ProductAlertsCompone - `ng generate component product-alerts` + ng generate component product-alerts From bf4d8568341a6ac432059903eb66c3c7509c1b9a Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Wed, 22 Mar 2023 09:41:23 +0100 Subject: [PATCH 21/23] fix(migrations): preserve trailing commas in code generated by standalone migration (#49533) This is based on some internal feedback. Adds logic to the standalone migration that attempts to preserve trailing commas when updating existing AST nodes. When creating new ones, it tries to infer whether to generate the trailing comma based on the surrounding code. PR Close #49533 --- .../standalone-migration/prune-modules.ts | 5 +- .../standalone-bootstrap.ts | 6 +- .../standalone-migration/to-standalone.ts | 49 +++++- .../test/standalone_migration_spec.ts | 159 ++++++++++++++++++ 4 files changed, 208 insertions(+), 11 deletions(-) diff --git a/packages/core/schematics/ng-generate/standalone-migration/prune-modules.ts b/packages/core/schematics/ng-generate/standalone-migration/prune-modules.ts index d7f21cdad35f..e3016c520ab5 100644 --- a/packages/core/schematics/ng-generate/standalone-migration/prune-modules.ts +++ b/packages/core/schematics/ng-generate/standalone-migration/prune-modules.ts @@ -152,7 +152,10 @@ function removeArrayReferences( tracker: ChangeTracker): void { for (const [array, toRemove] of locations.getEntries()) { const newElements = filterRemovedElements(array.elements, toRemove); - tracker.replaceNode(array, ts.factory.updateArrayLiteralExpression(array, newElements)); + tracker.replaceNode( + array, + ts.factory.updateArrayLiteralExpression( + array, ts.factory.createNodeArray(newElements, array.elements.hasTrailingComma))); } } diff --git a/packages/core/schematics/ng-generate/standalone-migration/standalone-bootstrap.ts b/packages/core/schematics/ng-generate/standalone-migration/standalone-bootstrap.ts index fae719f56c3a..08300f211fca 100644 --- a/packages/core/schematics/ng-generate/standalone-migration/standalone-bootstrap.ts +++ b/packages/core/schematics/ng-generate/standalone-migration/standalone-bootstrap.ts @@ -244,9 +244,13 @@ function replaceBootstrapCallExpression( // Push the providers after `importProvidersFrom` call for better readability. combinedProviders.push(...providers); + + const providersArray = ts.factory.createNodeArray( + combinedProviders, + analysis.metadata.properties.hasTrailingComma && combinedProviders.length > 2); const initializer = remapDynamicImports( sourceFile.fileName, - ts.factory.createArrayLiteralExpression(combinedProviders, combinedProviders.length > 1)); + ts.factory.createArrayLiteralExpression(providersArray, combinedProviders.length > 1)); args.push(ts.factory.createObjectLiteralExpression( [ts.factory.createPropertyAssignment('providers', initializer)], true)); diff --git a/packages/core/schematics/ng-generate/standalone-migration/to-standalone.ts b/packages/core/schematics/ng-generate/standalone-migration/to-standalone.ts index 85dc38ce7236..2319d212bf3f 100644 --- a/packages/core/schematics/ng-generate/standalone-migration/to-standalone.ts +++ b/packages/core/schematics/ng-generate/standalone-migration/to-standalone.ts @@ -98,10 +98,15 @@ export function convertNgModuleDeclarationToStandalone( decl, allDeclarations, tracker, typeChecker, importRemapper); if (importsToAdd.length > 0) { + const hasTrailingComma = importsToAdd.length > 2 && + !!extractMetadataLiteral(directiveMeta.decorator)?.properties.hasTrailingComma; decorator = addPropertyToAngularDecorator( decorator, ts.factory.createPropertyAssignment( - 'imports', ts.factory.createArrayLiteralExpression(importsToAdd))); + 'imports', + ts.factory.createArrayLiteralExpression( + // Create a multi-line array when it has a trailing comma. + ts.factory.createNodeArray(importsToAdd, hasTrailingComma), hasTrailingComma))); } } @@ -215,6 +220,9 @@ function moveDeclarationsToImports( const declarationsToCopy: ts.Expression[] = []; const properties: ts.ObjectLiteralElementLike[] = []; const importsProp = findLiteralProperty(literal, 'imports'); + const hasAnyArrayTrailingComma = literal.properties.some( + prop => ts.isPropertyAssignment(prop) && ts.isArrayLiteralExpression(prop.initializer) && + prop.initializer.elements.hasTrailingComma); // Separate the declarations that we want to keep and ones we need to copy into the `imports`. if (ts.isPropertyAssignment(declarationsProp)) { @@ -248,7 +256,9 @@ function moveDeclarationsToImports( // If there are no `imports`, create them with the declarations we want to copy. if (!importsProp && declarationsToCopy.length > 0) { properties.push(ts.factory.createPropertyAssignment( - 'imports', ts.factory.createArrayLiteralExpression(declarationsToCopy))); + 'imports', + ts.factory.createArrayLiteralExpression(ts.factory.createNodeArray( + declarationsToCopy, hasAnyArrayTrailingComma && declarationsToCopy.length > 2)))); } for (const prop of literal.properties) { @@ -260,8 +270,13 @@ function moveDeclarationsToImports( // If we have declarations to preserve, update the existing property, otherwise drop it. if (prop === declarationsProp) { if (declarationsToPreserve.length > 0) { + const hasTrailingComma = ts.isArrayLiteralExpression(prop.initializer) ? + prop.initializer.elements.hasTrailingComma : + hasAnyArrayTrailingComma; properties.push(ts.factory.updatePropertyAssignment( - prop, prop.name, ts.factory.createArrayLiteralExpression(declarationsToPreserve))); + prop, prop.name, + ts.factory.createArrayLiteralExpression(ts.factory.createNodeArray( + declarationsToPreserve, hasTrailingComma && declarationsToPreserve.length > 2)))); } continue; } @@ -273,10 +288,16 @@ function moveDeclarationsToImports( if (ts.isArrayLiteralExpression(prop.initializer)) { initializer = ts.factory.updateArrayLiteralExpression( - prop.initializer, [...prop.initializer.elements, ...declarationsToCopy]); + prop.initializer, + ts.factory.createNodeArray( + [...prop.initializer.elements, ...declarationsToCopy], + prop.initializer.elements.hasTrailingComma)); } else { - initializer = ts.factory.createArrayLiteralExpression( - [ts.factory.createSpreadElement(prop.initializer), ...declarationsToCopy]); + initializer = ts.factory.createArrayLiteralExpression(ts.factory.createNodeArray( + [ts.factory.createSpreadElement(prop.initializer), ...declarationsToCopy], + // Expect the declarations to be greater than 1 since + // we have the pre-existing initializer already. + hasAnyArrayTrailingComma && declarationsToCopy.length > 1)); } properties.push(ts.factory.updatePropertyAssignment(prop, prop.name, initializer)); @@ -288,7 +309,9 @@ function moveDeclarationsToImports( } tracker.replaceNode( - literal, ts.factory.updateObjectLiteralExpression(literal, properties), + literal, + ts.factory.updateObjectLiteralExpression( + literal, ts.factory.createNodeArray(properties, literal.properties.hasTrailingComma)), ts.EmitHint.Expression); } @@ -313,10 +336,12 @@ function addPropertyToAngularDecorator( } let literalProperties: ts.ObjectLiteralElementLike[]; + let hasTrailingComma = false; if (node.expression.arguments.length === 0) { literalProperties = [property]; } else if (ts.isObjectLiteralExpression(node.expression.arguments[0])) { + hasTrailingComma = node.expression.arguments[0].properties.hasTrailingComma; literalProperties = [...node.expression.arguments[0].properties, property]; } else { // Unsupported case (e.g. `@Component(SOME_CONST)`). Return the original node. @@ -327,7 +352,9 @@ function addPropertyToAngularDecorator( // the latter ends up duplicating the node's leading comment. return ts.factory.createDecorator(ts.factory.createCallExpression( node.expression.expression, node.expression.typeArguments, - [ts.factory.createObjectLiteralExpression(literalProperties, literalProperties.length > 1)])); + [ts.factory.createObjectLiteralExpression( + ts.factory.createNodeArray(literalProperties, hasTrailingComma), + literalProperties.length > 1)])); } /** Checks if a node is a `PropertyAssignment` with a name. */ @@ -559,12 +586,16 @@ export function migrateTestDeclarations( } if (importsToAdd && importsToAdd.size > 0) { + const hasTrailingComma = importsToAdd.size > 2 && + !!extractMetadataLiteral(decorator.node)?.properties.hasTrailingComma; + const importsArray = ts.factory.createNodeArray(Array.from(importsToAdd), hasTrailingComma); + tracker.replaceNode( decorator.node, addPropertyToAngularDecorator( newDecorator, ts.factory.createPropertyAssignment( - 'imports', ts.factory.createArrayLiteralExpression(Array.from(importsToAdd))))); + 'imports', ts.factory.createArrayLiteralExpression(importsArray)))); } else { tracker.replaceNode(decorator.node, newDecorator); } diff --git a/packages/core/schematics/test/standalone_migration_spec.ts b/packages/core/schematics/test/standalone_migration_spec.ts index 1421c7d6f287..5f496b23bfd4 100644 --- a/packages/core/schematics/test/standalone_migration_spec.ts +++ b/packages/core/schematics/test/standalone_migration_spec.ts @@ -1657,6 +1657,128 @@ describe('standalone migration', () => { `)); }); + it('should preserve the trailing comma when adding an `imports` array', async () => { + writeFile('module.ts', ` + import {NgModule, Directive} from '@angular/core'; + + @Directive({selector: '[dir]'}) + export class MyDir {} + + @NgModule({ + declarations: [MyDir], + exports: [MyDir], + }) + export class Mod {} + `); + + await runMigration('convert-to-standalone'); + + expect(stripWhitespace(tree.readContent('module.ts'))).toContain(stripWhitespace(` + @NgModule({ + imports: [MyDir], + exports: [MyDir], + }) + `)); + }); + + it('should preserve the trailing comma when adding to an existing `imports` array', async () => { + writeFile('module.ts', ` + import {NgModule, Directive} from '@angular/core'; + import {CommonModule} from '@angular/common'; + import {RouterModule} from '@angular/router'; + + @Directive({selector: '[dir]'}) + export class MyDir {} + + @NgModule({ + imports: [ + CommonModule, + RouterModule, + ], + declarations: [MyDir], + exports: [MyDir], + }) + export class Mod {} + `); + + await runMigration('convert-to-standalone'); + + expect(stripWhitespace(tree.readContent('module.ts'))).toContain(stripWhitespace(` + @NgModule({ + imports: [ + CommonModule, + RouterModule, + MyDir, + ], + exports: [MyDir], + }) + `)); + }); + + it('should preserve the trailing comma when marking a directive as standalone', async () => { + writeFile('module.ts', ` + import {NgModule, Directive} from '@angular/core'; + + @Directive({ + selector: '[dir]', + exportAs: 'dir', + }) + export class MyDir {} + + @NgModule({declarations: [MyDir]}) + export class Mod {} + `); + + await runMigration('convert-to-standalone'); + + expect(stripWhitespace(tree.readContent('module.ts'))).toContain(stripWhitespace(` + @Directive({ + selector: '[dir]', + exportAs: 'dir', + standalone: true, + }) + `)); + }); + + it('should add a trailing comma when generating an imports array in a component', async () => { + writeFile('module.ts', ` + import {NgModule, Directive, Component} from '@angular/core'; + + @Directive({selector: '[dir-one]'}) + export class DirOne {} + + @Directive({selector: '[dir-two]'}) + export class DirTwo {} + + @Directive({selector: '[dir-three]'}) + export class DirThree {} + + @Component({ + selector: 'my-comp', + template: '
', + }) + export class MyComp {} + + @NgModule({declarations: [DirOne, DirTwo, DirThree, MyComp]}) + export class Mod {} + `); + + await runMigration('convert-to-standalone'); + + expect(stripWhitespace(tree.readContent('module.ts'))).toContain(stripWhitespace(` + @Component({ + selector: 'my-comp', + template: '
', + standalone: true, + imports: [ + DirOne, + DirTwo, + DirThree, + ], + }) + `)); + }); + it('should remove a module that only has imports and exports', async () => { writeFile('app.module.ts', ` import {NgModule} from '@angular/core'; @@ -2413,6 +2535,43 @@ describe('standalone migration', () => { `)); }); + it('should preserve the trailing comma when deleting a module', async () => { + const initialAppModule = ` + import {NgModule, InjectionToken} from '@angular/core'; + import {CommonModule} from '@angular/common'; + import {RouterModule} from '@angular/router'; + + const token = new InjectionToken('token'); + + @NgModule() + export class ToDelete {} + + @NgModule({ + imports: [ + CommonModule, + ToDelete, + RouterModule, + ], + providers: [{provide: token, useValue: 123}], + }) + export class AppModule {} + `; + + writeFile('app.module.ts', initialAppModule); + + await runMigration('prune-ng-modules'); + + expect(stripWhitespace(tree.readContent('app.module.ts'))).toContain(stripWhitespace(` + @NgModule({ + imports: [ + CommonModule, + RouterModule, + ], + providers: [{provide: token, useValue: 123}], + }) + `)); + }); + it('should switch a platformBrowser().bootstrapModule call to bootstrapApplication', async () => { writeFile('main.ts', ` import {AppModule} from './app/app.module'; From 288156b06bd712829f9d17175053b617b508f36c Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Wed, 22 Mar 2023 18:06:40 +0100 Subject: [PATCH 22/23] Revert "fix(migrations): preserve trailing commas in code generated by standalone migration (#49533)" (#49547) This reverts commit bf4d8568341a6ac432059903eb66c3c7509c1b9a. PR Close #49547 --- .../standalone-migration/prune-modules.ts | 5 +- .../standalone-bootstrap.ts | 6 +- .../standalone-migration/to-standalone.ts | 49 +----- .../test/standalone_migration_spec.ts | 159 ------------------ 4 files changed, 11 insertions(+), 208 deletions(-) diff --git a/packages/core/schematics/ng-generate/standalone-migration/prune-modules.ts b/packages/core/schematics/ng-generate/standalone-migration/prune-modules.ts index e3016c520ab5..d7f21cdad35f 100644 --- a/packages/core/schematics/ng-generate/standalone-migration/prune-modules.ts +++ b/packages/core/schematics/ng-generate/standalone-migration/prune-modules.ts @@ -152,10 +152,7 @@ function removeArrayReferences( tracker: ChangeTracker): void { for (const [array, toRemove] of locations.getEntries()) { const newElements = filterRemovedElements(array.elements, toRemove); - tracker.replaceNode( - array, - ts.factory.updateArrayLiteralExpression( - array, ts.factory.createNodeArray(newElements, array.elements.hasTrailingComma))); + tracker.replaceNode(array, ts.factory.updateArrayLiteralExpression(array, newElements)); } } diff --git a/packages/core/schematics/ng-generate/standalone-migration/standalone-bootstrap.ts b/packages/core/schematics/ng-generate/standalone-migration/standalone-bootstrap.ts index 08300f211fca..fae719f56c3a 100644 --- a/packages/core/schematics/ng-generate/standalone-migration/standalone-bootstrap.ts +++ b/packages/core/schematics/ng-generate/standalone-migration/standalone-bootstrap.ts @@ -244,13 +244,9 @@ function replaceBootstrapCallExpression( // Push the providers after `importProvidersFrom` call for better readability. combinedProviders.push(...providers); - - const providersArray = ts.factory.createNodeArray( - combinedProviders, - analysis.metadata.properties.hasTrailingComma && combinedProviders.length > 2); const initializer = remapDynamicImports( sourceFile.fileName, - ts.factory.createArrayLiteralExpression(providersArray, combinedProviders.length > 1)); + ts.factory.createArrayLiteralExpression(combinedProviders, combinedProviders.length > 1)); args.push(ts.factory.createObjectLiteralExpression( [ts.factory.createPropertyAssignment('providers', initializer)], true)); diff --git a/packages/core/schematics/ng-generate/standalone-migration/to-standalone.ts b/packages/core/schematics/ng-generate/standalone-migration/to-standalone.ts index 2319d212bf3f..85dc38ce7236 100644 --- a/packages/core/schematics/ng-generate/standalone-migration/to-standalone.ts +++ b/packages/core/schematics/ng-generate/standalone-migration/to-standalone.ts @@ -98,15 +98,10 @@ export function convertNgModuleDeclarationToStandalone( decl, allDeclarations, tracker, typeChecker, importRemapper); if (importsToAdd.length > 0) { - const hasTrailingComma = importsToAdd.length > 2 && - !!extractMetadataLiteral(directiveMeta.decorator)?.properties.hasTrailingComma; decorator = addPropertyToAngularDecorator( decorator, ts.factory.createPropertyAssignment( - 'imports', - ts.factory.createArrayLiteralExpression( - // Create a multi-line array when it has a trailing comma. - ts.factory.createNodeArray(importsToAdd, hasTrailingComma), hasTrailingComma))); + 'imports', ts.factory.createArrayLiteralExpression(importsToAdd))); } } @@ -220,9 +215,6 @@ function moveDeclarationsToImports( const declarationsToCopy: ts.Expression[] = []; const properties: ts.ObjectLiteralElementLike[] = []; const importsProp = findLiteralProperty(literal, 'imports'); - const hasAnyArrayTrailingComma = literal.properties.some( - prop => ts.isPropertyAssignment(prop) && ts.isArrayLiteralExpression(prop.initializer) && - prop.initializer.elements.hasTrailingComma); // Separate the declarations that we want to keep and ones we need to copy into the `imports`. if (ts.isPropertyAssignment(declarationsProp)) { @@ -256,9 +248,7 @@ function moveDeclarationsToImports( // If there are no `imports`, create them with the declarations we want to copy. if (!importsProp && declarationsToCopy.length > 0) { properties.push(ts.factory.createPropertyAssignment( - 'imports', - ts.factory.createArrayLiteralExpression(ts.factory.createNodeArray( - declarationsToCopy, hasAnyArrayTrailingComma && declarationsToCopy.length > 2)))); + 'imports', ts.factory.createArrayLiteralExpression(declarationsToCopy))); } for (const prop of literal.properties) { @@ -270,13 +260,8 @@ function moveDeclarationsToImports( // If we have declarations to preserve, update the existing property, otherwise drop it. if (prop === declarationsProp) { if (declarationsToPreserve.length > 0) { - const hasTrailingComma = ts.isArrayLiteralExpression(prop.initializer) ? - prop.initializer.elements.hasTrailingComma : - hasAnyArrayTrailingComma; properties.push(ts.factory.updatePropertyAssignment( - prop, prop.name, - ts.factory.createArrayLiteralExpression(ts.factory.createNodeArray( - declarationsToPreserve, hasTrailingComma && declarationsToPreserve.length > 2)))); + prop, prop.name, ts.factory.createArrayLiteralExpression(declarationsToPreserve))); } continue; } @@ -288,16 +273,10 @@ function moveDeclarationsToImports( if (ts.isArrayLiteralExpression(prop.initializer)) { initializer = ts.factory.updateArrayLiteralExpression( - prop.initializer, - ts.factory.createNodeArray( - [...prop.initializer.elements, ...declarationsToCopy], - prop.initializer.elements.hasTrailingComma)); + prop.initializer, [...prop.initializer.elements, ...declarationsToCopy]); } else { - initializer = ts.factory.createArrayLiteralExpression(ts.factory.createNodeArray( - [ts.factory.createSpreadElement(prop.initializer), ...declarationsToCopy], - // Expect the declarations to be greater than 1 since - // we have the pre-existing initializer already. - hasAnyArrayTrailingComma && declarationsToCopy.length > 1)); + initializer = ts.factory.createArrayLiteralExpression( + [ts.factory.createSpreadElement(prop.initializer), ...declarationsToCopy]); } properties.push(ts.factory.updatePropertyAssignment(prop, prop.name, initializer)); @@ -309,9 +288,7 @@ function moveDeclarationsToImports( } tracker.replaceNode( - literal, - ts.factory.updateObjectLiteralExpression( - literal, ts.factory.createNodeArray(properties, literal.properties.hasTrailingComma)), + literal, ts.factory.updateObjectLiteralExpression(literal, properties), ts.EmitHint.Expression); } @@ -336,12 +313,10 @@ function addPropertyToAngularDecorator( } let literalProperties: ts.ObjectLiteralElementLike[]; - let hasTrailingComma = false; if (node.expression.arguments.length === 0) { literalProperties = [property]; } else if (ts.isObjectLiteralExpression(node.expression.arguments[0])) { - hasTrailingComma = node.expression.arguments[0].properties.hasTrailingComma; literalProperties = [...node.expression.arguments[0].properties, property]; } else { // Unsupported case (e.g. `@Component(SOME_CONST)`). Return the original node. @@ -352,9 +327,7 @@ function addPropertyToAngularDecorator( // the latter ends up duplicating the node's leading comment. return ts.factory.createDecorator(ts.factory.createCallExpression( node.expression.expression, node.expression.typeArguments, - [ts.factory.createObjectLiteralExpression( - ts.factory.createNodeArray(literalProperties, hasTrailingComma), - literalProperties.length > 1)])); + [ts.factory.createObjectLiteralExpression(literalProperties, literalProperties.length > 1)])); } /** Checks if a node is a `PropertyAssignment` with a name. */ @@ -586,16 +559,12 @@ export function migrateTestDeclarations( } if (importsToAdd && importsToAdd.size > 0) { - const hasTrailingComma = importsToAdd.size > 2 && - !!extractMetadataLiteral(decorator.node)?.properties.hasTrailingComma; - const importsArray = ts.factory.createNodeArray(Array.from(importsToAdd), hasTrailingComma); - tracker.replaceNode( decorator.node, addPropertyToAngularDecorator( newDecorator, ts.factory.createPropertyAssignment( - 'imports', ts.factory.createArrayLiteralExpression(importsArray)))); + 'imports', ts.factory.createArrayLiteralExpression(Array.from(importsToAdd))))); } else { tracker.replaceNode(decorator.node, newDecorator); } diff --git a/packages/core/schematics/test/standalone_migration_spec.ts b/packages/core/schematics/test/standalone_migration_spec.ts index 5f496b23bfd4..1421c7d6f287 100644 --- a/packages/core/schematics/test/standalone_migration_spec.ts +++ b/packages/core/schematics/test/standalone_migration_spec.ts @@ -1657,128 +1657,6 @@ describe('standalone migration', () => { `)); }); - it('should preserve the trailing comma when adding an `imports` array', async () => { - writeFile('module.ts', ` - import {NgModule, Directive} from '@angular/core'; - - @Directive({selector: '[dir]'}) - export class MyDir {} - - @NgModule({ - declarations: [MyDir], - exports: [MyDir], - }) - export class Mod {} - `); - - await runMigration('convert-to-standalone'); - - expect(stripWhitespace(tree.readContent('module.ts'))).toContain(stripWhitespace(` - @NgModule({ - imports: [MyDir], - exports: [MyDir], - }) - `)); - }); - - it('should preserve the trailing comma when adding to an existing `imports` array', async () => { - writeFile('module.ts', ` - import {NgModule, Directive} from '@angular/core'; - import {CommonModule} from '@angular/common'; - import {RouterModule} from '@angular/router'; - - @Directive({selector: '[dir]'}) - export class MyDir {} - - @NgModule({ - imports: [ - CommonModule, - RouterModule, - ], - declarations: [MyDir], - exports: [MyDir], - }) - export class Mod {} - `); - - await runMigration('convert-to-standalone'); - - expect(stripWhitespace(tree.readContent('module.ts'))).toContain(stripWhitespace(` - @NgModule({ - imports: [ - CommonModule, - RouterModule, - MyDir, - ], - exports: [MyDir], - }) - `)); - }); - - it('should preserve the trailing comma when marking a directive as standalone', async () => { - writeFile('module.ts', ` - import {NgModule, Directive} from '@angular/core'; - - @Directive({ - selector: '[dir]', - exportAs: 'dir', - }) - export class MyDir {} - - @NgModule({declarations: [MyDir]}) - export class Mod {} - `); - - await runMigration('convert-to-standalone'); - - expect(stripWhitespace(tree.readContent('module.ts'))).toContain(stripWhitespace(` - @Directive({ - selector: '[dir]', - exportAs: 'dir', - standalone: true, - }) - `)); - }); - - it('should add a trailing comma when generating an imports array in a component', async () => { - writeFile('module.ts', ` - import {NgModule, Directive, Component} from '@angular/core'; - - @Directive({selector: '[dir-one]'}) - export class DirOne {} - - @Directive({selector: '[dir-two]'}) - export class DirTwo {} - - @Directive({selector: '[dir-three]'}) - export class DirThree {} - - @Component({ - selector: 'my-comp', - template: '
', - }) - export class MyComp {} - - @NgModule({declarations: [DirOne, DirTwo, DirThree, MyComp]}) - export class Mod {} - `); - - await runMigration('convert-to-standalone'); - - expect(stripWhitespace(tree.readContent('module.ts'))).toContain(stripWhitespace(` - @Component({ - selector: 'my-comp', - template: '
', - standalone: true, - imports: [ - DirOne, - DirTwo, - DirThree, - ], - }) - `)); - }); - it('should remove a module that only has imports and exports', async () => { writeFile('app.module.ts', ` import {NgModule} from '@angular/core'; @@ -2535,43 +2413,6 @@ describe('standalone migration', () => { `)); }); - it('should preserve the trailing comma when deleting a module', async () => { - const initialAppModule = ` - import {NgModule, InjectionToken} from '@angular/core'; - import {CommonModule} from '@angular/common'; - import {RouterModule} from '@angular/router'; - - const token = new InjectionToken('token'); - - @NgModule() - export class ToDelete {} - - @NgModule({ - imports: [ - CommonModule, - ToDelete, - RouterModule, - ], - providers: [{provide: token, useValue: 123}], - }) - export class AppModule {} - `; - - writeFile('app.module.ts', initialAppModule); - - await runMigration('prune-ng-modules'); - - expect(stripWhitespace(tree.readContent('app.module.ts'))).toContain(stripWhitespace(` - @NgModule({ - imports: [ - CommonModule, - RouterModule, - ], - providers: [{provide: token, useValue: 123}], - }) - `)); - }); - it('should switch a platformBrowser().bootstrapModule call to bootstrapApplication', async () => { writeFile('main.ts', ` import {AppModule} from './app/app.module'; From 901353ec7ab24eca5067d1a9f10d77cda5693d63 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Wed, 22 Mar 2023 13:04:07 -0700 Subject: [PATCH 23/23] release: cut the v15.2.4 release --- CHANGELOG.md | 14 +++++++++++++- package.json | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 103419bde66a..34c2e23c4f1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ + +# 15.2.4 (2023-03-22) +### core +| Commit | Type | Description | +| -- | -- | -- | +| [bae6b5ceb1](https://github.com/angular/angular/commit/bae6b5ceb16bd87c8146aa29564a8d29135a6f95) | fix | Allow `TestBed.configureTestingModule` to work with recursive cycle of standalone components. ([#49473](https://github.com/angular/angular/pull/49473)) | +| [087f4412af](https://github.com/angular/angular/commit/087f4412afe9ccdefe7d63012af749b79f3e84d0) | fix | more accurate matching of classes during content projection ([#48888](https://github.com/angular/angular/pull/48888)) | +## Special Thanks +Aditya Srinivasan, Alex Rickabaugh, Andrew Scott, Kristiyan Kostadinov, Masaoki Kobayashi, Matthieu Riegler, Paul Gschwendtner, Peter Götz, Thomas Pischke, Virginia Dooley and avmaxim + + + # 15.2.3 (2023-03-16) ## Special Thanks @@ -4006,4 +4018,4 @@ This release contains the same set the of changes as 11.2.0-next.1. ### Code Refactoring * **compiler:** remove support for TypeScript 3.9 ([#39313](https://github.com/angular/angular/issues/39313)) ([736e064](https://github.com/angular/angular/commit/736e0644b02bc4606a7ae0c974d1b06e993708f6)) -* **router:** adjust type of parameter in `navigateByUrl` and `createUrlTree` to be more accurate ([#38227](https://github.com/angular/angular/issues/38227)) ([e4f4d18](https://github.com/angular/angular/commit/e4f4d18)), closes [#18798](https://github.com/angular/angular/issues/18798) \ No newline at end of file +* **router:** adjust type of parameter in `navigateByUrl` and `createUrlTree` to be more accurate ([#38227](https://github.com/angular/angular/issues/38227)) ([e4f4d18](https://github.com/angular/angular/commit/e4f4d18)), closes [#18798](https://github.com/angular/angular/issues/18798) diff --git a/package.json b/package.json index 9f5b2b9bf35d..0dbbf9bca969 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-srcs", - "version": "15.2.3", + "version": "15.2.4", "private": true, "description": "Angular - a web framework for modern web apps", "homepage": "https://github.com/angular/angular",