13597 Commits

Author SHA1 Message Date
Matthieu Riegler a2e6f317a7 fix(core): allow to set a resource in an error state (#62253)
A resource is error state should still remain writable.

fixes #62241

PR Close #62253
2025-06-25 13:20:43 +00:00
Matthieu Riegler c43f632dc0 docs: fix deprecation message on ngIf/ngSwitch (#62149)
fixes #62147

PR Close #62149
2025-06-25 11:22:16 +00:00
arturovt b40c9d0e59 refactor(common): move ngServerMode check outside tap() to enable tree-shaking (#62238)
In this commit, the `ngServerMode` check is moved outside the RxJS `pipe()` to ensure that server-only logic is excluded from client bundles. Previously, the `tap()` operator and its closure were always included in the output, even though `ngServerMode` was false on the client and the side effect was never triggered.

By guarding the observable chain earlier, this reduces the RxJS stack frame depth, which simplifies debugging by avoiding unnecessary operator noise in client-side stack traces.

The resulting logic is also easier to reason about and avoids evaluating `HttpResponse` instances where not needed.

PR Close #62238
2025-06-25 11:13:22 +00:00
arturovt 4c00238a69 fix(core): avoid injecting ErrorHandler from a destroyed injector (#61886)
This commit prevents lazy injection of the internal `ErrorHandler` from a destroyed injector, as it would result in another "destroyed injector" error.

PR Close #61886
2025-06-24 14:13:34 +00:00
arturovt 65c59dd796 fix(router): handle scrollRestoration error in restricted environments (#62186)
In this commit, setting `window.history.scrollRestoration` is wrapped in a try-catch block to prevent `SecurityError` exceptions in restricted contexts such as:

- sandboxed iframes
- partially navigated or inactive windows
- test runners, extensions, or content previews

If an error occurs, a runtime warning with error code [2400] is logged to the console. This avoids breaking app initialization and improves cross-browser safety.

Unfortunately, it's not possible to perform any end-to-end testing of this fix.

PR Close #62186
2025-06-24 12:24:44 +00:00
arturovt e7d259b0dc refactor(core): drop injection context assertion in production (#62038)
Drops `assertInInjectionContext` call in production in `afterNextRender`.

PR Close #62038
2025-06-24 12:24:10 +00:00
Alan Agius 9b0177398f build: update jest monorepo to v30 (#62233)
See associated pull request for more information.

Closes #61980 as a pr takeover

PR Close #62233
2025-06-24 11:13:30 +00:00
Angular Robot 9c3157d327 build: lock file maintenance (#62204)
See associated pull request for more information.

PR Close #62204
2025-06-24 09:38:18 +00:00
Joey Perrott eddc296b94 build: migrate final non-zone.js jasmine tests (#62170)
Migrate the final remaining non-zone.js package jasmine tests to the new toolchain

PR Close #62170
2025-06-24 08:48:00 +00:00
Kristiyan Kostadinov 3eb5a79a83 fix(compiler-cli): handle initializer APIs wrapped in type casts (#62203)
Fixes that the logic recognizing initializer APIs didn't account for the expression being wrapped in an `as` expresion or in a parenthesized expression. This was already accounted for in the diagnostic so these changes align the behavior between them.

Fixes #62197.

PR Close #62203
2025-06-23 14:26:06 +02:00
Kristiyan Kostadinov 369f03ad7f fix(core): unable to retrieve defer blocks in tests when component injects ViewContainerRef (#62156)
Fixes that `getDeferBlocks` wasn't accounting for the case where a component might be injecting `ViewContainerRef`. When that happens, an additional wrapper is introduced that needs to be accounted for when traversing the tree.

Fixes #62047.

PR Close #62156
2025-06-23 14:24:47 +02:00
Kristiyan Kostadinov e909287e2b build: remove unused dependency (#62206) (#62210)
Removes the `google-closure-compiler` dependency that keeps getting updated by the bot, even though we don't actually use it.

PR Close #62206

PR Close #62210
2025-06-23 13:56:28 +02:00
Andrew Scott dff1417b73 build: revert incompatible build changes in patch branch (#62168)
incompatible build changes from ebaebb849f

PR Close #62168
2025-06-20 12:03:48 -07:00
Kristiyan Kostadinov de0d525ad7 fix(compiler-cli): add suggestion when pipe is missing (#62146)
Adds some suggestions for potential pipes to be imported when raising the missing pipe diagnostic.

Fixes #62136.

PR Close #62146
2025-06-20 10:30:04 +02:00
Andrew Scott ebaebb849f refactor(core): update FakeNavigation to the latest spec (#62017)
Spec updates are in https://github.com/whatwg/html/pull/10919

For the most part, the updates revolve around the deferred commit
handling (with precommitHandler). Updates to redirect allow more
options. A committed promise now exists on the transition since commits
can be delayed. Tests were made zoneless for easier debugging and
timeouts were reduced.

PR Close #62017
2025-06-19 15:10:42 +02:00
Andrew Scott 144c429230 fix(upgrade): Make zoneless work with hybrid apps (#61660)
Hybrid applications trigger a digest when `onMicrotaskEmpty` emits so
that the AngularJS app can run its lifecycle when the Angular app does. For
ZoneJS applications, this is effectively after every render/app tick. This change
updates the code to use `afterEveryRender` instead.

fixes #61640

PR Close #61660
2025-06-19 14:25:49 +02:00
Joey Perrott 4e26ef996b build: migrate to using new jasmine_test (#62132)
Migrate additional targets to jasmine_test

PR Close #62132
2025-06-19 10:04:46 +02:00
Joey Perrott f201df9b83 build: migrate to using new jasmine_test (#62106)
Use the new jasmine_test based on rules_js instead of jasmine_node_test from rules_nodejs

PR Close #62106
2025-06-18 17:59:50 +02:00
Angular Robot b40613f70d build: lock file maintenance (#62068)
See associated pull request for more information.

PR Close #62068
2025-06-18 15:58:43 +02:00
Kristiyan Kostadinov 82bf9848a1 fix(migrations): more robust trailing comma removal in unused imports migration (#62118)
Fixes the following issues with the logic in the unused imports migration that deals with trailing commas:
1. It was generating overlapping text ranges which can break internally.
2. It wasn't handling some cases that produce trailing commas.

PR Close #62118
2025-06-18 15:57:13 +02:00
Andrew Scott ae212b51ee fix(core): Wrap ErrorEvent with no error property (#62081)
This commit updates the global error listener to wrap the global ErrorEvent in a new Error with cause
if the error property is undefined.

fixes #62078

PR Close #62081
2025-06-18 13:57:25 +02:00
Angular Robot 4aa262b425 build: update cross-repo angular dependencies (#62116)
See associated pull request for more information.

PR Close #62116
2025-06-18 13:28:13 +02:00
Angular Robot 7636048aa0 build: update dependency google-closure-compiler to v20250615 (#62115)
See associated pull request for more information.

PR Close #62115
2025-06-18 10:48:11 +02:00
Ben Hong 9453ce956c docs: add dedicated redirecting routes guide (#62005)
docs: update language block

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

docs: enhance redirects function docs

docs: fix future tense usage

docs: update phrasing to be present tense

docs: update redirect guides to use better phrasing and examples

docs: fix typo on code example

Co-authored-by: Andrew Scott <atscott01@gmail.com>

docs: fix typo in code example

Co-authored-by: Andrew Scott <atscott01@gmail.com>

docs: update syntax of code snippet

Co-authored-by: Andrew Scott <atscott01@gmail.com>

docs: update description on redirect function and api docs

PR Close #62005
2025-06-18 09:07:34 +02:00
Angular Robot deaa292550 build: lock file maintenance (#62063)
See associated pull request for more information.

PR Close #62063
2025-06-16 11:27:38 +02:00
Joey Perrott 8403bc731b build: migrate to usages of @devinfra// instead of @npm//@angular/build-tooling (#62050)
Use workspace imported devinfra deps instead of npm dep

PR Close #62050
2025-06-16 10:23:30 +02:00
Matthieu Riegler f69ec36784 refactor(localize): add tripleslash type of Application builder (#62037)
Prior to this change, the triple slash directive was only added on the angular-devkit application builder.

Fixes #61968

PR Close #62037
2025-06-15 12:39:36 +02:00
arturovt 67f657e4a3 fix(core): inject APP_ID before injector is destroyed (#61885)
In this commit, we request `APP_ID` outside the `onDestroy` callback because the injector might already be in a destroyed state when the callback runs.

PR Close #61885
2025-06-12 15:56:51 +02:00
Matthieu Riegler de7aa608c9 refactor(migrations): support local string tokens for inject migration (#62013)
The `localTypeChecker` allows us to at least support locally defined strings in addition to string literals.

PR Close #62013
2025-06-12 15:53:21 +02:00
Michael Berger 4bba6d95ef docs(core): correct standalone jsdocs (#62025)
PR Close #62025
2025-06-12 15:51:24 +02:00
Angular Robot b24d5406de build: update dependency google-closure-compiler to v20250609 (#62009)
See associated pull request for more information.

PR Close #62009
2025-06-12 13:39:49 +02:00
Jessica Janiuk e343cdfb86 fix(core): Fixes template outlet hydration (#62012)
Projected nodes were missing ssrId information and were skipping annotating template information, which caused templates to be destroyed and recreated rather than hydrated.

fixes: #50543

PR Close #62012
2025-06-12 12:54:27 +02:00
Paul Gschwendtner 43ef2ea628 build: fix hermetic execution of packages/core/test/... (#62027)
Due to a bug that is currently in progress of being resolved in the
`rules_js` toolchain (see:
https://github.com/aspect-build/rules_js/issues/362), we were seeing
subtle differences between `main` and PRs/local builds as RBE is a
strict sandbox environment while the normal linux/darwin sandbox isn't
necessarily.

This commit fixes the issue by avoiding the interop targets that don't
bring in the actual transitive node modules.

PR Close #62027
2025-06-12 12:16:56 +02:00
Angular Robot 44468bfe48 build: update cross-repo angular dependencies (#62008)
See associated pull request for more information.

PR Close #62008
2025-06-12 10:03:41 +02:00
Paul Gschwendtner d16c1cf462 build: migrate packages/core/test to new jasmine_test rule (#61902)
Migrates `packages/core/test` to the new `jasmine_test` rule. As part of
this, we are also removing an unnecessary/unused test fixture.

PR Close #61902
2025-06-12 10:00:10 +02:00
Angular Robot e73f2486a1 build: update dependency google-closure-compiler to v20250608 (#61997)
See associated pull request for more information.

PR Close #61997
2025-06-11 10:45:28 +02:00
Joey Perrott 135c594443 refactor: use zone.js from npm instead of packages/zone.js throughout repo (#61978)
Use zone.js from npm isntead of from the repo going forward

PR Close #61978
2025-06-10 12:02:36 -07:00
Carolina 78910a32ef docs: rework programmatically rendering components section to mention @defer (#61763)
PR Close #61763
2025-06-10 12:01:30 -07:00
Angular Robot ee4acc26a7 build: update dependency google-closure-compiler to v20250603 (#61960)
See associated pull request for more information.

PR Close #61960
2025-06-09 11:57:16 -07:00
Andrew Scott 85e9505020 fix(zone.js): waitForAsync should pass args to the test function (#61755)
This ensures that test functions with arguments (e.g. `it.each` in jest)
are forwarded to the test function. This does not apply to jasmine,
which assumes the only arguments needed would be the `done` function.

fixes #61717

PR Close #61755
2025-06-09 11:22:22 -07:00
Jessica Janiuk bb6ec10cfd Revert "refactor(service-worker): make SwPush and SwUpdate tree-shakable (#61670)" (#61923)
This reverts commit f8c1b6e779.

PR Close #61923
2025-06-06 07:48:45 -07:00
Taygan Caldwell 6ae07ad9a1 refactor(core): Delete createSignalTuple (#61907)
Delete createSignalTuple because it is no longer needed. creatSignal has the same behavior.

PR Close #61907
2025-06-06 13:46:16 +02:00
Joey Perrott 8ccd496014 build: remove unnecessary zone.js dep from various build targets (#61903)
Remove unnecessary zone.js dep from various build targets

PR Close #61903
2025-06-05 09:13:01 -07:00
kristilw 1e8158baee fix(core): components marked for traversal resets reactive context (#61663)
when marked for traversal the reactive context has to be set to null to avoid inheriting the reactive context of the parent component

PR Closes #61662

PR Close #61663
2025-06-05 14:49:02 +02:00
kristilw 1e4ce31da4 refactor(core): update tests to use standalone (#61663)
update tests to use standalone components for easier test setup

PR Close #61663
2025-06-05 14:49:02 +02:00
Paul Gschwendtner 8fc96a7065 build: migrate partial compliance tests to rules_js (#61895)
Migrates the partial compliance tests to `rules_js`. Also as part of
this, we re-enable RBE to see if that fixed the issues, or in case
they are already resolved from the RBE side.

PR Close #61895
2025-06-05 13:33:52 +02:00
Taygan Caldwell f562fd4298 refactor(core): export signal setter and updater types for wiz (#61714)
Export signal setter and updater types for Wiz to use

PR Close #61714
2025-06-05 12:57:23 +02:00
arturovt 1cd23be57e fix(core): unregister onDestroy in outputToObservable (#61882)
We should remove the `onDestroy` listener once subscription is unsubscribed because components might not be destroyed yet, but they still would capture subscribers.

PR Close #61882
2025-06-05 11:16:57 +02:00
Angular Robot f6841ea089 build: update cross-repo angular dependencies (#61881)
See associated pull request for more information.

PR Close #61881
2025-06-05 10:17:01 +02:00
Paul Gschwendtner 426eca50f6 build: migrate packages/localize/schematics to ts_project (#61862)
Migrates `packages/localize/schematics` to `ts_project`.

PR Close #61862
2025-06-05 07:34:50 +00:00