Commit graph

29561 commits

Author SHA1 Message Date
Andrew Scott
85a932cc80 docs(router): deprecate setupTestingRouter (#48008)
The `setupTestingRouter` function is not necessary. The `Router` can be fully
initialized through the DI configuration in the same way as it is in
production. Tests should use `provideRouter` or `RouterTestingModule`.

PR Close #48008
2022-11-09 11:07:43 -08:00
Andrew Scott
f5d0c80622 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
046ce43388 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:10 -08:00
Andrew Kushnir
2d8d562604 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:56 -08:00
Angular Robot
30177a41f9 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
ee13ab2b93 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
6438f69f28 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
8e6ec72beb 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
2ae36142a6 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:21 -08:00
Dylan Hunn
604cdb7307 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
917816f672 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:23 -08:00
Matthieu Riegler
ea3374c16b 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:42 -08:00
Andrew Scott
99898f3370 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
64d6db67d4 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
4d5e5ae54a 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
Joey Perrott
f70f50aef4 build: fix invalid yaml (#47977)
Fix the invalid yaml for the assistant to the branch manager action

PR Close #47977
2022-11-04 12:56:37 -07:00
Albert Szekely
2ed5aeffd8 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:29 -07:00
Andrew Scott
bc0fc02016 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
6b659d08ef 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
Joey Perrott
549af69524 build: fix file extension for github action (#47976)
Fix the file extension for the new assistant-to-the-branch-mananager action

PR Close #47976
2022-11-04 09:27:15 -07:00
Joey Perrott
ad8ccedeca build: enable the branch manager action in the repo (#47942)
Set up the branch manager action to automatically monitor if a pull request is able to merge into its target branches

PR Close #47942
2022-11-03 17:54:41 -07:00
Alex Rickabaugh
febf29dd51 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:03 -07:00
Alex Rickabaugh
cf6c819489 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
487ad9d0bb 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:38 -07:00
Alan Agius
5b00e1ffa2 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:57 -07:00
Peter Scriven
f01ea3c9dd docs: fix lint errors for change detection guides (#47952)
PR Close #47952
2022-11-03 17:51:25 -07:00
Alan Agius
665af467d8 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:51 -07:00
Alan Agius
062e17b65d 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
ec43991665 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
Dylan Hunn
ce8160ecb2 fix(language-service): Prevent crashes on unemitable references (#47938)
Currently, when generating an import of a selector, the language service might crash if the compiler cannot emit a reference to the new symbol's file from the target component's file. (This might happen because the two are the same file.) We should handle that case by reusing the existing import if possible, or otherwise failing gracefully.

PR Close #47938
2022-11-03 17:49:11 -07:00
Alan Agius
760cd78e94 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:53 -07:00
Markus Eckstein
bd04173910 docs: fix missing word (#47876)
PR Close #47876
2022-11-03 17:47:26 -07:00
Alan Agius
32135b27a1 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
c9a6f95c9d 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
c82c1a5dfc 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:55 -07:00
Andrew Kushnir
c82de11506 docs: release notes for the v15.0.0-rc.2 release 2022-11-03 17:40:17 -07:00
Andrew Kushnir
35e44b83ad docs: release notes for the v14.2.9 release 2022-11-03 16:46:56 -07:00
Andrew Kushnir
13b863a1bf Revert "fix(core): hardening rules related to the attribute order on iframe elements (#47935)" (#47959)
This reverts commit 2d08965b1a.

The reason for revert is that we've identified some issues with implementation. The issues will get addressed soon and the fix would be re-submitted.

PR Close #47959
2022-11-03 11:20:32 -07:00
Andrew Kushnir
2d08965b1a 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 09:07:31 -07:00
mgechev
0bc4405860 docs: update roadmap as of q4 2022 (#47910)
PR Close #47910
2022-11-01 04:46:48 -07:00
Kristiyan Kostadinov
925dd73c7e 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:08 -07:00
Alex Rickabaugh
0d49fe01ea 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
11288f2504 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:28 -07:00
Paul Gschwendtner
39b898d0cd 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:28 -07:00
Virginia Dooley
37ba610449 docs: Linting corrections. Restructuring or rewording sentences to be shorter and clearer. (#47897)
PR Close #47897
2022-10-28 02:37:46 -07:00
JiaLiPassion
24c93bbd87 release: cut the zone.js-0.12.0 release (#47895)
PR Close #47895
2022-10-28 02:36:25 -07:00
Alan Agius
73693be516 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:07 -07:00
Alan Agius
790ee17e80 fix(platform-server): call onSerialize when state is empty (#47888)
Commit a0b2d36415 (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:56 -07:00
Charles Lyding
e9d78d080f 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:15 +02:00
Pawel Kozlowski
2d085dc037 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