34225 Commits

Author SHA1 Message Date
Andrew Kushnir 5fce27d63f 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:22 -04:00
Matthieu Riegler bddfd2f8c2 docs: fix deprecated docs navigation background color. (#61775)
Backport of #58848 into v19 / main.

PR Close #61775
2025-05-30 11:09:13 -04:00
Kristiyan Kostadinov bb88b3f22f 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:20 -04:00
Matthieu Riegler 221c07c58d 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 2f0ecfc8ef 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:09 -04:00
Kristiyan Kostadinov 75b7cd4cac build: update bundle goldens (#61718)
Updates out of date goldens.

PR Close #61718
2025-05-30 09:53:37 -04:00
Kristiyan Kostadinov 29e5e045f9 refactor(core): add DOM-only listener instruction (#61718)
Adds the `domListener` instruction which allows us to listen only to DOM events while skipping the directive output logic.

PR Close #61718
2025-05-30 09:53:37 -04:00
Kristiyan Kostadinov 78fba14f88 refactor(core): split directive logic away from common template code (#61718)
Reworks the `declareTemplate` function, that we use both in the `template` instruction and in other template-based code like control flow and `@defer`, so that it's split up into a function with directive logic and one without. For anything except the `template` instruction we don't need the directive matching and lifecycle hook logic.

Also introduces a DOM-only instruction called `domTemplate`.

PR Close #61718
2025-05-30 09:53:37 -04:00
Kristiyan Kostadinov 7520cd141c refactor(core): add DOM-only element and container instructions (#61718)
Adds the new `domElement` and `domElementContainer` instructions that are the equivalent of the `element` and `elementContainer` instructions, but will allow us to skip the following overhead when we know that there are no directives:
* Directive matching.
* Directive instantiation.
* Lifecycle hook management.
* Content query execution.

PR Close #61718
2025-05-30 09:53:36 -04:00
Kristiyan Kostadinov cb8ff45c0c refactor(core): move directive logic out of shared element code (#61718)
Moves the logic that deals with matching and instantiating directives out of the shared element instruction code.

PR Close #61718
2025-05-30 09:53:36 -04:00
Kristiyan Kostadinov 4ed6d4ac33 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
Sumit Arora 582fedd726 refactor(devtools): fixing PR comments and adding unit tests (#59999)
- Update code to fix PR comments and cleanup code
- Add unit tests for the new code

PR Close #59999
2025-05-30 09:48:12 -04:00
Sumit Arora 280119fec0 refactor(devtools): adding route details panel for selected route (#59999)
On clicking a route in the router tree, the route details panel is displayed.
- The panel shows the details of the selected route, including the path, component, providers, guards etc.
- Clicking on a chip will navigate to the corresponding source file in the editor.
- Clicking on the path will navigate to the corresponding route in the router tree.

Demo Application Source: https://github.com/sumitarora/angular-routes-demo
Demo Application Deployed: https://sumitarora.github.io/angular-routes-demo/#/

PR Close #59999
2025-05-30 09:48:12 -04:00
hawkgs 21fa353591 refactor(devtools): introduce a more sophisticated directive forest filter (#61085)
Parse the filter string and match by component and directive names independently.

PR Close #61085
2025-05-30 09:46:22 -04:00
fejx 5f187b229f 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 7cfd89a3a2 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
Matthieu Riegler e4b0844d4d docs: update control flow migration command (#61750)
PR Close #61750
2025-05-29 18:15:56 -04:00
Vlad Boisa 31556cd714 docs: fix broked link Routing guide (#61749)
Fix typo in link for correct display of the link
PR Close #61749
2025-05-29 18:14:14 -04:00
hawkgs 68aa159a7f docs(docs-infra): fix update guide version dropdown on Firefox (#61744)
Fixes #58776

PR Close #61744
2025-05-29 18:12:40 -04:00
Matthieu Riegler 8fa75fe58b docs: remove ngIf/ngFor/ngSwitch from the directive overview (#61708)
PR Close #61708
2025-05-29 17:57:51 -04:00
Matthieu Riegler f8a944314c docs: remove unnecessary mention of ngIf/ngFor from llms-full (#61694)
PR Close #61694
2025-05-29 17:56:50 -04:00
Matthieu Riegler 60e06786ba docs: remove the constructor DI from the learn angular tutorial (#61693)
PR Close #61693
2025-05-29 17:55:02 -04:00
Matthieu Riegler e7608e503f docs: update API examples to modern angular (#61688)
PR Close #61688
2025-05-29 17:53:28 -04:00
Matthieu Riegler 276a3510b2 docs: replace @Input/@Output in docs (#61686)
This commit also remove some unused examples

PR Close #61686
2025-05-29 17:51:30 -04:00
Matthieu Riegler 663975b4e7 docs: update learn-angular tutorial to use input/output (#61607)
This replaces the example that were using the decorators.

PR Close #61607
2025-05-29 17:50:30 -04:00
mgechev 0ab865e47b docs: update the roadmap to reflect v20 progress (#61406)
PR Close #61406
2025-05-29 17:44:48 -04:00
Paul Gschwendtner 909e543f7e build: do not run ssr-benchmarks when using //... (#61566)
These are also excluded on CI, and shouldn't run locally either as they
are "manual debug" targets.

PR Close #61566
2025-05-29 14:39:12 -04:00
Paul Gschwendtner 9d7768ccd6 build: rework benchmarks and examples in modules/ to new optimization rule (#61566)
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.

PR Close #61566
2025-05-29 14:39:11 -04:00
Paul Gschwendtner b80957d1c5 build: adjust bundling tests to use Angular CLI (#61566)
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).

PR Close #61566
2025-05-29 14:39:11 -04:00
Paul Gschwendtner 6dade56bb3 build: rework symbol extractor to support lazy/common chunks (#61566)
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.

PR Close #61566
2025-05-29 14:39:11 -04:00
Paul Gschwendtner 7bc39a883d build: fix app_bundle rule after migrating packages/compiler (#61566)
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.

PR Close #61566
2025-05-29 14:39:11 -04:00
Paul Gschwendtner 87f440bb77 build: ensure compiler is properly picked up as runtime dep of compiler-cli (#61566)
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.

PR Close #61566
2025-05-29 14:39:11 -04:00
Paul Gschwendtner 0e7597bb82 build: enable merging of default shell_env and env in Bazel (#61566)
This is necessary to support later versions of e.g. `rules_ts`.

PR Close #61566
2025-05-29 14:39:11 -04:00
Angular Robot fc5ff827ab build: update bazel dependencies (#61566)
See associated pull request for more information.

PR Close #61566
2025-05-29 14:39:11 -04:00
Paul Gschwendtner dfb465637d build: migrate packages/elements to ng_project (#61566)
Migrates `packages/elements` to `ng_project`.

PR Close #61566
2025-05-29 14:39:10 -04:00
Paul Gschwendtner fa123803b4 build: update api-gen to work with compiler as ts_project (#61566)
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.

PR Close #61566
2025-05-29 14:39:10 -04:00
Paul Gschwendtner ef44f671f4 build: migrate packages/compiler to ts_project (#61566)
Migrates `packages/compiler` to `ts_project`.

PR Close #61566
2025-05-29 14:39:10 -04:00
Matthieu Riegler 04b68816a1 docs: setup redirect for zoneless (#61737)
PR Close #61737
2025-05-28 17:44:45 -07:00
Andrew Scott 9b514b7501 docs: link to v20 blog post in changelog (#61734)
PR Close #61734
2025-05-28 12:28:14 -07:00
Andrew Scott 2a290ab30e docs: update versions.json with v20 (#61732)
This updates the versions.json to make v20 consistent with other versions

PR Close #61732
2025-05-28 11:11:23 -07:00
Andrew Scott 449c540015 release: bump version of in memory web api (#61731)
PR Close #61731
2025-05-28 10:53:17 -07:00
Andrew Scott d5ac3805f8 build: bump peer deps for angular-in-memory-web-api (#61729)
bumps peer deps to v20 for in memory web api

PR Close #61729
2025-05-28 10:29:44 -07:00
Jens Kuehlers 4e97ed96cd docs: update version picker for v20 (#61727)
PR Close #61727
2025-05-28 10:28:18 -07:00
Devin Chasanoff 7ea1750420 docs: add v20 dev event banner (#61723)
PR Close #61723
2025-05-28 10:27:36 -07:00
Andrew Scott 8cf7e2302f docs: update tutorials and playground to v20 (#61726)
update boilerplates to use v20 final

PR Close #61726
2025-05-28 09:41:42 -07:00
Andrew Scott 62be7fa7c5 docs: cherrypick v20 release notes to main (#61724)
cherrypick v20 release notes to changelog in main branch
2025-05-28 07:16:44 -07:00
Andrew Scott 1fd59c0298 docs: release notes for the v19.2.14 release 2025-05-28 06:39:06 -07:00
Andrew Scott d19669ca7b docs: release notes for the v20.0.0-rc.3 release 2025-05-27 16:01:37 -07:00
Matthieu Riegler fe03aa09ad Revert "fix(core): call DestroyRef on destroy callback if view is destroyed (#58008)" (#61625)
This reverts commit 5f7f04634f.

PR Close #61625
2025-05-27 15:21:20 -07:00
Matthieu Riegler c77e198f5d docs(docs-infra): limit file interactions on tutorials. (#61696)
The restricted mode on the code editor prevents renaming, deleting or adding files.

PR Close #61696
2025-05-27 11:33:10 -07:00