Commit Graph

37724 Commits

Author SHA1 Message Date
Jessica Janiuk 302dd0f7c6 release: cut the v22.1.0-next.1 release v22.1.0-next.1 2026-06-17 14:16:07 -07:00
Jessica Janiuk f540400ac1 docs: release notes for the v22.0.2 release 2026-06-17 14:09:45 -07:00
Angular Robot e35e4a9f67 build: update cross-repo angular dependencies to 1ce5d68
See associated pull request for more information.
2026-06-17 13:57:40 -07:00
Joey Perrott 45192ba749 ci: update dev-infra reference to new commit SHA
Updates the reusable release workflow reference to use the new commit SHA 1ce5d6899a2634fccf021a84656026bed0acbe16 from angular/dev-infra PR 3796.
2026-06-17 13:10:43 -07:00
Cameron Smick ae6d8dae75 refactor(core): add childSignalProp to ReactiveNodeKind
Add `childSignalProp` to `ReactiveNodeKind` in order to consolidate `ReactiveNodeKind` types and enable Client-Only Wiz to use it.
2026-06-17 13:03:13 -07:00
arturovt 8cf7731468 fix(core): guard against DOM clobbering in declareExperimentalWebMcpTool
Previously, the modelContext truthiness check could be bypassed via DOM
clobbering (e.g. `<form id="modelContext">`), causing a truthy HTMLElement
to pass the guard and then throw when `registerTool` was called on it.

Replace the truthiness check with a duck-type check that asserts
`registerTool` is a function, rejecting both absent and clobbered values.
2026-06-17 13:02:10 -07:00
Andrew Scott 1e79dd3140 refactor(router): Add handling for ActivatedRoute-scoped injector
Add handling in navigation for creating and destroying injectors scoped
to `ActivatedRoute` life.
The code for creating the injectors is certainly more complicated
than it _could_ be since there's no actual feature built around this yet.

Keeps as much implementation code tree-shakeable as possible:
Raw size: +764 bytes
Gzipped size: +182 bytes
2026-06-17 11:39:13 -07:00
Joost Koehoorn 327744ac17 perf(core): detect existing signal dependency without checking all producer links
This commit addresses a scaling issue in the signal dependency graph where
the detection of duplicate dependency links would perform a linear scan across
all consumer links of all producers. The linear scan is replaced with a version
comparison of the dependency edge against the current epoch; if they are
equal the existing dependency edge is known to be valid in this epoch. This means
that the link won't be eligible for removal and therefore doesn't have to be
recreated.
2026-06-17 11:38:04 -07:00
rootvector2 ea1a3ed64c fix(core): escape overlapping comment delimiters in escapeCommentText
`COMMENT_DISALLOWED` is matched globally, so overlapping delimiter
sequences are skipped: `<!-->` only escapes the leading `<!--` and
leaves a live `-->` that can close a programmatically created comment
node early. Drop the `^` anchors so a standalone `>`/`->` is escaped
wherever it appears, which neutralizes the trailing delimiter left
behind by an earlier match.
2026-06-17 11:37:08 -07:00
Joey Perrott ea18ab24dd ci: add id-token: write permission to release workflow
Adds id-token: write permission to the release workflow to allow the called reusable workflow to generate NPM provenance metadata during publishing.
2026-06-17 10:32:27 -07:00
Angular Robot 6bd2cea404 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-06-17 10:31:15 -07:00
aminesbdev a89ab78a11 docs(docs-infra): update environment configuration examples and remove production flag 2026-06-17 10:01:36 -07:00
aminesbdev 0a06167208 docs(docs-infra): add environment runtime configuration
Add a new reference explaining Angular environment configuration strategies,
including both build-time and runtime approaches.

Register the reference in SKILL.md so it is discoverable by the skill system.
2026-06-17 10:01:36 -07:00
Angular Robot 2d2d5fc362 build: lock file maintenance
See associated pull request for more information.

Closes #69367 as a pr takeover
2026-06-17 09:12:30 -07:00
Andrew Scott a5ee50beac refactor(compiler): correct TcbInvalidReferenceOp initializer
initializer should use null! as any rather than simply '= any'
2026-06-17 08:14:51 -07:00
Joey Perrott a7d142913f ci: update reusable release workflow target SHA, pass robot key, and downgrade permissions
Updates the reusable workflow reference to target the merged dev-infra commit e9faacd5b4df391f59989b6fb448b2c24115d592. Passes the ANGULAR_ROBOT_PRIVATE_KEY secret as angular-robot-key. Downgrades default contents permission to read as write access is handled by the App token in the custom action.
2026-06-17 08:10:59 -07:00
Joey Perrott 182fbb8476 ci: introduce GHA release publish workflow
Introduce the caller GitHub Actions workflow for release publishing, which delegates the build and publish steps to the centralized reusable workflow in dev-infra. This targets the merged reusable workflow in dev-infra by SHA.
2026-06-17 08:10:59 -07:00
Angular Robot 9378577bd7 build: update pnpm to v11.7.0
See associated pull request for more information.
2026-06-17 08:07:51 -07:00
rudzikdawid 02d6b436f1 fix(docs-infra): increase SSR fetch limit to prevent 404 on page reload
Navigating to specific ARIA guide pages directly or via hard refresh
causes a 404 error because the payload exceeds the default SSR fetch
limit. This commit increases the maxResponseBodySize to 2MB.
2026-06-17 08:03:54 -07:00
Alex Rickabaugh 86ade07de6 refactor(compiler): add support for @Input transforms under isolatedDeclarations
Adds support for `@Input` transform functions in isolated declarations mode (`emitDeclarationOnly: true`), allowing components and directives to specify `transform` functions without triggering fatal compiler errors.

