Commit Graph

25550 Commits

Author SHA1 Message Date
Andrew Kushnir 6a9b1e11c2 release: cut the v15.0.0-rc.3 release 15.0.0-rc.3 2022-11-09 13:40:24 -08:00
Andrew Scott 6ab9f03baf docs(router): small adjustments to router docs (#48009)
* Update extractedUrl documentation to point to the correct extract method
* Remove authService.redirectUrl from tour of heroes (it's not used anywhere)

PR Close #48009
2022-11-09 10:56:40 -08:00
Alan Agius 37a25486cf fix(core): add zone.js version 0.12.x as a valid peer dependency (#48002)
This commit adds `zone.js` version `0.12.x` as a valid peer dependency

PR Close #48002
2022-11-09 09:54:12 -08:00
Andrew Kushnir 28f289b825 fix(core): hardening attribute and property binding rules for <iframe> elements (#47964)
This commit updates the logic related to the attribute and property binding rules for <iframe> elements. There is a set of <iframe> attributes that may affect the behavior of an iframe and this change enforces that these attributes are only applied as static attributes, making sure that they are taken into account while creating an <iframe>.

If Angular detects that some of the security-sensitive attributes are applied as an attribute or property binding, it throws an error message, which contains the name of an attribute that is causing the problem and the name of a Component where an iframe is located.

BREAKING CHANGE:

Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.

PR Close #47964
2022-11-09 00:47:57 -08:00
Angular Robot 54d0981871 build: update dependency google-closure-compiler to v20221102 (#47992)
See associated pull request for more information.

PR Close #47992
2022-11-08 12:39:21 -08:00
Andrew Scott 2efcc26bb6 docs(router): Update router docs to use guard functions instead of @Injectable (#47989)
This commit updates various router docs to use the functional style
guards instead of the `@Injectable` style.

PR Close #47989
2022-11-08 11:35:08 -08:00
Alex Castle a93a1a5759 docs(common): Merge two ngOptimizedImage docs into one (#47990)
Move the old image-directive-setup.md documentation page to be a section on the main image-directive.md docs page

PR Close #47990
2022-11-08 10:36:06 -08:00
Dylan Hunn ae29f98c20 fix(forms): Runtime error pages must begin with leading zero (#47991)
I recently checked in a new error guide. The corresponding page must have a leading zero because it is a runtime error. Otherwise links to this error guide will be invalid.

PR Close #47991
2022-11-08 10:35:09 -08:00
Andrew Scott 02918c9b5a test(router): Move test for redirect under correct describe block (#47993)
This moves a redirect test to be grouped with other redirect tests.

PR Close #47993
2022-11-08 10:34:23 -08:00
Dylan Hunn 2625dc1312 fix(forms): Improve a very commonly viewed error message by adding a guide. (#47969)
[A Github issue](https://github.com/angular/angular/issues/43821) about an arcane-sounding Forms error is one of the repo's top-ten most visited pages. This converts the error to `RuntimeErrorCode` and adds a dedicated guide to explain how to solve it.

PR Close #47969
2022-11-07 16:00:06 -08:00
Kristiyan Kostadinov 3e490fab1b refactor(core): remove duplicate createRenderer call (#47981)
Fixes that we were calling `createRenderer` even though we had one already. This likely wasn't a performance issue since the renderer factory caches the renderer, but it's still better to reuse it to avoid confusion in the future.

Fixes #47980.

PR Close #47981
2022-11-07 12:33:26 -08:00
Matthieu Riegler 76b64f659c refactor(router): Simplify routerLink selector (#47941)
Since the merge of `RouterLinkWithHref` into `RouterLink` there is no need for a complex selector.

PR Close #47941
2022-11-07 12:32:43 -08:00
Andrew Scott fb7318cb86 refactor(router): Remove code to support relativeLinkResolution (#47933)
The public API for enabling this option has already been removed. This change
updates the internal Router code to not include any logic to support it.

PR Close #47933
2022-11-07 09:26:19 -08:00
Paul Gschwendtner 08ee9b4b26 build: update ng-dev configuration to account for caretaker note label change (#47987)
The caretaker note label has been renamed to the new standardized label
name. This commit updates the ng-dev caretaker check configuration to
account for this.

Also the merge assistance queue query is updated to only show PRs marked
as ready for merge. Other PRs with just a caretaker note should not be
of interest for the caretaker yet.

PR Close #47987
2022-11-07 09:25:40 -08:00
Alan Agius 46c0576efe docs: update polyfills sections for version 15 (#47975)
This commit updates the polyfills section in the browsers support guide. The `polyfills.ts` is no longer generated in version 15+

PR Close #47975
2022-11-07 09:25:04 -08:00
Albert Szekely b8a6f7491b fix(router): fix redirectTo on named outlets - resolves #33783 (#47927)
fix(router): fix redirectTo on named outlets - resolves #33783

PR Close #47927
2022-11-04 09:30:32 -07:00
Andrew Scott 8f38bbaf26 refactor(router): Warn when provideRoutes is used without provideRouter (#47896)
Due to being only 1 letter away from `provideRouter`, it is quite
possible that developers may accidentally use `provideRoutes` rather
than `provideRouter` in the `boostrapApplication` function. This change
will warn developers when `provideRoutes` is used without the `Router`.

PR Close #47896
2022-11-04 09:29:24 -07:00
Andrew Scott 80dff09134 docs(router): deprecate provideRoutes function (#47896)
This function is too similar in name to the new `provideRouter` and can
lead to misconfiguring the router. The function itself is just a small
wrapper around `{provide: ROUTES, multi: true, useValue: routes}`. It is
rarely necessary to provide routes in this way. The harm `provideRoutes`
will cause due to being only 1 letter away from `provideRouter` vastly
outweighs the benefit of a slightly shorter provider.

PR Close #47896
2022-11-04 09:29:24 -07:00
Alex Rickabaugh e7b48da713 fix(http): rename withLegacyInterceptors to withInterceptorsFromDi (#47901)
This rename reflects what the function actually does. Although the intention
is still not to have two different interceptor mechanisms, that is now
communicated in the docs for the function instead of in its name.

Fixes #47764

PR Close #47901
2022-11-03 17:54:04 -07:00
Alex Rickabaugh fe0075bdea docs(http): add public API tags and jsdoc for provideHttpClient (#47901)
This commit adds documentation and API tagging for `provideHttpClient` and
the `with*` feature functions.

PR Close #47901
2022-11-03 17:54:03 -07:00
Doug Parker 1d02e6ad68 build: add --keep_going to components tests. (#47958)
This configures CI to run all the tests and report all the failures instead of aborting after the first one.

PR Close #47958
2022-11-03 17:52:40 -07:00
Alan Agius b4706cf3e8 docs: add searchKeywords in testing guide (#47953)
This is to push up the page in search results when searching for these terms.

Ex: currently when searching using the term `test` this page is displayed at the middle of the results.

PR Close #47953
2022-11-03 17:51:59 -07:00
Peter Scriven cc4f5e6663 docs: fix lint errors for change detection guides (#47952)
PR Close #47952
2022-11-03 17:51:27 -07:00
Alan Agius f35c46a894 docs: remove CI testing setups (#47940)
This section is unnecessary given that all is needed for the user is to run `ng test`, and is also tricky to maintain (Node was hard coded to v14 still).

We have no mechanism of testing or verifying these setups, and we have no motivation to do so.

Users should see their CI providers documentation Any preconfigured Node setup is going to suggest `ng test`, which should "just work" for Angular.

PR Close #47940
2022-11-03 17:50:52 -07:00
Alan Agius f9888d928e docs: update testing document to include karma config (#47940)
In version 15, the Angular CLI will no longer generate a `karma.conf.js` by default.

This commit updates the testing document to include an example of how to include a custom `karma.conf.js`.  Also, we update several parts of the documentation which were outdated.

PR Close #47940
2022-11-03 17:50:51 -07:00
Andrew Kushnir c097c5fbcb refactor(common): improve the NgOptimizedImage error message related to changing inputs (#47926)
This commit updates the error message thrown by the NgOptimizedImage directive, when it detects a situation
when inputs change after initial rendering.

The list of inputs was also updated to include all inputs added recently.

PR Close #47926
2022-11-03 17:50:22 -07:00
Alan Agius a016508768 docs: remove redirects to no longer existing page (#47929)
This redirect is broken as this page no longer exists.

PR Close #47929
2022-11-03 17:47:55 -07:00
Markus Eckstein 164a1713d5 docs: fix missing word (#47876)
PR Close #47876
2022-11-03 17:47:28 -07:00
Alan Agius 604d89eef9 docs: update examples to reflect changes in Angular CLI version 15. (#47904)
These changes include
- Remove the usage of `enableProdMode`
- Remove `test.ts`, `polyfills.ts`, `karma.conf.js` and environment files which are no longer generated by default

PR Close #47904
2022-11-03 17:46:46 -07:00
Alan Agius 83cec3de51 docs: update analytics gathering documentation (#47840)
Currently there are 3 pages for analytics gathering information. Most of the information is duplicate.

With this change we remove the duplicate pages and outdated content to reflect the changes in version 15.

PR Close #47840
2022-11-03 17:45:35 -07:00
abergquist 7a33d395b3 docs: made code appear better, etc. (#47336)
Made code appear better and resolved some minor grammatical opportunities/issues.
PR Close #47336
2022-11-03 17:44:57 -07:00
Andrew Kushnir 8a19bc63ea release: cut the v15.0.0-rc.2 release 15.0.0-rc.2 2022-11-03 17:32:10 -07:00
Andrew Kushnir 173dde7681 Revert "fix(core): hardening rules related to the attribute order on iframe elements (#47935)" (#47961)
This reverts commit d4b3c0b47c.

PR Close #47961
2022-11-03 17:03:43 -07:00
Andrew Kushnir d4b3c0b47c fix(core): hardening rules related to the attribute order on iframe elements (#47935)
This commit updates the logic related to the attribute order on iframes and makes the rules more strict. There is a set of iframe attributes that may affect the behavior of an iframe, this change enforces that these attributes are applied before an `src` or `srcdoc` attributes are applied to an iframe, so that they are taken into account.

If Angular detects that some of the attributes are set after the `src` or `srcdoc`, it throws an error message, which contains the name of ann attribute that is causing the problem and the name of a Component where an iframe is located. In most cases, it should be enough to change the order of attributes in a template to move the `src` or `srcdoc` ones to the very end.

BREAKING CHANGE:

Existing iframe usages may have `src` or `srcdoc` preceding other attributes. Such usages may need to be updated to ensure compliance with the new stricter rules around iframe bindings.

PR Close #47935
2022-11-02 07:23:42 -07:00
mgechev e63574774e docs: update roadmap as of q4 2022 (#47910)
PR Close #47910
2022-11-01 04:46:49 -07:00
Kristiyan Kostadinov d5cd79f885 perf(platform-browser): resolve memory leak when using animations with shadow DOM (#47903)
`AnimationRendererFactory` maintains a map between a renderer delegate and the animations renderer it corresponds to, but the renderers are never removed from the map. This leads to memory leaks when used with the `ShadowDom` view encapsulation, because the specific renderer keeps a references to its shadow root which in turn references all the elements in the view.

These changes resolve the leak by clearing the reference when the animations renderer is destroyed.

Fixes #47892.

PR Close #47903
2022-11-01 04:46:09 -07:00
Alex Rickabaugh e683298be6 docs(core): update standalone docs for provideRouter (#47902)
This commit updates the standalone components guide on AIO to showcase the
new `provideRouter` API. Previously the guide demonstrated configuring the
router via `importProvidersFrom(RouterModule.forRoot(...))`. A new section
was added to ensure `importProvidersFrom` was still shown in an example.

PR Close #47902
2022-11-01 04:45:20 -07:00
Paul Gschwendtner 99597c8c57 refactor(bazel): enable typescript strictness flags for package (#47893)
No longer maintains a separate tsconfig for the Bazel package. This
seems to be a legacy artifact back when ngc-wrapped was put into GitHub.

We now use the canonical repository Bazel tsconfig. This commit also
fixes all strictness-related errors and makes ngc-wrapped compatible.

PR Close #47893
2022-11-01 04:44:29 -07:00
Paul Gschwendtner f99cc40c5d refactor(compiler-cli): update emit signature to support for strongly typed emitCallback (#47893)
Currently `ngc-wrapped` mostly relies on any casts/or disabled
strictness checks to be able to use `tsickle`'s emit callback and
emit result merging for ngtsc. We should change this so that supertypes
of `ts.EmitResult` can be used in these optional callbacks- allowing us
to enable strictness checks in `packages/bazel/...` too.

PR Close #47893
2022-11-01 04:44:29 -07:00
Virginia Dooley 623602fc3a docs: Linting corrections. Restructuring or rewording sentences to be shorter and clearer. (#47897)
PR Close #47897
2022-10-28 02:37:47 -07:00
Alan Agius b3ea67e8a7 docs: improve grammer in CLI command template (#47891)
Before
```
This command has the following commands:
```

Now
```
This command has the following sub-commands:
```

PR Close #47891
2022-10-28 02:29:08 -07:00
Alan Agius 31a7ce1268 fix(platform-server): call onSerialize when state is empty (#47888)
Commit https://github.com/angular/angular/commit/a0b2d364156eed0d33831c37b00ea5c58ff4bbec#diff-3975e0ee5aa3e06ecbcd76f5fa5134612f7fd2e6802ca7d370973bd410aab55cR25-R31 changed the serialization phase logic so
that when the state is empty the script tag is not added to the document. As a side effect, this caused the `toJson` not called which caused the `onSerialize` callbacks also not to be called.
These callbacks are used to provide the value for a key when `toJson` is called. Example: https://github.com/ngrx/platform/issues/101#issuecomment-351998548

Closes #47172

PR Close #47888
2022-10-28 02:27:57 -07:00
Charles Lyding c7bc47c509 docs: update CLI related deprecation information (#47885)
There are no new CLI related deprecations for v15. However, multiple
features listed in the deprecation guide have since been removed and
are now also removed from the relevant sections of the guide.

PR Close #47885
2022-10-27 18:03:16 +02:00
Pawel Kozlowski 96c0e42e61 fix(core): allow readonly arrays for standalone imports (#47851)
Standalone components should support readonly arrays in the
`@Component.imports`.

Fixes #47643

PR Close #47851
2022-10-27 09:29:24 +02:00
Pawel Kozlowski f24da6baad release: cut the v15.0.0-rc.1 release 15.0.0-rc.1 2022-10-26 20:34:19 +02:00
Andrew Scott ea7ff35b30 Revert "build: add atscott to unavailable list for pullapprove (#47658)" (#47877)
This reverts commit cf88a3ce20.

PR Close #47877
2022-10-26 19:00:55 +02:00
George Kalpakas 603194ee20 build(docs-infra): upgrade cli command docs sources to 50d813140 (#47870)
Updating [angular#15.0.x](https://github.com/angular/angular/tree/15.0.x) from
[cli-builds#15.0.x](https://github.com/angular/cli-builds/tree/15.0.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/46cb32b90...50d813140):

**Modified**
- help/analytics.json
- help/config.json

PR Close #47870
2022-10-26 17:35:02 +02:00
Angular Robot 5dadec56e6 build: update cross-repo angular dependencies (#47874)
See associated pull request for more information.

PR Close #47874
2022-10-26 16:33:21 +02:00
Angular Robot d75e3da429 build: update bazel setup to v5.7.0 (#47436)
See associated pull request for more information.

PR Close #47436
2022-10-26 15:43:20 +02:00
Angular Robot ebd2ddbbd1 build: update cross-repo angular dependencies (#47846)
See associated pull request for more information.

PR Close #47846
2022-10-26 14:12:24 +02:00