Commit Graph

37346 Commits

Author SHA1 Message Date
Matthew Beck 5ca0c5a940 release: cut the v22.0.0-rc.0 release v22.0.0-rc.0 2026-05-13 16:32:34 -07:00
Kam 0d55de82f9 refactor(core): mark resource() overloads as @publicApi 22.0
#68253 graduated `resource`, `rxResource`, and `httpResource` to stable
by swapping `@experimental` for `@publicApi 22.0` across three files.
The two `resource()` overloads in `packages/core/src/resource/resource.ts`
were missed and still carried `@experimental 19.0`. The public-api
golden already lists both overloads as `// @public`, so this aligns the
source with what the rest of the codebase reflects.

(cherry picked from commit 7557b339ea)
2026-05-13 15:54:59 -07:00
Alan Agius 639a785376 docs: add version 22 to the browser support reference table
(cherry picked from commit dbf38537f2)
2026-05-13 15:33:59 -07:00
AleksanderBodurri 1f0c1ab1e3 refactor(core): patch special provider classes with __NG_ELEMENT_ID__
Calls a new patchSpecialProvider function to attach __NG_ELEMENT_ID__ and track special providers for debug tooling

(cherry picked from commit ec63947dc6)
2026-05-13 12:15:26 -07:00
Kristiyan Kostadinov ccb7d427e4 fix(compiler): type check invalid for loops
Currently if a `@for` loop doesn't have a `track` expression we don't produce an AST for it at all which means no type checking and language service support for it.

These changes make it so we produce the AST anyways since it gives the user more tools to resolve the issue (e.g. autocompletion when writing the `track` expression).

(cherry picked from commit 06f6dec7aa)
2026-05-13 11:26:46 -07:00
Angular Robot f2412c7221 build: update devinfra digest to eaa9aaa
See associated pull request for more information.
2026-05-13 11:25:36 -07:00
Ben Hong e9ff7cc33b docs: add clarification around plain object models
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
(cherry picked from commit 3584eeb491)
2026-05-13 11:24:40 -07:00
Angular Robot 7017557d4d build: update cross-repo angular dependencies
See associated pull request for more information.
2026-05-12 15:53:07 -07:00
Angular Robot 1080c764ea docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-05-12 15:51:17 -07:00
Matthew Beck c6aa402d0f Revert "refactor(compiler-cli): drop @ts-ignore around fs.readFileSync"
This reverts commit e0593ecc8b.

(cherry picked from commit 7ff4847e03)
2026-05-12 15:20:59 -07:00
Matthew Beck 7dc1017e51 fix(compiler): simplify handling of colon host with a selector list
Update `_convertColonHost` to extract and use only the first argument from a `:host(...)` selector list, ignoring subsequent arguments instead of splitting and duplicating the selector list. Also remove the obsolete test cases from `host_and_host_context_spec.ts`.

(cherry picked from commit 1d3bf59f9a)
2026-05-12 14:25:49 -07:00
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
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
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
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
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
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 v22.0.0-next.12 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