25294 Commits

Author SHA1 Message Date
Angular Robot 4f2c87b988 build: update dependency mocha to v10 (#46619)
| datasource | package | from  | to     |
| ---------- | ------- | ----- | ------ |
| npm        | mocha   | 9.2.2 | 10.0.0 |

PR Close #46619
2022-07-11 18:13:37 +00:00
Angular Robot beba6af226 build: update dependency firebase-tools to v11 (#46614)
See associated pull request for more information.

PR Close #46614
2022-07-11 18:12:42 +00:00
Andrew Scott bf5bee6d43 refactor(router): move around some code to eliminate circular deps (#46752)
This commit eliminates some circular dependencies by moving around
interfaces and type guards.

PR Close #46752
2022-07-11 17:59:31 +00:00
Andrew Scott e8ae0fe3e9 fix(router): Fix cancellation code for canLoad rejections (#46752)
Before this commit, the `NavigationCancellationCode` would always be set
to `Redirect` when encountering a "navigationcancelingError". However,
this error can also be thrown when `CanLoad` guars reject. This commit
ensures these cancellation errors have a code as well so this mistake
cannot be made again.

PR Close #46752
2022-07-11 17:59:30 +00:00
Marcin Wosinek a4b64bc483 build(docs-infra): update versions of some docs examples dependencies (#46609)
Update angular-in-memory-web-api and jasmine-marbles (used in doc examples) to latest versions.

PR Close #46609
2022-07-11 17:34:26 +00:00
Angular Robot 4190e9a776 build: update dependency jasmine to v4 (#46617)
| datasource | package        | from   | to    |
| ---------- | -------------- | ------ | ----- |
| npm        | jasmine        | 3.10.0 | 4.2.1 |
| npm        | @types/jasmine | 3.5.14 | 4.0.3 |
| npm        | jasmine        | 3.6.1  | 4.2.1 |

PR Close #46617
2022-07-11 17:33:55 +00:00
Joshua VanAllen b9f5829509 build: Fix Angular CLI issue template link (#46756)
This fixes the issue template link to the Angular CLI repository instead of staying in the Angular repository.

PR Close #46756
2022-07-11 17:33:28 +00:00
Angular Robot a36853ccb8 build: update bazel setup to v5.5.2 (#46770)
See associated pull request for more information.

PR Close #46770
2022-07-11 17:32:49 +00:00
Andrew Scott 647afb02b3 refactor(router): Simplify the prioritizeGuardValue logic (#46745)
The existing logic does something similar but in a more roundabout way.
It reads _the whole array_. If it encounters a pending value, it ignores
the remaining ones. If it hasn't encountered a pending value by the time
it hits false/UrlTree, it returns that result.

The new logic is the same, but reverses what we're looking for. Instead
of processing the whole array, we stop when we encounter an initial
value. When we encounter one that isn't `true`, that gets returned. If
we get to the end and everything was `true`, return `true`.

PR Close #46745

PR Close #46745
2022-07-11 16:55:58 +00:00
Jessica Janiuk a003dd8dc2 Revert "refactor(router): Simplify the prioritizeGuardValue logic" (#46759)
This reverts commit f32fface4763d789a8b7cc4f4489f98be4e1073a.

PR Close #46759
2022-07-08 22:27:01 +00:00
Angular Robot 8124c78556 build: update eslint dependencies to v5.30.5 (#46705)
| datasource | package                          | from   | to     |
| ---------- | -------------------------------- | ------ | ------ |
| npm        | @typescript-eslint/eslint-plugin | 5.30.0 | 5.30.5 |
| npm        | @typescript-eslint/parser        | 5.30.0 | 5.30.5 |

PR Close #46705
2022-07-08 22:00:00 +00:00
Andrew Scott 9acec3f0f7 refactor(router): Remove use of OutletInjector (#46755)
OutletInjector doesn't do anything special. Injector.create can be used instead

PR Close #46755
2022-07-08 21:56:01 +00:00
John Vandenberg c14c701775 docs: fix spelling (#46713)
PR Close #46713
2022-07-08 20:54:52 +00:00
Andrew Scott cee207ea11 refactor(router): Simplify the prioritizeGuardValue logic (#46745)
The existing logic does something similar but in a more roundabout way.
It reads _the whole array_. If it encounters a pending value, it ignores
the remaining ones. If it hasn't encountered a pending value by the time
it hits false/UrlTree, it returns that result.

The new logic is the same, but reverses what we're looking for. Instead
of processing the whole array, we stop when we encounter an initial
value. When we encounter one that isn't `true`, that gets returned. If
we get to the end and everything was `true`, return `true`.

PR Close #46745
2022-07-08 20:03:47 +00:00
Angular Robot e59c7047de build: update dependency @octokit/graphql to v5 (#46753)
See associated pull request for more information.

PR Close #46753
2022-07-08 19:59:36 +00:00
Angular Robot de4fae0bee build: update cross-repo angular dependencies to db87550 (#46736)
See associated pull request for more information.

PR Close #46736
2022-07-08 19:59:11 +00:00
Angular Robot 1199ddfcf5 build: update babel dependencies (#46708)
See associated pull request for more information.

PR Close #46708
2022-07-08 19:58:37 +00:00
Andrew Scott 9e836c232f feat(compiler): warn when style suffixes are used with attribute bindings (#46651)
This commit adds an extended diagnostic which warns when style suffixes such as '.px'
are used with attribute bindings (attr.width.px).

Fixes #36256

PR Close #46651
2022-07-08 18:32:58 +00:00
Or'el Ben-Ya'ir ea0f07a858 docs(router): fix minor typos in tutorial (#46696)
PR Close #46696
2022-07-08 17:57:44 +00:00
zhysky 201248ed5c docs: fix packages\docs\di\di.md (#46704)
‘Provider11’ is unreasonable, according to the context, it should be ‘Provider1’

PR Close #46704
2022-07-08 17:53:39 +00:00
Paul Gschwendtner bd927236df fixup! ci: use actual main branch for components repo unit test job (#46743)
Remove todo
PR Close #46743
2022-07-08 16:19:56 +00:00
Paul Gschwendtner 131468ec18 ci: use actual main branch for components repo unit test job (#46743)
For the branch rename migration we temporarily had to work
from a forked-off branch. Now that all the migration and cleanup
Is complete, we can switch to the actual new main branch.

This is the last remaining cleanup in the organization as it seems.
PR Close #46743
2022-07-08 16:19:56 +00:00
Andrew Scott a4ce273e50 feat(router): Add the target RouterStateSnapshot to NavigationError (#46731)
This commit adds the target `RouterStateSnapshot` to the
`NavigationError` so error handlers/subscribers can more easily
determine which navigation failed, including the matched `Route` configs
for the navigation. This information was previously not available
(neither in `NavigationError` nor the `Router#getCurrentNavigation()`).

fixes #27626

PR Close #46731
2022-07-08 16:19:06 +00:00
dario-piotrowicz 350e3643c5 docs(animations): add section about animations and view encapsulation (#46738)
Add a section regarding component view encapsulations in the complex animation
sequences guide to let developers know how animations work in regard to
view encapsulations.

This section is used to both add information to the guide but also to
take a stand on how the animations should behave in regard to the
shadow dom view encapsulation.

This relates to PR #46488 which by trying to make sure the query
function works with shadow dom elements proved that having the
animations implementation work with shadow dom would increase the
complexity of the code and would have a negative impact on performance,
such facts alongide the small adoption of shadow dom by users influenced
the decision to keep the current functionalities and simply discourage
the use of animations and shadow dom components.

PR Close #46738
2022-07-07 13:52:33 -07:00
dario-piotrowicz b3c20add72 Revert "fix(animations): enable shadowElements to leave when their parent does (#46459)" (#46739)
This reverts commit b417370383.

The change applied is no longer appropriate since the use of animations
and shadow dom components is discouraged (as of #46738)

PR Close #46739
2022-07-07 13:51:30 -07:00
George Kalpakas 5a699034b1 build(docs-infra): upgrade cli command docs sources to a764b37fa (#46740)
Updating [angular#main](https://github.com/angular/angular/tree/main) from
[cli-builds#main](https://github.com/angular/cli-builds/tree/main).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/4a6dfc1d8...a764b37fa):

**Modified**
- help/update.json

PR Close #46740
2022-07-07 13:33:43 -07:00
Alan Agius 28b6ec515a docs: typo fix in destroy description (#46737)
Typo in environment.

PR Close #46737
2022-07-07 13:33:10 -07:00
Pawel Kozlowski 71e606d3c3 feat(core): expose EnvironmentInjector on ApplicationRef (#46665)
There are legitimate cases where access to an EnvironmentInjector
of a bootstrapped application is required / convenient. It will be also
required for support of standalone components with Angular elements.

PR Close #46665
2022-07-07 13:05:27 -07:00
Jessica Janiuk 33ce3883a5 feat(compiler): Add extended diagnostic to warn when missing let on ngForOf (#46683)
In the case that a user accidentally forgot the let keyword, they dont get a very clear indicator of there being a problem.
They get an issue in the template iteration at runtime. This diagnostic will warn the user when the let keyword is missing.

PR Close #46683
2022-07-07 13:04:33 -07:00
Angular Robot ad2721a149 build: update cross-repo angular dependencies (#46607)
| datasource | package                       | from            | to              |
| ---------- | ----------------------------- | --------------- | --------------- |
| npm        | @angular-devkit/architect-cli | 0.1401.0-next.3 | 0.1401.0-next.4 |
| npm        | @angular-devkit/build-angular | 14.1.0-next.3   | 14.1.0-next.4   |
| npm        | @angular-devkit/core          | 14.1.0-next.3   | 14.1.0-next.4   |
| npm        | @angular-devkit/schematics    | 14.1.0-next.3   | 14.1.0-next.4   |
| npm        | @angular/cli                  | 14.1.0-next.3   | 14.1.0-next.4   |
| npm        | @schematics/angular           | 14.1.0-next.3   | 14.1.0-next.4   |

PR Close #46607
2022-07-06 15:56:23 -07:00
Angular Robot 42b6d23806 build: update scorecard action dependencies (#46706)
| datasource  | package               | from    | to      |
| ----------- | --------------------- | ------- | ------- |
| github-tags | github/codeql-action  | v2.1.13 | v2.1.15 |
| github-tags | ossf/scorecard-action | v1.1.1  | v1.1.2  |

PR Close #46706
2022-07-06 15:49:38 -07:00
Alan Agius 392c56749a fix(localize): add --project option to ng-add schematic (#46664)
`--project` is unwritten standard to provide the project name. With this change we allow the project name to be provided using the `--project` command line argument and remove the ambiguity with other schematics.

PR Close #46664
2022-07-06 15:49:05 -07:00
Paul Gschwendtner a588b2f712 ci: remove renovate changes group (#46676)
Removes the Renovate changes group as the respective code-owners. i.e.
dev-infra or docs-infra should be responsible for reviewing changes.

The caretaker does not necessarily have context when e.g. Jasmine
should be updated or not/ if this needs coordination with other parts
of the organization etc.

Also updates are not always trivial, see recent updates for Angular
(involing size updates, CLI commands fixups etc.) and e.g. Karma-Jasmine
requiring debugging of ZoneJS.

The Renovate group is also not easy to keep now that we use a custom
robot account that doesn't necessarily only do Renovate..
(we could check the branch name -- but I believe the group can just be
removed)

PR Close #46676
2022-07-06 13:46:48 -07:00
Paul Gschwendtner 925b574e32 ci: switch to explicit commit message body for renovate (#46676)
The commit body table by Renovate is sometimes not generated e.g. when
just dev-infra is being updated. In order to make our lint job happy
for such dev-infra updates, we should use an explicit message that is
at least 20 characters long.

PR Close #46676
2022-07-06 13:46:48 -07:00
Dylan Hunn e9b5dac9ec fix(forms): Move all remaining errors in Forms to use RuntimeErrorCode. (#46654)
RuntimeErrorCode allows for better tree-shaking, and unique codes for each error.

PR Close #46654
2022-07-06 09:49:39 -07:00
Alan Agius 206a576ae4 refactor(core): remove unused tick method (#46722)
This method is unused and is not part of the public API.

PR Close #46722
2022-07-06 09:48:55 -07:00
Paul Gschwendtner 2972f07b04 ci: enable renovate dashboard issue (#46695)
We want to enable the Renovate dashboard to be able to trigger updates
which might be out of schedule, or to see if some updates are
stuck/pending, or to be able to rebase/try previously closed PRs.

PR Close #46695
2022-07-06 09:48:00 -07:00
Andrew Scott 458d3469cb release: cut the v14.1.0-next.4 release (#46726) 14.1.0-next.4 2022-07-06 09:42:31 -07:00
Andrew Scott e7b1922b9a docs: release notes for the v14.0.5 release (#46725) 2022-07-06 09:31:02 -07:00
Andrew Scott 1f56320682 docs: Add BootstrapOptions to publicApi (#46679)
`BootstrapOptions` is exposed through `PlatformRef#bootstrapModule` but
is not included in the public API so you cannot find it on angular.io.
This commit simply marks the interface as public API (as it should be).

PR Close #46679
2022-07-06 08:55:37 -07:00
Andrew Scott 6c1357dd7d feat(router): Add stable cancelation code to NavigationCancel event (#46675)
This commit adds a stable cancelation code to the `NavigationCancel`
event. This code is acceptable for use in production whereas parsing the
`reason` string is not. This allows developers to determine more
specifically _why_ a navigation was canceled and perform different
actions in different scenarios.

PR Close #46675
2022-07-06 07:42:24 -07:00
Angular Robot e96ece901c build: update dependency concurrently to v7 (#46698)
| datasource | package      | from  | to    |
| ---------- | ------------ | ----- | ----- |
| npm        | concurrently | 5.0.1 | 7.2.2 |
| npm        | concurrently | 5.3.0 | 7.2.2 |

PR Close #46698
2022-07-06 07:31:46 -07:00
George Kalpakas b80a6e29cd docs(elements): fix typo in guide (@ --> @) (#46688)
HTML entities should not be used inside single backtick code blocks,
because they are not automatically decoded.

PR Close #46688
2022-07-06 07:31:15 -07:00
Alan Agius 5fd3bb6a15 docs: replace fix typo in (#46659)
`extract-18n` should be `extract-i18n`

PR Close #46659
2022-07-06 07:30:14 -07:00
Alan Agius 46ce009608 docs: fix typo in $localize description (#46659)
`18n` should be `i18n`

PR Close #46659
2022-07-06 07:30:13 -07:00
Alan Agius fc66f56c12 fix(docs-infra): wrap enum values in CLI commands (#46658)
This commit changes the enum seperator in the CLI command overview pages so that wrapping is allowed.

PR Close #46658
2022-07-06 07:29:50 -07:00
Angular Robot 03e810eb3d build: update dependency supertest to v6 (#46627)
| datasource | package   | from  | to    |
| ---------- | --------- | ----- | ----- |
| npm        | supertest | 4.0.2 | 6.2.3 |

PR Close #46627
2022-07-06 07:29:20 -07:00
Pawel Kozlowski 96c6139c9a feat(core): add ability to set inputs on ComponentRef (#46641)
This change adds the setInput method to the ComponentRef.

Previously users had to call `componentRef.instance['inputName']`
to change inputs of a dynamically created component. This had
several problems:

*  OnPush components were not marked for check and thus very
difficult to test;
* input aliasing was not take into account - a property name
on a component could have been different from the actual input
name so setting input properties was fragile;
* manually setting input propertie would NOT trigger the
`NgOnChanges` lifecycle hook.

This modifications unifies `@Input` accross dynamically created
components and the ones referenced in templates. This also opens
doors to other changes: as an example router could use this new
method to set `@Input`s from router params.

Closes #12313
Closes #22567

PR Close #46641
2022-07-01 13:45:46 -07:00
Andrew Scott dd3e0968ec refactor(router): Remove custom error message for invalid guards (#46678)
This custom error message for invalid guards requires a fair bit of
extra logic in several places. This change reduces special logic for an error
case that would fail anyways. Additionally, there were already a couple
places that _did not_ have this special error and we have not seen any
indication that there is more confusion for those (resolvers and canMatch).

PR Close #46678
2022-07-01 13:25:50 -07:00
Bob Watson db631bebbf docs: move section on subscribing to observable (#46655)
This change moves a section of the text to a more logical location in the document flow.

fixes #43235

PR Close #46655
2022-07-01 10:23:46 -07:00