35853 Commits

Author SHA1 Message Date
Kristiyan Kostadinov c81620f2c1 refactor(compiler-cli): update set of required inputs
Updates the required inputs that can be ignored for form controls.

(cherry picked from commit 877678345a)
2025-11-07 11:57:53 -08:00
Kristiyan Kostadinov cc25f96f02 test(forms): fix type checking errors in signal form tests
Fixes some type checking errors in the signal forms tests that accumulated while there wasn't any type checking.

(cherry picked from commit 10915f2f5f)
2025-11-07 11:57:53 -08:00
Kristiyan Kostadinov 71ab11ccf0 fix(compiler-cli): make field detection logic more robust
Currently the logic for detecting `Field` directives only works if it's imported from `@angular/forms/signals` which doesn't cover our own tests.

These changes make the check more robust.

(cherry picked from commit 0b6b78ca74)
2025-11-07 11:57:53 -08:00
Kristiyan Kostadinov 5b55200edf fix(compiler-cli): allow value to be set on radio fields
Updates the logic that checks for unsupported bindigns to allow `value` to be set on `radio` controls.

(cherry picked from commit a61e01d51f)
2025-11-07 11:57:53 -08:00
Kristiyan Kostadinov bd322ca410 fix(compiler-cli): do not flag custom control required inputs as missing when field is present
Adds some logic that won't report the `value` or `checked` inputs as missing when the `Field` directive is present since it will bind to the inputs implicitly.

(cherry picked from commit 165634264e)
2025-11-07 11:57:53 -08:00
Kristiyan Kostadinov 01290ab275 fix(compiler-cli): use any when checking field interface conformance
Switches to checking against `FormValueControl<any>` instead of `FormValueControl<unknown>` when checking whether custom controls conform to the interface.

Fixes #64946.

(cherry picked from commit 4d0778529f)
2025-11-07 11:57:53 -08:00
Andrew Scott 89095946cf fix(language-service): address potential memory leak during project creation
This addresses a potential memory leak in plugin-factory.ts.
The require call inside the create function reloads the entire language
service module for every new project, which is inefficient and could be a cause of the memory leak during branch
switching. This ensures the module is loaded only once and the same
instance is shared across all projects.