Synthesizes the `ngAcceptInputType_` write type syntactically:
- For referenced functions (`transform: booleanAttribute`), emits `Parameters<typeof booleanAttribute>[0]`, relying on downstream template type checking to resolve the type.
- For inline functions (`transform: (v: string) => boolean`), extracts `parameters[0].type` directly from the local TypeScript AST.
2026-06-16 10:27:18 -07:00
Alex Rickabaugh 5d2b1c4100 refactor(compiler): add support for host directives under isolatedDeclarations
Removes restrictions around using external references and local directives in `hostDirectives` under isolated declarations mode (`emitDeclarationOnly: true`).

By wrapping the host directive reference in a `WrappedNodeExpr`, TypeScript's declaration emitter seamlessly emits `typeof hostReference.node`, preserving existing imports or local identifiers exactly as authored. Also adds support for translating `PropertyAccessExpression` inside `WrappedNodeExpr` into `QualifiedName` for `.d.ts` emission, ensuring namespace imports (`import * as n from './dir'`) are preserved correctly.
2026-06-16 10:27:18 -07:00
SkyZeroZx 0152e3cbdf fix(core): treat iframe credentialless as security-sensitive
Mark the iframe `credentialless` attribute as security-sensitive so dynamic
bindings are handled consistently with other iframe attributes that affect the
initial navigation, such as `sandbox`, `allow`, `referrerPolicy`, `csp`, and
`fetchPriority`.

Because `credentialless` must be present before the iframe starts loading to
affect the navigation’s credential mode, late dynamic updates can leave the final
DOM looking correct while the initial request was not loaded credentiallessly.
2026-06-16 09:05:53 -07:00
yamanerkam cbccd368af docs: use the @Service decorator in the learn-angular DI tutorial
The "Creating an injectable service" tutorial introduced services with
`@Injectable({providedIn: 'root'})`, even though the essentials guide and
the in-depth dependency injection guides have already moved to the newer
`@Service` decorator. This left the tutorial out of step with the rest of
the documentation.

Update steps 19 and 20 to use `@Service()`. Because `@Service()` is an
ergonomic shorthand for `@Injectable({providedIn: 'root'})`, the examples
behave identically while teaching the recommended modern API. The step 19
README is reworked to match: it drops the now-unnecessary `providedIn`
configuration step and adds a note linking to the in-depth services guide
for the `autoProvided: false` opt-out.
2026-06-16 08:49:04 -07:00
Kristiyan Kostadinov 28cb15a2bb fix(core): prevent unsubscribe during emit from throwing off other listeners
Fixes that when a listener unsubscribes from an `output` within its own callback, it was preventing subsequent listeners from running.

These changes fix the issue by not mutating the array while the emit loop is running, but replacing the listener with `null` and coming back later to remove it.

Fixes #69325.
2026-06-16 08:29:32 -07:00
Matthieu Riegler 74fa0588b1 refactor(devtools): ensure code is escaped
By stringifying twice we ensure the code is escape before building the string template.
2026-06-16 08:25:35 -07:00
Angular Robot 383a42a89f build: update cross-repo angular dependencies
See associated pull request for more information.
2026-06-16 08:18:45 -07:00
Andrew Scott 83622ee519 refactor(compiler-cli): Export indexer API for use in hybrid analysis
exports indexer API for use in hybrid analysis
2026-06-15 11:53:36 -07:00
Angular Robot 01e99d8a32 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-06-15 11:18:08 -07:00
Andrew Scott 21fccd4038 refactor(compiler-cli): Change indexComponent file to be fileUrl
We do not need ParseSourceFile which contains the whole content. Only the file url is ever used.
2026-06-15 10:56:51 -07:00
Matthieu Riegler 471dcb42ca refactor(compiler): Collect in-element comments
PR #67179 forgot to implement that part.
2026-06-15 10:54:06 -07:00
SkyZeroZx 98f42eaaae fix(core): avoid caching missing locale data
Only cache locale data loaded from the global locale registry when an actual locale entry is found.

This prevents attacker-controlled missing locale identifiers from being retained indefinitely in SSR when locale lookup falls back to a parent locale or the built-in English locale, avoiding unbounded process memory growth in locale-aware pipes and formatters.
2026-06-15 10:53:08 -07:00
Alan Agius 417a4071a7 fix(compiler): restrict possible event handler check to property names longer than 2 characters
Previously, the compiler disallowed translation of any attribute starting with 'on' for security reasons. This incorrectly disallowed translation of the 'on' attribute itself, which is not an event handler.

