Commit graph

29561 commits

Author SHA1 Message Date
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
Derek Cormier
b258b32f55 build(bazel): copy dist folder to aio for firebase deployment
Firebase requires the distributable to be in the same folder as
firebase.json.
2022-11-23 14:43:08 -07:00
Derek Cormier
e864254224 build(bazel): point to correct dist folder in firebase config (#48211)
Point to the AIO dist folder in the Bazel output tree.

PR Close #48211
2022-11-23 12:12:29 -08:00
JoostK
7d88700933 fix(compiler-cli): accept inheriting the constructor from a class in a library (#48156)
The stricter checks under `strictInjectionParameters` in Angular 15 now enforce that
an inherited constructor must be compatible with DI, based on whether all parameters
are valid injection tokens. There is an issue when the constructor is inherited from
a class in a declaration file though, as information on the usage of `@Inject()` is
not present within a declaration file. This means that this stricter check cannot be
accurately performed, resulting in false positives.

This commit disables the stricter check to behave the same as it did prior to
Angular 15, therefore avoiding the false positive.

Fixes #48152

PR Close #48156
2022-11-23 12:10:37 -08:00
Derek Cormier
2e38af1f48 build(bazel): fix aio deployment unit tests
Missing a spy for the new chmod call.
2022-11-23 12:39:23 -07:00
Derek Cormier
776882ae7e build(bazel): remove write protection on aio dist folder for deployment
Deploy script adds extra files and needs write access.
2022-11-23 12:09:51 -07:00
Angular Robot
73ad3bb9c8 build: update scorecard action dependencies (#47866)
See associated pull request for more information.

PR Close #47866
2022-11-23 10:54:13 -08:00
Angular Robot
a5c4e3d578 build: update bazel setup to v5.7.1 (#47884)
See associated pull request for more information.

PR Close #47884
2022-11-23 10:53:00 -08:00
Angular Robot
131bfc5bad build: update io_bazel_rules_sass digest to a2fce75 (#47970)
See associated pull request for more information.

PR Close #47970
2022-11-23 10:52:30 -08:00
Derek Cormier
6360e38d07 build(bazel): fix AIO deployment unit tests (#48206)
Forgot to update the dist path in these tests.

PR Close #48206
2022-11-23 18:30:44 +00:00
Derek Cormier
10f1e0fb3f build(bazel): fix dist dir in AIO deploy script (#48203)
The script is run cd'ed into aio so the path to the Bazel dist
location is up one folder.

PR Close #48203
2022-11-23 17:40:25 +00:00