26426 Commits

Author SHA1 Message Date
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
Matthieu Riegler ffccb8e3a7 refactor(animations): handle #24571 todos (#49231)
This commit removes the remaining ones in animations code base

PR Close #49231
2023-03-06 18:45:34 +00:00
Matthieu Riegler b13e079bc7 refactor(core): Remove ChangeDetectorStatus & isDefaultChangeDetectionStrategy (#49299)
Unused code in core and other packages. They were private exports.

PR Close #49299
2023-03-06 16:57:02 +00:00
Matthieu Riegler 84f45363eb refactor(platform-browser): remove ununsed functions. (#49302)
Both `camelCaseToDashCase` and `dashCaseToCamelCase` haven't been used since 2.2.0.

PR Close #49302
2023-03-06 16:56:32 +00:00
Andrew Kushnir 980147555c refactor(core): rename TNode.tViews to TNode.tView (#49313)
Previously (at the early days of Ivy) a TNode used to keep an array of TViews, but the logic was changed since that time, but the `tViews` field remained on TNode interface (+ corresponding typings).

This commit renames TNode.tViews to TNode.tView and cleans up typings.

PR Close #49313
2023-03-06 16:56:00 +00:00
Matthieu Riegler 182258520d refactor(platform-browser): handle #24571 todos (#49232)
This commit removes the remaining TODO(issue/24571) in platform-browser code base.

PR Close #49232
2023-03-06 16:54:38 +00:00
Andrew Scott ac59054cd4 refactor(migrations): Move ChangeTracker to common utils (#49308)
The `ChangeTracker` is generally useful and could be used by a lot of
migrations instead of having to rewrite similar boilerplate.

PR Close #49308
2023-03-03 22:03:37 +00:00
Paul Gschwendtner b90b3299aa test: fix router testing example breaking due to non-existent stub (#49293)
We recently migrated the testing example to use the router testing
harness. There was one instance of the previous non-`TestBed` examples
left that still relies on a stub that has already been removed.

This example is not used anywhere and we should rather encourage
a single pattern of testing. i.e. the harness as per recent changes.

This commit removes the broken file.

PR Close #49293
2023-03-03 19:41:36 +00:00
Paul Gschwendtner 4ae753d84f build: always preserve symlinks when executing e2e test commands (#49293)
Currently, examples with test commands like `ng build` are *never*
using the local version of `//packages/compiler-cli`. This is because
the CLI is invoked accidentally from within `external/aio_example_deps`.

Since the CLI relies on importing the compiler-cli, it will always
resolve the dependency from that directory- causing it to be always
the version installed via `aio/examples/tools/shared/package.json`.

We should never resolve symlinks and escape the e2e sandbox. That way
the compiler-cli would be resolved properly and could also become the
locally built one, depending on the test mode (i.e. npm or "local").

PR Close #49293
2023-03-03 19:41:36 +00:00
Paul Gschwendtner f859de3e60 build: ensure chromium is not using sandbox within Bazel sandbox for AIO example e2e tests (#49293)
Chromium is launched via Karma from within the Bazel AIO example e2e
tests. This breaks depending on the platform and sandbox mechanism used.

We should never use Chromium's sandbox on top of Bazel's sandbox
invocation. The Angular CLI exposes a browser exactly for this use-case.

PR Close #49293
2023-03-03 19:41:36 +00:00