Commit graph

37335 commits

Author SHA1 Message Date
Matthew Beck
194f723f66 fix(compiler): remove dedicated support for legacy shadow DOM selectors
Remove `_shadowDOMSelectorsRe` and `_convertShadowDOMSelectors` from `shadow_css.ts` so that `::shadow`, `::content`, `/shadow-deep/`, and `/shadow/` are no longer treated specially or stripped from user CSS. Instead, they are naturally scoped like standard selectors. Also remove the legacy failing test from `shadow_css_spec.ts`.

(cherry picked from commit 6de4955124)
2026-05-12 14:24:32 -07:00
Matthew Beck
4c25a42e98 fix(compiler): remove deprecated shadow CSS encapsulation polyfills
Completely remove support for `polyfill-next-selector`, `polyfill-unscoped-rule`, and `polyfill-rule` from `shadow_css.ts`, along with their associated methods and regular expressions. Also delete `polyfills_spec.ts` entirely.

(cherry picked from commit 23f0898edb)
2026-05-12 14:24:06 -07:00
Matthew Beck
8a1533c9ad fix(compiler): preserve leading commas in animation definitions
Update the regular expression in `_scopeAnimationRule` to prevent absorbing and deleting leading commas after `animation:`. Also remove the corresponding legacy test case from `keyframes_spec.ts`.

(cherry picked from commit 770e505f78)
2026-05-12 14:23:00 -07:00
Matthew Beck
c7aef8ec5d fix(compiler): enforce parentheses containing arguments for :host-context
Modify `_colonHostContextRe` and `_hostContextPattern` to strictly process `:host-context` only when parentheses containing at least one non-whitespace argument character are present. Update `_colonHostRe` to explicitly NOT match `:host` when followed by a hyphen. When invoked without parentheses or with empty parentheses, the selector is completely ignored and treated as a standard CSS pseudo-class in the source text. Also update the legacy test case from `host_and_host_context_spec.ts`.

(cherry picked from commit 338bf7d46f)
2026-05-12 14:22:23 -07:00
Kam
a4ec2b49ce refactor(compiler-cli): drop @ts-ignore around fs.readFileSync
The `readFileBuffer` method in `node_js_file_system.ts` was wrapped in
`@ts-ignore` to suppress a TS2322 Buffer/Uint8Array typing error that
was fixed in the TypeScript 5.9.2 upgrade. The minimum supported
TypeScript is now 6.0, so the suppression is dead.

(cherry picked from commit e0593ecc8b)
2026-05-12 13:21:57 -07:00
Angular Robot
60eac0e55c build: lock file maintenance
Some checks are pending
DevInfra / assistant_to_the_branch_manager (push) Waiting to run
CI (push) / adev (push) Waiting to run
CI (push) / vscode-ng-language-service (push) Waiting to run
CI (push) / publish-snapshots (push) Waiting to run
CI (push) / zone-js (push) Waiting to run
CI (push) / lint (push) Waiting to run
CI (push) / devtools (push) Waiting to run
CI (push) / test (push) Waiting to run
CI (push) / integration-tests (push) Waiting to run
CI (push) / adev-deploy (push) Blocked by required conditions
Update ADEV Cross Repo Docs / Update Cross Repo ADEV Docs (push) Waiting to run
See associated pull request for more information.
2026-05-12 11:43:17 -07:00
Angular Robot
3ca31a6bb0 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-05-12 11:41:02 -07:00
Aleksander Bodurri
c88e2149e4 refactor(devtools): use WeakRef in idToInjector map for injector cleanup
Replace the manual injectorsSeen cleanup mechanism with WeakRef and FinalizationRegistry. The old approach worked but coupled cleanup to the UI change detection and required tracking seen injectors across traversal. WeakRef lets the browser handle this naturally, removing the injectorsSeen set and the manual cleanup loop.

(cherry picked from commit 84d757446b)
2026-05-12 11:37:13 -07:00
Matthieu Riegler
2c0e45b9d5 build: update cross-repo angular dependencies (22.0.x)
This PR also replaces the implementation of the select component on ADEV due to the aria breaking changes
2026-05-12 10:58:03 -07:00
SkyZeroZx
cc0fa6e3de refactor(http): update HTTP resource options APIs to stable
Marks `HttpResourceRequest`, `HttpResourceOptions`, and `HttpResourceRef` as public APIs following the stabilization of the Resource API in https://github.com/angular/angular/pull/68253

(cherry picked from commit a617967d90)
2026-05-12 10:48:07 -07:00
Paul Gschwendtner
a960d7a1c7 ci: mark devversion as unavailable
Currently OOO and I don't want reviews to be necessarily stuck for too long.