(cherry picked from commit 4405725943)
2025-11-07 11:57:25 -08:00
Alan Agius aada582e96 build: update rules_angular to latest
Update `rules_angular` to latest.
2025-11-07 11:43:47 -08:00
Alan Agius 1e53f4e957 refactor: exclude tsconfig.json from VSIX package contents (#64991)
The  file is no longer included in the VSCode extension package.
This change updates the golden file and the  file to reflect this exclusion.

PR Close #64991
2025-11-07 11:36:31 -08:00
Alan Agius 8967d9bc40 test: add golden file test for VSCode extension package contents (#64991)
This commit introduces a golden file test to verify the contents of the VSCode extension package.
The test ensures that the list of files included in the extension package remains consistent.

A new Bazel rule  is added to generate the list of files, and  is used to compare it against the golden file. A helper script  is also added to facilitate the generation of the golden file.

PR Close #64991
2025-11-07 11:36:31 -08:00
Matthew Beck f54cc4f28a fix(compiler): support commas in :host() argument
This change adds support for commas in :host() arguments (e.g.
`:host(:not(.foo, .bar))` as well as in nested parens when the argument
is applied without parens (e.g. `:host:not(:has(.foo, .bar))`).
Previously these selectors would receive an extra `[nghost]` attr, e.g.
`[nghost]:not(.foo, [nghost].bar)`.

I didn't file a bug for this one, but it's also blocking on an internal
LSC. Like the other CSS changes, I'll run a TGP to confirm this isn't
breaking.

(cherry picked from commit 680c3c7bff)
2025-11-07 10:43:37 -08:00
Shuaib Hasan Akib 0552e728a8 docs(docs-infra): use self-closing syntax for component examples
Replaced multiple component tags such as `<example></example>` with
self-closing syntax (`<example />`) across documentation examples.
This improves readability and aligns with the current Angular
style conventions.

(cherry picked from commit a2cd36777a)
2025-11-07 10:24:41 -08:00
Charles Lyding 31846ded2d docs: remove invalid service dependency guide section
The current section `Services with dependencies` within the testing services
guide is non-functional and has been removed. The example service is using
`inject` but the test code is using constructor-based injection. The further
sections discuss the use of TestBed to adjust providers which better handles
these cases.

(cherry picked from commit e3143036ba)
2025-11-07 10:23:50 -08:00
SkyZeroZx 46c1a80b8f docs(docs-infra): refactor update to use host property and refactor isWindows
(cherry picked from commit dff803514e)
2025-11-07 10:13:26 -08:00
Alon Mishne dec8d74ecf docs: Update MCP docs to include all current stable and experimental tools
(cherry picked from commit b481fee049)
2025-11-07 10:12:33 -08:00
Charles Lyding 27b355b220 docs: Update testing guides for Vitest and Karma
This commit updates the testing documentation to reflect the introduction of Vitest as the default test runner, while ensuring Karma testing instructions are still available.

Key changes include:
- Adding a new guide for "Testing with Karma" (`guide/testing/karma.md`).
- Updating the "Code Coverage" guide (`guide/testing/code-coverage.md`) to use `angular.json` for coverage enforcement and referencing Vitest documentation.
- Modifying the "Testing Overview" guide (`guide/testing/overview.md`) to introduce Vitest as the default, update `ng test` output examples, and link to the new Karma guide.
- Updating navigation data to include the new Karma testing guide.

(cherry picked from commit 2a2397acc4)
2025-11-07 10:10:29 -08:00
Andrew Scott 3f7111a9c3 fix(language-server): fix directory renaming on Windows
Hopefully addresses issues on Windows where fs.watch on a directory
locks that directory.

fixes https://github.com/angular/vscode-ng-language-service/issues/1398

(cherry picked from commit c91d8203a2)
2025-11-07 10:10:00 -08:00
Miles Malerba a3cb1dfd1a refactor(forms): nicer type errors
By intersecting with `object` instead of `unknown` in the primitive and
`FormControl` cases, we get TypeScript to show nicer type errors that
mention `FieldTree<...>` insetad of `() => FieldState<...>`

(cherry picked from commit 0efb3f6d1f)
2025-11-07 15:45:08 +00:00
SkyZeroZx b15325f409 refactor(devtools): replace HostListener with host metadata for keydown handling
Uses host metadata instead of the HostListener decorator for keydown events

(cherry picked from commit c74367c5de)
2025-11-07 15:44:46 +00:00
khanhkhanhlele 59798a13dd docs: Fix typos in some files
(cherry picked from commit a625f6bb20)
2025-11-07 15:44:08 +00:00
Angular Robot 8e73f54f38 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-06 15:28:28 -08:00
tsc036 e69ada4ceb refactor(core): move profile_types.ts to primtives
move profile_types.ts so the types can be used in Wiz code

(cherry picked from commit cf47ce2db9)
2025-11-06 22:22:38 +00:00
Miles Malerba 6d6fda8610 refactor(forms): allow FieldTree of recursive type
Adjusts our typings to work better with recursive types and avoid
infinite recursion in the type system.

(cherry picked from commit faccf03ee0)
2025-11-06 21:43:46 +00:00
Miles Malerba 9ea1c2216d refactor(forms): expose pathKeys as part of the API
Currently we maintain the pathKeys internally, but do not expose them
through the `FieldContext`, this PR updates the `FieldContext` to expose
this property.

(cherry picked from commit 2fd8dc9195)
2025-11-06 21:43:15 +00:00
Miles Malerba 8b4195fe7e refactor(forms): support dynamic object logic
extends `applyEach` to work on objects as well, conditionally applying
logic to each property of the object.

(cherry picked from commit c9058087ae)
2025-11-06 21:42:51 +00:00
Angular Robot 86a9feb9b5 build: update cross-repo angular dependencies to v21.0.0-rc.1
See associated pull request for more information.
2025-11-06 13:22:03 -08:00
Jessica Janiuk dcfd7fe399 Revert "build: restrain visibility to compiler-cli subpackages (#64732)"
This reverts commit acaa1e6104.
2025-11-06 13:09:27 -08:00
Jessica Janiuk 7c0daeac89 Revert "refactor(compiler-cli): remove deep imports from compiler-cli (#64732)"
This reverts commit af16b48ac7.
2025-11-06 13:09:27 -08:00
Matthieu Riegler acaa1e6104 build: restrain visibility to compiler-cli subpackages (#64732)
This should solve future deep imports issues.

PR Close #64732
2025-11-06 20:01:27 +00:00
Matthieu Riegler af16b48ac7 refactor(compiler-cli): remove deep imports from compiler-cli (#64732)
Accessed symbols are grouped into dedicated `private` entries

PR Close #64732
2025-11-06 20:01:27 +00:00
SkyZeroZx 593f902f24 refactor(platform-browser): remove unused Platform ID dependency from DomRendererFactory2
Eliminates the unnecessary injection and usage of Platform ID in the renderer factory logic, along with related test scaffolding cleanup

(cherry picked from commit 5343001835)
2025-11-06 20:00:50 +00:00
Angular Robot de2ff121d5 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-06 11:56:14 -08:00
arturovt e90f9e418c refactor(forms): tree-shake ngControlStatusHost and ngGroupStatusHost
This commit removes `ngGroupStatusHost` variable because it's a side-effect, ending up preserving `ngControlStatusHost` and `ngGroupStatusHost`.

(cherry picked from commit 9f76fb61df)
2025-11-06 18:57:48 +00:00
Matthew Berry aad6ced0ef fix(compiler): support one additional level of nesting in :host()
Previously we supported one level of nested parentheses inside of a
`:host()` selector, e.g. `:host(:not(p))`. This caused a breakage in g3
when I migrated a selector from `:host:not(:has(p))` to
`:host(:not(:has(p)))`. This change adds support for just one more level
of nesting.

It'd be nice to move everything to a real CSS parser (or even update it
to count parentheses like I did with :host-context()), but I wasn't able
to get that to work in ~20 minutes and I'm focusing on other things at
the moment.

This change punts the problem until somebody tries to use just one more
level of nesting in a selector.

Fixes #64830

(cherry picked from commit 444143758e)
2025-11-06 18:53:47 +00:00
kirjs 3bbcae6ce8 refactor(forms): add compatForm
This allows using reactive form controls in signal forms

(cherry picked from commit 60447945bc)
2025-11-06 18:51:31 +00:00
Alan Agius 3bed9f0f16 build: format md files
This commit configures prettier to format markdown files.
2025-11-06 10:07:13 -08:00
Miles Malerba 60ce31fb62 test(forms): re-enable some disabled tests
Adjusts test behavior to reflect current implementation and enables them

(cherry picked from commit fa02d96508)
2025-11-06 17:41:31 +00:00
Jessica Janiuk a3c2fe819a Revert "refactor(common): Removes unused imports to clean up dependencies"
This reverts commit 6d3e0f1a51.
2025-11-06 09:05:05 -08:00
SkyZeroZx 6d3e0f1a51 refactor(common): Removes unused imports to clean up dependencies
Eliminates unnecessary imports to reduce clutter and improve maintainability

(cherry picked from commit ca3ef38143)
2025-11-06 16:35:32 +00:00
tsc036 b30bcc514d refactor(core): export types from primitives
export Version type and a type for linkedSignal previous value so they can be used for the Wiz implementations

(cherry picked from commit 104f7d57c1)
2025-11-06 16:34:58 +00:00
SkyZeroZx d8c656bd58 docs: correct formatting in dependency injection guides
(cherry picked from commit 61066071cf)
2025-11-06 16:34:31 +00:00
Joey Perrott 26995e2082 fix(docs-infra): properly expose the prerendered routes for sitemap generation
Properly expose the prerendered routes for sitemap generation rather than only copying the browser directory
2025-11-06 07:52:22 -08:00
Joey Perrott 5fb0b80f10 feat(docs-infra): generate the sitemap for angular.dev
We automatically generate the sitemap for the angular.dev deployment and include it in the assets pushed
to firebase.

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2025-11-06 07:52:22 -08:00
Miles Malerba f3e2252f4b refactor(forms): add better support for Object.keys and Symbol.iterator
Improves support for using `Object.keys` (and related methods) and
`Symbol.iterator` to work with a `FieldTree` of unknown shape.

(cherry picked from commit e87f423d90)
2025-11-06 15:51:31 +00:00
Miles Malerba d1f4c8c18c refactor(forms): improved select support
When we set the `value` on a `<select>` element we're really just
setting the selected `<option>`. It treats the selected option as the
source of truth, rather than the actual value. This means that if
options are added or removed or their value changes, the `<select>` may
wind up with a different `value` than what's in our model.

This PR resolves this issue by adding a `MutationObserver` to the select
that is used to resync its value to the model whenever the options may
have changed.

(cherry picked from commit 194b41199b)
2025-11-06 15:49:09 +00:00
Angular Robot 87ffa3ca28 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-06 07:47:27 -08:00
Angular Robot f0ffd9bebd build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-05 15:26:25 -08:00
Joey Perrott 827a267511 build: update diff release package script
Update the diff relase package script to properly recursively apply the chmod and support a flag for writing the
diff to a file instead of only logging it to the console.

(cherry picked from commit de1f22cf2c)
2025-11-05 23:24:53 +00:00
Angular Robot 086ce4b40f build: update all github actions
See associated pull request for more information.
2025-11-05 15:17:38 -08:00
Angular Robot 0a75a0aee2 build: update bazel dependencies
See associated pull request for more information.
2025-11-05 15:17:18 -08:00