22921 Commits

Author SHA1 Message Date
Andrew Scott f6c229f755 release: cut the v13.2.7 release (#45363) 13.2.7 2022-03-16 11:26:17 -07:00
why520crazy 9361f091cc docs: add ngx-gantt to "EXPLORE ANGULAR RESOURCES" page (#45351)
PR Close #45351
2022-03-15 16:29:24 -07:00
Amer Yousuf eac94f0945 fix(forms): improve error message for invalid value accessors (#45192)
improve error message for invalid value accessors when accessor is not provided as array

PR Close #45192
2022-03-15 13:26:04 -07:00
Lee Cooper b0892c0cfa fix(docs-infra): fix tour of heroes global styles (#45329)
fix button styles in src/styles.css that are missing from code snippets

PR Close #45329
2022-03-15 13:24:53 -07:00
alirezaghey 16eda01be0 docs: fix small English typo (#45340)
PR Close #45340
2022-03-14 13:10:19 -07:00
Andrew Scott b09686923b docs: Fix typo in issue template (#45327)
PR Close #45327
2022-03-14 09:31:02 -07:00
Jessica Janiuk 78781a998d refactor(core): Switch over to new closure LOCALE vs getLocale() (#45302)
This is a change requested via an LSC due to a deprecation.

PR Close #45302
2022-03-10 12:48:30 -08:00
Andrew Scott 6336b8e5b3 refactor(router): Make a few adjustments to createUrlTree for clarity (#45306)
* `tree` function now accepts the old root rather than the old
  `UrlTree`. The `urlTree` argument was only used to get the `root`.
  This change makes it more clear what that pararmeter is used for and
  what's actually being used
* Move the `oldRoot` (previously `urlTree`) to be the first argument of `tree`.
  This change now mirrors the argument order for `replaceSegment` and
  can be read from left to right more easily "in this root,
  replace this old segment group with this new segment group".
* Extract `newRoot` to a variable. This just makes it more clear what's
  going on at the end rather than combining a bunch of operations into
  one.

These changes are being made so that hopefully a future refactor can be
done which does not rely on the `urlTree` argument at all in the
`createUrlTree` function. These refactorings will make it easier to see
1:1 functionlity in these various places.

PR Close #45306
2022-03-09 13:52:38 -08:00
Alistair Kane 10de52887b docs: update <div> to <p> in lifecycle-hooks.md (#45063)
Changes <div> to <p> in description to match the elements in the screenshot.

Update lifecycle-hooks.md

Changes <div> to <p> in description to match the elements in the screenshot.

PR Close #45063
2022-03-09 13:52:16 -08:00
Andrew Kushnir 6f1c941dfe release: cut the v13.2.6 release (#45299) 13.2.6 13.3.0-next.0 2022-03-09 08:53:23 -08:00
Andrew Scott 9bce9ce89e fix(language-service): Prioritize Angular-specific completions over DOM completions (#45293)
When authoring Angular templates, developers are likely to be most interested in
the current Directive/Component inputs and outputs, then potential
attributes which would match other directives to the element,
and lastly the plethora of DOM events and attributes.

This change ensures that Angular-specific information appears above DOM
information by prepending the first printable ASCII characters to the
sort text.

Fixes https://github.com/angular/vscode-ng-language-service/issues/1537

PR Close #45293
2022-03-08 14:48:38 -08:00
Andrew Scott 8227eb914e refactor(migrations): update isReferenceToImport to not use valueDeclaration (#45292)
valueDeclaration is only set when the Symbol type is a `Value`:

* [setValueDeclaration](https://sourcegraph.com/github.com/microsoft/TypeScript@d8b21a8d6cef772fea5cf2a507b651c5d38194bd/-/blob/src/compiler/binder.ts?L321-322)
* [Value union](https://sourcegraph.com/github.com/microsoft/TypeScript@d8b21a8d6cef772fea5cf2a507b651c5d38194bd/-/blob/src/compiler/types.ts?L4849:9#tab=references)

This won't be the case if the symbol is an interface (notice that `Interface` is not in the union for `Value` above).

For this reason, we can't rely on the `valueDeclaration` property of the symbol.
Instead, it's more reliable to just compare the first items in the `declarations` list.

PR Close #45292
2022-03-08 13:13:26 -08:00
Renovate Bot 23003f817f build: update actions/checkout action to v3 (#45248)
PR Close #45248
2022-03-08 10:28:32 -08:00
Mladen Jakovljević d98ce5ed4f fix(docs-infra): remove anchor tags from heritage docs (#45287)
Remove anchor tags from heritage docs and let `autoLinkCode` insert them properly.

PR Close #45287
2022-03-08 10:26:50 -08:00
Luca cff1c5622f fix(service-worker): file system hash in batch of 500 elements (#45262)
Add file system concurrency hash test

Fixes #45133
PR Close #45262
2022-03-08 10:23:39 -08:00
Andrew Scott 6efa366e2c fix(compiler): compute correct offsets when interpolations have HTML entities (#44811)
When parsing interpolations, the input string is _decoded_ from what was
in the orginal template. This means that we cannot soley rely on the input
string to compute source spans because it does not necessarily reflect
the exact content of the original template. Specifically, when there is
an HTML entity (i.e. `&nbsp;`), this will show up in its decoded form
when processing the interpolation (' '). We need to compute offsets
using the original _encoded_ string.

Note that this problem only surfaces in the splitting of interpolations.
The spans to this point have already been tracked accurately. For
example, given the template `&nbsp;<div></div>`, the source span for the
`div` is already correctly determined to be 6. Only when we encounter
interpolations with many parts do we run into situations where we need
to compute new spans for the individual parts of the interpolation.

PR Close #44811
2022-03-08 10:23:08 -08:00
Srikanth Kolli ad9d98146e docs: Change tag name to TD from TR in context of colspan usage (#45257)
PR Close #45257
2022-03-07 15:41:37 -08:00
nanda18 8390e12bdd docs: update flush description to include microtasks (#45237)
PR Close #45237
2022-03-07 15:41:08 -08:00
Renovate Bot 43bbaf810d build: update dependency google-closure-compiler to v20220301 (#45260)
PR Close #45260
2022-03-07 14:30:47 -08:00
Renovate Bot 6842bf0515 build: update dependency magic-string to v0.26.1 (#45247)
PR Close #45247
2022-03-07 14:29:46 -08:00
Kristiyan Kostadinov f261fa7c08 test(compiler): fix deprecation warning (#45285)
Jasmine logs a warning when there's a `describe` with no tests. These changes fix one such case in the compiler that happens when the tests are run against Windows.

PR Close #45285
2022-03-07 11:36:48 -08:00
JiaLiPassion d29883adff ci: components CI test should use local zone.js build (#45277)
CI components test install the angular package from the local
version, but still use the zone.js from npm, so this commit let
components also install zone.js from local too.

PR Close #45277
2022-03-07 11:35:00 -08:00
Andrew Scott de67c9fd01 refactor(router): Use helper function to throw NoMatch (#45244)
This update matches the other locations where noMatch is thrown.

PR Close #45244
2022-03-04 15:24:14 -08:00
Joey Perrott 9a8ef7cc28 build: patch snapshot issue in dev-infra selecting the latest version tag (#45269)
Local patch ahead of landing of https://github.com/angular/dev-infra/pull/449

PR Close #45269
2022-03-04 15:23:40 -08:00
Anner Visser 4e1d825d83 docs: change link for devtools to angular repo (#45207)
PR Close #45207
2022-03-03 12:28:25 -08:00
Aristeidis Bampakos 356c521195 docs: add Greek localization for Angular Docs (#45152)
PR Close #45152
2022-03-03 12:27:53 -08:00
JiaLiPassion 9a7eba2352 fix(zone.js): defineProperties should also set symbol props (#45098)
Close #44095

Fix `defineProperties` patch not set `symbol` props issue.

Co-authored-by: varomodt<varomodt@users.noreply.github.com>
Co-authored-by: AndrewKushnir<AndrewKushnir@users.noreply.github.com>

PR Close #45098
2022-03-03 12:22:05 -08:00
Andrew Scott e16dab82a1 refactor(router): Remove special logic for hybrid apps (#45240)
This commit removes special (undocumented) logic in the Router code that is
meant to prevent duplicate navigations that result from location syncs in
AngularJS/Angular hybrid applications.

The duplicate navigations can occur when both the Router and the AngularJS sync
code detect a location change via a popstate/hashchange event. When this
happens, the Angular Router schedules a navigation to sync itself with
the browser, but the hybrid listener may also schedule an additional
navigation. There are a few reasons this logic should not be included in
the Router:

* This special logic is not tree shakeable so it introduces a bundle
  size cost for all applications, most of which don't need it.
* There have been many updates to the routing pipeline to tolerate
  duplicate navigations. That is, duplicate navigations can happen and
  routing should still complete successfully.
    * https://github.com/angular/angular/commit/0e8548f667e5fdefa3ac7cdf1ba47e3e17011ffc
    * https://github.com/angular/angular/commit/9e039ca68bfae5328f3fc1f16fabd7673c466a25
* The logic is really in the wrong place: The hybrid sync code should be
  the location to handle this. If duplicate navigations are meant to be
  avoided, the hybrid sync code should have handling to _not_ trigger
  duplicate navs.
* This logic _also_ used to exist because the mock location
  helper used for test incorrectly triggered popstate events during
  router navigations. In order to avoid unexpected behavior in tests, this
  logic needed to be added. This incorrect mocking may also have been
  put in place because the upgrade module _would_ see a location change
  event and trigger a duplicate navigation.  The location mock has since been updated to
  match real browser behavior so this is no longer necessary. The
  upgrade module has also been updated to not trigger duplicate
  navigations.  The following commits are related to this:
    * https://github.com/angular/angular/commit/202a1a56314af4ddb99c476f974536a10e390319
    * https://github.com/angular/angular/commit/c6a93001eb74374b0fbc6aea1286fe1183d21382

Side note: The `setTimeout` in the location change listener is used to
ensure the ordering of duplicate navigations was consistent. You can see
that the logic being removed here expects the imperative navigation to precede the
popstate/hashchange. With the removal of this code, the `setTimeout` no
longer serves a purpose. However, it has been found that tests can rely
on this behavior (incorrectly) because they expect the navigation to be
complete but in reality, it hasn't even started because the test has not
flushed the timeout. Removing the timeout would be a breaking change as
a result.

PR Close #45240
2022-03-03 09:14:39 -08:00
Paul Gschwendtner 913bbba42b ci: update aio payload size golden to reflect Angular update (#45239)
Similar to 63e9cc7cba, but for the
patch branch where the `aio` job increased in total by ~100b.

New total: 718427 bytes
Before total: 718357 bytes

PR Close #45239
2022-03-03 09:14:08 -08:00
Joey Perrott c7e5cb0371 build: update .pullapprove.yml (#45061) (#45239)
Remove errant extra space in fw-compiler glob matcher.

PR Close #45061

PR Close #45239
2022-03-03 09:14:08 -08:00
Paul Gschwendtner aa616db24f build: update tooling to use new entry-point for dev-infra exports (#45239)
Previously, dev-infra only bundled the CLI with all its dependencies, while
we still also kept all bundled dependencies in the `dependencies`. This basically
meant that the CLI bundling did not provide any value at all.

We fixed this upstream and now dependencies are still bundled, but no longer
also declared as `dependencies`. We also stopped shipping deep JS files, only
shipping the bundles now.

As part of this deep file removal, we introduced a runtime entry-point for
exports/types. This one will also benefit from the bundling and it will be
predictable what symbols dev-infra consumer projects rely on (allowing us to
also have an API guard or something in the future).

PR Close #45239
2022-03-03 09:14:08 -08:00
Renovate Bot de9290096c build: update angular (#45239)
Updates Angular through Renovate. Patch port.

PR Close #45239
2022-03-03 09:14:08 -08:00
Kristiyan Kostadinov 2c7d96afcb build: add retry logic to postinstall script (#45252)
Several people on the team (myself included) have had issues where the `webdriver-manager` step of the `postinstall` script fails on the first run, but work correctly on the second one.

These changes attempt to simplify the workflow by retrying the script up to 3 times before giving up.

PR Close #45252
2022-03-03 09:13:26 -08:00
Jessica Janiuk 8bf3b53a1d release: cut the v13.2.5 release (#45241) 13.2.5 2022-03-02 10:18:07 -08:00
Andrew Kushnir 56ca7d385b perf(common): make NgLocalization token tree-shakable (#45118) (#45226)
This commit updates the `NgLocalization` token to become tree-shakable (vs using a direct reference to that token in the `providers` section of the `CommonModule`). The `NgLocalization` token is used for apps that use i18n and for other apps it would be excluded from the bundle.

PR Close #45118

PR Close #45226
2022-03-02 01:02:54 +00:00
Theodore Brown e8fd452bd2 fix(core): remove individual commands for updating gold files (#45198)
The documented command for updating the forms gold files was outdated
and didn't work. Since this command list can easily become outdated,
remove the individual commands in favor of the simpler global scripts.

PR Close #45198
2022-03-01 19:16:53 +00:00
Andrew Kushnir 71ff12c1cc perf(core): make LOCALE_ID and other tokens from ApplicationModule tree-shakable (#45102) (#45222)
The `ApplicationModule` module has a number of tokens declared as non-tree-shakable providers. This commit updates them to make tree-shakable.

PR Close #45102

PR Close #45222
2022-03-01 18:38:18 +00:00
Andrew Kushnir 82d772857c perf(core): make Compiler, ApplicationRef and ApplicationInitStatus tree-shakable (#45102) (#45222)
The `Compiler`, `ApplicationRef` and `ApplicationInitStatus` classes are registered as non-tree-shakable providers in the `ApplicationModule`. This commit converts them to the tree-shakable providers instead.

PR Close #45102

PR Close #45222
2022-03-01 18:38:17 +00:00
Andrew Kushnir 2bebaa99cf refactor(core): drop unused SCHEDULER provider (#45102) (#45222)
The `SCHEDULER` provider was used previously when both ViewEngine and Ivy code was present. After some prior refactoring, all references to the `SCHEDULER` token were removed, but the token itself remains present in the `ApplicationModule`, which makes it non-tree-shakable.

This commit removes the `SCHEDULER` token as unused.

PR Close #45102

PR Close #45222
2022-03-01 18:38:17 +00:00
dario-piotrowicz 8907fbbfed docs: improve structure of http example (#44986)
improve the http aio example by:
 - adding a background color to the messages section so that it
   can be distinguished from the others
 - avoid using `hr` elements to divide the various sections, use
   css instead (so that the divisions can also be omitted when
   the sections are not being shown)
 - fix the erroneous presence of an input text element inside a button
   (see: https://github.com/angular/angular/pull/44557#discussion_r787239658)

PR Close #44986
2022-02-28 19:31:25 +00:00
Guillaume Bonnet 84b4ad812b docs(docs-infra): fix the stackblitz on page i18n-example (#45097)
The previous configuration didn't allow to serve in any language.

Fixes #45066

PR Close #45097
2022-02-28 17:25:41 +00:00
Paul Gschwendtner 76c6dca93f ci: instruct renovate to not update/override merge ready PRs (#45204)
Sometimes Renovate proposes an update and we need to add some
manual fixups, like updating a size golden. For this we push to
same upstream branch.

Renovate will update the PR though when another new revision/version
becomes available, overriding the fixup and discarding it.

This happened quite often now and causes significantly more
work required by the dev-infra time..

PR Close #45204
2022-02-25 22:10:55 +00:00
Paul Gschwendtner 85546594a5 ci: fix stamping for builds performed in CI (#45147)
Fixes the stamping for snapshot builds and the artifact deployment job.
Currently the stamped versions will have the `.with-local-changes` version
suffix given that we add a file to the Git repo that is just
needed for the CircleCI cache key computation.

PR Close #45147
2022-02-25 19:14:05 +00:00
JoostK 55b8c4f701 ci: allow Babel to be updated by Renovate (#45203)
Automatic updating of Babel was disabled because there were build failures
when using the latest version of Babel, but these have been resolved in
#44931. This commit removes Babel packages from Renovate's ignored list
to allow automatic updates again.

PR Close #45203
2022-02-25 19:13:23 +00:00
JoostK 1e6f700b7d refactor(localize): update version of Babel (#45203)
The `@angular/localize` package depends on a version of Babel that is two years
old, so this commit updates to the latest version.

Some changes were made to the linker and compliance tests to account for slight
changes in source maps, along with a few code updates because of changes to
the typings of Babel.

PR Close #45203
2022-02-25 19:13:23 +00:00
Andrew Scott 01fde59dd9 refactor(router): Refactor errors in applyRedirects to use common throwError function (#45170)
The implementation of `throwError` in `rxjs` is identical to what is
done manually in the Router code.

PR Close #45170
2022-02-24 23:50:01 +00:00
Andrew Scott a4debf14e3 refactor(router): Update match result to be more explicit (#45170)
The `lastChild` property in the match result is only used to compute the
remaining segments (i.e. the ones which were not consumed). The updated
type here makes it easier to use and more clear.

PR Close #45170
2022-02-24 23:50:01 +00:00
dario-piotrowicz c6e64aa8ad docs: fix style guide example app included as routing (#45148)
in the aio example apps page the style guide for documentation
contributions is included in the Routing section instead of being
in its own section, add a documentation section and include the example
in that one

PR Close #45148
2022-02-24 22:57:54 +00:00
Charles Lyding 7379d75782 ci: add permissions to current github action workflows (#45177)
The currently recommended best practice for Github action workflows is to set top-level permissions to read only. And if the job uses the automatic `GITHUB_TOKEN`, fine-grained permissions for each job based on the job's requirements should also be added.
All existing workflows in the repository now have top-level read only permission blocks.
Only the `scorecard` workflow currently requires additional job level permissions and the minimum set of permissions were already present for the job.

PR Close #45177
2022-02-24 21:39:38 +00:00
Jessica Janiuk 21a51fb6a4 test(animations): Fix flaky animations e2e test (#45196)
This adds a 300ms wait to the animations tests to ensure they are fully done animating before asserting.

PR Close #45196
2022-02-24 13:15:33 -08:00