(cherry picked from commit 95034a7b92)
2026-05-12 10:47:14 -07:00
Andrew Scott
e9d1c7ed56 refactor(router): Move target RouterState creation before 'blocking' stage
Some checks are pending
DevInfra / assistant_to_the_branch_manager (push) Waiting to run
CI (push) / lint (push) Waiting to run
CI (push) / devtools (push) Waiting to run
CI (push) / test (push) Waiting to run
CI (push) / integration-tests (push) Waiting to run
CI (push) / adev (push) Waiting to run
CI (push) / vscode-ng-language-service (push) Waiting to run
CI (push) / publish-snapshots (push) Waiting to run
CI (push) / zone-js (push) Waiting to run
CI (push) / adev-deploy (push) Blocked by required conditions
Update ADEV Cross Repo Docs / Update Cross Repo ADEV Docs (push) Waiting to run
This change moves `RouterState` creation to _before_ the `afterPreactivation` step,
which is the step that pauses until bootstrap listeners are complete. It is used for
'enabled blocking' initial navigation and destructive hydration. After this stage,
activation is expected to be (more or less) synchronous.

More importantly than above (since enabled blocking and destructive hydration are
essentially deprecated), this also oves the state creation before the view transition
creation.

These are done to accomodate features in the future that would depend on the RouterState
(e.g. ones which need to know which `ActivatedRoute` instances are new and which are reused).
These features may include additional async blocks/waits, which should not happen after view
transition creation (which freezes the UI until resolved).

(cherry picked from commit 1f287b9ba7)
2026-05-11 18:29:56 -07:00
Kam
ba79f263a1 refactor(compiler-cli): replace forEach with for...of in entry_point
Convert four `.forEach()` calls in `private_export_checker.ts` and
`reference_graph.ts` to `for...of`, matching the iteration style used
elsewhere in the compiler. The TODOs that forced these workarounds are
obsolete.

(cherry picked from commit e661f4d255)
2026-05-11 18:29:07 -07:00
Angular Robot
8391cf0df7 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-05-11 12:45:51 -07:00
Douglas Parker
a14f734548 refactor(core): add "experimental" to WebMCP API names.
WebMCP is still an experimental standard and going through frequent changes in the Chrome implementation and the standards process. As a result, we should be clear about the support status of this API and its overall stability guarantees.

(cherry picked from commit 38e26f0759)
2026-05-11 12:43:10 -07:00
Kam
295e4826a2 refactor(compiler-cli): drop @ts-ignore around jsDocParsingMode
The getters and setters for jsDocParsingMode in `host.ts` and
`ts_create_program_driver.ts` were suppressed with @ts-ignore to
support TypeScript 5.2, which lacked the property on `ts.CompilerHost`.
The minimum supported TypeScript is now 6.0, and `jsDocParsingMode`
is part of the public TypeScript API, so the suppressions can go.

(cherry picked from commit 7a146238ba)
2026-05-11 12:40:30 -07:00
Matthieu Riegler
3593ceb407 docs: update guides to use @Service
In the cases where it was preferable to use `@Service` in place of `@Injectable`

(cherry picked from commit 52a848790f)
2026-05-11 12:38:27 -07:00
Jessica Janiuk
9a424edf03 ci: update pullapprove
This removes thePunderWoman from active review requests, but leaves passive on.

(cherry picked from commit 43a8df9520)
2026-05-11 12:37:52 -07:00
Ben Hong
ff21eb9b39 docs: add new signal forms field metadata guide
Some checks are pending
DevInfra / assistant_to_the_branch_manager (push) Waiting to run
CI (push) / test (push) Waiting to run
CI (push) / lint (push) Waiting to run
CI (push) / devtools (push) Waiting to run
CI (push) / integration-tests (push) Waiting to run
CI (push) / adev (push) Waiting to run
CI (push) / vscode-ng-language-service (push) Waiting to run
CI (push) / publish-snapshots (push) Waiting to run
CI (push) / zone-js (push) Waiting to run
CI (push) / adev-deploy (push) Blocked by required conditions
Update ADEV Cross Repo Docs / Update Cross Repo ADEV Docs (push) Waiting to run
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
(cherry picked from commit ef134ac367)
2026-05-11 12:05:33 -07:00
Matthieu Riegler
78ec99d146 docs(docs-infra): improve api docs extraction
This allows us to show the API docs when the jsdoc block is at the top of a overloaded function (and not on the implementation signature).

eg: `injectAsync`
(cherry picked from commit 7360c1da68)
2026-05-11 12:03:44 -07:00
Kam
0601dc579a docs: add inject() example to "Forwarding injected dependencies"
Lead the section with the recommended `inject()` pattern (child
inherits the property, no `super` forwarding), and keep the existing
constructor DI example after as the alternative. Also fixes a typo
where the verb "class" should read "pass".

