Commit graph

32781 commits

Author SHA1 Message Date
Angular Robot
6aa0bbd4e4 build: update cross-repo angular dependencies (#60811)
See associated pull request for more information.

PR Close #60811
2025-04-10 11:31:17 -04:00
hawkgs
2021f64612 refactor(devtools): reduce material form field density globally (#60633)
Make the form field density consistent across the app.

PR Close #60633
2025-04-10 11:22:44 -04:00
Alan Agius
654e6da588 fix(docs-infra): update docs-alert and re-enable tests (#60827)
Before this commit, the docs-alert tests were failing. This also ensures that `NOTE:` is always capitalized.

PR Close #60827
2025-04-10 11:21:12 -04:00
Paul Gschwendtner
abe96914f5 build: remove unnecessary feature detection that breaks with shared chunks (#60825)
Since APF can contain shared chunks, where e.g. `eetemplate` lives, the
`coreHasSymbol` check is no longer reliable. Right now it even prevents
the version range check (that is reliably working) from running because
we detect a `index.d.ts` file but simply don't find the requested
symbol in there (we don't expand exports via type checker).

PR Close #60825
2025-04-10 14:19:52 +00:00
Paul Gschwendtner
7fc14d7f26 build: fix adev first party linking and re-enable tests (#60825)
This commit attempts to finally fix the long-standing first-party
package linking issue with the rather tricky `rules_nodejs` toolchain.

I've verified that no version of e.g. `@angular/core` ends up in the
Bazel sandbox. This is achieved by also filtering transitive Angular
deps for first-party linked packages. e.g. `@angular/docs`.

In addition, `@angular/docs` accidentally ended up bundling parts of
Angular core because it relied on an entry-point that was not part of
the "well known externals". As part of the ongoing `ng_package`
update/rewrite, we should look into disabling bundling of ANY external
dependency/module. This is possible because we use relative imports
inside APF packages as of recently!

This commit should allow us to develop and continue new compiler
features, without having to temporarily (or longer) disable all
`angular.dev` unit tests!

Fixes #54858.

PR Close #60825
2025-04-10 14:19:52 +00:00
Matthieu Riegler
36ae560765 refactor(core): remove the phase prop from AfterRenderOptions (#60641)
The `AfterRenderPhase` enum now becomes private, it isn't exported anymore.

PR Close #60641
2025-04-09 15:39:47 -07:00
Vincent
9f31947aad fix(http): Include HTTP status code and headers when HTTP requests errored in httpResource (#60802)
Currently the HTTP status code and headers are only included if the request succeeded. Given status codes convey more information in case of a request error vs. success, this makes it more useful than inspecting what is contained in `.error()`.

PR Close #60802
2025-04-09 14:25:02 -07:00
Andrew Scott
ea58402b12 release: cut the v20.0.0-next.6 release 2025-04-09 13:02:48 -07:00
Andrew Scott
c3113b9b63 docs: release notes for the v19.2.6 release 2025-04-09 12:30:31 -07:00
Kristiyan Kostadinov
8744c9a165 fix(compiler-cli): ensure HMR works with different output module type (#60797)
Currently when we transpile the HMR update module, we use the project's compiler options verbatim. This appears to break down with some module types, whereas we have to use a native export.

These changes override the compiler options to ensure that the user's options don't end up breaking HMR.

Fixes #60795.

PR Close #60797
2025-04-09 11:42:55 -07:00
Matthieu Riegler
0b69b61929 fix(core): Flush animations when no component has been checked (#58089)
When Angular runs application synchronization automatically, animations
are now guaranteed to be flushed, regardless of whether change detection
was run on any components attached to `ApplicationRef`. This most
frequently affects animations related to component removal where the DOM
element for the component would previously not be removed due to
animations not being flushed

BREAKING CHANGE: Animations are guaranteed to be flushed when Angular
runs automatic change detection or manual calls to `ApplicationRef.tick`.
Prior to this change, animations would not be flushed in some situations
if change detection did not run on any views attached to the
application. This change can affect tests which may rely on the old
behavior, often by making assertions on DOM elements that should have
been removed but weren't because DOM removal is delayed until animations
are flushed.

fixes #58075

PR Close #58089
2025-04-09 11:12:54 -07:00
Jermaine Jatau
bf0f4c47e7 docs: update guide on referencing component children (#60787)
PR Close #60787
2025-04-09 11:08:31 -07:00
Matthieu Riegler
e50f8a23dc Revert "refactor(core): use stream in rxResource instead of loader (#59910)" (#60803)
This reverts commit 98a584c1e8.

PR Close #60803
2025-04-09 09:33:26 -07:00
Pawel Kozlowski
2b4fd9b273 refactor(core): allow multiple DI profilers (#60562) (#60562)
This commit changes the DI profiler infrastructure to
allow multiple profilers running at the same time.

PR Close #60562

PR Close #60562
2025-04-09 09:16:40 -07:00
Angular Robot
df42976084 build: update github/codeql-action action to v3.28.15 (#60780)
See associated pull request for more information.

PR Close #60780
2025-04-08 16:26:14 -07:00
Angular Robot
36ea67354b build: update all non-major dependencies (#60782)
See associated pull request for more information.

PR Close #60782
2025-04-08 16:17:10 -07:00
aparziale
39a4e00464 fix(core): fix ng generate @angular/core:output-migration. Fixes angular#58650 (#60763)
Fixes #58650 - Insert a TODO comment for empty emit (without parameter).

PR Close #60763
2025-04-08 16:10:03 -07:00
Angular Robot
9bba182c0e build: update cross-repo angular dependencies (#60777)
See associated pull request for more information.

PR Close #60777
2025-04-08 16:09:31 -07:00
arturovt
b1c2a8ac38 refactor(router): replace APP_INITIALIZER (#60719)
The `APP_INITIALIZER` is deprecated. Replaced with `provideAppInitializer`.

PR Close #60719
2025-04-08 16:06:04 -07:00
Andrew Scott
b8d9f95faa Revert "refactor(core): allow multiple DI profilers (#60562)" (#60793)
This reverts commit 56cc5fdb57.

CI tests are consistently timing out after this commit

PR Close #60793
2025-04-08 14:04:16 -07:00
Andrew Scott
a997a886d9 refactor(router): use performance API for router view transitions (#60790)
Adds feature tracking for view transitions.

PR Close #60790
2025-04-08 14:02:28 -07:00
Angular Robot
0506a0e7f3 docs: update Angular CLI help [main] (#60788)
Updated Angular CLI help contents.

PR Close #60788
2025-04-08 10:23:16 -07:00
cexbrayat
98a584c1e8 refactor(core): use stream in rxResource instead of loader (#59910)
With the changes in #59573, `resource` can now define a `stream` rather than a `loader`.
In the same PR, `rxResource` was updated to leverage this new functionality to handle multiple responses from the underlying observable,
rather than just the first one as it was previously.
This commit renames the `loader` option of `rxResource` into `stream` to be better aligned with its new behavior.

The previous version is temporarily kept and marked as deprecated to help migrating the current usage.

Before
```
usersResource = rxResource({
  request: () => ...,
  loader: ({ request }) => ...
});
```

After
```
usersResource = rxResource({
  request: () => ...,
  stream: ({ request }) => ...
});
```

PR Close #59910
2025-04-08 10:19:13 -07:00
Kristiyan Kostadinov
c0f41bc505 refactor(platform-browser): remove GenericBrowserDomAdapter (#60760)
The `GenericBrowserDomAdapter` wasn't don't anything so we can drop it and have the `BrowserDomAdapter` extend `DomAdapter` directly.

PR Close #60760
2025-04-08 10:14:54 -07:00
Angular Robot
155e661838 build: update dependency @types/babel__generator to v7.27.0 (#60781)
See associated pull request for more information.

PR Close #60781
2025-04-08 10:13:57 -07:00
Enea Jahollari
7a971766dc feat(compiler): add extended diagnostic for uninvoked track function on @for blocks (#60495)
The compiler will warn devs when they haven't invoked the track function passed to track in @for blocks

PR Close #60495
2025-04-08 10:10:33 -07:00
Kirill Cherkashin
80a32588b4 docs: Update guide link in http package md file (#59955)
PR Close #59955
2025-04-08 09:20:19 -07:00
Matthieu Riegler
2c6b697e4c refactor(core): promote effect to stable. (#60773)
`effect` is promoted to stable in v20

PR Close #60773
2025-04-08 09:16:38 -07:00
Matthieu Riegler
ba79f23e2e refactor(router): remove dependency on @types/dom-view-transitions (#60731)
The types have been shipped in TS 5.6

PR Close #60731
2025-04-08 09:01:41 -07:00
Pawel Kozlowski
56cc5fdb57 refactor(core): allow multiple DI profilers (#60562)
This commit changes the DI profiler infrastructure to
allow multiple profilers running at the same time.

PR Close #60562
2025-04-08 08:56:30 -07:00
Angular Robot
6fa8d44197 build: update io_bazel_rules_sass digest to b4800f3 (#60737)
See associated pull request for more information.

PR Close #60737
2025-04-07 13:33:14 -07:00
Angular Robot
99e409fb2d docs: update Angular CLI help [main] (#60750)
Updated Angular CLI help contents.

PR Close #60750
2025-04-07 13:32:19 -07:00
JoostK
3d85d9363c fix(core): reduce total memory usage of various migration schematics (#60774)
This commit changes Tsurge's operation within angular-devkit (i.e. the CLI) to
no longer retain all programs across all migrations. This isn't necessary for
so-called "funnel" migrations so not retaining the programs for those migrations
is a pure performance win. The "complex" migrations may see increased execution time
given that the program is now being recreated for the actual migration phase to run,
although reduced memory pressure may help alleviate this overhead. Since this new
approach should help prevent Node from running out of memory and failing entirely
this is preferred over a potentially increased execution time.

Fixes #59813

PR Close #60774
2025-04-07 13:13:33 -07:00
Doug Parker
0ae1889560 fix(core): run ApplicationRef.prototype.bootstrap in NgZone (#60720)
`bootstrapApplication` always creates the root component in the `NgZone`, however `ApplicationRef.prototype.bootstrap` historically did not, meaning that if users did not go out of their way to call `ngZone.run(() => appRef.bootstrap(SomeComp))`, components would not run change detection correctly.

This commit updates `ApplicationRef.prototype.bootstrap` to _always_ run within `NgZone`, removing this hazard and ensuring components always run CD as expected.

PR Close #60720
2025-04-07 11:32:31 -07:00
Angular Robot
5039ed0fa7 build: update cross-repo angular dependencies (#60747)
See associated pull request for more information.

PR Close #60747
2025-04-07 10:31:01 -07:00
Jamie Couperwhite
a1a9f8c1a9 docs: fix typo in documentation for pendingUntilEvent (#60756)
PR Close #60756
2025-04-07 10:29:35 -07:00
aparzi
d8e941bd61 fix(core): fix docs for output migration (#60764)
missing EventEmitter import

PR Close #60764
2025-04-07 09:23:33 -07:00
Andrew Scott
9228a73363 feat(docs-infra): Add Navigation API adapter to adev (#60722)
This adapter adds an integration with the Navigation API, allowing
SPA Router navigations to be displayed more fully in the browser UI.
With this, site visitors will be able to see that a page is loading via
the loading spinner in the tab. They will also have access to cancel the
navigation with the browser UI via the "stop" button or by pressing the
escape key (only relevant for slower connections).

* https://github.com/WICG/navigation-api
* https://developer.mozilla.org/en-US/docs/Web/API/Navigation_API

PR Close #60722
2025-04-04 11:46:00 -07:00
Andrew Scott
558d76ec5d refactor(docs-infra): Move router-specific app configuration to separate file (#60722)
This moves the router configuration for the app to a separate file since
there is a lot of it.

PR Close #60722
2025-04-04 11:46:00 -07:00
Kristiyan Kostadinov
92c4123a74 refactor(compiler): integrate new AST nodes into visitors (#60724)
Updates the various visitors to add placeholders for the new AST nodes.

PR Close #60724
2025-04-04 11:28:47 -07:00
Kristiyan Kostadinov
42039b7253 refactor(compiler): produce selectorless ASTs (#60724)
Adds the initial logic to produce the `Component` and `Directive` AST nodes from their equivalents in the HTML AST.

PR Close #60724
2025-04-04 11:28:47 -07:00
Kristiyan Kostadinov
334d0fa585 refactor(compiler): allow for security context to be inferred without tag name (#60724)
Currently it's required to pass in the tag name when determining the security context, however with selectorless we might not have a tag name. These changes update the logic to account for it.

PR Close #60724
2025-04-04 11:28:47 -07:00
Kristiyan Kostadinov
10b5beab3d refactor(compiler): add start/end spans to ng-content element (#60724)
Adds `startSourceSpan` and `endSourceSpan` to the `Content` AST node so it's consistent with the rest of the element-like nodes.

PR Close #60724
2025-04-04 11:28:47 -07:00
Kristiyan Kostadinov
bf9dd185b0 refactor(compiler): introduce R3 AST nodes for components and directives (#60724)
Sets up the AST nodes for components and directives in the R3 AST.

PR Close #60724
2025-04-04 11:28:47 -07:00
Kristiyan Kostadinov
3a6e45f965 refactor(compiler): integrate new nodes into visitors (#60724)
Integrates the `Component` and `Directive` nodes into the various visitors.

PR Close #60724
2025-04-04 11:28:47 -07:00
Kristiyan Kostadinov
c74b168382 refactor(compiler): produce AST from selectorless tokens (#60724)
Updates the HTML parser to produce AST nodes from the tokens produced that were added to the lexer in the previous commit.

PR Close #60724
2025-04-04 11:28:47 -07:00
Kristiyan Kostadinov
dc1c0a0e44 refactor(compiler): add component and directives nodes to HTML AST (#60724)
Updates the HTML AST to add nodes for components and directives. Also adds a `directives` field to `Element`.

PR Close #60724
2025-04-04 11:28:47 -07:00
Kristiyan Kostadinov
03944ccf52 refactor(compiler): add experimental tokenization of directives (#60724)
Sets up tokenization for the new experimental directive syntax.

PR Close #60724
2025-04-04 11:28:46 -07:00
Kristiyan Kostadinov
e8dbc363b1 refactor(compiler): add experimental tokenization of components (#60724)
Sets up the tokenization for the new experimental selectorless components as a first step towards producing an AST.

PR Close #60724
2025-04-04 11:28:46 -07:00
Pawel Kozlowski
8d050b5bfc feat(core): stabilize linkedSignal API (#60741)
The linkedSignal API is now considered stable.

PR Close #60741
2025-04-04 10:35:51 -07:00