This commit introduces `isPossibleEventHandler` to verify that the property name has a length greater than 2 in addition to starting with 'on'. This allows attributes like 'on' to be translated while still correctly disallowing actual event handlers like 'onerror', 'onclick', etc.
2026-06-15 09:23:49 -07:00
Andrew Scott 2112edefe1 refactor(core): ɵɵgetInheritedFactory should accept abstract type
An abstract component or directive can extend another class, meaning
ɵɵgetInheritedFactory needs to allow abstract
2026-06-15 09:22:35 -07:00
Angular Robot 958c198aa3 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-06-15 09:18:49 -07:00
Kam 4ba8ba4ef2 fix(docs-infra): align homepage banner and search field
The homepage hero lays out the announcement banner and the search field on
the same flex row. The `.search-field` wrapper was a plain block, so its
`docs-text-field` kept its intrinsic height instead of filling the row,
leaving the two pills at different heights and vertically misaligned.

Make `.search-field` a flex container so the search control stretches to the
row height and matches the banner.
2026-06-15 09:15:29 -07:00
Kam 50e7f3a1cd fix(docs-infra): center social and theme menus under their triggers on tablet
On tablet the social and theme mini-menus didn't line up with the buttons that
open them.

All three mini-menus now share one tablet positioning rule on `.adev-mini-menu`
that centers each panel under its trigger, with `--social`/`--theme`/`--version`
modifiers selecting the anchor; the version picker's on-screen behavior is
unchanged. The social trigger also gains `aria-controls` + a matching menu `id`
for a11y parity with the theme trigger.
2026-06-15 08:59:18 -07:00
Kam 43acead06d fix(docs-infra): use a facade for docs-video to fix Firefox embeds
Follow-up to #69205. After switching adev's COEP to `credentialless`, the
cross-origin YouTube iframe in `<docs-video>` loads in Chromium and Safari but
not Firefox, whose `credentialless` policy does not extend to nested frames. The
result was a COEP error screen instead of the player.

Render `<docs-video>` as a lightweight thumbnail facade instead of embedding the
iframe directly. The thumbnail is a cross-origin subresource, so it loads under
`credentialless` in every browser. `DocViewer` then upgrades the facade to the
inline player on hydration in browsers that can load the embed (Chromium,
Safari), preserving the previous behavior there. On Firefox the facade stays a
plain link that opens the video on YouTube (with autoplay), which replaces the
error screen.

The thumbnail uses `maxresdefault` and falls back to `hqdefault` when a video
has no max-resolution image.
2026-06-15 08:58:00 -07:00
Matthieu Riegler 3b8bb7219b docs: add item about the resource breaking change.
In #67382 we changed how values are resolved which ended up being a breaking change for some unit tests.

fixes #69360
2026-06-15 08:57:02 -07:00
kirjs c0e2364f12 docs(forms): use touch.emit() in custom controls example 2026-06-15 08:56:11 -07:00
Angular Robot 20fb11bdda build: update pnpm to v11.6.0
See associated pull request for more information.
2026-06-15 08:54:16 -07:00
whit33y 40f7fbdccb docs: clarify value attribute on radio/checkbox inputs is allowed with formField 2026-06-12 10:16:44 -07:00
aparziale 58efd86c78 fix(migrations): migration skip any target are not build or test
Fix migration behaviout that skip any target are not build or test

Fixes #66865
2026-06-12 09:24:44 -07:00
Alan Agius 32d7315094 refactor: optimize dom security schema lookups
Restructure the security schema map to index by property name instead of tag name, improving lookup efficiency.
2026-06-12 09:20:36 -07:00
hawkgs db677a4349 fix(docs-infra): stabilize html element scroll gutter
Stabilize `<html>` scroll gutter.

Fixes #69036
2026-06-12 09:19:32 -07:00
hawkgs 91ab7c6dea fix(docs-infra): add explicit font styles to docs-primary-btn
Add font family, size and weight to the `.docs-primary-btn`. This guarantees that applying the class to non-button elements, like anchors, will results in the same visual representation.
2026-06-12 09:08:02 -07:00
Angular Robot a157ec51af build: update pnpm to v11.5.3
See associated pull request for more information.
2026-06-12 08:18:32 -07:00
Angular Robot 72a8b98f54 build: update cross-repo angular dependencies to 11ee1f5
See associated pull request for more information.
2026-06-12 08:16:46 -07:00
Andrew Scott 8984c59626 refactor(core): ComponentDef should allow abstract types too
d1539a8513 incorrectly assumed components wouldn't be abstract but
it is still possible (though probably should be an abstract directive instead).
2026-06-11 13:08:09 -07:00
Aleksander Bodurri 985fd78818 docs(devtools): document the injector tree visualization
Add an internals doc covering how the injector tree is built from the directive forest's resolution paths, rendered with d3, and how injector data is read from the DI debug APIs.
2026-06-11 13:07:08 -07:00
Jessica Janiuk 782157dfd6 docs: release notes for the vscode extension 22.0.1 release 2026-06-11 13:05:06 -07:00