(cherry picked from commit 4ec076e13c)
2026-05-11 12:02:51 -07:00
Kam
2e9085c82a docs: recommend output() over EventEmitter in reactive forms guide
The "Save form data" step pointed at `EventEmitter` while the rest of
the guide uses modern APIs (e.g. `inject(FormBuilder)`). Swap to
`output()` and align the TODO in the profile-editor example.

(cherry picked from commit 0629e7e505)
2026-05-11 12:02:09 -07:00
SkyZeroZx
5a6e946708 docs: remove experimental warnings from resource/signal forms documentation
(cherry picked from commit 538d0a8e93)
2026-05-11 11:46:12 -07:00
arturovt
119a19e604 fix(platform-server): forward BEFORE_APP_SERIALIZED errors to ErrorHandler
Some checks failed
DevInfra / assistant_to_the_branch_manager (push) Has been cancelled
CI (push) / lint (push) Has been cancelled
CI (push) / devtools (push) Has been cancelled
CI (push) / test (push) Has been cancelled
CI (push) / integration-tests (push) Has been cancelled
CI (push) / adev (push) Has been cancelled
CI (push) / vscode-ng-language-service (push) Has been cancelled
CI (push) / publish-snapshots (push) Has been cancelled
CI (push) / zone-js (push) Has been cancelled
Update ADEV Cross Repo Docs / Update Cross Repo ADEV Docs (push) Has been cancelled
CI (push) / adev-deploy (push) Has been cancelled
Errors thrown by BEFORE_APP_SERIALIZED callbacks were previously logged
via console.warn and silently ignored. This meant failures such as
TransferState.toJson() encountering a circular reference would go
unreported in apps that use a custom ErrorHandler (e.g. Sentry).

Errors are now forwarded to the application's ErrorHandler, making them
visible through whatever reporting mechanism the app has configured.
The render continues to completion after the error is reported.

Closes #65811

(cherry picked from commit 7623580378)
2026-05-08 14:10:16 -07:00
Kam
66c317ab1c docs: fix two 404 links in the roadmap
"Introduce built-in control flow" => guide/templates/control-flow (was
the now-removed next.angular.dev/essentials/conditionals-and-loops),
and "Improve documentation and schematics for standalone components"
=> essentials/components (was the bare `components`, not an adev route).

(cherry picked from commit 8b46492b7e)
2026-05-08 14:05:46 -07:00
Angular Robot
1d621ead2f build: update pnpm to v10.33.4
Some checks are pending
CI (push) / test (push) Waiting to run
DevInfra / assistant_to_the_branch_manager (push) Waiting to run
CI (push) / lint (push) Waiting to run
CI (push) / devtools (push) Waiting to run
CI (push) / integration-tests (push) Waiting to run
CI (push) / adev (push) Waiting to run
CI (push) / vscode-ng-language-service (push) Waiting to run
CI (push) / publish-snapshots (push) Waiting to run
CI (push) / zone-js (push) Waiting to run
CI (push) / adev-deploy (push) Blocked by required conditions
Update ADEV Cross Repo Docs / Update Cross Repo ADEV Docs (push) Waiting to run
See associated pull request for more information.
2026-05-08 10:05:58 -06:00
Angular Robot
0d02c6a07f build: update dependency bazel to v8.7.0
See associated pull request for more information.
2026-05-08 09:59:43 -06:00
Alan Agius
ebb8537cf1 docs: remove note regarding lack of support for ng test --debug in browser mode
This is no longer the case.

Closes #68621

(cherry picked from commit b3de3af0dd)
2026-05-08 08:57:14 -07:00
Matthew Beck
2a19754c59 release: cut the v22.0.0-next.12 release 2026-05-08 09:22:23 -06:00
Kristiyan Kostadinov
8ebae1de33 fix(core): allow service with factory on abstract classes
Fixes that setting a `@Service` with a `factory` on an abstract class was resulting in a compilation error.

(cherry picked from commit c72ebcb1ad)
2026-05-08 10:16:20 +02:00
Michael Small
b099fce606 docs: fix signal forms async validator typings
docs: add response types for form async `onSuccess`

docs: set defined fallback for async validator params

docs: replace `this.` w/`const`

docs: give fallback string for form async validators

docs: replace `onError` overwritten by `onSuccess`

docs: use `undefined!` for now w/async validators

chore: lint form's `async-operations.md`
(cherry picked from commit 89ee8a8162)
2026-05-07 17:18:01 -07:00
SkyZeroZx
17a226d25d docs(docs-infra): use signals & improve types
Use signals to avoid markForCheck.

Simplify takeUntilDestroyed usage by relying on implicit DestroyRef.

Improve type safety by typing inject(ElementRef).

