33397 Commits

Author SHA1 Message Date
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
Kristiyan Kostadinov 3817459f9e build: add missing symbol (#61783)
Fixes a broken symbol test.

PR Close #61783
2025-05-30 13:34:46 -04:00
Angular Robot f9258123fa build: update rules_angular digest to e0f7af7 (#61780)
See associated pull request for more information.

PR Close #61780
2025-05-30 13:27:32 -04:00
Paul Gschwendtner 0f13d908a9 build: migrate all modules/... code to ts_project (#61779)
Migrates all `modules/...`  code to `ts_project`.

PR Close #61779
2025-05-30 11:14:58 -04:00
Andrew Kushnir b1d960d082 fix(core): produce an error when incremental hydration is expected, but not configured (#61741)
This commit updates runtime logic to produce an error when there are some `@defer` blocks with `hydrate` triggers, but the incremental hydration is not enabled via `withIncrementalHydration()`. Previously the check was only detecting the case when `withIncrementalHydration()` is present on the server, but missing on the client. With the change in this commit, the check would be performed on the server as well.

PR Close #61741
2025-05-30 11:14:23 -04:00
Matthieu Riegler a685152adc docs: fix deprecated docs navigation background color. (#61775)
Backport of #58848 into v19 / main.

PR Close #61775
2025-05-30 11:09:14 -04:00
Kristiyan Kostadinov e9820a6d48 fix(migrations): avoid trailing whitespaces in unused imports migration (#61698)
Follow-up to #61674 where we were leaving behind some whitespace, e.g. `[One, Two, Three]` would turn into `[One ]`. These changes only preserve the whitespace if the node is preceded by a newline.

This wasn't caught by tests, because they were stripping away whitespaces before asserting. I've also reworked the tests to be sensitive to formatting changes.

PR Close #61698
2025-05-30 11:07:21 -04:00
Matthieu Riegler 517ad23729 docs: restore routing with matcher (#61778)
Let's restore that page until we rewrite that part.

fixes #61771

PR Close #61778
2025-05-30 11:05:02 -04:00
Doug Parker b561a5009b refactor: expand DevTools reviewer list (#61709)
Updates the current list of DevTools reviewers to make a few small changes.
1. Adds `hawkgs` and `milomg`.
2. Removes the leading `~` from `JeanMeche` to include him in automatic review requests.
3. Adds `jkrems` for additional Googler coverage in automatic review requests.
4. Removes `mgechev` and `MarkTechson` who haven't been involved in daily DevTools development for a while.
5. Adds the leading `~` to `devversion` and `josephperrott` to remove them from automatic review requests while leaving them with access for "break glass" situations.

Note that the leading `~` means that the individual may approve PRs and satisfy the group's requirement, but PullApprove will not automatically request a review from them. See https://v3-docs.pullapprove.com/config/reviewers/#reviewers-that-dont-want-review-requests.

PR Close #61709
2025-05-30 09:56:10 -04:00
Kristiyan Kostadinov 8461488835 refactor(compiler-cli): export type used by migrations (#61697)
Re-exports the `FileSystem` type since it's used by some tsurge migrations and because internally the barrel export from `ngtsc/file_system` is removed.

PR Close #61697
2025-05-30 09:50:58 -04:00
Paul Gschwendtner e538862c89 build: do not run ssr-benchmarks when using //...
These are also excluded on CI, and shouldn't run locally either as they
are "manual debug" targets.
2025-05-30 10:01:23 +02:00
Paul Gschwendtner 4fa276214c build: rework benchmarks and examples in modules/ to new optimization rule
We are dropping the custom ESBuild and Terser pipeline from dev-infra
and instead leverage the Angular CLI directly. This commit adjusts
the benchmarks to use this new rule.
2025-05-30 10:01:23 +02:00
Paul Gschwendtner e910893fa6 build: adjust bundling tests to use Angular CLI
Instead of dev-infra maintaining a custom ESBuild + Terser pipeline that
tries to emulate the Angular CLI, we are switching the bundling core
tests to a new rule that really leverages the Angular CLI.

This involves some file renames and small adjustments. In addition, we
leverage the updated symbol tracking rule to output new goldens that can
work with multiple bundle files (as generated by the Angular CLI;
especially with defer and its "lazy" chunks).
2025-05-30 10:01:23 +02:00
Paul Gschwendtner f521b6c99f build: rework symbol extractor to support lazy/common chunks
Since we are going to replace our `app_bundle` rule (custom ESBuild +
Terser pipeline) with the real Angular CLI where shared/lazy/common
chunks may exist, we need to update the symbol extractor to support
multiple files.

We could have just merged all symbols, but this commit tries to do
better by detecting what symbols are loaded eagerly vs. lazily. This
will be very useful for e.g. defer tests or other lazy features we are
introducing in the feature.
2025-05-30 10:01:23 +02:00
Paul Gschwendtner 845f8dfd38 build: fix app_bundle rule after migrating packages/compiler
The `app_bundle` rule does not work after the migration of
`packages/compiler` to `ts_project` because the `.mjs` extensions are
now missing in the non npm-package output.

This causes runtime errors as `.js` is not recognized as ESM. Switching
to the real npm package for usage, fixes this issue.
2025-05-30 10:01:23 +02:00
Paul Gschwendtner c7ac9dfd4f build: ensure compiler is properly picked up as runtime dep of compiler-cli
Currently when linking the `@angular/compiler-cli` package, the peer
dependency to `compiler` is not resolved and we are trying to make the
compiler dependency available via `data`. This is unidiomatic and
brittle. This commit fixes this.
2025-05-30 10:01:23 +02:00
Paul Gschwendtner b438971a24 build: enable merging of default shell_env and env in Bazel
This is necessary to support later versions of e.g. `rules_ts`.
2025-05-30 10:01:23 +02:00
Angular Robot 7081949665 build: update bazel dependencies
See associated pull request for more information.
2025-05-30 10:01:23 +02:00
Paul Gschwendtner a9fc1f94c9 build: migrate packages/elements to ng_project
Migrates `packages/elements` to `ng_project`.
2025-05-30 10:01:23 +02:00
Paul Gschwendtner e9987f2019 build: update api-gen to work with compiler as ts_project
Compiler now would have `.js` files. Those aren't picked up as ESM,
unless we install the `package.json` with `type: module`. Sounds great
on paper, but doesn't work in reality because the way the compiler
packages are available to `api-gen/` is via the old `rules_nodejs`
linker, so the `packages/package.json` wouldn't work; nor do the
`package.json`s of the e.g. compiler-cli package work- because those
already contain the `exports` of the built npm package.

We fix this in a much more reasonable way, and the whole module
resolution problem by leveraging the pnpm linking here. This works as
expected.
2025-05-30 10:01:23 +02:00
Paul Gschwendtner aa0c46f4f3 build: migrate packages/compiler to ts_project
Migrates `packages/compiler` to `ts_project`.
2025-05-30 10:01:23 +02:00
fejx 6113faefc8 docs: fix copy-paste error on defer page in interaction section (#61751)
PR Close #61751
2025-05-29 18:20:55 -04:00
Yuta Nishi 6b26adbd7e docs(router): fix typo in define-routes.md (#61740)
Fixes a typo in the "Lazily loaded components" section of the define-routes.md guide.
The path for the home-page component was incorrectly written as ',' instead of ''.

PR Close #61740
2025-05-29 18:17:33 -04:00