Commit graph

32574 commits

Author SHA1 Message Date
Gerome Grignon
c65259c8a5 docs: lint code examples (#59979)
PR Close #59979
2025-03-27 18:09:45 +00:00
Gerome Grignon
2468bd7282 docs: migrate reactive forms to standalone (#59979)
PR Close #59979
2025-03-27 18:09:44 +00:00
Gerome Grignon
bd4cffe1ae docs: migrate reactive forms to standalone (#59979)
PR Close #59979
2025-03-27 18:09:44 +00:00
Joey Perrott
98bf4d5afd build: disable remote upload of local action results to RBE cache (#60568)
disable remote upload for local actions

PR Close #60568
2025-03-26 20:48:16 -07:00
hawkgs
8559c794a8 docs(docs-infra): fix CSS media queries boundaries (#60564)
Make lower boundaries exclusive, so we avoid conflicts with the upper boundaries.

PR Close #60564
2025-03-26 20:47:32 -07:00
Kristiyan Kostadinov
1e6faad479 fix(compiler-cli): correctly parse event name in HostListener (#60561)
Fixes that we weren't accounting for targeted events when creating the AST for `@HostListener`-decorated members.

PR Close #60561
2025-03-26 20:46:45 -07:00
Kristiyan Kostadinov
7e03af898e fix(compiler-cli): set correct target when type checking events (#60561)
Currently the TCB generation code doesn't handle targeted events (e.g. `(document:click)`) which ends up binding to the current element and can have type inference implications. These changes take the event's `target` into account.

PR Close #60561
2025-03-26 20:46:45 -07:00
Kristiyan Kostadinov
ec8c8f827e refactor(compiler): allow name parsing logic to be reused (#60561)
Moves the logic for parsing event names out into methods on the `BindingParser` so we don't have to duplicate it. Also updates the types to more accurately represent the runtime value.

PR Close #60561
2025-03-26 20:46:45 -07:00
Paul Gschwendtner
9f18c7cc74 fix(compiler-cli): support relative imports to symbols outside rootDir (#60555)
By default, the compiler-cli uses the relative import strategy when
there is no `rootDir` or `rootDirs`. This is expected as everything is
assumed to be somehow reachable through relative imports.

With `rootDirs` that allow for a "virtual file system"-like environment,
the compiler is not necessarily able to always construct proper relative
imports. The compiler includes the `LogicalProjectStrategy` for this
reason. This strategy is able to respect `rootDirs` to construct
relative paths when possible.

This logic currently accidentally triggers when there is a `rootDir`
set. This option is not to be confused with the virtual directory
option called `rootDirs`. The compiler currently confuses this and
accidentally enters this mode when there is just a `rootDir`— breaking
in monorepos that imports can point outside the `rootDir` to e.g. other
compilation unit's `.d.ts` (which is valid; just not `.ts` sources can
live outside the root dir).

This is necessary for our Bazel toolchain migration.

PR Close #60555
2025-03-26 20:45:55 -07:00
Jessica Janiuk
309f269e91 docs: add more details about event replay (#60554)
PR Close #60554
2025-03-26 20:45:04 -07:00
Kristiyan Kostadinov
da784a9445 refactor(core): add type to disambiguate event listeners (#60549)
Adds a utility type to make it easier to distinguish wrapped and unwrapped listeners. Also adds a type for event callbacks so we don't need to repeat it everywhere.

PR Close #60549
2025-03-26 20:44:31 -07:00
Kristiyan Kostadinov
55ac384d6f refactor(core): consolidate listener cleanup storage (#60549)
We were duplicating the logic for storing listener-related cleanup functions in a couple of places. These changes consolidate it into one function.

PR Close #60549
2025-03-26 20:44:31 -07:00
Kristiyan Kostadinov
277aa76876 refactor(core): simplify listener signature (#60549)
Reduces the number of parameters that need to be passed into listeners.

PR Close #60549
2025-03-26 20:44:31 -07:00
Kristiyan Kostadinov
acf84db778 refactor(core): separate out DOM listener logic (#60549)
Moves the logic for listening to a DOM event out into a separate function for easier reuse.

PR Close #60549
2025-03-26 20:44:31 -07:00
Kristiyan Kostadinov
defefae4b5 refactor(core): remove special-casing from listener wrapping (#60549)
We had a special case in the `wrapListener` function that would return the original function if it's invoked with `Function`. This was added for `DebugNode.triggerEventHandler`, but isn't necessary anymore.

PR Close #60549
2025-03-26 20:44:31 -07:00
Pawel Kozlowski
64f6fc0095 refactor(core): allow multiple profilers (#60548)
This commit changes the profiler infrastructure to
allow multiple profilers running at the same time.

PR Close #60548
2025-03-26 20:44:03 -07:00
Alan Agius
fe9b79b615 feat(core): update Node.js version support (#60545)
Node.js v18 will reach End-of-Life on April 30, 2025, and will no longer be supported in Angular v20.
Node.js Release Schedule: https://github.com/nodejs/release#release-schedule

BREAKING CHANGE:
- Angular no longer supports Node.js v18.
- Node.js versions 22.0 to 22.10 are also no longer supported.

Before upgrading to Angular v20, ensure the Node.js version is at least 20.11.1.
For the full list of supported versions, visit: https://angular.dev/reference/versions

PR Close #60545
2025-03-26 20:42:16 -07:00
Alan Agius
f845fbeb58 build: update development Node.js version to 22.14.0 and auto-update (#60545)
The version of Node.js used for development and CI jobs is now set to the active LTS version's latest minor and patch. Renovate is also now configured to update the minor and patch versions.

PR Close #60545
2025-03-26 20:42:16 -07:00
Angular Robot
384fa959ac build: update babel dependencies to v7.27.0 (#60544)
See associated pull request for more information.

PR Close #60544
2025-03-26 20:41:38 -07:00
Angular Robot
14d27eeb67 build: update scorecard action dependencies (#60543)
See associated pull request for more information.

PR Close #60543
2025-03-26 20:40:59 -07:00
Angular Robot
f9993e4fbe build: update all non-major dependencies (#60542)
See associated pull request for more information.

PR Close #60542
2025-03-26 20:40:29 -07:00
Andrew Kushnir
88ae6517a2 refactor(language-service): convert scripts within packages/language-service to relative imports (#60540)
This commit updates scripts within `packages/language-service` to relative imports as a prep work to the upcoming infra updates.

PR Close #60540
2025-03-26 20:40:01 -07:00
Andrew Kushnir
6a207ebfb0 refactor(localize): convert scripts within packages/localize to relative imports (#60540)
This commit updates scripts within `packages/localize` to relative imports as a prep work to the upcoming infra updates.

PR Close #60540
2025-03-26 20:40:01 -07:00
hawkgs
af67334fe5 ci: add hawkgs to pullapprove (#60536)
Add hawkgs to pullaprove for angular-dev.

PR Close #60536
2025-03-26 20:39:31 -07:00
Matthieu Riegler
c6ef75bdea docs(docs-infra): Use AlertSeverityLevel values for alerts (#60532)
PR Close #60532
2025-03-26 20:38:11 -07:00
Kristiyan Kostadinov
8b990a31c3 fix(compiler): error if rawText isn't estimated correctly (#60529)
The `TemplateLiteralElementExpr` has some logic where it tries to estimate the `rawText` if one isn't provided by looking at the node's source span. The problem with this approach is that we have some long-standing issues with our expression AST parser (see https://github.com/angular/angular/pull/60267#discussion_r1986402524) where it might not produce accurate spans if escape sequences are involved. This in turn can lead to unrecoverable errors, because TypeScript will throw an error if the raw string doesn't match the cooked one when constructing a TypeScript AST node.

These changes remove the logic that depends on the source span and relies purely on the secondary fallback that inserts escaped characters manually.

It's also worth noting that the `rawText` doesn't seem to matter much at this point, because the main usage of it is when downlevelling template literals to ES5 which we no longer support.

Fixes #60528.

PR Close #60529
2025-03-26 20:37:31 -07:00
Matthieu Riegler
d1510dafdf docs(docs-infra): fix the deferable views tutorials. (#60509)
PR Close #60509
2025-03-26 20:36:27 -07:00
Matthieu Riegler
217f6d96ba refactor(core): run effect cleanup as untracked (#60421)
A effect cleanup should not be considered reactive.

fixes #57757

PR Close #60421
2025-03-26 20:35:45 -07:00
Andrew Kushnir
34393874e6 refactor(upgrade): convert scripts within packages/upgrade to relative imports (#60238)
This commit updates scripts within `packages/upgrade` to relative imports as a prep work to the upcoming infra updates.

PR Close #60238
2025-03-26 20:35:11 -07:00
Andrew Kushnir
bc042935d0 refactor(service-worker): convert scripts within packages/service-worker to relative imports (#60238)
This commit updates scripts within `packages/service-worker` to relative imports as a prep work to the upcoming infra updates.

PR Close #60238
2025-03-26 20:35:10 -07:00
Alex Rickabaugh
40bd57646a release: cut the v20.0.0-next.4 release 2025-03-26 20:32:49 -07:00
Alex Rickabaugh
395f6c08b2 docs: release notes for the v19.2.4 release 2025-03-26 20:28:20 -07:00
Andrew Kushnir
6d3849ffc8 refactor(core): updates to golden files (#60227)
This commit updates golden files to include the changes that appeared after changing imports to relative paths.

PR Close #60227
2025-03-25 10:58:00 -07:00
Andrew Kushnir
ae047c59c0 refactor(core): convert scripts within packages/core/test to relative imports (#60227)
This commit updates scripts within `packages/core/test` to relative imports as a prep work to the
upcoming infra updates.

PR Close #60227
2025-03-25 10:58:00 -07:00
Andrew Kushnir
3d2263cb1f refactor(core): convert scripts within packages/core/src to relative imports (#60227)
This commit updates scripts within `packages/core/src` to relative imports as a prep work to the upcoming infra updates.

PR Close #60227
2025-03-25 10:58:00 -07:00
Hryhorii (Greg) Avcharov
7499b74d7d docs: fix templates bindings link (#60521)
PR Close #60521
2025-03-24 09:07:29 -07:00
Pawel Kozlowski
bf029e4f23 refactor(core): simplify signature of listenToDirectiveOutput (#60514)
We can simplify signature of listenToDirectiveOutput by passing less
arguments (some of them can be derived from already passed arguments).

PR Close #60514
2025-03-24 09:05:50 -07:00
Angular Robot
11994a715b build: update cross-repo angular dependencies (#60511)
See associated pull request for more information.

PR Close #60511
2025-03-24 09:04:36 -07:00
aparzi
cf5c61c849 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:05 -07:00
Milo
d95d352a8e fix(devtools): show preview content even after expanding node (#60360)
this aligns with Chrome devtools behavior

PR Close #60360
2025-03-24 09:03:21 -07:00
Pawel Kozlowski
997836e858 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
dcfa8a04f5 docs(docs-infra): disable shared-docs tests. (#60520)
Those tests are currently broken until we bump the angular version (pending release).

PR Close #60520
2025-03-24 06:56:15 +00:00
Jessica Janiuk
13d1c8ab38 fix(core): fixes timing of hydration cleanup on control flow (#60425)
This properly cleans up stale control flow branches in the case
that branches change between server and client at the same
timing as NgIf / NgSwitch.

fixes: #58670
fixes: #60218

PR Close #60425
2025-03-21 14:45:23 -07:00
Jessica Janiuk
58e1d9e39a refactor(compiler): Add conditionalCreate instruction (#60425)
This adds a new instruction for dealing with creating conditionals. It ensures flags are set on the TNode for later identification during hydration.

PR Close #60425
2025-03-21 14:45:23 -07:00
Paul Gschwendtner
115c2f8d38 build: fix linking of cdk/material in devtools and simplify code (#60516)
This commit fixes the linking of CDK/Material which recently broke
because the CDK/Material package now comes with potential shared FESM
chunks; that our current hard-coded, manual linking process doesn't know
about. This ultimately resulted in duplicate code, breaking
Material/CDK.

This commit fixes that.

In addition to the fix, we simplify our linking significantly and reduce
the rather large complexity around linking, or having to specify every
entry-point manually, by linking the full package and putting it into
a different location. This is also what we conceptually are doing in
Angular Material as part of the `rules_js` migration.

PR Close #60516
2025-03-21 14:37:56 -07:00
cexbrayat
7408a1f58b 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
Alan Agius
9dbccae47a refactor(docs-infra): remove usage of @angular/platform-browser-dynamic from adev (#60504)
Usage of `@angular/platform-browser-dynamic` is not needed since Angular CLI always inject `@angular/compiler` when running JIT.

PR Close #60504
2025-03-21 14:36:54 -07:00
Paul Gschwendtner
87751c0796 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
a3c209bb69 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
Matthieu Riegler
1339f06ebe docs(docs-infra): Improve markdown generation for code examples. (#60408)
Markdown requires code blocks (```) to start without white spaces. With this change we ensure that `@example` blocks with leading spaces are well supported.

fixes #60407

PR Close #60408
2025-03-21 14:35:19 -07:00