25265 Commits

Author SHA1 Message Date
Lukas Matta 397d75bc4c docs: add missing space (#46800)
PR Close #46800
2022-07-12 15:56:09 +00:00
Paul Gschwendtner c8b0127f31 build: remove unused inline-package-json-deps.js script (#46798)
This script was used back when dev-infra code was part of
the Angular framework repository. The script is now unused
and can be deleted.

PR Close #46798
2022-07-12 15:54:51 +00:00
Paul Gschwendtner 1596902825 build: move jasmine seed generation logic to karma config (#46798)
The jasmine seed generator is only used in a single karma configuration
file. Used by the legacy build and the Saucelabs/ZoneJS Karma jobs.

We should move the separate script code directly into the config to make
it clear that the seed generation is not used elsewhere, and to simplify
the Starlark code.

PR Close #46798
2022-07-12 15:54:51 +00:00
Angular Robot 9f9e4f2314 build: update eslint dependencies to v5.30.6 (#46794)
See associated pull request for more information.

PR Close #46794
2022-07-12 15:54:12 +00:00
Paul Gschwendtner 5ba7503603 test: update payload size goldens for AIO after analytics change (#46716)
Most of the increase comes from code being moved from `index.html`
to the main bundle. A small increase comes from the additional `gtag.js`
loading logic, but other than that the size is effectively increased
due to the untracked code from `index.html` being moved into the
`main.js` bundle.

PR Close #46716
2022-07-12 15:53:23 +00:00
Paul Gschwendtner 28832ca46a refactor(docs-infra): enable ip anonymization for legacy universal analytics (#46716)
In GA4 ip anonymization is enabled by default, but in universal
analytics with `analytics.js`, this needs to be explicitly enabled.

PR Close #46716
2022-07-12 15:53:23 +00:00
Paul Gschwendtner dc684dbea0 refactor: move error reporting for analytics to service (#46716)
This is acceptable because `gtag.js` is also only loaded as part of the
service, similary `ga` is only registered in the service (so the
reporting was a noop if errors are thrown before -- no change here)

We can benefit from downleveling etc. and do not need to be careful
with the inline script in the `index.html`

PR Close #46716
2022-07-12 15:53:23 +00:00
Paul Gschwendtner 658d161c18 feat(docs-infra): set up Google Analytics 4 along with keeping legacy Universal Analytics (#46716)
We currently use Universal Analytics. This is deprecated in favor of
Google Analytics 4 and UA will stop processing hits in October 2023.

This change intends to prepare us for this migration, and to already
pre-populate our GA4 property (there is no way to migrate existing data
/properties into a GA4 property -- a new one needs to be created).

This will help us minimize the data gap so that we can:

* Continue to look at the UA property with the full time span until
  October 2023
* Can start using the GA4 property long-term in the future, starting
  with data even before Universal Analytics stops processing new data.

We need to keep the existing `analytics.js` setup. Initially we have
considered using `gtag.js` for both the UA and GA4 properties, as it
supports that, but that doesn't work with our strict trusted types
enforcement because it results in multiple `gtag.js` scripts (specific
versions for UA or GA4) that recreate the same trusted type policies.
This causes runtime errors and breaks the setup.

Instead, with continued use of `analytics.js` we have the benefit of
a good separation of trusted types + events and configuration. There is
some problematic with translation of Universal Analytics Events to GA4,
or the other way around (even though we don't use custom events
currenlty)

We also do not need to send page views for our GA4 property because GA4
with gtag supports this automatically (respecting the history state --
using the `Enhanced measurement events` setting in the UI).
For our UA legacy instance we continue to dispatch events manually. This
logic can be removed in the future.

More details can be found here:
https://docs.google.com/document/d/1aK8u4ZlXbqQ2wMqmgSX7Ces8iLgamC13oCoG6VeBruA/edit?usp=sharing&resourcekey=0-EVe-Rhnme3bj_pkz2RcOmw.

PR Close #46716
2022-07-12 15:53:23 +00:00
Nicolas Molina Monroy 23e7f7f2f3 docs: add nicobytes to GDE resources and Platzi to Online Training (#46668)
PR Close #46668
2022-07-11 23:29:30 +00:00
Bob Watson 50830a2bc7 docs: update topics to include feedback from PR review (#46647)
Fix #44662

PR Close #46647
2022-07-11 22:32:35 +00:00
Bob Watson 9d030dadd3 docs: update references to HeroListComponent (#46647)
Remove or reframe references to the obsolete HeroListComponent component that was taken from an old version of the Tour of Heroes tutorial.

Incorporates review feedback.

Fix #44662

PR Close #46647
2022-07-11 22:32:35 +00:00
Bob Watson 8271da9dbb docs: Remove content lint errors from tutorial topics (#46652)
Contains revisions to the Tour of Heroes tutorial that remove the text and formatting errors identified by the content lint tool.

PR Close #46652
2022-07-11 21:44:58 +00:00
Angular Robot 2808d889dc build: update dependency firebase-tools to v11 (#46779)
See associated pull request for more information.

PR Close #46779
2022-07-11 21:42:08 +00:00
Paul Gschwendtner 7b9269c5e4 build: account for integration test rule change (#46778)
The integration test rule now always executes tests in a directory
outside of the execroot. This ensures a more hermetic test environment
on platforms without a sandbox, or when tests are run with `tags:
local`.

As part of this change, an issue with Yarn 1.x. and `nodejs_binary`
unveiled. Yarn 1.x. is resolved properly using the tool mapping but
when Yarn inside Yarn is invoked (e.g. using `package.json` scripts),
then the second nested Yarn invocation fails due to an unknown path.

This happens because Yarn in the original invocation creates another
directory in the `/tmp` directory and modifies the `PATH` so that
the same `yarn` can be invoked again. This makes sense conceptually
but breaks in our case because the Yarn Bash script put into the `/tmp`
directory tries to resolve our vendored Yarn script relatively (which
is the wrong spot here). It worked previously in the execroot because
`nodejs_binary` invoked Yarn through `<external>/../node.sh
<absolute-path-to-yarn-cjs-script>`, but outside the execroot it invoked
Yarn using a relative path (which then ended up being preserved in the
Yarn temporary directory).

We can fix this by updating the Bazel NodeJS repository which seems to
have coincidentally have a fix for the path resolution. See:

https://github.com/bazelbuild/rules_nodejs/pull/3493#event-6870301735.

PR Close #46778
2022-07-11 20:55:30 +00:00
Angular Robot a9504064be build: update cross-repo angular dependencies to 218be21 (#46778)
See associated pull request for more information.

PR Close #46778
2022-07-11 20:55:30 +00:00
JiaLiPassion 19e6d9ccd3 feat(core): import AsyncStackTaggingZone if available (#46693)
Import `AsyncStackTaggingZoneSpec` if the user imported
`zone.js/plugins/async-stack-tagging` bundle. So the user can
use `console.trace` to output the `async task` information more
clearly.

PR Close #46693
2022-07-11 20:01:50 +00:00
JiaLiPassion 848a00956e feat(zone.js): add AsyncStackTaggingZoneSpec implementation (#46693)
Chrome has an experimental API to improve the debug experience of the
async tasks.
The details can be found here https://bugs.chromium.org/p/chromium/issues/detail?id=332624#c29

This commit add the `async stack tagging` support in the `zone.js`.
User can `import 'zone.js/plugins/async-stack-tagging';` to enable this
feature.

PR Close #46693
2022-07-11 20:01:50 +00:00
markostanimirovic b6a950cd60 docs(core): add full example of directive with typed context (#46689)
This commit adds a complete example of a structural directive
with strongly typed context.

PR Close #46689
2022-07-11 20:01:06 +00:00
Jessica Janiuk 93f73114e6 Revert "build: update dependency firebase-tools to v11" (#46777)
This reverts commit 179523003d.

PR Close #46777
2022-07-11 19:27:03 +00:00
Jessica Janiuk 9ad296a55f Revert "refactor(router): Remove use of OutletInjector" (#46775)
This reverts commit e288d87742.

PR Close #46775
2022-07-11 19:13:20 +00:00
SoulsMark e58207e444 docs: link fix from google.developers to web.dev (#46768)
PR Close #46768
2022-07-11 18:14:59 +00:00
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