Commit graph

14272 commits

Author SHA1 Message Date
SkyZeroZx
36f4c9b299 refactor(core): Removes unused flag for onDestroy
Eliminates an unnecessary configuration flag

(cherry picked from commit 2ad1b5979f)
2025-11-03 20:21:07 -08:00
SkyZeroZx
33f833984d refactor(platform-browser): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens

(cherry picked from commit 97169b4689)
2025-11-03 16:31:58 -08:00
SkyZeroZx
1b5e2c84b5 refactor(platform-server): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens

(cherry picked from commit 5e4437baf8)
2025-11-03 16:31:58 -08:00
SkyZeroZx
f32a364045 refactor(router): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens

(cherry picked from commit 67da4eb04c)
2025-11-03 16:31:58 -08:00
SkyZeroZx
d3ed745653 refactor(forms): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens

(cherry picked from commit 78e6716f40)
2025-11-03 16:31:58 -08:00
SkyZeroZx
20fa3841ba refactor(core): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens

(cherry picked from commit 64efbc53aa)
2025-11-03 16:31:58 -08:00
Kristiyan Kostadinov
4c6e29f72f fix(compiler-cli): make required inputs diagnostic less noisy
Currently when a required input is missing, we produce a diagnostic on the entire start tag. This can be really noisy if there are already some attributes on the element.

This change switch to only highlighting the tag name instead.

(cherry picked from commit f233f7420a)
2025-11-03 13:27:54 -08:00
Matthieu Riegler
5d75d0ec30 refactor(core): Replace usages of the Function type for animations
`Function` is usually not recommended as its not specific enough.

