Commit graph

29561 commits

Author SHA1 Message Date
Samuel Littley
c7bf75dd5e fix(platform-browser): remove obsolete shim for Map comparison in Jasmine (#45521)
Angular now uses Jasmine 2.8 as a minimum version (required by
protractor; most of it is using ^3.5.0 which currently resolves to
3.99.0), which makes this shim obsolete - all versions of Jasmine used
have Map comparison built in.

This shim causes problems for custom equality checkers - when using a
Map containing types needing a custom equality check, this  fails
because the call to `jasmine.matchersUtil.equals` from the shim does not
use any of the custom equality matchers.

PR Close #45521
2022-04-12 18:43:37 +00:00
Sumit Arora
b5f39c5da1 docs(devtools): updating firefox documentation (#44952)
updating typo

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
e589bc6227 feat(devtools): added string flag for browser support (#44952)
* Added `flag_browser` to toggle between different browser builds chrome and firefox
* Updated build command to support new flag configuration

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
bc0b6fe67d feat(devtools): adding firefox support (#44952)
* Updating manifest.json to new build structure
* Adding doctype to pages to remove warnings

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
9f1bcc7b93 docs(devtools): updating firefox documentation (#44952)
Updating dist path to load Firefox DevTools

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
ceb19c044a feat(devtools): renaming shell-chrome (#44952)
Renaming `shell-chrome` to `shell-browser` contains the build that supports both browsers.

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
d54d1fd68e feat(devtools): dynamic build support for devtools (#44952)
* Updating build to support both browsers firefox & chrome.
* Added new `config_setting` to support build.
* Added new genrule `copy_manifest` to `prodapp` pkg_web.

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
47ceffcbd4 docs(devtools): updating firefox development documentation (#44952)
Updating Firefox DevTools documentation to be more descriptive and removing images.

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
2b73d95b06 feat(devtools): updating firefox manifest json file (#44952)
Updating `manifest.json` file for firefox.

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
60f2cfd7f5 docs(devtools): adding firefox development documentation (#44952)
Adding DevTools documentation for Firefox.

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
e231d3c878 feat(devtools): adding firefox support for devtools (#44952)
Adding Firefox support for Angular DevTools.

PR Close #44952
2022-04-12 18:41:37 +00:00
George Kalpakas
eb2f4492eb docs(docs-infra): add missing period in aio/README.md (#45584)
PR Close #45584
2022-04-12 18:40:46 +00:00
Leosvel Pérez Espinosa
222d8662a2 docs: fix schematicCollections option (#45602)
PR Close #45602
2022-04-12 18:40:08 +00:00
Dylan Hunn
89d299105a feat(forms): Implement strict types for the Angular Forms package. (#43834)
This PR strongly types the forms package by adding generics to AbstractControl classes as well as FormBuilder. This makes forms type-safe and null-safe, for both controls and values.

The design uses a "control-types" approach. In other words, the type parameter on FormGroup is an object containing controls, and the type parameter on FormArray is an array of controls.

Special thanks to Alex Rickabaugh and Andrew Kushnir for co-design & implementation, to Sonu Kapoor and Netanel Basal for illustrative prior art, and to Cédric Exbrayat for extensive testing and validation.

BREAKING CHANGE: Forms classes accept a generic.

Forms model classes now accept a generic type parameter. Untyped versions of these classes are available to opt-out of the new, stricter behavior.

PR Close #43834
2022-04-12 17:37:04 +00:00
Jessica Janiuk
d11d1c0b70 Revert "refactor(router): Add warning for relativeLinkResolution: 'legacy' (#45523)" (#45594)
This reverts commit d180db15bf.

PR Close #45594
2022-04-12 00:08:41 +00:00
dario-piotrowicz
3fceba4bd1 refactor(animations): include pushUnrecognizedPropertiesWarning in ngDevMode check (#45591)
the check for unsupported CSS properties has been made dev-mode-only in
PR #45570, so the check for the unsupportedCSSPRopertiesFound can be
moved inside a ngDevMode check so that more code can be treeshaken away

PR Close #45591
2022-04-11 21:06:03 +00:00
Paul Gschwendtner
0facba5b70 build: update bazel integration test to RNJ v5.4.0 and Sass 1.50.0 (#45470)
Updates Bazel integration to RNJ v5.4.0. This is needed since it relies
on Angular Bazel which now relies on an internal pkg_npm helper breaking
change.

PR Close #45470
2022-04-11 21:01:09 +00:00
Paul Gschwendtner
1219c5a374 refactor(bazel): fix dts bundling by accounting for api-extractor change (#45470)
Fixes the dts bundling by accounting for recent API extractor changes
which made API-extractor support path mappings. This causes
cross-package and cross-entry-point imports to no longer be considered
external, resulting in the imports to be dropped.

PR Close #45470
2022-04-11 21:01:09 +00:00
Paul Gschwendtner
4b2e98d55d fix(bazel): remove unnecessary file extractions from ng_package (#45470)
Looks like there is some old legacy code for extracting files
from NPM packages. This is already captured by the unscoped
ESM2020 output extraction.

PR Close #45470
2022-04-11 21:01:09 +00:00
Paul Gschwendtner
28e835b4bb feat(bazel): report error when dependency does not provide JS sources in ng_package (#45470)
Non-JavaScript source-providing targets in the `ng_package` rule can throw-off
the entry-point detection and therefore should be flagged. Currently e.g.
a genrule-generated static file might unnecessarily cause additional
actions to be generated (non-breaking but just unnecessary)

PR Close #45470
2022-04-11 21:01:09 +00:00
Paul Gschwendtner
636909fba7 feat(bazel): allow for generated package.json files in ng_package (#45470)
Currently the `ng_package` rule does not support generated
`package.json` files. Generated `package.json` files are sometimes
useful when e.g. dependencies are automatically inserted (e.g.
many dependencies in the components repo for the MDC deps)

Currently the `package.json` files would be copied as part of
the `data` attribute, but they would not be processed. i.e. missing
out on the `exports` field and more.

We can simplify the rule attributes and make this more ergonomic.

PR Close #45470
2022-04-11 21:01:09 +00:00
Renovate Bot
48b8a1fcf0 build: update all non-major dependencies (#45470)
Updates all non-major dependencies, including Bazel

PR Close #45470
2022-04-11 21:01:09 +00:00
Andrew Scott
d180db15bf refactor(router): Add warning for relativeLinkResolution: 'legacy' (#45523)
This change adds code to compute the corrected value for a link,
regardless of the `relativeLinkResolution` value. Then, if the
`relativeLinkResolution` is set to `legacy` and differs from the correct
value, a warning is printed to the console in dev mode.

This change is meant to assist in notifying developers that they have
code which relies on the deprecated, broken behavior so they can fix and
update the code before the `relativeLinkResolution` option is fully
removed.

PR Close #45523
2022-04-11 20:51:15 +00:00
Michael-Doner
f1630bb24d docs: Fix several typos in the angular documentation (#45573)
PR Close #45573
2022-04-11 17:41:59 +00:00
dario-piotrowicz
9572bb2ded refactor(animations): use full ngDevMode check in animatable prop validation (#45570)
in the `validateAnimatableStyleProperty` function use the more complete
check for the ngDevMode as it seems to be the preferred version
(see: https://github.com/angular/angular/pull/45212#discussion_r823045428)

PR Close #45570
2022-04-11 16:52:02 +00:00
dario-piotrowicz
a6fa37bc6e feat(animations): make validateStyleProperty check dev-mode only (#45570)
make the validateStyleProperty check dev-mode only so that it is
consistent with the validateAnimatableStyleProperty check introduced in
PR #45212

besides consistency this change also reduces the payload size and
increases performance (since less logic is executed)

original conversation: https://github.com/angular/angular/pull/45212#discussion_r818106737

PR Close #45570
2022-04-11 16:52:02 +00:00
Renovate Bot
b13a453472 build: update dependency google-closure-compiler to v20220405 (#45568)
PR Close #45568
2022-04-11 16:26:25 +00:00
Kristiyan Kostadinov
41223a81f2 build: update to jasmine 4.0 (#45558)
Updates us to version 4.0 of Jasmine and fixes some errors that were the result of us depending upon deprecated APIs. We need to do this both to stay up to date and because it was going to break eventually, because one of the Bazel packages was logging a deprecation warning that version 4.0 was required.

There were also some cases where the state of `ngDevMode` had started leaking out between tests.

PR Close #45558
2022-04-11 16:25:28 +00:00
Joey Perrott
8d85f24ef3 build: refactor global approvals to be done via overrides, adding dev-infra global approvers (#44866)
Add dev-infra global approver support and change global approval management to be done via
overrides.  By using overrides to determine global approval status, we can safely ignore
the concept of global approval in all of the other group management.

PR Close #44866
2022-04-11 16:24:46 +00:00
Joey Perrott
0fed2bafd6 build: update pullapprove to assign caretakers to renovate PRs (#44866)
Automatically assign renovate generated PRs to the current caretakers.

PR Close #44866
2022-04-11 16:24:46 +00:00
Renovate Bot
20fbb4c35c build: update github/codeql-action action to v2.1.8 (#45542)
PR Close #45542
2022-04-11 16:22:26 +00:00
Renovate Bot
a6bf2c5837 build: update dependency eslint-plugin-jsdoc to v39 (#45562)
PR Close #45562
2022-04-11 16:17:28 +00:00
Michal Materowski
4c1ce828bd build: fix typo in package.json file comment (#45569)
Change comment in scripts section of package.json

PR Close #45569
2022-04-11 16:14:16 +00:00
Renovate Bot
b96d6ea8de build: update dependency @types/chrome to ^0.0.181 (#45586)
PR Close #45586
2022-04-11 16:13:00 +00:00
Joe Martin (Crowdstaffing)
e0ac614121 docs: update test threshold \nupdate test threshold to get this content merged. (#45325)
PR Close #45325
2022-04-08 19:36:31 +00:00
Joe Martin (Crowdstaffing)
bf1294ba69 docs: apply suggestions from code review (#45325)
Apply editorial suggestions for peer review.

Co-authored-by: Tiffany Davis <88161089+TMDavisGoogle@users.noreply.github.com>

PR Close #45325
2022-04-08 19:36:30 +00:00
Joe Martin (Crowdstaffing)
42289f25c6 docs: improve markdown (#45325)
The purpose of the changes is to clean all markdown to match a single pedantic style.

*   To ensure all changes in style are properly separated.
*   To ensure all styled content aligns to nearest 4-character-tab.
*   To ensure all code blocks use the Angular `<code-example>` or `<code-tab>` elements.
*   To ensure all markdown exists outside of html tags.
*   To ensure all images use the Angular style for `<img>` elements.
*   To ensure that all smart punctuation is replaced or removed.

    ```text
    ’, ’, “, ”, –, —, …
    ```

*   To ensure all content does not conflict with the following reserved characters.

    ```text
    @, $, *, &, #, |, <, >,
    ```

*   To ensure all content displays using html entities.

The following changes were made to files in the following directory.

```text
aio/content
```

The target files were markdown files.
The list of excluded files:

```text
.browserslistrc, .css, .conf, .editorconfig, .gitignore, .html, .js, .json, .sh, .svg, .ts, .txt, .xlf,
```

PR Close #45325
2022-04-08 19:36:30 +00:00
Jessica Janiuk
7a37fe9f28 Revert "build: update to jasmine 4.0 (#45558)" (#45566)
This reverts commit a248df0682.

PR Close #45566
2022-04-08 19:07:29 +00:00
Kristiyan Kostadinov
a248df0682 build: update to jasmine 4.0 (#45558)
Updates us to version 4.0 of Jasmine and fixes some errors that were the result of us depending upon deprecated APIs. We need to do this both to stay up to date and because it was going to break eventually, because one of the Bazel packages was logging a deprecation warning that version 4.0 was required.

There were also some cases where the state of `ngDevMode` had started leaking out between tests.

PR Close #45558
2022-04-08 15:55:58 +00:00
Cédric Exbrayat
60b5a3de9d refactor(core): validate property (#45528)
Simplifies and documents the `validateProperty` function (in a similar fashion that #45492 simplified `validateElementIsKnown`).

PR Close #45528
2022-04-07 22:03:13 +00:00
George Kalpakas
2a81e440f4 docs: remove out-of-order <h3> elements from footer (#45510)
The footer uses `h3` elements out of order, which causes a "Heading
elements are not in a sequentially-descending order" a11y error.
Replace the `h3` elements with `div` to improve a11y.

Fixes #44338

PR Close #45510
2022-04-07 21:01:58 +00:00
Andrew Scott
f8f3ab377b fix(router): Remove any from LoadChildrenCallback type (#45524)
The `LoadChildrenCallback` type previously included `any` in the
possible return value union for `Promise`. This is too loose and should
be restricted to values that are actually supported.

BREAKING CHANGE: When returning a `Promise` from the
`LoadChildrenCallback`, the possible type is now restricted to
`Type<any>|NgModuleFactory<any>` rather than `any`.

PR Close #45524
2022-04-07 21:01:09 +00:00
Hossein Mousavi
5adfe8ef24 docs(forms): remove the incorrect set value from previous commit (#45533)
in the validators documentation, the value for the formControl for both required and requiredTrue validators is an empty string. This is OK for required since it gives us an error. But I think if we set the value of formControl responsible for requiredTrue to something other than an empty string (e.g.: 'some value'), it would demonstrate the difference between required and requiredTrue better.

PR Close #45533
2022-04-07 21:00:25 +00:00
Hossein Mousavi
b1d06837dd docs(forms): add value to formControl for better demonstration of requiredTrue validator (#45533)
in the validators documentation, the value for the formControl for both required and requiredTrue validators is an empty string. This is OK for required since it gives us an error. But I think if we set the value of formControl responsible for requiredTrue to something other than an empty string (e.g.: 'some value'), it would demonstrate the difference between required and requiredTrue better.

PR Close #45533
2022-04-07 21:00:25 +00:00
George Kalpakas
b57f8bea61 test(docs-infra): ufix e2e test for {@example} dgeni tags (#45551)
Previously, the `guide/compoent-style` page was used in e2e tests to
verify the behavior of `{@example}` dgeni tags. However, this guide has
been updated and no longer contains an `{@example}` tag.

This commit switches to using a different page (`api/common/NgIf`) that
does currently contain an `{@example}` tag.

(NOTE: This will also fix the [CI failures][1] in #45501.)

[1]: https://circleci.com/gh/angular/angular/1145424

PR Close #45551
2022-04-07 20:59:19 +00:00
George Kalpakas
24649b9930 fix(docs-infra): add shell to the list of code-example languages recognized as cli commands (#45551)
Previously, only `language="sh"` and `language="bash"` would be
recognized (and formatted) as cli commands in `<code-example>`.

This commit adds `shell` to the list of languages recognized as cli
commands.

(NOTE: This will fix the [CI failures][1] in #45325.)

[1]: https://circleci.com/gh/angular/angular/1145559

PR Close #45551
2022-04-07 20:59:19 +00:00
Andrew Kushnir
f1a2816ba9
release: cut the v14.0.0-next.11 release (#45550) 2022-04-06 08:58:29 -07:00
Andrew Kushnir
d4270d2423
docs: release notes for the v13.3.2 release (#45549) 2022-04-06 08:56:09 -07:00
Martin Sikora
1c11a57155 fix(router): merge interited resolved data and static data (#45276)
in layers

Right now route static data are collected from its parents based on the logic
described in `inheritedParamsDataResolve()`, merged into a single object
and then merged again with merged data from resolvers. This means that a
child's data can be overriden by a resolver in its parent (#34361).
However, what is the expected behavior is not described in the documentation.
This PR changes this behavior and merges static data and resolved data
in "layers" (route by route) so child's static data and resolved data
cannot be overriden by their parents.

Fixes #34361

PR Close #45276
2022-04-05 08:49:09 -07:00
Christoph Guttandin
a3f344ff6e test(animations): add test for buildAnimationAst() function (#31107)
This commit adds a test for the buildAnimationAst() function.

PR Close #31107
2022-04-05 08:41:38 -07:00