(cherry picked from commit a0b998e293)
2026-05-07 17:17:34 -07:00
SkyZeroZx
729a9130e7 docs: add documentation for de-duplicate host directives
(cherry picked from commit 307723a352)
2026-05-07 16:53:46 -07:00
Matthieu Riegler
ad717dff1d refactor(core): use the @Service decorator where possible.
A few bytes to win.
Added only on the services that don't rely on constructor DI.

(cherry picked from commit a7dab601fa)
2026-05-07 16:03:34 -07:00
Michael Small
2e2f92210f docs: add FormField/FormRoot imports + move comment w/backticks
(cherry picked from commit 7b4791f474)
2026-05-07 15:56:48 -07:00
Michael Small
acae6a0ef4 docs: fix applyWhenValue form example
(cherry picked from commit 44c0293a3e)
2026-05-07 15:54:09 -07:00
Michael Small
50f8823fe8 docs: rename outdated validateTree example's model
(cherry picked from commit 0ef43c5ff3)
2026-05-07 15:53:45 -07:00
Angular Robot
609f9304c2 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-05-07 16:45:05 -06:00
Angular Robot
a3d4631332 build: update bazel dependencies
See associated pull request for more information.
2026-05-07 16:34:44 -06:00
Alan Agius
a451a1d66e fix(platform-server): add allowedHosts option to renderModule and renderApplication
In server-side rendering (SSR) setups, passing request URLs directly to the lower-level rendering APIs `renderModule` or `renderApplication` can expose applications to Server-Side Request Forgery (SSRF) or Host Header Injection attacks via absolute-form request URLs.
To mitigate these vulnerabilities at the framework layer, this commit introduces the `allowedHosts` option to `PlatformConfig` (supporting exact hostnames, wildcards like `*.example.com`, or `*` to allow all).

During platform initialization inside `createServerPlatform`, the hostname of the request `url` is validated against the `allowedHosts` list. If the hostname is not authorized, bootstrap immediately throws a host validation error, preventing unauthorized rendering and silent SSRF bypasses.

Closes #68436

(cherry picked from commit 60552a73e8)
2026-05-07 15:30:08 -07:00
Angular Robot
a373c0ecd6 build: update all github actions
See associated pull request for more information.
2026-05-07 16:29:18 -06:00
Kristiyan Kostadinov
45a82b2751 fix(docs-infra): switch remaining adev services to @Service
Reworks all the remaining injectables in adev to use `@Service`.

(cherry picked from commit 1f238ab567)
2026-05-07 15:23:30 -07:00
Matthew Beck
932458c6b5 test: remove invalid css that was causing issues with the postcss parser
These tests happened to use garbage "{c}" declaration lists which caused
the parser to choke. Given that we already have tests demonstrating
similar behavior and that's not what these tests were meant to
demonstrate, I've updated them to use empty declaration lists.

(cherry picked from commit b1699da827)
2026-05-07 15:20:21 -07:00
Alan Agius
6f525245cd fix(core): disallow event attribute bindings in host bindings unconditionally
Moves the event attribute validation check outside of `ngDevMode` in the `elementAttributeInternal` instruction to ensure that bindings to event attributes like `on*` are always blocked at runtime.

(cherry picked from commit 5b421c61cd)
2026-05-07 15:19:27 -07:00
Andrew Scott
aa1859689c refactor(compiler): Update indexer API to be generic
Rather than requiring TS AST in the indexer API, this update makes it generic with adapters to provide necessary information. This allows other analysis pipelines that don't use TS AST to work with the indexer.

(cherry picked from commit bc655d006f)
2026-05-07 15:17:05 -07:00
Kam
1bf3c22245 docs: normalize product name casing across docs
Several user-facing docs, tooltips, and tutorial code samples used
non-canonical spellings of product names. This normalizes them to
the form each project uses for its own brand.

(cherry picked from commit ed333c3992)
2026-05-07 15:09:50 -07:00
Alan Agius
0f4bf97d06 docs: update Node.js version requirements in version reference table
(cherry picked from commit d8e5514f30)
2026-05-07 15:06:42 -07:00
Bhuvansh855
e738db659c docs(animations): improve grammar and clarity across animation guides
(cherry picked from commit dc4b3172df)
2026-05-07 15:03:47 -07:00
SUMIDA, Ippei
fd9dda5819 docs: Update error display for password field in signal forms playground
Change error message display from paragraph to list format in signal forms playground.

(cherry picked from commit 2fcfffbc7d)
2026-05-07 14:53:13 -07:00
Alan Agius
0f2160c410 fix(migrations): remove compiler import from safe optional chaining migration
Removes the @angular/compiler import from the safe optional chaining migration. This import is not needed as the compiler package import is side-effectful and has no functional use here.

(cherry picked from commit f1738b5032)
2026-05-07 14:44:11 -07:00