26385 Commits

Author SHA1 Message Date
Andrew Scott 901353ec7a release: cut the v15.2.4 release 15.2.4 2023-03-22 13:15:53 -07:00
Kristiyan Kostadinov 288156b06b Revert "fix(migrations): preserve trailing commas in code generated by standalone migration (#49533)" (#49547)
This reverts commit bf4d856834.

PR Close #49547
2023-03-22 10:21:27 -07:00
Kristiyan Kostadinov bf4d856834 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
2023-03-22 16:41:53 +01:00
Peter Götz 3bb76768a6 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
2023-03-22 16:02:48 +01:00
Andrew Scott be2db59a55 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
2023-03-21 14:09:23 -07:00
Andrew Scott 9c57b656a1 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
2023-03-21 14:09:22 -07:00
Andrew Scott b293c6a77c 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
2023-03-21 14:08:30 -07:00
Alex Rickabaugh 951a3474d6 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
2023-03-21 20:30:05 +01:00
Paul Gschwendtner b5e68e42c1 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
2023-03-21 16:40:48 +01:00
Angular Robot a404587615 build: update scorecard action dependencies (#49508)
See associated pull request for more information.

PR Close #49508
2023-03-21 16:39:10 +01:00
Angular Robot 6c9886b1ca build: update cross-repo angular dependencies (#49517)
See associated pull request for more information.

PR Close #49517
2023-03-21 15:30:37 +01:00
Thomas Pischke 3c75f98117 docs: remove pipe in exponential backoff (#49494)
PR Close #49494
2023-03-21 07:58:06 +01:00
Thomas Pischke cd5d7b6615 docs: update deprecated exponential backoff example (#49494)
PR Close #49494
2023-03-21 07:58:06 +01:00
Aditya Srinivasan 97d58ec091 docs: fix link ngFor documentation link (#49479)
Fix the `ngFor` API link under the "Structural directive shorthand" section
PR Close #49479
2023-03-21 07:56:38 +01:00
Masaoki Kobayashi 087f4412af fix(core): more accurate matching of classes during content projection (#48888)
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.
```
<button mat-button *ngIf="true"><span *ngIf="true" class="{{'a'}}"></span></button>
```
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.
```
<button mat-button *ngIf="true"><span *ngIf="true" class="{{'a'}}"></span></button>
```
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
2023-03-20 16:07:14 +01:00
avmaxim 0f0c0a9452 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
2023-03-20 13:12:19 +01:00
Matthieu Riegler bae6b5ceb1 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
2023-03-20 10:02:15 +01:00
Virginia Dooley 868dcabdee docs: Send data to server - insert updated links. (#49447)
PR Close #49447
2023-03-20 08:49:21 +01:00
Matthieu Riegler 8f6cbb66a2 docs: remove bazel builder section (#49423)
PR Close #49423
2023-03-20 08:48:43 +01:00
Angular Robot c807a324d1 build: update actions/checkout digest to 24cb908 (#49436)
See associated pull request for more information.

PR Close #49436
2023-03-17 08:38:16 +01:00
Virginia Dooley 2e37e2365b docs: Optimize server interaction - insert updated link. (#49438)
PR Close #49438
2023-03-17 08:36:59 +01:00
Virginia Dooley bb2753decb docs: Track and show request progress - insert updated link. (#49439)
PR Close #49439
2023-03-17 08:35:45 +01:00
Virginia Dooley e6736c77a0 docs: Intercept requests - insert updated link. (#49446)
PR Close #49446
2023-03-17 08:34:15 +01:00
Alex Rickabaugh 3d71d9ddd9 release: cut the v15.2.3 release 15.2.3 2023-03-16 12:08:14 -07:00
Angular Robot c9816448ed build: update actions/cache digest to 940f3d7 (#49377)
See associated pull request for more information.

PR Close #49377
2023-03-15 17:27:22 -07:00
Alan Agius 589e76b7ef test(common): update async pipe tests to fix test errors (#49433)
The below error is displayed during some tests

```js
ERROR: 'Unhandled Promise rejection:', 'Cannot read properties of null (reading 'markForCheck')', '; Zone:', 'ProxyZone', '; Task:', 'Promise.then', '; Value:', TypeError: Cannot read properties of null (reading 'markForCheck')
TypeError: Cannot read properties of null (reading 'markForCheck')
    at AsyncPipe2._updateLatestValue (http://angular-ci.local:9876/base/dist/legacy-test-bundle.spec.js?49174f830d8743d5c8a9551b77550b859b934291:51947:19)
```

This is caused by the fact that `ref` in `AsyncPipe` is initialized with a value of `null` which causes `_updateLatestValue` to fail since it is not expected to be `null`.

This change ensures that a `ref` is always provided and that all subscriptions are disposed off after each test.

PR Close #49433
2023-03-15 17:19:38 -07:00
Virginia Dooley bba3fcb30b docs: Understanding communicating with http - insert updated links. (#49429)
PR Close #49429
2023-03-15 17:18:54 -07:00
Angular Robot 6f139b4f0b build: update io_bazel_rules_sass digest to 3d2ad47 (#49428)
See associated pull request for more information.

PR Close #49428
2023-03-15 17:11:56 -07:00
Angular Robot dfa7f648d6 build: update github/codeql-action action to v2.2.6 (#49420)
See associated pull request for more information.

PR Close #49420
2023-03-15 17:01:01 -07:00
Alan Agius 5a3d121204 test: fix misconfiguration in tests (#49391)
Currently, tests are tested twice using "production" like configuration. This commit disabled "optimization" for non production builds.

PR Close #49391
2023-03-15 16:59:51 -07:00
Esteban Gehring e4516c75d2 docs(upgrade): mark lifecycle methods as nodoc (#49416)
PR Close #49416
2023-03-14 09:41:36 -07:00
Esteban Gehring 32e98f7937 docs(common): mark lifecycle methods as nodoc (#49416)
PR Close #49416
2023-03-14 09:41:36 -07:00
Angular Robot 6c189ed0f1 build: update io_bazel_rules_sass digest to aa03944 (#49397)
See associated pull request for more information.

PR Close #49397
2023-03-14 09:25:16 -07:00
Angular Robot 2df92f7633 build: update cross-repo angular dependencies (#49410)
See associated pull request for more information.

PR Close #49410
2023-03-13 13:50:33 +00:00
Virginia Dooley 1535ab90da docs: New doc: Understanding communicating with backend services using HTTP (#49294)
PR Close #49294
2023-03-09 09:21:14 -08:00
Virginia Dooley c2726650f6 docs: New doc extract from original HTTP doc to be retired. (#48914)
PR Close #48914
2023-03-09 09:19:04 -08:00
Virginia Dooley a44224ce59 docs: delete outdated link. (#48909)
PR Close #48909
2023-03-09 09:17:02 -08:00
Virginia Dooley 3c71e4846a docs: delete or revise outdated links. (#48909)
PR Close #48909
2023-03-09 09:17:02 -08:00
Virginia Dooley 43dff1fc27 docs: New doc extract from original HTTP doc to be retired. (#48909)
PR Close #48909
2023-03-09 09:17:01 -08:00
Matthieu Riegler 7e23883b5d refactor(dev-infra): remove obsolete todos (#49362)
These todos do not apply anymore, let's remove them.

PR Close #49362
2023-03-08 15:39:56 -08:00
Matthieu Riegler 7efaf525a5 docs: Remove RenderComponentType from the depreciation list. (#49363)
`RenderComponentType` was removed by #33019

PR Close #49363
2023-03-08 15:39:03 -08:00
Angular Robot f099df839e docs: update events (#49366)
Generated `events.json` with the latest events retrieved from the Firebase DB.

Closes #49355

PR Close #49366
2023-03-08 21:54:24 +00:00
Angular Robot c9e8804b5c build: update eslint dependencies to v5.54.1 (#49348)
See associated pull request for more information.

PR Close #49348
2023-03-08 13:08:34 -08:00
Alan Agius 2dee505582 refactor(core): split ɵɵdefineDirective and ɵɵdefineComponent (#49350)
Before this change `ɵɵdefineDirective` called `ɵɵdefineComponent` under the hood. This is problematic for the consistent component id generation as it could result in hash collisions for certain directives. Directives however do not require an id.

This changes moves common definition generation logic into a separate function that is re-used in `ɵɵdefineDirective` and `ɵɵdefineComponent`.

PR Close #49350
2023-03-08 13:07:54 -08:00
Jessica Janiuk 75d5bfda1e release: cut the v15.2.2 release 15.2.2 2023-03-08 10:43:09 -08:00
Paul Gschwendtner 993750815e refactor(compiler-cli): remove unused class decorator downlevel code (#49351)
The decorator downlevel transform is never used for actual class
decorators because Angular class decorators rely on immediate execution
for JIT. Initially we also supported downleveling of class decorators
for View Engine library output, but libraries are shipped using partial
compilation output and are not using this transform anymore.

The transform is exclusively used for JIT processing, commonly for
test files to help ease temporal dead-zone/forward-ref issues. We can
remove the class decorator downlevel logic to remove technical debt.

PR Close #49351
2023-03-08 17:59:12 +00:00
Matthieu Riegler 88a0ff74ad docs(docs-infra): Split Error by categories & sort by code. (#49343)
* 2 categories : Runtime errors and Compiler Errors.
* Numeric sort on error code.

PR Close #49343
2023-03-07 19:18:01 +00:00
Sai Kartheek Bommisetty 75b2a265a9 docs: update toh-pt5.md (#49307)
PR Close #49307
2023-03-07 19:17:25 +00:00
Vinit Neogi d0a73b24fe docs(docs-infra): missing "is" in glossary (#49356)
documentation glossary for view hierarchy is missing a "is" to be grammatically correct

Fixes #49352

PR Close #49356
2023-03-07 19:16:42 +00:00
Matthieu Riegler e0be553abf docs(forms): change error code in filename to match enum value. (#49344)
Error code for bad AsyncValidatorFn is 1101 not 1003.

PR Close #49344
2023-03-07 17:38:02 +00:00