(cherry picked from commit 79b7ac722a)
2025-11-03 12:05:09 -08:00
Kristiyan Kostadinov
a4fe078969 refactor(common): remove unused import (#64699)
Cleans up unused code to improve readability and maintainability.

PR Close #64699
2025-10-30 19:27:34 +00:00
Angular Robot
c721de112c build: update cross-repo angular dependencies (#64781)
See associated pull request for more information.

PR Close #64781
2025-10-30 17:47:12 +00:00
Andrew Scott
60cc3cbde4 refactor(core): Move patch toggles inside functions to allow tree shaking
In general, global level const will cause DCE bailouts.

(cherry picked from commit fb569ef614)
2025-10-29 13:57:56 -07:00
Matthieu Riegler
366392b692 refactor(compiler): desambiguate and export RegularExpressionLiteralExpr
This allows all symbols used by `ExpressionVisitor` to be accessible.

(cherry picked from commit cfba831966)
2025-10-29 13:45:20 -07:00
Matthieu Riegler
20b4b2c43c refactor(core): expose isWritableSignal to the publicApi
This is alongside the already exisiting isSignal()

fixes #64763

(cherry picked from commit 76adbbcd0a)
2025-10-29 13:31:53 -07:00
Miles Malerba
981fabc9b6 feat(docs-infra): add support for namespaces
Adds support for generating docs for namespaces (and merged declarations
of namespace + type)

(cherry picked from commit 662f0e5c00)
2025-10-29 13:22:26 -07:00
Lukas Matta
95344c19f3 fix(migrations): Do not remove a template if it is referenced even with a trailing semilocon
This commit fixes a behavior where under certain conditions, the migration script ignored
a template reference with a trailing semicolon and incorrectly removed the definition
of a referenced template.

Fixes #64741

(cherry picked from commit 64cb08529d)
2025-10-29 10:51:01 +01:00
Miles Malerba
9cecae81de docs(forms): make FIELD experimental
Adds `@experimental` tag to `FIELD`

(cherry picked from commit a7180b65db)
2025-10-29 10:40:53 +01:00
Miles Malerba
e0a9cfc973 refactor(forms): rename the logic property on FieldPathNode
`logic` was a confusing name, as it is a logic builder instance, not a
logic instance.

(cherry picked from commit 3d70d68676)
2025-10-29 10:40:10 +01:00
Miles Malerba
60c8e2779c refactor(forms): preserve logic order when apply is used on root path
In some cases the logic order was not preserved properly when using `apply`. In particular this occurs when some logic is registered on a child of the root, followed by an apply to the root, followed by further logic registered on a child. In this case the final registered logic wound up running before the applied logic.

This happened because `FieldPathNode` for a child path was caching its `LogicNodeBuilder` at creation time. This meant that if the parent's `LogicNodeBuilder` changed (e.g., due to an `apply` call), the child would still be using the old one.

This commit fixes the issue by dynamically resolving the `LogicNodeBuilder` for a child path whenever it is accessed.

(cherry picked from commit fa13a167f1)
2025-10-29 10:40:09 +01:00
Miles Malerba
07e56596a5 refactor(forms): track arrays in a parent array by index
This commit changes arrays in a parent array to be tracked the same way
as primitive values like strings and numbers. This is necessary because
the tracking key symbol used to maintain identity for objects in an
array does not survive the array spread operation:

```
return {...oldValue} // tracking symbol preserved 
return [...oldValue] // tracking symbol lost 
```

(cherry picked from commit f80b51a738)
2025-10-28 20:52:54 +01:00
Alan Agius
ebdfd71f50 refactor(migrations): exclude all @angular/* packages from schematics bundle
This change updates the rollup configuration for the core schematics to exclude all `@angular/*` packages from the bundle. This is possible following https://github.com/angular/angular/pull/64703

This significantly reduces the size of the `@angular/core` schematics bundle, resulting in a size reduction to 5.8mb.

(cherry picked from commit b4e798ed87)
2025-10-28 20:51:53 +01:00
kirjs
d74fb923cc refactor(forms): Allow returning plain values from validators
This makes the API nicer to use

(cherry picked from commit c57bbaa87d)
2025-10-28 20:50:48 +01:00
kirjs
07b9be1d2c refactor(forms): Allow returning plain values from validators
This makes the API nicer to use

(cherry picked from commit 8562e29be4)
2025-10-28 20:50:48 +01:00
kirjs
71a6266dd3 refactor(forms): Allow returning plain values from validators
This makes the API nicer to use

(cherry picked from commit 28847c9a19)
2025-10-28 20:50:48 +01:00
kirjs
2c2ea2c0da refactor(forms): Allow returning plain values from validators
This makes the API nicer to use

(cherry picked from commit b5c29d0d0a)
2025-10-28 20:50:48 +01:00
Matthieu Riegler
4f21ea72cb refactor(compiler-cli): Remove deep imports of compiler-cli in angular/core
migration schematics will pull from `compiler-cli/private/migrations`
core tests will pull from `compiler-cli/private/testing`

(cherry picked from commit 8e50cdb930)
2025-10-28 15:58:59 +01:00
Andrew Scott
d303cde96d refactor(core): Remove zone toggles for test and standalone
The migration is complete internally. All that remains is bootstrapModule

(cherry picked from commit a253739ac8)
2025-10-28 15:58:02 +01:00
arielbackenroth
3fbaaa0176 refactor(http): add hooks for propagating traces across XHR callbacks.
Enables propagating a trace across XHR callbacks by providing a hook for
wrapping the callback with a function bound to the send trace context.

(cherry picked from commit 07b8e953f4)
2025-10-28 15:09:00 +01:00
tjshiu
3617167d3c docs: align adev best practices with llm-eval
(cherry picked from commit 763db3a70b)
2025-10-28 15:08:17 +01:00
Shuaib Hasan Akib
ba719f4d15 refactor(router): remove redundant default value from routerOutletData input
Since `input()` defaults to `undefined`, the explicit initializer was unnecessary.
This improves clarity and reduces boilerplate.

(cherry picked from commit 8291760f9b)
2025-10-28 10:24:27 +01:00
Matt Lewis
54ad2304e3 fix(core): Clear lView from IcuIteratorState when stack is empty to prevent memory leak
If a component template contains an icu expression it is being retained until the next change detection cycle for that template. This results in a net retention of only ever a single copy of the given lView but that creates an opportunity for compounding leaks.

Change the icu i18n_icu_container_visitor to free the IcuIteratorState retained lView when the stack is empty so that garbage collection can occur when the view is discarded.

(cherry picked from commit 59e648913c)
2025-10-27 19:42:22 +01:00
Matthieu Riegler
ce5ca247e5 refactor(migrations): use the applicationProviders for the zoneless migration
PR #64354 introduced the `applicationProviders` for `bootstrapModule`, this allows a simpler migration output.

(cherry picked from commit eec6669733)
2025-10-27 19:41:32 +01:00
Alan Agius
843f30afc9 build: reduce package size of @angular/core
The schematics bundle size is reduced by externalizing @angular/compiler. This reduces the package size from 11mb to 9.1mb.

(cherry picked from commit 9d00c6892f)
2025-10-27 17:12:51 +01:00
csorrentino
bd780366e8 refactor(forms): add onError callback to validateHttp for HTTP errors
Adds onError callback inside validateHttp validator in signal forms

PR-Close: #63949
(cherry picked from commit a5678f6f2b)
2025-10-27 17:12:28 +01:00
Matthew Beck
04dd75ba94 fix(compiler): support arbitrary nesting in :host-context()
Previously we supported one level of nested pseudo-element selectors
inside :host-context(), e.g. :host-context(:is(.foo, .bar)). This was
based on a regex-based approach. We could support deeper levels of
nesting by updating the regex, but using a regex approach prohibits us
from supporting arbitrary nesting.

Rather than just adding one more level to the existing expression, I've
added a new generator function which splits selectors on commas in a
parenthesis-aware way. This allows us to support arbitrary nesting.

It's likely we'll want to reuse this in other places where we're not as
careful today. We'll probably do this on a request-based basis, though.

Fixes #59176

(cherry picked from commit b478e91068)
2025-10-27 13:40:50 +01:00
Alan Agius
a1b4e381e6 build: refactor location of best-practices.md
This commit moves the best-practices.md file from adev/src/context to packages/core/resources. The BUILD.bazel files and other configuration files have been updated to reflect this change.

(cherry picked from commit 25e8bcbdf6)
2025-10-27 09:31:39 +01:00
Miles Malerba
22c012c985 refactor(forms): fix some typos
Fix some typos in signal forms code

(cherry picked from commit 01e1ad2b37)
2025-10-27 09:27:05 +01:00
SkyZeroZx
3bc260c630 docs: Adds guide links to HTTP API docs for better discoverability
(cherry picked from commit c5e6b8bdc8)
2025-10-27 09:26:01 +01:00
Andrew Scott
7a2d029f51 refactor(router): Add provider for integrating with Navigation API and Location shim
This adds a (private) provider for integrating with the browser Navigation API.
This provider ensures that interactions with the `Location` service
use the underlying platform navigation rather than the history and
location APIs.

(cherry picked from commit dd09da8ba2)
2025-10-27 09:22:00 +01:00
Alan Agius
e9f55a8817 Revert "build: refactor location of best-practices.md"
This reverts commit 07a51872d5.

(cherry picked from commit 620e2c4926)
2025-10-24 19:02:42 +02:00
SkyZeroZx
2abf2fb501 feat(common): Blocks IPv6 localhost from preconnect checks
Prevents unnecessary preconnect warnings by adding IPv6 loopback ('[::1]') to the blocklist.

(cherry picked from commit a3639e2258)
2025-10-24 18:46:48 +02:00
SkyZeroZx
fd65ebca0f refactor(common): Add missing OnDestroy interface in PreconnectLinkChecker
The OnDestroy interface was implemented but not declared; this adds the missing interface declaration

(cherry picked from commit 207baad322)
2025-10-24 18:46:48 +02:00
Andrew Scott
de5b0661e9 fix(zone.js): Support jasmine v6
This fixes the jasmine patch to ensure we are patching the private APIs
off of the right location, which changed in v6.

see 168ff0a751

(cherry picked from commit 48abe007d9)
2025-10-24 18:46:09 +02:00
Alan Agius
fb13537949 build: refactor location of best-practices.md
This commit moves the best-practices.md file from adev/src/context to packages/core/resources. The BUILD.bazel files and other configuration files have been updated to reflect this change.

(cherry picked from commit 07a51872d5)
2025-10-24 18:45:36 +02:00
Matthieu Riegler
a1ac9a6415 fix(forms): interop supports CVAs with signals (#64618)
The directive implemnetation might set CVA values during the template evaluation. Since the template is a reactive context we need to untrack when setting the CVA values to prevent writing to signals in a reactive context.

fixes #64614

PR Close #64618
2025-10-24 09:31:39 +02:00
Miles Malerba
aa389a691b fix(core): ensure @for iteration over field is reactive (#64113)
When working with a proxy object such as signal forms' `Field`,
accessing the `lenght` or `Symbol.iterator` may trgger a reactive read.
This change ensures that `@for` properly captrues this before clearing
the active consumer.

PR Close #64113
2025-10-24 09:29:29 +02:00
Miles Malerba
0af83e6855 test(forms): test reactive iteration over array field (#64113)
Adds a test that verifies @for iteration over an array field is actually
reactive to new items being added to the array.

PR Close #64113
2025-10-24 09:29:29 +02:00
Angular Robot
4ce1ffc65c build: update cross-repo angular dependencies (#64623)
See associated pull request for more information.

PR Close #64623
2025-10-23 18:23:56 +02:00
Miles Malerba
02f7263133 refactor(forms): rename files related to metadata (#64603)
Renames some files to reflect the property => metadata name change

PR Close #64603
2025-10-23 18:13:16 +02:00
Miles Malerba
a6a5fd7b7d refactor(forms): rename field state related to metdata (#64603)
Renames the field state related to metadata to reflect the new
"metadata" name. In particular:
- `property(...)` is renamed to `metadata(...)`
- `hasProperty(...)` is renamed to `hasMetadata(...)`

PR Close #64603
2025-10-23 18:13:16 +02:00
Miles Malerba
f3c547b750 refactor(forms): rename logic functions related to metadata (#64603)
Renames logic functions related to metadata to align with the new
"metadata" name. Notably:
- `property(...)` => `metadata(...)`
- `aggregateProperty(...)` => `aggregateMetadata(...)`

PR Close #64603
2025-10-23 18:13:16 +02:00