25265 Commits

Author SHA1 Message Date
Dylan Hunn cc2d32adb9 release: cut the v14.2.2 release 14.2.2 2022-09-14 19:47:30 -07:00
Pawel Kozlowski a0cb5011ed ci: update payload size for cli-hello-world-lazy test (#47431)
The size for the mentioned tests decreased causing CI build
to fail. Updating sizes to the current ones.

PR Close #47431
2022-09-14 09:20:56 -07:00
Andrew Kushnir ad23934a61 ci: update payload size for Animations integration test (#47424)
This commit updates the payload size for the Animations integration test app. The increase is likely is a result of a number of accumulated changes from various commits merged previously.

PR Close #47424
2022-09-13 22:46:30 -07:00
Andrew Kushnir e21494a333 refactor(core): drop RootContext object (#47056)
In a previous refactor, the `RootContext` was update to only contain a reference to a component. This commit perform further refactoring to get rid of the `RootContext` altogether, while storing component reference directly on the root view (without the `RootContext` wrapper).

PR Close #47056
2022-09-13 09:21:35 -07:00
dario-piotrowicz 937e6c5b3d fix(animations): make sure that the animation function delay is applied (#47285)
make sure that when an animation is defined via the `animation` function
(and used via `useAnimation`) and a delay has been provided then that
delay gets correctly applied

resolves #47283

PR Close #47285
2022-09-13 09:20:45 -07:00
Sebastian 24e5c2a83f docs(core): fix viewProviders & providers typos in NodeInjectorFactory (#47408)
Fixes incorrect spellings for providers (provides) and viewProviders (viewProvides) in NodeInjectorFactory examples
PR Close #47408
2022-09-13 09:20:18 -07:00
George Kalpakas e0f09ec2b9 build: use the create-pr-for-changes action from angular/dev-infra (#47410)
Use the `create-pr-for-changes` action of the `angular/dev-infra` repo,
instead of the `gkalpak/dev-infra` one. The latter was used during
development for debugging purposes during and was accidentally committed
to the repo.

PR Close #47410
2022-09-13 09:19:22 -07:00
Andrew Kushnir bb06432948 refactor(platform-server): add a marker to specify how a page was rendered (#47103)
This commit updates the `renderApplication`, `renderModule` and `renderModuleFactory` functions to append a special marker (in a form of an attribute, called `ng-server-context`) to the component host elements. This marker is needed to analyze how a page was rendered.

PR Close #47103
2022-09-12 19:05:49 -07:00
onrails 183dbb7c44 docs(forms): correcting description verbs of formGroup methods (#47399)
Updated methods' description verbs. They are sometimes used with the assumption of the 'it' pronoun and sometimes not. For instance, the verb  'to construct' is used with 's' in one method description and not others. It is the case for other verbs as well. This is also remarkable in the description of the built-in methods of FormArray.
PR Close #47399
2022-09-12 19:05:23 -07:00
Bob Watson 4b7b1aee96 docs: update prompts in the doc issue template (#47389)
Co-Authored-By: Joe Martin (Crowdstaffing) <87730750+josmar-crwdstffng@users.noreply.github.com>

PR Close #47389
2022-09-12 13:25:47 -07:00
Benjamin Chanudet f9f414e948 docs: replace deprecated --outFile option for ng extract-i18n (#47397)
replace deprecated --outFile option for ng extract-i18n

The `--outFile` command option was last used in Angular v10 (back when it was still `ng xi18n`), yet there are still references to it in the documentation, alongside the up-to-date option `--out-file`. This commit replaces all mentions to the incorrect option with the correct writing.
PR Close #47397
2022-09-12 13:25:21 -07:00
Abhishek Rawat 47ed62f6c5 docs: fix angle brackets in details code block (#47400)
Angle brackets are not showing inside the markdown code block by writing like &lt; &gt;.
PR Close #47400
2022-09-12 13:24:57 -07:00
George Kalpakas 2d7ce00caa build(docs-infra): introduce new process for generating data for the events page (#45588)
This commit introduces a new process for generating data for the AIO
[events page](https://angular.io/events), which streamlines the process
and minimizes duplication and manual work. For more details, see
`aio/scripts/generate-events/README.md`.

PR Close #45588
2022-09-12 12:25:45 -07:00
Andrew Kushnir c9bdf9bab1 fix(common): rename rawSrc -> ngSrc in NgOptimizedImage directive (#47362) (#47396)
As an ongoing effort to stabilize the NgOptimizedImage API before existing the Developer Preview, this commit renames the `rawSrc` attribute used for the NgOptimizedImage selector matching to `ngSrc`. The `rawSrcset` is also renamed to `ngSrcset` for consistency.

The motivation for this change is to align the attribute name better with other built-in directives, such as `ngFor`, `ngIf`, `ngClass`, `ngStyle`, etc.

Note: this is technically a breaking change, but since the NgOptimizedImage directive is in the Developer Preview mode, we land the change in a patch branch.

PR Close #47362

PR Close #47396
2022-09-12 01:18:55 -07:00
Andrew Kushnir a61d553d73 refactor(common): drop unnecessary srcset sanitization (#47302)
This commit updates runtime and compiler to drop unnecessary `srcset` sanitization. The sanitization was needed previously for old browsers, but all modern browsers can handle `srcset` safely without any additional sanitization.

See prior discussion in https://github.com/angular/angular/pull/45182.

Resolves #45164.

PR Close #47302
2022-09-09 14:27:16 -07:00
Kristiyan Kostadinov 80c66a1e57 fix(forms): don't prevent default behavior for forms with method="dialog" (#47308)
The forms `submit` event handlers have a `return false` to prevent form submissions from reloading the page, however this also prevents the browser behavior for forms with `method="dialog"`.

These changes add an exception since the `method="dialog"` doesn't refresh the page.

Fixes #47150.

PR Close #47308
2022-09-09 14:26:49 -07:00
abergquist 055b4721b5 docs: Removed unnecessary blank line (#47329)
PR Close #47329
2022-09-09 14:26:23 -07:00
Andrew Kushnir 403b970e78 refactor(common): create an NgFor alias for NgForOf directive (#47309)
This commit adds a re-export of the `NgForOf` class as `NgFor` to improve the DX for cases when the directive is used as standalone. Developers can import `NgFor` class, which better matches the `ngFor` attribute used in a template.

PR Close #47309
2022-09-09 14:04:55 -07:00
Ikko Ashimine f4a65b2590 docs: fix typo in app.component.ts (#47384)
identifer -> identifier

PR Close #47384
2022-09-09 14:04:26 -07:00
Bob Watson 07a4882beb docs: increase aio-preview size limit (#47395)
The current limit of ~24MB is now too small to allow preview builds.
This update increases the limit to 35MB.

PR Close #47395
2022-09-09 14:01:00 -07:00
Pawel Kozlowski a3e1303f04 fix(core): imply @Optional flag when a default value is provided (#47242)
Unify default value handling across injector and node injector: as long
as a default value is provided it has the same effect as specifying the
@Optional() flag.

Fixes #47109

PR Close #47242
2022-09-08 09:34:18 -07:00
vyom1611 ea6f6eb79d docs: updates es version based on issue #47335 (#47379)
- Updates the documentation for typescript-configuration.md by updating target version from 'es2017' to 'es2020'

PR Close #47379
2022-09-08 09:33:53 -07:00
George Kalpakas 16ba9aaaef build: update dependency typescript to ~4.8.0 (#47367)
See associated pull request for more information.

> **Note**
> This is a backport of #47293 to the `14.2.x` branch.

PR Close #47367
2022-09-07 10:49:39 -07:00
Mariia Subkov b75a37491e docs: fix linter errors for accessibility page (#47327)
This addresses a part of the issue #47179.

PR Close #47327
2022-09-07 10:49:05 -07:00
Marc Wrobel c9666cc8e6 docs: fix minor typos in various documentations (#47290) (#47290)
PR Close #47290

PR Close #47290
2022-09-07 10:48:31 -07:00
Marc Wrobel 223e27ef57 docs(docs-infra): fix minor typos in angular.io (#47295) (#47295)
PR Close #47295

PR Close #47295
2022-09-07 10:47:21 -07:00
Andrew Kushnir 4002f0121e release: cut the v14.2.1 release 14.2.1 2022-09-07 10:34:36 -07:00
JoostK 0e35829580 fix(compiler): avoid errors for inputs with Object-builtin names (#47220)
Using raw objects as a lookup structure will inadvertently find methods defined on
`Object`, where strings are expected. This causes errors downstream when string
operations are applied on functions.

This commit switches over to use `Map`s in the DOM element schema registry to fix
this category of issues.

Fixes #46936

PR Close #47220
2022-09-06 11:55:13 -07:00
Bob Watson 124a600535 docs: add new words to vocabulary (#47344)
docs: add VMWare to spell check dictionary
docs: add rebase, rebases, rebased to spell check dictionary
docs: add repos to spell check dictionary
docs: change repeated string regex

PR Close #47344
2022-09-06 11:33:15 -07:00
Joe Martin (Crowdstaffing) 2b503c8da9 docs: Update markdown and formatting in image-directive topic. (#47259)
PR Close #47259
2022-09-06 11:30:50 -07:00
George Kalpakas 6091786696 fix(service-worker): include headers in requests for assets (#47260)
Previously, when requesting non-cached asset resources from the network,
the ServiceWorker would strip off all request metadata (including
headers). This was done in order to avoid issues with opaque responses,
but it turned out to be overly aggressive, breaking/worsening legit
usecases (such as requesting compressed data).

This commit fixes this by preserving the headers of such requests.

For reference, Workbox passes the original request as is. (See for
example the [NetworkFirst][1] strategy).

> **Note**
> Data requests (i.e. requests for URLs that belong to a data-group) are
  not affected by this. They already use the original resource as is.

[1]: https://github.com/GoogleChrome/workbox/blob/95f97a207fd51efb3f8a653f6e3e58224183a778/packages/workbox-strategies/src/NetworkFirst.ts#L90

Fixes #24227

PR Close #47260
2022-09-06 10:03:13 -07:00
George Kalpakas 65d936296d test(service-worker): simplify how redirects are defined in MockServerState (#47260)
Previously, the `MockServerStateBuilder#withRedirect()` method did two
things: (a) define a redirect from one path to another and (b) specify
the contents of the redirect destination. This was confusing, because it
deviated from the regular way of specifying file contents, which is via
a `MockFileSystem` instance.

This commit slightly simplifies the process of defining redirects by
having the `withRedirect()` method only define the redirect and let the
contents of the redirect destination be specified as usual via
`MockFileSystem`. This makes `MockFileSystem` the single source of truth
for file contents used with `MockServerState`.

PR Close #47260
2022-09-06 10:03:13 -07:00
George Kalpakas f5cfbe00df test(service-worker): fix default value of Request#credentials (omit --> same-origin) (#47260)
Previously, the default value of `MockRequest#credentials` (used in
testing) was set to `omit`. This was different than the default value
used in browsers, which is `same-origin` (see [Request docs on MDN][1])
and could lead to incorrect test results.

This commit changes the default value for `credentials` to `same-origin`
to match what would happen in the browser.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials

PR Close #47260
2022-09-06 10:03:13 -07:00
George Kalpakas 28d33505fd fix(service-worker): only consider GET requests as navigation requests (#47263)
Previously, the criteria for determining if a request was a
[navigation request][1] did not account for the request method. This
incorrectly identified HTML form submit POST requests as navigation
requests and served `index.html` instead of passing them through to the
server, thus breaking the form submission.

This commit fixes this by ensuring that only GET requests are considered
navigation requests.

> **Note**
> HTML forms with their method set to `GET` will still be affected by
> the issue. This is not a big concern, because using `GET` for form
> submission is quite uncommon and generally discouraged (due to
> limitations and security considerations).

[1]: https://angular.io/guide/service-worker-config#handling-navigation-requests

Fixes #36368

PR Close #47263
2022-09-06 10:02:11 -07:00
Angular Robot 56304d6b95 build: update io_bazel_rules_sass digest to f3874ae (#47292)
See associated pull request for more information.

PR Close #47292
2022-09-06 09:59:22 -07:00
Jeremy Elbourn d8cfb7cbe5 refactor(router): remove unnecesary null (#47238)
These null values are unused and unecessary. I suspect it's a remnant from when the codebase was transpiled to Dart.

PR Close #47238
2022-09-06 09:57:38 -07:00
Jeremy Elbourn f4825c7b9d refactor(common): remove unnecesary null (#47238)
These null values are unused and unecessary. I suspect it's a remnant from when the codebase was transpiled to Dart.

PR Close #47238
2022-09-06 09:57:38 -07:00
Jeremy Elbourn e6b6e89163 refactor(animations): remove unnecesary null (#47238)
These null values are unused and unecessary. I suspect it's a remnant from when the codebase was transpiled to Dart.

PR Close #47238
2022-09-06 09:57:38 -07:00
Jeremy Elbourn da7dc4670c refactor(forms): remove unnecesary null (#47238)
These null values are unused and unecessary. I suspect it's a remnant from when the codebase was transpiled to Dart.

PR Close #47238
2022-09-06 09:57:38 -07:00
jaybell 1875ce520a fix(common): use DOCUMENT token to query for preconnect links (#47353)
`PreconnectLinkChecker` checks to see if preconnect links have been added to the `<head>` element but uses `document` directly which does not exist when rendering in Angular Universal. This PR switches the `PreconnectLinkChecker` to use the `DOCUMENT` token instead so that the query works when SSR'ing

PR Close #47353
2022-09-06 09:56:27 -07:00
Kara Erickson c0d7ac9ec2 fix(common): improve formatting of image warnings (#47299)
This is a tiny fix to add paragraph breaks in
image distortion warnings to make them a bit
easier to read. With this change, the intrinsic
and rendered image sizes are printed on their
own lines instead of mid-paragraph.

PR Close #47299
2022-09-06 09:55:57 -07:00
Angular Robot 0d337c9ff2 build: update github/codeql-action action to v2.1.22 (#47223)
See associated pull request for more information.

PR Close #47223
2022-09-06 09:51:56 -07:00
Sabareesh Kappagantu b7c1d72a61 docs: fix linting errors in component overview guide (#47352)
PR Close #47352
2022-09-06 09:41:13 -07:00
Sabareesh Kappagantu 844f48ccdb docs: add substitution entry for camel case (#47351)
PR Close #47351
2022-09-06 09:40:40 -07:00
Sabareesh Kappagantu 57f13bfe73 docs: fix linting errors in class binding guide (#47351)
PR Close #47351
2022-09-06 09:40:40 -07:00
Bingo's Code f11d6ffbb1 docs: apply suggestions from code review (#47350)
Co-authored-by: Bob Watson <104218420+bob-watson@users.noreply.github.com>
PR Close #47350
2022-09-06 09:38:33 -07:00
Sabareesh Kappagantu 798a92db91 docs: fix linting errors in architecture components guide (#47350)
PR Close #47350
2022-09-06 09:38:32 -07:00
Sonu Sindhu be5180a6e0 docs: formatting issue (#47349)
There were some formatting issue and I just updated * to & in migration-undecorated-classes.md
PR Close #47349
2022-09-06 09:37:49 -07:00
Sabareesh Kappagantu 200ddce88f docs: update angular-package-format guide (#47342)
PR Close #47342
2022-09-06 09:35:39 -07:00
Bingo's Code 0ba363d5b5 docs: update aio/content/guide/angular-package-format.md with suggestion (#47342)
Co-authored-by: Bob Watson <104218420+bob-watson@users.noreply.github.com>

PR Close #47342
2022-09-06 09:35:39 -07:00