33419 Commits

Author SHA1 Message Date
Paul Gschwendtner 8564cf48d8 build: replace all ng_package with new rule from rules_angular (#61862)
Replaces all `ng_package` rule with the new rule from `rules_angular`.

PR Close #61862
2025-06-05 07:34:50 +00:00
Paul Gschwendtner a24fb53a73 build: remove packages/bazel (#61862)
Removes the `@angular/bazel` package as we no longer need it. Yay!

It's replaced by `rules_angular`.

PR Close #61862
2025-06-05 07:34:50 +00:00
Paul Gschwendtner b03a7356a4 build: migrate private/testing to ng_project (#61862)
Migrates `private/testing` to `ng_project`.

PR Close #61862
2025-06-05 07:34:49 +00:00
Paul Gschwendtner f98dfc2842 build: migrate integration and primitives/defer to ts_project (#61862)
Migrates remaining `ts_project` targets (excluding zone.js) to
`ts_project`.

PR Close #61862
2025-06-05 07:34:49 +00:00
Paul Gschwendtner d462051521 build: remove npm_package rule for packages/bazel (#61862)
The bazel npm package is no longer needed and currently breaks
as we started using a 1P pnpm linked package that would otherwise
end up being pulled into this legacy rule.

PR Close #61862
2025-06-05 07:34:49 +00:00
Paul Gschwendtner a9a7654cbf build: migrate packages/compiler-cli to ts_project (#61862)
This commit migrates the remaining pieces of `compiler-cli` to
`ts_project`. This involves a few more things during migration:

- the `ng_module` ngc_wrapped rule broke as part of this change, so we
  switched it to `ts_project` too. This logic is soon gone anyway.

- we needed an extra pnpm "package.json" for the linker babel test. This test is
  loading from the real compiler-cli npm package. Babel needs a real
  node module for this, so this solution seems reasonable. It may be
  worth exploring in the future to move this test into an integration
  test though.

- the older integrationtest in compiler-cli is removed as the coverage
  is much better with the compliance test suite and this test.

PR Close #61862
2025-06-05 07:34:49 +00:00
Angular Robot 49e273a5f9 build: update all non-major dependencies (#61701)
See associated pull request for more information.

PR Close #61701
2025-06-04 17:23:54 -04:00
kirjs 66e9924eb2 release: cut the v20.0.1 release 20.0.1 2025-06-04 15:19:00 -04:00
arturovt ddd22bea48 fix(core): unregister onDestroy in ResourceImpl when destroy() is called (#61870)
This commit unregisters the `onDestroy` listener when `destroy()` is called on the `ResourceImpl`. This prevents memory leaks and ensures that the resource reference is not captured in the destroy callback after it has already been destroyed.

PR Close #61870
2025-06-04 14:23:13 -04:00
arturovt 41b10396d2 refactor(service-worker): make SwPush and SwUpdate tree-shakable (#61670)
In this commit, we mark the `SwPush` and `SwUpdate` classes as root providers. As a result, they are no longer statically referenced in the `provideServiceWorker` providers list, which previously forced them to be explicitly bundled into the main file. These classes might never be used—some consumers may use the service worker only for prefetching and caching assets.

Practically speaking, even if a user injects the `SwPush` class without calling `provideServiceWorker()`, it would result in a DI error because the communication channel dependency is not available. There is no practical reason to keep these classes as non-root providers or to reference them explicitly.

Currently, some users work around this by using `patch-package` to modify the service worker code and remove these classes from the providers list.

PR Close #61670
2025-06-04 14:15:33 -04:00
arturovt 3f7b77dcd6 refactor(common): use ngServerMode in HttpInterceptorHandler (#61605)
Drops `isPlatformServer(platformId)` in favor of `ngServerMode` in the `HttpInterceptorHandler`.

PR Close #61605
2025-06-04 14:13:16 -04:00
Nikita Sologub b75094dc42 docs: replace undefined 'heroId' with defined 'id' (#61798)
PR Close #61798
2025-06-04 14:09:23 -04:00
Abhideep d7b2733cf9 docs: update home.ts (#61873)
updating HousingLocationInfo(interface) with HousingLocation(component), which is required to be imported into the Home Component

PR Close #61873
2025-06-04 14:04:40 -04:00
Angular Robot bdf882ccd4 build: update dependency google-closure-compiler to v20250601 (#61869)
See associated pull request for more information.

PR Close #61869
2025-06-04 12:20:47 -04:00
Nikita Sologub 07adef841e docs: complete a truncated sentence in define-routes.md (#61871)
PR Close #61871
2025-06-04 12:18:06 -04:00
AleksanderBodurri b4ed62ddf6 fix(core): properly handle the case where getSignalGraph is called on a componentless NodeInjector (#60772)
Previously this would throw an error on the assertLView when we try to discover the templateLView.

Now this properly returns null for the template consumer and continues discovering other effects on the injector.

PR Close #60772
2025-06-04 12:16:47 -04:00
Andrew Scott 8c60cbfd1c fix(core): takeUntilDestroyed completes immediately if DestroyRef already destroyed (#61847)
Adds fix directly for `takeUntilDestroyed` to unsubscribe when already
destroyed instead of putting
synchronous behavior on `DestroyRef.onDestroyed` callback as in #58008

fixes #54527

PR Close #61847
2025-06-04 12:14:15 -04:00
cexbrayat 3c644688eb refactor(core): use RefactorStreamItem type in rxResource (#59887)
The `ResourceStreamItem` was introduced in #59851 and can be used to simplify the `rxResource` code.

PR Close #59887
2025-06-04 11:45:05 -04:00
Hakeem a02717e429 docs(docs-infra): handle fractional sizes between max and min widths vals (#61600)
PR Close #61600
2025-06-04 11:41:51 -04:00
David 0bf8642372 docs(migrations): update the docs for the migration to control flow syntax (#61816)
Change the command to execute the migration, because the command stated in the previous version results in the error "Cannot find migration 'control-flow-migration' in '@angular/core'.". The new command is more in line with the docs of other migrations.

PR Close #61816
2025-06-04 11:28:49 -04:00
Taygan Caldwell 9e850c80f1 refactor(core): Refactor createSignal to return a tuple contain getter, setter, and updater (#61705)
Refactor createSignal to return a tuple instead of a signal getter. createSignalTuple will be removed in a follow up pr once createSignalTuple usages in google3 are migrated to createSignal.

PR Close #61705
2025-06-04 10:46:12 -04:00
Angular Robot 3710b124a1 build: update cross-repo angular dependencies (#61855)
See associated pull request for more information.

PR Close #61855
2025-06-04 10:24:51 -04:00
arturovt 5c31e7e28d fix(core): unregister onDestroy when observable errors in toSignal (#61596)
The observable terminates immediately when `error` is called, and no further emissions or completion notifications occur. Thus, we have to remove the listener in both the `error` and `complete` notifications.

PR Close #61596
2025-06-04 09:36:41 -04:00
Matthieu Riegler eb62a5833e docs: open llms files in new tab (#61851)
Without that the app's router tries to route to unexinsting pages

fixes #61850

PR Close #61851
2025-06-04 06:31:54 +00:00
Matthieu Riegler 2bf724938e docs: update resource docs (#61846)
`value` throws when the resource is in error state.

PR Close #61846
2025-06-03 20:20:47 -04:00
arturovt b93fa22f25 fix(service-worker): prevent duplicate fetches during concurrent update checks (#61443)
Previously, multiple simultaneous calls to `checkForUpdate()` could result in redundant
fetches and hashing of the update manifest, leading to unnecessary network and CPU usage.

This change introduces a mechanism to track an in-progress update check using a cached
promise (`ongoingCheckForUpdate`). Subsequent calls to `checkForUpdate()` while a check
is in progress will return the same promise instead of triggering a new request.

Once the check completes (successfully or not), the cached promise is cleared,
allowing future update checks to proceed normally.

This improves efficiency and prevents overlapping update logic in applications that
may invoke `checkForUpdate()` from multiple sources (e.g. polling, manual triggers).

PR Close #61443
2025-06-03 15:57:30 -04:00
Matthieu Riegler 939ca0786d docs(docs-infra): fix tutorial tooltip (#61782)
The code editor tooltip exhibits some weird bug when there is a margin applied. The root issue is unknown but at least it improves the current situation.

fixes #60923

PR Close #61782
2025-06-03 13:58:32 -04:00
zachend 9743bd1317 fix(service-worker): update service worker to handle seeking better for videos (#60029)
This update ensures that the service worker can handle range requests, allowing video seeking to work correctly when videos are delivered by the service worker.

PR Close #60029
2025-06-03 10:56:07 -04:00
Angular Robot 661b58cb0c build: lock file maintenance (#61814)
See associated pull request for more information.

PR Close #61814
2025-06-03 10:49:42 -04:00
Angular Robot 9a24a2b0eb build: update rules_angular digest to 8c799e8 (#61841)
See associated pull request for more information.

PR Close #61841
2025-06-03 10:36:46 -04:00
Shuaib Hasan Akib b44fe66e79 docs(docs-infra): add language service for Zed (#61482)
PR Close #61482
2025-06-03 10:30:25 -04:00
Matthieu Riegler d64ff4c320 docs(docs-infra): use modern apis (#61706)
PR Close #61706
2025-06-03 10:28:20 -04:00
Paul Gschwendtner b5d21b00bc build: ensure optimization rule can use compiler-cli from HEAD (#61810) (#61830)
This ensures that the new optimization rule, and also adev (when we
complete migrating it to `rules_js`) can use the latest compiler-cli
version from HEAD.

PR Close #61810

PR Close #61830
2025-06-03 08:21:13 -04:00
Angular Robot 30ea478be4 build: update cross-repo angular dependencies (#61704)
See associated pull request for more information.

PR Close #61704
2025-06-03 07:33:33 -04:00
Matthieu Riegler 0ea831caea refactor(migrations): keep the control flow migration as ng generate. (#61773)
this way `ng generate @angular/core:control-flow` which has been fairly documented, remains valid.

PR Close #61773
2025-06-03 07:13:00 -04:00
Pawel Kozlowski 7c4f74a91a docs: documentation for the Chrome DevTools integration (#61690)
Initial version of the documentation describing integration with the
Chrome DevTools performance panel.

PR Close #61690
2025-06-03 07:04:38 -04:00
Angular Robot 9e16d9cdf6 build: update dependency yargs to v18 (#61770)
See associated pull request for more information.

PR Close #61770
2025-06-03 07:02:12 -04:00
Kristiyan Kostadinov 32230e637d build: add missing import (#61838)
Fixes the `20.0.x` branch, which was broken due to a missing import.

PR Close #61838
2025-06-03 11:07:23 +02:00
Oussama BADR 13a0fc6c70 docs: Use signal function to read value in CustomDialog example (programmatic-rendering.md) (#61821)
PR Close #61821
2025-06-02 16:05:49 -04:00
Kristiyan Kostadinov 8ecb1ba027 fix(compiler): recover invalid parenthesized expressions (#61815)
When the expression parser consumes tokens inside a parenthesized expression, it looks for valid tokens until it hits and invalid one or a closing paren. If it finds an invalid token, it reports and error and tries to recover until it finds a closing paren. The problem is that in such cases, it would produce the `ParenthesizedExpression` and continue parsing **from** from the closing paren which would then produce more errors that add noise to the output and result in an incorrect representation of the user's code. E.g. `foo((event.target as HTMLElement).value)` would be recovered to `foo((event.target)).value` instead of `foo((event.target).value)`.

These changes resolve the issue by skipping over the closing paren at the recovery point.

Fixes #61792.

PR Close #61815
2025-06-02 15:50:47 -04:00
Matthieu Riegler f180f3d54d build: remove ng_update_migration integration test. (#61825)
The CLI already covers this in their E2E tests.

PR Close #61825
2025-06-02 15:45:46 -04:00
Andrew Scott 4eb535863e docs(router): Update view transition types to dev preview (#61787)
This updates the documented state of the view transition interfaces. The withViewTransitions feature was already marked dev preview

PR Close #61787
2025-06-02 12:42:20 -04:00
Vincent 42b5fcace9 docs: Add Angular 20 migration instructions for changes in resources (#61772)
PR Close #61772
2025-06-02 12:38:34 -04:00
AleksanderBodurri 7faad63ad7 fix(devtools): issue where on initial render DevTools would not load properly (#61812)
Commit 3e70d64 introduced cdk version 20.0.0-rc2 which introduced a change to how the cdk virtual scroll sets some internal state.

Previously in DevTools we were using a computed incorrectly to respond to changes in the directive forest and apply them to the underlying datasource. With the change to the CDK shown above, this incorrect usage caused us to attempt to update underlying signals in the virtual scroll directive while within a computed callback, throwing an error.

This commit corrects our usage by swapping from a computed to an effect, allowing the underlying signals in the scroll directive to be updated without error.

PR Close #61812
2025-06-02 12:36:18 -04:00
Vadim 04a98d097a docs(docs-infra): example causes RuntimeError: NG0950: Input is required but no value is available yet (#61785)
PR Close #61785
2025-06-02 09:49:38 -04:00
Jens Kuehlers d49ca52407 docs: point v20 banner to blog (#61824)
PR Close #61824
2025-06-02 09:41:34 -04:00
Matthieu Riegler cb2dc5cd24 docs: update llms files (#61791)
PR Close #61791
2025-06-02 09:31:50 -04:00
marktechson 9ed1af0d24 docs: add Using AI development page (#61790)
PR Close #61790
2025-06-02 09:26:37 -04:00
Kristiyan Kostadinov 66a0ec6510 fix(compiler): move defer trigger assertions out of parser (#61747)
When defer blocks have a reference-based trigger without a parameter, we infer it from the placeholder block. This requires some validations like ensuring that there's only one element in the placeholder. The validations are currently implemented at the parser level which can affect tools like linters that need to pass `preserveWhitespaces: true` in order to get accurate source mappings.

These changes move the validations into the template type checker so that they still get flagged, but much later in the process. Moving them over involves a bit more work, because the template type checker also sets `preserveWhitespaces: true`.

Fixes #61725.

PR Close #61747
2025-05-30 13:44:58 -04:00
Doug Parker bc72d7a8d0 docs: fix component harness indentation and comments (#61760)
Component harness docs code snippets seem to have been a bit corrupted.

PR Close #61760
2025-05-30 13:37:56 -04:00