Commit graph

25771 commits

Author SHA1 Message Date
Andrew Scott
27eaded62d fix(compiler-cli): Produce diagnostic rather than crash when using invalid hostDirective (#48314)
Because the language service uses the compiler, we try to produce as
much useful information as possible rather than throwing hard errors.
Hard errors cause the compiler to crash. While this can be acceptable
when compiling a program as part of a regular build, this is undesirable
for the language service.

PR Close #48314
2022-12-01 13:43:30 -08:00
Matthieu Riegler
38421578a2 feat(core): Make the isStandalone() function available in public API (#48114)
This commit updates an internal `isStandalone` function and exposes it as a public API,
so that it can be used in applications code.

fixes #47919

PR Close #48114
2022-12-01 13:21:21 -08:00
piyush132000
b4ab710990 docs: removed empty method (#48236)
I removed empty methods from a file and unnecessary import and added export keyword for exportng module

PR Close #48236
2022-12-01 09:39:09 -08:00
Andrew Scott
80297348e8 refactor(router): Remove assignExtraOptionsToRouter helper function (#48215)
This commit removes the unnecessary `assignExtraOptionsToRouter` helper
function. This helper is not necessary because the options can be
retrieved from DI and assigned during the construction on the Router.

PR Close #48215
2022-12-01 09:38:26 -08:00
Andrew Scott
a0551ee761 refactor(router): Eliminate constructor parameters in Router class (#48215)
The Router constructor and `setupRouter` factory mainly exist as a
legacy configuration. Since the Router's creation, the style in Angular
has evolved quite a bit. This commit eliminates and cleans up some
unnecessary comlicated code paths related to the router
constructor/factory.

Note that there are edits to the `setupTestingRouter` that could be seen
as breaking. However, it is not for several reasons:

1. The function is documented as a factory function. If used as
   documented, the parameters should match what's available in DI
2. The function is totally unused by the Router itself and is not used
   in g3 either. I believe it was made publicApi by an error when
   updating documentation annotations long ago.

PR Close #48215
2022-12-01 09:38:26 -08:00
Andrew Scott
4d398a0bab release: cut the v15.1.0-next.1 release 2022-11-30 12:37:21 -08:00
Andrew Scott
33fcb0f171 docs: release notes for the v15.0.2 release 2022-11-30 12:22:52 -08:00
Angular Robot
b935255ef9 build: update all non-major dependencies (#48271)
See associated pull request for more information.

PR Close #48271
2022-11-30 09:29:26 -08:00
Pawel Kozlowski
da7318e2fa refactor(core): remove debug data structures (#48281)
This commit removes several debug data structures from
the framework runtime. The data structures in question
were introduced in the framework in the past with the
idea of having debugging aid in the form of the human-redable
data structures. It turned out that in practice those
data structures were not used (most of the fwk developers
didn't even know about their existence!), yet we kept
paying the price of maintaining those duplicated (prod
and debug) version of the data structures.

PR Close #48281
2022-11-30 09:27:59 -08:00
Angular Robot
e777588b05 build: update dependency @types/uuid to v9 (#48285)
See associated pull request for more information.

PR Close #48285
2022-11-30 09:27:04 -08:00
Andrew Scott
d5aaf5523d refactor(router): Remove DeprecatedLoadChildren (#48292)
This option has already been removed from availability externally. Internally, the last use has been removed
for the type on Route.loadChildren. More testing will be necessary to verify nothing relies on the other
code paths.

PR Close #48292
2022-11-30 08:29:11 -08:00
Andrew Scott
0ff5d972cd refactor(router): Move navigationId handling to the transition manager (#48202)
The navigationId is really just a count of how many navigations have been
processed through the navigation pipeline. This tracking should be
done as part of the navigation transition handler

PR Close #48202
2022-11-29 14:55:25 -08:00
Andrew Scott
55ae4aa234 refactor(router): Move transition subject into transition handler (#48202)
The navigation transitions subject belongs in the navigation transitions handler
rather than the Router.

PR Close #48202
2022-11-29 14:55:25 -08:00
Andrew Scott
edd5192264 refactor(router): directly inject internal properties from DI (#48202)
Rather than accessing router internal properties that are available in DI,
this commit directly injects those dependencies in the navigation transition
handler. Note that there are several other items that _should_ be injectable
in DI (like the TitleStrategy) but because those are part of the Router public
interface and writeable(!), they might be changed during runtime. We
have to get these other items from the Router for now...

PR Close #48202
2022-11-29 14:55:25 -08:00
Andrew Scott
17b76998ae refactor(router): Get EnvironmentInjector directly in transition handler (#48202)
Remove the NgModuleRef from the internal interface of the Router. This
was only used to get the injector (equivalent to EnvironmentInjector).
Instead, the navigation transition handler can directly inject the
EnvironmentInjector

PR Close #48202
2022-11-29 14:55:25 -08:00
Andrew Scott
7b1d63e939 refactor(router): Move configLoader to transition handler (#48202)
The ConfigLoader is only used as part of the navigation transition.
Moving the loader there completes the removal of event triggering in
the router code. This all now lives in the transition handler (plus
the router scroller, but let's ignore that...).

PR Close #48202
2022-11-29 14:55:25 -08:00
Andrew Scott
6810a04143 refactor(router): Move events subject to transition class (#48202)
The events observable is part of the lifecycle of a navigation. This should
be contained in the NavigationTransitions class rather than the Router.
This Subject is re-exported by the router as an observable to maintain
the public API

PR Close #48202
2022-11-29 14:55:25 -08:00
Andrew Scott
b02df19934 refactor(router): remove malformedUriHandler from interface passed to transitions (#48202)
The malformedUriHandler is not used during the navigation transition and can be removed form the interface

PR Close #48202
2022-11-29 14:55:25 -08:00
Angular Robot
208f52209b build: update eslint dependencies (#48216)
See associated pull request for more information.

PR Close #48216
2022-11-29 12:29:46 -08:00
Alan Agius
5f7f2d8673 build: remove codelyzer from aio dependencies (#48216)
This package is no longer used.

PR Close #48216
2022-11-29 12:29:46 -08:00
Alan Agius
612eaca3c5 build: update cross-repo dependencies to latest stable version (#48216)
With this change we update the cross-repo dependencies to the latest stable version

PR Close #48216
2022-11-29 12:29:46 -08:00
Angular Robot
d4c3584d88 build: update github/codeql-action action to v2.1.34 (#48272)
See associated pull request for more information.

PR Close #48272
2022-11-29 12:29:20 -08:00
Derek Cormier
535838d67b build(bazel): fix aio deploy script (#48265)
Move the copy of the bazel dist folder to the firebase dist folder
earlier on in the process so that any checks operate out of a single
folder.

PR Close #48265
2022-11-29 20:04:24 +00:00
Rokas Brazdžionis
ae712ef6dd docs: update date pipe default timezone injection token reference (#48274)
replace deprecated `DATE_PIPE_DEFAULT_TIMEZONE` with `DATE_PIPE_DEFAULT_OPTIONS`
PR Close #48274
2022-11-29 09:40:28 -08:00
Paul Gschwendtner
35151ea0ca build: hide --loader warning when ESM import patch is installed (#48282)
Similar to the Rules NodeJS require patch, we have an ESM import patch
as of the AIO Bazel migration (to support ESM scripts better).

This script uses `--loader`, an experimental NodeJS flag. This is
similar to how `ts-node` uses it. We should disable the warnings
as it results in a lot of unreadable Bazel output and the warnings
are okay to be ignored. Note that we cannot fine-grain disable
the specific warning so all others would be disabled too.

Realistically we haven't seen any in the past and long-term we will
be not relying on patched resolution anyway (looking at `rules_js`).

PR Close #48282
2022-11-29 09:39:26 -08:00
Andrew Scott
aa66f703d2 Revert "refactor(router): remove malformedUriHandler from interface passed to transitions (#48202)" (#48269)
This reverts commit 17aba7c4c0.

PR Close #48269
2022-11-28 16:52:08 -08:00
Andrew Scott
db1c73c431 Revert "refactor(router): Move events subject to transition class (#48202)" (#48269)
This reverts commit f555050f9a.

PR Close #48269
2022-11-28 16:52:07 -08:00
Andrew Scott
a765876f97 Revert "refactor(router): Move configLoader to transition handler (#48202)" (#48269)
This reverts commit bec2e79e81.

PR Close #48269
2022-11-28 16:52:07 -08:00
Andrew Scott
5a1bb6d595 Revert "refactor(router): Get EnvironmentInjector directly in transition handler (#48202)" (#48269)
This reverts commit 008a1b0e44.

PR Close #48269
2022-11-28 16:52:07 -08:00
Andrew Scott
7a23ba99b5 Revert "refactor(router): directly inject internal properties from DI (#48202)" (#48269)
This reverts commit b17dc7a7f7.

PR Close #48269
2022-11-28 16:52:07 -08:00
Andrew Scott
98abd61643 Revert "refactor(router): Move transition subject into transition handler (#48202)" (#48269)
This reverts commit ca6b766e47.

PR Close #48269
2022-11-28 16:52:07 -08:00
Andrew Scott
88ccc75cc4 Revert "refactor(router): Move navigationId handling to the transition manager (#48202)" (#48269)
This reverts commit afc668acd5.

PR Close #48269
2022-11-28 16:52:07 -08:00
Bob Watson
2b55f4bf0d docs: update docs to use new build and test commands (#48266)
PR Close #48266
2022-11-28 15:33:53 -08:00
Matthieu Riegler
3f954278e7 test(core): remove some ViewEngine related test code (#48238)
Some tests had comments relating to ViewEngine that were not needed anymore since VE was dropped.

PR Close #48238
2022-11-28 13:08:22 -08:00
Matthieu Riegler
dac5860a47 refactor(router): remove non-null assertions (#48244)
As part of #24571, removing non-null assertions (where appropriate)

PR Close #48244
2022-11-28 13:07:59 -08:00
Andrew Scott
afc668acd5 refactor(router): Move navigationId handling to the transition manager (#48202)
The navigationId is really just a count of how many navigations have been
processed through the navigation pipeline. This tracking should be
done as part of the navigation transition handler

PR Close #48202
2022-11-28 10:53:26 -08:00
Andrew Scott
ca6b766e47 refactor(router): Move transition subject into transition handler (#48202)
The navigation transitions subject belongs in the navigation transitions handler
rather than the Router.

PR Close #48202
2022-11-28 10:53:26 -08:00
Andrew Scott
b17dc7a7f7 refactor(router): directly inject internal properties from DI (#48202)
Rather than accessing router internal properties that are available in DI,
this commit directly injects those dependencies in the navigation transition
handler. Note that there are several other items that _should_ be injectable
in DI (like the TitleStrategy) but because those are part of the Router public
interface and writeable(!), they might be changed during runtime. We
have to get these other items from the Router for now...

PR Close #48202
2022-11-28 10:53:26 -08:00
Andrew Scott
008a1b0e44 refactor(router): Get EnvironmentInjector directly in transition handler (#48202)
Remove the NgModuleRef from the internal interface of the Router. This
was only used to get the injector (equivalent to EnvironmentInjector).
Instead, the navigation transition handler can directly inject the
EnvironmentInjector

PR Close #48202
2022-11-28 10:53:26 -08:00
Andrew Scott
bec2e79e81 refactor(router): Move configLoader to transition handler (#48202)
The ConfigLoader is only used as part of the navigation transition.
Moving the loader there completes the removal of event triggering in
the router code. This all now lives in the transition handler (plus
the router scroller, but let's ignore that...).

PR Close #48202
2022-11-28 10:53:26 -08:00
Andrew Scott
f555050f9a refactor(router): Move events subject to transition class (#48202)
The events observable is part of the lifecycle of a navigation. This should
be contained in the NavigationTransitions class rather than the Router.
This Subject is re-exported by the router as an observable to maintain
the public API

PR Close #48202
2022-11-28 10:53:26 -08:00
Andrew Scott
17aba7c4c0 refactor(router): remove malformedUriHandler from interface passed to transitions (#48202)
The malformedUriHandler is not used during the navigation transition and can be removed form the interface

PR Close #48202
2022-11-28 10:53:26 -08:00
Andrew Scott
3000f90632 refactor(router): move lastSuccesfulNavigation to navigation transitions (#48202)
lastSuccessfulNavigation is only used in the transition so it does not need to live in Router

PR Close #48202
2022-11-28 10:53:26 -08:00
Kristiyan Kostadinov
7b6392e464 build: update angular version of in-memory-web-api (#48218)
Bumps up the required Angular version of `angular-in-memory-web-api` to 15.

Fixes #48197.

PR Close #48218
2022-11-28 09:13:46 -08:00
piyush132000
fcf857209f docs: removed empty methods (#48230)
I removed empty methods from a file and unnecessary import

PR Close #48230
2022-11-28 09:13:19 -08:00
Alan Agius
ad483007b4 refactor(platform-server): remove Injector dependency for initDominoAdapter factory (#48231)
The injector is not used by this factory.

PR Close #48231
2022-11-28 09:12:35 -08:00
Alan Agius
7368ee1e5c refactor(core): remove unused private APIs (#48234)
Remove private code which is not used by the Framework.

PR Close #48234
2022-11-28 09:11:25 -08:00
Aristeidis Bampakos
379b2702d8 docs: update deployment to GitHub Pages (#48239)
The GitHub Pages section has been moved to the left sidebar of the Settings page.
PR Close #48239
2022-11-28 09:11:00 -08:00
Andrew Scott
228e992db7 docs(router): Deprecate canLoad guards in favor of canMatch (#48180)
As mentioned in #46021, `canMatch` guards can replace `canLoad`. There
are slight differences between the two but the purpose of preventing
user access to feature modules is still achievable. There are several
reasons keeping `CanLoad` around is detrimental to the API surface:

* Lazy loading should not be an architectural feature of an application. It's an
optimization you do for code size. That is, there should not be an architectural
feature in the router to directly specifically control whether to lazy load something or
not based on conditions such as authentication. This slightly
different from the `canMatch` guard: the guard controls whether
you can use the route at all and as a side-effect, whether we download the code.
`CanLoad` only specified whether the code should be downloaded so `canMatch` is
more powerful and more appropriate.

* The naming of `CanLoad` will be potentially misunderstood for the `loadComponent` feature.
Because it applies to `loadChildren`, it feels reasonable to think that it will
also apply to `loadComponent`. This isn’t the case: since we don't need
to load the component until right before activation, we defer the
loading until all guards/resolvers have run.

* Unnecessary API surface bloat where two features (CanMatch and CanLoad) do
essentially the same thing. This affects code size for supporting two
nearly identical features as well as the learning and teaching journey
for them both.

* `CanLoad` guards have the downside of _only_ being run once to prevent
loading child routes. Once that passes and children are loaded, the
guard never runs again. As a result, developers need to always provide
_both_ canLoad and a canActivate in case the answer to the guard flips
back to `false`. This is not the case for `canMatch`, which will run
on every navigation.

DEPRECATED: CanLoad guards in the Router are deprecated. Use CanMatch
instead.

PR Close #48180
2022-11-28 09:04:08 -08:00
Derek Cormier
12db492233 build(bazel): fix pwa test metrics
Prior to the AIO bazel migration, the pwa test script only tested the
pwa metric. A bug was introduced where the score target was used for all
metrics, causing the AIO deploy test to fail.
2022-11-23 14:57:32 -07:00