22818 Commits

Author SHA1 Message Date
Dylan Hunn 7a47add255 release: cut the v13.2.2 release (#45018)
PR Close #45018
13.2.2
2022-02-08 09:39:47 -08:00
Alan Cohen 7bc4dbd7ff docs: fix command to clear cache on Windows (#44988)
PR Close #44988
2022-02-07 21:18:03 -08:00
Andrew Kushnir d40ac2056e 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 1368f58b49 docs: add Cost-Effective Angular Testing (#44969)
to resources
PR Close #44969
2022-02-07 13:17:35 -08:00
Kristiyan Kostadinov b75e90f809 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
iRealNirmal 3919ee37cf 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:35 -08:00
JoostK 37af6abb49 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:53 -08:00
Alan Agius 604a67f0a1 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 baf0c7a11a docs(docs-infra): fix cosidered typo (#44987)
fix the "cosidered" typo (which should be "considered")

PR Close #44987
2022-02-07 09:45:22 -08:00
Renovate Bot cd97d8793f build: update all non-major dependencies (#44974)
Patch port of #44963

PR Close #44974
2022-02-04 11:55:23 -08:00
Ramzan 3fae6637e7 perf(http): remove IE special status handling (#44354)
revert the condition as dev only

PR Close #44354
2022-02-04 11:45:16 -08:00
Andrew Kushnir 30d1c34384 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:43 -08:00
Jayson Acosta 1384013a00 docs: correct typo (#44793)
Service worker card contains typo 'us' when it should be 'use.'
PR Close #44793
2022-02-04 10:42:26 -08:00
zuckjet 9327e97500 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:44 -08:00
Joey Perrott 59a6ec4396 build: exclude devtools scope from generated changelogs (#44964)
The devtools scoped commits are not included in the repository's CHANGELOG.md
file as these commits are not references areas which are included in the
primary released artifacts.

PR Close #44964
2022-02-03 15:19:26 -08:00
Olivier Capuozzo 1b216297f4 docs: update input-output-diagram.svg (#39900)
"deleteRequest" is the *event* (not target) and "crossOffItem" is the *handler* of the event (not "source").

PR Close #39900
2022-02-03 14:51:00 -08:00
Joey Perrott a89805c3ae build: setup OpenSSF Scorecard (#44960)
Set up OpenSSF Scorecard to begin tracking security metrics within the repo.

PR Close #44960
2022-02-03 14:50:23 -08:00
jhonyeduardo f092badb9c docs: add po-ui to UI Components resources (#43689)
PR Close #43689
2022-02-03 12:45:40 -08:00
dario-piotrowicz d27015a43c refactor(docs-infra): add types to all the aio examples buttons (#44557)
add types to all the buttons in the angular.io examples to encourage
the best practice of always including a type per button (regardless
to whether it is in a form or now)

PR Close #44557
2022-02-03 12:44:48 -08:00
dario-piotrowicz b9aee9070c refactor(docs-infra): remove outdated comments regarding CustomEvent (#44557)
remove the comments present in aio examples saying that for older
browsers such as IE CustomEvent could be necessary (as the the Event
constructor could be not available)

such comments are no longer necessary/relevant since the Event constructor
is available for all the supported browsers

PR Close #44557
2022-02-03 12:44:48 -08:00
Dario Piotrowicz 5fdd8ae3ba refactor(docs-infra): fix template eslint issues in aio examples (#44557)
the aio examples have various eslint issues regarding template rules, those
are currently turned off and TODO comments have been added to them in the
examples eslintrc, fix such issues and remove the respective TODO comments

this also includes examples refactoring to use buttons for better accessibility,
this change tries to make the smallest amound of changes to the examples' behaviors
and designs/UI

PR Close #44557
2022-02-03 12:44:48 -08:00
TANMAY SRIVASTAVA b2f474c4c9 docs: describe your change... (#42899)
in the last Lines ViewEncapsulationComponent should be EmulatedEncapsulationComponent as there is no such  ViewEncapsulationComponent  exists in this example where as 
ShadowDomEncapsulationComponent  contains NoEncapsulationComponent and EmulatedEncapsulationComponent
PR Close #42899
2022-02-03 12:41:36 -08:00
dario-piotrowicz 38b042b6d0 docs: improve punctuation in animation sequence summary (#44567)
slightly improve the punctuation in the animation sequence summary present
in the complex animation sequences guide

PR Close #44567
2022-02-03 12:40:53 -08:00
Dario Piotrowicz 48262bcb70 docs(animations): add section about animating reordering list items (#44567)
add a section regarding reordering list items in the complex animation
sequences guide to help developers rememeber to use a `TrackByFunction`
whenever they are animating `*ngFor` list items which change their
ordering

as suggested here: https://github.com/angular/angular/issues/42750#issuecomment-979127165

relates to issue #28040 and #42750

PR Close #44567
2022-02-03 12:40:53 -08:00
Andrew Scott fb3c0b2605 docs: remove item from changelog that does not work (#44961)
After trying this feature, it turns out the approach does not work and we
will be reverting the commits. Note that the feature _never_ worked so it's
not a breaking change.

PR Close #44961
2022-02-03 12:40:01 -08:00
Daniel Díaz fecd4f8eab docs: remove duplicate closing tags in View Encapsulation file (#44958)
PR Close #44958
2022-02-03 08:54:00 -08:00
Doug Parker 9cce12cbf5 refactor(compiler): add @suppress {msgDescriptions} if no description is present on an i18n message (#44787)
Refs http://b/214103351.

This happens if a user writes `<span i18n>Message</span>`. This is accepted as an internationalized message, but without a description. JSCompiler will throw an error in this situation because descriptions are generally required. Now, the Angular compiler will generate a suppression annotation so JSCompiler allows the syntax. This will ease an internal migration to JSCompiler-based i18n.

PR Close #44787
2022-02-02 15:33:45 -08:00
Andrew Scott b9aab0c87b fix(upgrade): Do not trigger duplicate navigation events from Angular Router (#43441)
This code mimics behavior that Google Analytics has been using to
prevent duplicate navigations. They set up their own `HybridRoutingService`
location sync to avoid duplicate navigations that came from the Angular
router. This would happen because the Angular router would trigger a
navigation, which would then get picked up by the `$locationShim`, which
would trigger a `$locationChangeStart`, which would then be picked up by
the `setUpLocationSync` watcher here, which would again trigger a
navigation in the Angular Router.

All of this can be prevented by checking if the `navigationId` exists on
the history state object. This property is added by the Angular router
during navigations.

fixes #21610

PR Close #43441
2022-02-02 19:51:20 +00:00
Andrew Scott 123f42c744 test(upgrade): update router upgrade tests to use fewer mocks (#43441)
This updates the router upgrade tests to use less mocked behavior. The
test upgrade location module is copied from the one that's used in the
common package. This update to the tests verifies more real behavior of
the upgrade module.

PR Close #43441
2022-02-02 19:51:20 +00:00
mgechev 64adfc9150 docs: remove banner after survey expiration (#44949)
The survey is now over. We can remove the banner.

PR Close #44949
2022-02-02 19:50:20 +00:00
Jessica Janiuk 7924a2e497 release: cut the v13.2.1 release (#44948) 13.2.1 2022-02-02 10:42:38 -08:00
George Kalpakas 98a1da9382 build(docs-infra): upgrade cli command docs sources to 0f51d5c70 (#44943)
Updating [angular#13.2.x](https://github.com/angular/angular/tree/13.2.x) from
[cli-builds#13.2.x](https://github.com/angular/cli-builds/tree/13.2.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/9ac3df5d1...0f51d5c70):

**Modified**
- help/test.json

PR Close #44943
2022-02-02 17:07:59 +00:00
mgechev 165aa4f164 docs: update the survey expiration date (#44938)
Extend with a few more days since the survey is still open.

PR Close #44938
2022-02-02 01:56:40 +00:00
JoostK 4a5ad1793f fix(compiler-cli): ensure casing of logical paths is preserved (#44798)
The logical filesystem would store a cached result based on the canonical path,
where the cached value contains the physical path that was originally provided.
This meant that other physical paths with an identical canonical path would use
a cached result derived from another physical path.

This inconsistency is not known to result in actual issues but is primarily
being made as a performance improvement, as using the provided physical paths
as cache key avoids the need to canonicalize the path if its result is already
cached.

PR Close #44798
2022-02-02 00:04:38 +00:00
JoostK d65a42b183 refactor(compiler-cli): use relative imports into dts files as fallback in type-check files (#44798)
The generated imports should normally use module specifiers that are valid for
use in production code, where arbitrary relative imports into e.g. node_modules
are not allowed. For template type-checking code it is however acceptable to
use relative imports, as such files are never emitted to JS code. It is
desirable to allow a filesystem relative import as fallback if an import would
otherwise fail to be generated, as doing so allows fewer situations from
needing an inline type constructor.

PR Close #44798
2022-02-02 00:04:37 +00:00
JoostK dee108b67c refactor(compiler): remove ViewEngine identifiers (#44676)
This commit removes the leftover `Identifiers` class that was used in the
ViewEngine compiler. The remaining usages of the `inlineInterpolate` and
`interpolate` instructions were refactored to make use of an
`InterpolationExpression` output expression to capture the argument list of an
interpolation expression. An attempt was made to refactor this further by
converting to the desired interpolation instruction immediately, but some
downstream consumers are designed in a way where the argument list itself is
needed, e.g. as other arguments need to be prepended/appended.

PR Close #44676
2022-02-02 00:04:14 +00:00
Andrew Scott 5a75721835 build: fix test for useUnknownInCatch (#44935)
CI ran before the change to the tsconfig file

PR Close #44935
2022-02-01 23:40:17 +00:00
markostanimirovic ec49796807 docs(router): provide better typing for resolver example (#44932)
PR Close #44932
2022-02-01 22:06:29 +00:00
JoostK b4e4617807 fix(common): include query parameters for open HTTP requests in verify (#44917)
When `HttpTestingController.verify` is used to verify that there are not open,
unexpected requests it would throw an error with the method and URL of all pending
requests, excluding the query parameters. This is confusing, as e.g. `expectOne`
matches a URL including its query parameters and `expectOne` does include the
query parameters when it reports when no request could be matched.

This commit changes the error that is reported by `verify` to include the query
parameters.

Closes #19974

PR Close #44917
2022-02-01 21:41:43 +00:00
Renovate Bot 812c1ba971 build: update all non-major dependencies (#44930)
PR Close #44930
2022-02-01 21:30:10 +00:00
David Shevitz 1cc1588c29 docs: fix incorrect title and tooltip in navigation (#44710)
Fixes #44589

In the navigation pane, the title and tooltip for the page,
Preparing component for translation, are incorrect. This PR
fixes this issue.

PR Close #44710
2022-02-01 19:17:40 +00:00
Alan b6d2212ce5 docs: correct the demo code of NgZone.run (#44733)
`NgZone.run` needs to be within the async closure, not around its registration, refer to: https://github.com/angular/angular/issues/44714
PR Close #44733
2022-02-01 19:16:16 +00:00
Andrew Scott a432ad65c7 build: Update 13.2.x for useUnknownInCatch (#44929)
36b16e667a enabled `useUnknownInCatchVariables`
but broke the build becaue the migration does not exist on the main
branch.

PR Close #44929
2022-02-01 19:15:06 +00:00
Arjen 96b3b774c3 docs: explain how ngsw.json is generated (#44823)
Update aio/content/guide/service-worker-devops.md

ngsw.json is the manifest file which is generated at build time ( based on ngsw-config.json ). This explains this a bit clearer.
At first, I thought that it was a wrongly named filename. Not is it explicitly described.

Co-Authored-By: George Kalpakas <kalpakas.g@gmail.com>

PR Close #44823
2022-02-01 18:26:42 +00:00
Doug Parker 365962948a refactor(compiler-cli): remove leftover _extendedTemplateDiagnostics flag (#44920)
This flag is currently a no-op because extended diagnostics are enabled in production.

PR Close #44920
2022-02-01 18:24:10 +00:00
Daniel Díaz 577d97f757 docs: add colon before introducing the list of items (#44751)
PR Close #44751
2022-02-01 18:20:47 +00:00
Andrew Scott 36b16e667a build: enable useUnknownInCatchVariables (#44679)
This unblocks the internal migration to turn the option on in g3.

PR Close #44679
2022-02-01 18:17:29 +00:00
Andrew Kushnir 2916ac9e1a refactor(core): the RuntimeError class should support more compact syntax (#44783)
This commit refactors the `RuntimeError` class to support a short version of providing error messages:
```
throw new RuntimeError(
  RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,
  ngDevMode && 'Injector has already been destroyed.');
```
In prod mode, the second argument becomes `false` andn this commit extends the typings to support that.

This commit also contains a couple places were the `RuntimeError` class is used to demostrate the compact form.

PR Close #44783
2022-02-01 00:15:56 +00:00
Andrew Kushnir 4644886aaf perf(animations): remove no longer needed CssKeyframes classes (#44903) (#44919)
This commit removes CSS keyframes-based code that was used to support animations in old browsers. With IE11 deprecation, all supported browsers have native WebAnimations support, so the old code can be removed. This results in ~7KB decrease of the animations package bundle size, since most of the code was non-tree-shakable.

Closes #44520.

PR Close #44919
2022-01-31 22:46:00 +00:00
JoostK f5ce6cfa1e refactor(compiler-cli): remove unused canonical-path dependency (#44918)
This package is no longer used within `compiler-cli` so is being removed as a dependency.

PR Close #44918
2022-01-31 21:39:54 +00:00