Commit graph

32400 commits

Author SHA1 Message Date
Hryhorii (Greg) Avcharov
00a9331fe8 docs: fix templates bindings link (#60521)
PR Close #60521
2025-03-24 09:07:30 -07:00
aparzi
081f5f5a83 fix(core): fix used templates are not deleted (#60459)
After running the control flow migration, used templates are not deleted.

PR Close #60459
2025-03-24 09:04:06 -07:00
Milo
5e109c8ded fix(devtools): show preview content even after expanding node (#60360)
this aligns with Chrome devtools behavior

PR Close #60360
2025-03-24 09:03:22 -07:00
Pawel Kozlowski
9ac4057db8 refactor(core): specify reactive node kind for linked signal (#60451)
This commit adds reactive node kind for linked signal.

PR Close #60451
2025-03-24 07:06:47 -07:00
Matthieu Riegler
d6a1a3a5de Revert "fix(localize): handle @angular/build:karma in ng add (#60513)" (#60523)
This reverts commit a2f622d82d.

PR Close #60523
2025-03-24 06:58:49 +00:00
cexbrayat
a2f622d82d fix(localize): handle @angular/build:karma in ng add (#60513)
`ng add @angular/localize` now also adds the localize polyfill to the configuration of Karma if the `@angular/build:karma` builder is used
(which is the default in Angular CLI v20)

PR Close #60513
2025-03-21 14:37:24 -07:00
Paul Gschwendtner
a4f144a366 test: ng-modules-importability test should import every module in isolation (#60503)
This will make the test even more useful, as it ensures that we aren't
accidentally relying on the compiler potentially discovering best
guessed modules from other imports that previously were part of the same
file (importing all modules as part of the test).

PR Close #60503
2025-03-21 14:36:27 -07:00
Andrew Temple
c5f28cd02e docs: remove link to lazy loading documentation (#60501)
Removes a link that no longer directs users to the expected documentation. Deleting the line is the recommended solution for issue #60500.
PR Close #60501
2025-03-21 14:35:58 -07:00
Pawel Kozlowski
877456e729 refactor(core): share code between ComponentRef and targeted instructions (#60463)
This refactor reorganizes code such that the dynamic bindings logic and
targeted listener instruction can share most of the code.

PR Close #60463
2025-03-21 13:12:00 +01:00
Paul Gschwendtner
c667d54bc9 build: add missing tinyglobby dependency in patch branch (#60510)
This dependency is not availale in the patch brach, while it is
available in the `main` branch. A recent PR relied on this dependency,
with passing tests because we don't run tests against the patch branch.

PR Close #60510
2025-03-21 12:25:03 +01:00
Alan Agius
8e8ccc7927 fix(platform-browser): ensure platformBrowserTesting includes platformBrowser providers (#60480)
Previously, `platformBrowserTesting` did not include any `platformBrowser` providers, causing an inconsistency with `platformBrowserDynamicTesting`.

This update resolves the issue by restructuring platform inheritance to ensure proper provider inclusion:

- `platformCore → platformBrowser → platformBrowserTesting`
- `platformBrowser → platformBrowserDynamic → platformBrowserDynamicTesting`

Now, `platformBrowserTesting` correctly inherits from `platformBrowser`, aligning with the expected behavior.

PR Close #60480
2025-03-20 12:33:13 -07:00
Paul Gschwendtner
867ea1c88a test: add integration test to ensure all exported modules can be imported (#60489)
This commit adds a new integration test which will help ensure that all
exported `@NgModule`'s of framework packages can be imported by users
without any errors.

This test is generally useful, but with our upcoming changes with
relative imports, this is a good safety-net. Relative imports could
break re-exported NgModules inside NgModule's. For more details, see:
https://github.com/angular/components/pull/30667

Notably we don't expect any issues for framework package as re-exporting
`@NgModule`'s inside `@NgModule`'s is seemingly a rather rare pattern for
APF libraries (confirmed by Material only having like 4-5 instances).

PR Close #60489
2025-03-20 12:32:37 -07:00
Paul Gschwendtner
bf899ef0f4 build: prepare testing infrastructure for code splitting of core package (#60487)
When we switch to relative imports, shared `.d.ts` chunks can be
generated.

We need to also pull these into our mock virtual FS testing
environments. Notably this does not cause a test slow-down because we
are talking about very few extra `.d.ts` chunk files. In our experiments
before, with no dts bundling, we saw test time increase from e.g.
20seconds to 100seconds. The 20s are still the same locally!

In addition, since code for definitions can now reside in shared `.d.ts`
chunks, the language service tests need to be adjusted in cases where
they assert for code definition locations in `@angular/core`. A new
helper prepares for more code to be moved into arbitrary `.d.ts` files;
we should simply assert the definition comes out of
`node_modules/@angular/core`.

PR Close #60487
2025-03-20 12:30:58 -07:00
Angular Robot
c13c53fc65 build: update actions/upload-artifact digest to ea165f8 (#60466)
See associated pull request for more information.

PR Close #60466
2025-03-20 11:54:43 -07:00
Paul Gschwendtner
9426e83988 build: disable RBE for compliance partial goldens (#60473)
We've seen these tests regularly, but somewhat rarely to be
stuck/hanging in the remote execution workers. Since the issue was
reproducable locally (via local RBE environment), we can improve
stability for the team until we resolve this with the RBE team.

PR Close #60473
2025-03-20 07:40:22 +00:00
khalilou88
6df6aa1ce2 docs: add missing word to inheritance docs (#60467)
PR Close #60467
2025-03-19 20:41:53 +01:00
Angular Robot
c422fb600a build: update actions/cache digest to 5a3ec84 (#60468)
See associated pull request for more information.

PR Close #60468
2025-03-19 20:35:34 +01:00
Pawel Kozlowski
2be008986a release: cut the v19.2.3 release 2025-03-19 20:23:56 +01:00
Alan Agius
2466fc9b42 refactor(platform-browser-dynamic): relocate DOMTestComponentRenderer to @angular/platform-browser (#60453)
This commit moves `DOMTestComponentRenderer` to `@angular/platform-browser/testing`, allowing the Angular CLI to eliminate its dependency on `@angular/platform-browser-dynamic`, which would no longer be required for new projects.

PR Close #60453
2025-03-19 19:08:09 +01:00
Kristiyan Kostadinov
aa8ea7a5b2 fix(compiler-cli): report more accurate diagnostic for invalid import (#60455)
Currently when an incorrect value is in the `imports` array, we highlight the entire array which can be very noisy for large arrays. This comes up semi-regularly (at least for me) when an import is missing.

These changes add some logic that reports a more accurate diagnostic location for the most common case where the `imports` array is static. Non-static arrays will fall back to the current behavior.

PR Close #60455
2025-03-19 19:06:38 +01:00
Jessica Janiuk
d306e31ee4 ci: fix flakey defer test (#60461)
This uses a fake timer scheduler implementation to ensure timer tests do not cause flakiness, similar to the incremental hydration tests.

PR Close #60461
2025-03-19 18:39:38 +01:00
Matthieu Riegler
c007dd5c77 docs: fix component metadata inheritance (#60464)
fixes #60422

PR Close #60464
2025-03-19 17:59:48 +01:00
Paul Gschwendtner
1e06c8e8b6 fix(platform-browser-dynamic): ensure compiler is loaded before @angular/common (#60458)
With the recent changes to the APF bundling rules, we turned on
tree-shaking in rollup to support proper code splitting for FESM bundles.

This resulted in Rollup re-ordering imports in the FESM bundles of
`@angular/platform-browser-dynamic`— highlighting that over the past
years, this package "accidentally" resulted in the side-effects of the
compiler registering itself globally.

This continues to be the case, and our changes generally didn't cause
any issues in CLI applications because the CLI explicitly wires up the
compiler (as expected) before `-dynamic` is even loaded. For custom
setup, like Analog, this order change surfaced a breakage because e.g.
`@angular/common` with its JIT decorators of e.g. directives/services
are triggered before the compiler is actually loaded/made available.

This commit fixes this. The explicit imports in practice are a noop
because our FESM bundling doesn't recognize compiler as side-effects
true; but marking the whole -dynamic package as having side-effects;
prevents rollup from swapping the import order. Long-term, we should
look into improving this by teaching `ng_package` that e.g. the compiler
has side-effects; so that the `import @angular/compiler` statement is
not dropped when constructing FESM bundles.

PR Close #60458
2025-03-19 16:54:49 +01:00
Jan Martin
13a8709b2b fix(core): catch hydration marker with implicit body tag (#60429)
When the browser parses a valid html5 response like this:

```html
<!-- ... -->
<title>My page</title>
</head>
<!--nghm-->
<app-root></app-root>
<!-- ... -->
```

The resulting DOM will only start adding nodes to the body when it
runs into the first non-header tag. E.g.:

```yml
- head
  - title "My page"
- comment "nghm"
- body
  - app-root
```

This isn't a sign that comments are modified, so it seems worth to
handle it gracefully.

PR Close #60429
2025-03-19 15:51:37 +01:00
Matthieu Riegler
4a1ae82a6c ci: prevent renovate to update typescript automatically (#60341)
This is something we usually want to do manually.

PR Close #60341
2025-03-19 15:48:21 +01:00
Jessica Janiuk
9fea601a93 ci: update shared primitives reviewers list (#60447)
This tightens up the list of reviewers for any shared primitives code changes.

PR Close #60447
2025-03-19 08:37:40 +01:00
Matthieu Riegler
dc2af3d54d refactor(dev-infra): disable progressBar test (#60448)
This test often (but inconsitantly) timeouts with
```
Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL)
```

We suspect a racing condition within the RouterTestingHarness.
Until this has been investigated, we'll disable this test.

PR Close #60448
2025-03-19 08:36:52 +01:00
Paul Gschwendtner
7d476782dd refactor: remove peer dependency on core from compiler (#60437)
Note that this is not a public-facing change because the compiler is not
supposed to be used directly. See `public-api-surface.md`

We are changing this because in the current state, for advanced setups
like our Bazel infrastructure in Material, this peer dependency can
result in a cycle. That is because we may decide to link the
`@angular/core` package using the compiler-cli/compiler; while
transitively the compiler has a dependency on core. That's a cycle
(surfacing in Bazel w/ `rules_js`).

Dropping this optional peer dependency is acceptable because `core`,
since recently, also has an optional peer dependency on the compiler.
This one makes more sense and is also more user-facing (people generally
never install the compiler directly).

Notably the compiler does not have any runtime dependency on `core` and
this was purely added for some safety checking. See:
8c171da29f

PR Close #60437
2025-03-18 18:15:08 +01:00
Alan Agius
a0327bb596 docs(docs-infra): add support for @example (#60443)
In TSDoc, we currently handle the `@usageNotes` annotation, but this is not a standard TSDoc tag. Instead, the `@example` annotation is the correct standard, which is used in the Angular CLI repo and on the SSR package.

This change ensures that `@example` is treated the same as `@usageNotes` during the transform process and also handle multiple instances of `@example` on the same tag.

PR Close #60443
2025-03-18 18:14:11 +01:00
Alan Agius
5c19ab5511 docs: update provideClientHydration parameter description (#60432)
PR Close #60432
2025-03-18 18:11:48 +01:00
Vlad Boisa
a38319ca39 docs: change the broked link (#60436)
Change the wrong path of the link to a working one.
PR Close #60436
2025-03-18 18:09:32 +01:00
Alan Agius
9291d52856 refactor(platform-server): expose internal render method for extensibility (#60416)
The `renderApplication` and `renderModule` methods currently encapsulate the entire rendering process, making it difficult to intercept key phases from a non-Angular context. This change exports the internal `render` method, allowing us to perform operations such as:

- Flushing headers before hydration preparation
- Handling non static redirects (e.g., 302 responses)
- Intercepting router events for additional processing

This refactor serves as an experimental step toward improving the API for better customization and integration in the future.

PR Close #60416
2025-03-18 10:31:44 +01:00
Doug Parker
9dffdd744d refactor(devtools): fix reading resolutionPath (#60403)
Sometimes `forest` can be empty if the provided roots are empty, and was leading to a "Cannot read `resolutionPath` of `undefined`" error. Now we check the forest has a tree in it before looking up `resolutionPath`.

There might be a separate issue with the fact that the backend script likely shouldn't be emitting an empty forest in the first place. However we already check that a resolution path exists at all, so I think it's fair to also check that a tree was provided. We can separately look into making sure the backend is emitting valid data.

PR Close #60403
2025-03-18 10:19:51 +01:00
Angular Robot
82fb14e600 build: update io_bazel_rules_sass digest to ebdb141 (#60428)
See associated pull request for more information.

PR Close #60428
2025-03-18 10:18:16 +01:00
William Mba
b4f3352232 docs: fix typo (#60431)
PR Close #60431
2025-03-18 10:11:59 +01:00
Paul Gschwendtner
2364be9ee2 build: improve partial compliance golden generation and add debug logging (#60427)
Improves the partial compliance golden generation to not rely on large
files being transmitted via `stdout`. Instead the files are written
directly as it's done in idiomatic Bazel generation actions.

In addition, we add extra stdout logging for the Bazel action, to see if
the process is actually invoked in RBE workers. Right now those are
occassionally stuck, but neither us, nor the RBE team can see anything
running, and they're occasionally stuck for 1hr.

PR Close #60427
2025-03-18 07:10:43 +00:00
Kristiyan Kostadinov
0615ffb4f7 fix(core): include input name in error message (#60404)
Includes either the `debugName` or alias of an input in the error message about a value not being available.

Fixes #60199.

PR Close #60404
2025-03-17 12:15:03 +01:00
Angular Robot
acaadca289 build: pin actions/upload-artifact action to 4cec3d8 (#60401)
See associated pull request for more information.

PR Close #60401
2025-03-17 10:26:01 +01:00
Paul Gschwendtner
9b8781a523 build: upload grpc remote logs for debugging (#60393)
This should be helpful in figuring out why RBE is currently unstable.

PR Close #60393
2025-03-14 19:51:27 +01:00
Jessica Janiuk
296aded9da fix(core): execute timer trigger outside zone (#60392)
This should prevent defer timers from impacting app stability by executing them outside of the zone, similar to other defer triggers.

fixes: #60373

PR Close #60392
2025-03-14 17:01:03 +01:00
Rahat Ahmed
24c5398f7d refactor(core): Support and document manually provided internal injections (#60347)
For internal framework values stored in injectors, they are manually
managed and inserted into injectors as needed. Therefore their tokens
don't provide a value or factory. This updates the type to reflect that
and updates the jsdocs a bit.

PR Close #60347
2025-03-14 13:40:41 +01:00
Andrew Scott
f030409c88 refactor(router): Clean up the transition subject (#60357)
This commit cleans up the transition subject a bit so it doesn't use a dummy
initial value. It also avoids copying over data from the previous
request when a new one is created.

PR Close #60357
2025-03-14 11:16:15 +01:00
Andrew Scott
ca32602393 refactor(router): Update to use early return to reduce nesting (#60377)
Updates a switchTap body to use early return to reduce nesting

PR Close #60377
2025-03-14 11:15:28 +01:00
Denis Bendrikov
8551cabe23 fix(devtools): eliminate unnecessary scrollbars on injector tree (#59966)
Modify CSS to eliminate unnecessary scrollbars on injector tree

PR Close #59966
2025-03-14 08:38:02 +01:00
Kristiyan Kostadinov
9e1a1030c8 fix(upgrade): handle output emitters when downgrading a component (#60369)
The `DowngradeComponentAdapter` adapter was assuming that all outputs are observables, but they can also be `OutputEmitterRef`.

Fixes #60366.

PR Close #60369
2025-03-13 17:36:56 +01:00
Pawel Kozlowski
38566293a4 refactor(core): pass signal equal function to primitives (#60364)
The signals primitives package understands the equals option now
so we can pass it to the signal / computed creation methods instead
of manually assigning the equality function on a reactive node.

PR Close #60364
2025-03-13 17:24:18 +01:00
Hyron48
8caf9d7f77 docs: added short explanation about event reply (#60349)
a short explanation about event reply has been added, briefly explaining the phases that compose it

PR Close #60349
2025-03-13 17:03:41 +01:00
Nico Muszalczyk
8b888b2e52 docs: note that CSS is also taken into account in the max bundle size (#60362)
Closes #60356

PR Close #60362
2025-03-13 15:50:40 +01:00
Angular Robot
fc192fdba1 docs: update Angular CLI help [19.2.x] (#60371)
Updated Angular CLI help contents.

PR Close #60371
2025-03-13 15:49:36 +01:00
Matthieu Riegler
4a30a4e26b refactor(http): replace overriden method with a ts declare (#60278)
This allows us to drop the useless `super.hasValue()`.

PR Close #60278
2025-03-12 12:27:48 -07:00