Commit graph

29561 commits

Author SHA1 Message Date
mgechev
e029d94246 docs: extend the LTS for ngUpgrade with a year (#45078)
PR Close #45078
2022-02-14 14:06:59 -08:00
dario-piotrowicz
3678434292 docs(animations): clarify information about query with :leave (#45059)
add information to the query api docs clarifying that elements with
a trigger can be queried via `:leave` when their parent is leaving

this exception is potentially something to be changed (see #45058)
but for the time being the docs can be updated to make the users
aware of such behavior

PR Close #45059
2022-02-14 14:05:22 -08:00
Mina Hosseini Moghadam
db59f5b051 docs: change dependencies to devDependencies in document (#45053)
after installing @angular/localize package, it will be placed in devDependencies object
PR Close #45053
2022-02-14 14:03:45 -08:00
Kristiyan Kostadinov
e461f716d4 feat(core): move ANIMATION_MODULE_TYPE injection token into core (#44970)
Moves the `ANIMATION_MODULE_TYPE` DI token into core so that libraries like Material don't have to introduce a dependency to animations only to figure out whether animations are disabled.

PR Close #44970
2022-02-14 14:03:07 -08:00
arturovt
bedb257afc fix(common): cleanup URL change listeners when the root view is removed (#44901)
The `Location` creates the `_urlChangeSubscription` when the `onUrlChange` is called for the first time.
The subscription `next` function captures `this` and prevents the `Location` from being garbage collected
when the root view is removed.

PR Close #44901
2022-02-14 14:02:26 -08:00
Patrick Cameron
f17e26f7c1 fix(docs-infra): fix broken link in Glossary (#45068)
Fix broken link in Glossary document

PR Close #45068
2022-02-14 12:51:30 -08:00
Dario Piotrowicz
569a262dfb docs(animations): improve aio animations guides info around :enter/:leave (#44550)
improve the aio animations guide information around elements entering and
leaving, this includes, querying them, their transitions and also improvements
to the animations guide live examples

PR Close #44550
2022-02-14 09:16:29 -08:00
George Kalpakas
e872e9d3a2 build(docs-infra): upgrade cli command docs sources to ac175ff10 (#45065)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](be7c79b5a...ac175ff10):

**Modified**
- help/extract-i18n.json

PR Close #45065
2022-02-14 09:15:21 -08:00
markostanimirovic
444354855b refactor(docs-infra): replace deprecated toPromise usages (#45045)
This commit replaces deprecated `Observable.toPromise` usages
with `lastValueFrom`.

PR Close #45045
2022-02-11 14:34:28 -08:00
markostanimirovic
b4157449c4 refactor(docs-infra): replace deprecated subscribe usages (#45046)
This commit replaces deprecated `Observable.subscribe` usages.

PR Close #45046
2022-02-11 14:33:45 -08:00
Renovate Bot
723032a79b build: update angular (#45049)
PR Close #45049
2022-02-11 14:33:17 -08:00
Renovate Bot
8793dbd8a2 build: update angular (#45011)
PR Close #45011
2022-02-10 09:15:41 -08:00
Srdjan Milic
bbababe590 refactor(http): deprecated symbol used (#44985)
Support for passing an error value to "throwError" method will be removed in v8 of rxjs. More info at https://rxjs.dev/api/index/function/throwError#throwerror

PR Close #44985
2022-02-09 11:46:32 -08:00
Jessica Janiuk
4c778cdb28 perf(animations): made errors in the animations package tree shakeable (#45004)
This moves all the error strings into exported functions that can be tree shaken away.

PR Close #45004
2022-02-09 11:43:42 -08:00
Joey Perrott
5ac5967b2a build: update .pullapprove.yml (#45007)
Add aleksanderbodurri@ to the list of require minimum reviews to allow for
approvals to count for that minimum requirement as well.

PR Close #45007
2022-02-09 11:27:48 -08:00
dario-piotrowicz
7ea70c4292 docs: improve try-it-now card focus area (#45002)
the focus/interactable area for the try-it-now card is wider than
necessary, reduce such width to the appropriate size

PR Close #45002
2022-02-09 10:23:07 -08:00
Joey Perrott
7d9413e1d1 docs: remove aikidave@ from contributors.json as part of offboarding (#45006)
PR Close #45006
2022-02-09 10:22:29 -08:00
Joey Perrott
163e2eb26d build: update .pullapprove.yml (#45006)
Remove aikidave@ from pull approve config as part of offboarding.

PR Close #45006
2022-02-09 10:22:29 -08:00
Renovate Bot
b8f8e8cf63 build: update scorecard action dependencies to 7f9dca2 (#45026)
PR Close #45026
2022-02-09 10:21:47 -08:00
JiaLiPassion
d5565ccdb4 fix(zone.js): fix several test cases which trigger done() multiple times (#45025)
Several test cases trigger the `done()` multiple times and cause warning
from jasmine. This commit fixes these test cases.

PR Close #45025
2022-02-09 10:18:56 -08:00
JiaLiPassion
dea7234a76 fix(zone.js): async-test should only call done once (#45025)
`AsyncTestZoneSpec` triggers jasmine `done()` function multiple times
and causes warning

```
An asynchronous function called its 'done' callback more than once. This is a bug in the spec, beforeAll, beforeEach, afterAll, or afterEach function in question. This will be treated as an error in a future version. See<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> for more information
```

The reproduce case will be running some `Zone.run()` inside
`waitForAsync()`.

```
it('multiple done', waitForAsync(() => {
  Zone.current.run(() => {});
  Zone.current.run(() => {});
}));
```

The reason the `done()` is called in the `onInvoke()` hook is to handle
the case that the testBody is totally sync, but we should only do this
check for the entry function not for all `Zone.run()` scenario.

Another issue is if we run nested zone inside `waitForAsync()`, the
`onHasTask()` hook will be triggered multiple times, and cause `done()`
be triggered multiple times, so we need to only trigger the `done()`
when the zone is `AsyncTestZone`.

PR Close #45025
2022-02-09 10:18:56 -08:00
Renovate Bot
c88e87d833 build: lock file maintenance (#44993)
PR Close #44993
2022-02-08 11:18:28 -08:00
Renovate Bot
a599fa8d7f build: update dependency google-closure-compiler to v20220202 (#45013)
PR Close #45013
2022-02-08 11:16:07 -08:00
Renovate Bot
226cb0878d build: update scorecard action dependencies to 230611d (#45012)
PR Close #45012
2022-02-08 11:15:36 -08:00
Amer Yousuf
3d464c9995 docs(forms): improve email validator directive docs (#45014)
PR Close #45014
2022-02-08 09:57:57 -08:00
Andrew Kushnir
822439fddd fix(core): ViewContainerRef.createComponent should consult module injector when custom one is provided (#44966)
Before Ivy, it was only possible to call the `ViewContainerRef.createComponent` function with the ComponentFactory as the first argument. An instance of a `ComponentFactory` resolved via `ComponentFactoryResolver` contained a reference to an `NgModule` where the component is declared. As a result, the component maintained a DI connection with the module injector tree (by retrieving an instance of `NgModuleRef` internally), even when the custom injector was provided (we try to find a token in a custom injector first and consult module injector after that).

With Ivy, we expanded the `ViewContainerRef.createComponent` function API to support direct references to the Component classes without going through the factory resolution step. As a result, there was no connection to the NgModule that declares the component. Thus, if you provide a custom injector, this is the only injector that is taken into account.

This commit updates the logic for the factory-less case to try retrieving an instance of an `NgModuleRef` using the DI tree which `ViewContainerRef` belongs to. The `NgModuleRef` instance is then used to get a hold of a module injector tree. This brings the factory-less and factory-based logic to more consistent state.

Closes #44897.

PR Close #44966
2022-02-08 09:57:20 -08:00
Kristiyan Kostadinov
1b91e1049e perf(compiler): chain element start/end instructions (#44994)
In templates with several levels of nested nodes, it's common for several `elementStart`/`elementEnd` instructions to show up in a row which can be optimized away.

These changes add chaining support for `elementStart`, `elementEnd`, `elementContainerStart` and `elementContainerEnd` to shave off some bytes when possible.

PR Close #44994
2022-02-08 09:56:50 -08:00
Kristiyan Kostadinov
8f1f35b973 refactor(compiler): rework instruction generation logic for improved flexibility (#44994)
Previously the logic for generating chained instructions was somewhat rigid, because we had to collect all of the calls ahead of time and then call one of the chained instruction helpers. This doesn't work for something like `elementStart`, because we have to descend into other elements that could add to the chain.

These changes refactor the code so that we collect the list of instructions in a flat array and we do the chaining only once at the end when we have the entire instruction set for the code block.

The new approach has the advantage of being (almost) entirely configuration-based via the `CHAINABLE_INSTRUCTIONS` array and being more flexible in allowing us to chain instructions that span across elements.

PR Close #44994
2022-02-08 09:56:49 -08:00
Esteban Gehring
635683ae97 docs(common): mark lifecycle methods as nodoc (#45017)
PR Close #45017
2022-02-08 09:56:28 -08:00
Dylan Hunn
df6f616431 docs: release notes for the v13.2.2 release (#45019)
PR Close #45019
2022-02-08 09:51:54 -08:00
Alan Cohen
486cade596 docs: fix command to clear cache on Windows (#44988)
PR Close #44988
2022-02-07 21:18:03 -08:00
Dylan Hunn
28e943634a refactor: one more CHANGELOG fixup. (#45010)
PR Close #45010
2022-02-07 17:40:29 -08:00
Dylan Hunn
4d63b80163 refactor: CHANGELOG is poorly formatted for most recent version. (#45009)
PR Close #45009
2022-02-07 17:34:50 -08:00
Dylan Hunn
a3de44c7f6 release: cut the v14.0.0-next.2 release (#45008)
PR Close #45008
2022-02-07 17:19:17 -08:00
Andrew Kushnir
64acbc4242 refactor(core): drop all .ngfactory and .ngsummary imports (#44957)
This commit updates various places in the repo (mostly tests/examples) to drop all `.ngfactory` and `.ngsummary` imports as they are no longer needed in Ivy.

PR Close #44957
2022-02-07 15:31:49 -08:00
Shai Reznik
d4da832088 docs: add Cost-Effective Angular Testing (#44969)
to resources
PR Close #44969
2022-02-07 13:17:34 -08:00
Kristiyan Kostadinov
ebf2fc5224 fix(forms): incorrectly keeping track of ngModel with ngFor inside a form (#40459)
When an `NgModel` is created within a `form`, it receives an `NgControl` based on its `name`, but
the control doesn't get swapped out if the name changes. This can lead to problems if the `NgModel`
is part of an `ngFor`, because the name can change based on its position in the list and a new
control can be defined with the same name, leading us to having multiple directives pointing to
the same control. For example, if we start off with a list like :

```
[0, 1, 2]; -> [NgModel(0), NgModel(1), NgModel(2)]
```

Then we remove the second item:

```
[0, 2]; -> [NgModel(0), NgModel(2)]
```

And finally, if we decide to add an item to the end of the list, we'll already have a control for
index 2, causing the list to look like:

```
[0, 2, 3]; -> [NgModel(0), NgModel(2), NgModel(2)]
```

These changes fix the issue by removing the old control when the `name` of the directive changes.

Fixes #38465.
Fixes #37920.

PR Close #40459
2022-02-07 13:16:10 -08:00
Renovate Bot
b5cce71b1e build: update dependency @types/chrome to ^0.0.178 (#44982)
PR Close #44982
2022-02-07 12:08:28 -08:00
iRealNirmal
70e29be328 refactor(forms): update PatternValidator to inherit AbstractValidatorDirective (#44887)
This commit updates the `PatternValidator` class to inherit `AbstractValidatorDirective` to make it conistent with other validators.

Closes angular#42267

PR Close #44887
2022-02-07 12:07:34 -08:00
Ruslan Lekhman
d5719c2e0f fix(core): input coercion (#42803)
BREAKING CHANGE: Forms [email] input coercion

Forms [email] input value will be considered as true if it is defined with any value rather
than false and 'false'.

PR Close #42803
2022-02-07 10:52:59 -08:00
JoostK
db6cf7e7c1 fix(compiler): allow banana-in-a-box bindings to end with non-null assertion (#37809)
For two-way-bindings that use the banana-in-a-box syntax, the compiler
synthesizes an event assignment expression from the primary expression.
It is valid for the primary expression to be terminated by the non-null
operator, however naive string substitution is used for the synthesized
expression, such that the `!` would immediately precede the `=` token,
resulting in the valid `!=` operator token. The expression would still
parse correctly but it doesn't implement the proper semantics, resulting
in incorrect runtime behavior.

Changing the expression substitution to force a space between the
primary expression and the assignment avoids this mistake, but it
uncovers a new issue. The grammar does not allow for the LHS of an
assignment to be the non-null operator, so the synthesized expression
would fail to parse. To alleviate this, the synthesized expression is
parsed with a special parser flag to allow for this syntax.

Fixes #36551

PR Close #37809
2022-02-07 10:46:52 -08:00
Alan Agius
638a2d56dc ci: group all scorecard action dependencies (#44998)
With this change we group all the scorecard action dependencies so that Renovate opens a single PR.

PR Close #44998
2022-02-07 09:46:29 -08:00
dario-piotrowicz
4708cd0000 docs(docs-infra): fix cosidered typo (#44987)
fix the "cosidered" typo (which should be "considered")

PR Close #44987
2022-02-07 09:45:21 -08:00
markostanimirovic
33df8405c9 docs(router): clarify execution order for resolvers (#44995)
Fixes #44971

PR Close #44995
2022-02-07 09:44:21 -08:00
Renovate Bot
2cda6cf700 build: update angular (#44981)
PR Close #44981
2022-02-07 09:21:09 -08:00
Ramzan
28393031b1 perf(http): remove IE special status handling (#44354)
revert the condition as dev only

PR Close #44354
2022-02-04 11:45:15 -08:00
Andrew Kushnir
99171522cb refactor(core): cleanup DebugNode and DebugElement implementations (#44270)
This commit updates `DebugNode` and `DebugElement` implementaitons to cleanup ViewEngine removal artifacts. There is no need for a separate interface and implementation class, so we can combine them now. This comment also gets rid of `R3` suffixes (denoting Ivy) in helper methods.

PR Close #44270
2022-02-04 10:43:42 -08:00
Payam Shahidi
38c03a2035 feat(common): support years greater than 9999 (#43622)
Since According to ISO8601 the Year is minimum of 4 digits, we should support years greater than 9999. (This is similar to the change in input.js: e157d6fa69)
Changed /^(\d{4}) to /^(\d{4,})

PR Close #43622
2022-02-04 10:43:11 -08:00
Jayson Acosta
d183e7d736 docs: correct typo (#44793)
Service worker card contains typo 'us' when it should be 'use.'
PR Close #44793
2022-02-04 10:42:25 -08:00
zuckjet
459cbed33b refactor(dev-infra): convert nullish coalescing operator to plain javascript (#44968)
low version nodejs doesn't support nullish coalescing operator very well

PR Close #44968
2022-02-04 10:40:43 -08:00