37863 Commits

Author SHA1 Message Date
Pawel Kozlowski 548ef4786e release: cut the v22.0.8 release v22.0.8 2026-07-22 16:33:02 +02:00
Kam 45eef0103e fix(docs-infra): fail the guide build when a markdown file starts with a BOM
A leading UTF-8 byte order mark (U+FEFF) before the first `#` stops the
Markdown parser from recognizing the heading, so the guide renders its
title as a paragraph and drops the standard docs header. The character
is invisible, so it cannot be caught in review.

Add a check in the guides generation pipeline that throws when a source
file starts with a BOM, failing the build with the offending file name.
This sits alongside the existing unknown-anchor check and prevents the
regression fixed in #69889 from recurring.

(cherry picked from commit ab52df470a)
2026-07-22 14:26:25 +02:00
Kam e26b9b42df docs: fix first heading rendering as paragraph on two template guides
The ng-container and binding template guide files each began with a
UTF-8 BOM (EF BB BF) before the leading `#`. The docs markdown parser
only promotes `#` to an H1 when it is the first character on the line,
so the BOM demoted the title to paragraph text (`<p># ...</p>`) and the
standard docs header (breadcrumbs, page title, edit button) never
rendered.

Stripping the BOM restores `#` as the first character, so both pages
now generate the proper `<header class="docs-header">` block. Verified
by rebuilding //adev/src/content/guide/templates:templates and
inspecting the generated HTML.

Fixes #69889

(cherry picked from commit f12db89659)
2026-07-22 14:26:24 +02:00
Angular Robot bc3ff3b068 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-07-22 13:24:05 +02:00
hawkgs 21c45a8e1e fix(zone.js): vitest patching of describe/it curried calls
Separate direct from curried calls of `describe`/`it` modifiers
(direct: `skip`, `only`, etc.; curried: `runIf`, `each`, etc.)
and perform the required patching to them.

Fixes: #69748
(cherry picked from commit e23541b263)
2026-07-22 12:34:06 +02:00
Jaime Burgos c0368f2278 fix(common): preserve crossorigin on image preloads
Propagate the crossorigin attribute from priority NgOptimizedImage hosts to SSR-generated preload links. Keep preload and image requests in the same credentials mode to avoid an anonymous image issuing an earlier credentialed request.

(cherry picked from commit d14696e430)
2026-07-22 12:31:56 +02:00
Kam e62905e536 docs: update stale Twitter reference to X in the URL matcher guide
Twitter is now X. In the custom-route-matcher guide, point the author-credit
link at x.com and refer to an "X (formerly Twitter) handle" (clarified once,
then "X handle"), matching the "X (formerly Twitter)" wording already used in
the footer, navigation, and update guide.

(cherry picked from commit 6557df5dbe)
2026-07-22 12:01:21 +02:00
Nikita Barsukov 6ee41d3351 docs: outdated section in the Signal Forms | Custom controls page
(cherry picked from commit cb1841d10b)
2026-07-22 12:00:11 +02:00
SkyZeroZx 5517db5328 docs: clarify usage of 'same-origin' mode and add SSR considerations
(cherry picked from commit d955d67b57)
2026-07-22 11:59:01 +02:00
SkyZeroZx 66f27a4c53 docs: add skills for Angular pipes
(cherry picked from commit 6371f0beb1)
2026-07-22 11:52:39 +02:00
SkyZeroZx c2a789f262 docs: clarify pipe usage to avoid DI misuse
(cherry picked from commit 6ac3e26fe0)
2026-07-22 11:50:19 +02:00
Suraj Yadav 388daea2fc fix(migrations): correctly migrate ngClass with mixed space-separated keys
Preserve NgClass import on partial migration and increment
skippedNgClassCount when an unmigrable mixed binding is encountered.

(cherry picked from commit 49672c437b)
2026-07-21 19:20:25 +02:00
splincode 3854174ec4 refactor(compiler): enforce exhaustive defer trigger handling
Store the trigger kind before each switch and assign the value to `never` in the fallback branch.

This removes the `any` casts and makes the switches exhaustive. Adding a new `DeferTriggerKind` without handling it in either phase now produces a TypeScript compilation error.

Runtime behavior and error messages remain unchanged.

(cherry picked from commit 8201cebc49)
2026-07-21 19:19:08 +02:00
Kam fb68711f04 feat(docs-infra): react with Angie in the playground minigame
The angle-guessing minigame's result popup personifies your score with a
hand-drawn stick-figure that changes expression by accuracy. Now that Angie
appears across adev — the 404 page, docs search, the embedded editor, the
tutorial intros and completions — give the minigame the same treatment so
its result feels consistent with the rest of the docs.

Replace the result reactor's stick-figure illustration with an Angie pose
keyed to accuracy (seven tiers, superhero down to angry). She is revealed
once the accuracy counter finishes counting up, popping in beside a speech
bubble that carries the round's existing quote. The result popup is widened
so Angie and the bubble sit side by side, and the share link is moved from
twitter.com to x.com.

This removes the previous hand-drawn stick-figure result art. NG the Angle,
the interactive character in the play area, is unchanged.

(cherry picked from commit 8422da814d)
2026-07-21 17:20:03 +02:00
Angular Robot 0eec0fe188 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-07-21 17:18:37 +02:00
Matthieu Riegler d302c7ab83 fix(forms): ensure pending status propagates to the root form in signal forms
Previously, the `pending()` status on a field's `ValidationState` only checked if the field itself or its immediate children had a pending asynchronous validator by directly inspecting `asyncErrors()`. This meant that a pending asynchronous validator deep within a nested form (e.g. on a grand-child) would not correctly bubble the `pending` state up to the root form.

fixes #69840

(cherry picked from commit 3497c9b943)
2026-07-21 13:48:37 +02:00
Angular Robot a79eb0ded3 build: update devinfra digest to 24f9214
See associated pull request for more information.
2026-07-21 13:31:02 +02:00
Angular Robot 1e6dd7b21c build: update bazel dependencies
See associated pull request for more information.
2026-07-21 13:27:10 +02:00
Angular Robot 830941287d build: update cross-repo angular dependencies
See associated pull request for more information.
2026-07-21 12:07:00 +02:00
Matthew Beck 7eec520725 test(compiler-cli): cover DOM-only vs full instruction set across compilation modes
Adds a compliance case pinning the instruction-set selection for a
directive-free standalone component:

  - full compile: the compiler can prove the template has no directive
    dependencies, so it takes the DOM-only fast path
    (`ɵɵdomElementStart`/`ɵɵdomElementEnd`).
  - local compile: the compiler cannot inspect dependencies, so
    `hasDirectiveDependencies` is forced true and the full instruction
    set is emitted (`ɵɵelementStart`/`ɵɵelementEnd`).

This mode-dependent switch was previously only exercised incidentally by
the `foreign_component` case, which couples it with foreign-component
compilation. The new case isolates it.

(cherry picked from commit eb3e480360)
2026-07-21 11:06:41 +02:00
Alan Agius 8616ba9db6 fix(core): ensure SVG animation attributeName is checked case-insensitively
Currently, the SVG sanitizer checks a static set of candidate attribute
names (`attributeName` and `attributename`). This approach misses other case
variations (such as `attributenAme` or others), which could potentially
bypass sanitization when binding sensitive attributes like `href` on
`<set>` or `<animate>` elements.

This change retrieves all attribute names of the SVG element, performs a
case-insensitive comparison with `'attributename'`, and sanitizes the value
if a match is found.

(cherry picked from commit 3499a1321b)
2026-07-21 11:05:07 +02:00
Kam 90e81e4367 feat(docs-infra): bookend the tutorials with Angie
The tutorial intro and "next steps" pages were plain headings with no
send-off. Bookend each tutorial with Angie: a greeting pose welcoming
learners on the intro page, and a superhero pose congratulating them on
the completion page, each beside a speech bubble.

The bubble treatment from the 404 page lived inside the not-found
component, so it's extracted into a reusable docs-content style
(docs-tutorial-mascot) usable from tutorial markdown, and applied to the
intro and completion pages of the Learn Angular, Signals, and Signal
Forms tutorials.

(cherry picked from commit d2c0e1ec77)
2026-07-21 11:03:26 +02:00
Angular Robot 70fb3e114b build: lock file maintenance
See associated pull request for more information.
2026-07-21 11:02:05 +02:00
Alan Agius 2b9222326a build: update devinfra commit and correct module file reference in ts version validation
Update devinfra sha to latest version.
2026-07-21 10:59:34 +02:00
Angular Robot f542a09953 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-07-20 18:16:17 +02:00
Suraj Yadav bb39cda648 fix(migrations): preserve NgClass import on partial migration
When only some NgClass usages are migrated (partial migration),
the NgClass import should be preserved in the module/component
imports if it is still used elsewhere.

(cherry picked from commit 223e40279f)
2026-07-20 18:14:42 +02:00
Kam 3ff6100777 fix(docs-infra): only claim a search on the 404 page when results exist
The "Page Not Found" page always rendered the sentence "We have
initiated a search for the term extracted from the URL", but the
NotFound component only runs a search when a term can be extracted,
and only renders results when there is at least one hit. On a 404
with no extractable term or no matching results, the page asserted
a search it never backed up.

Gate the sentence behind the same searchResults() check that guards
the results list, so the empty state simply reads "We couldn't find
what you were looking for."

(cherry picked from commit 79fe1c3a05)
2026-07-20 16:04:34 +02:00
arshiya tabasum 9d40f8aefe fix(http): prevent transfer cache key collisions
`makeCacheKey` joined the request fields with `|` before hashing. The url
and the serialized body can contain `|` themselves, so a shifted field
boundary (url `/items/a` + body `b|c` vs url `/items/a|b` + body `c`)
produced the same joined string and the same key, letting two distinct
requests share a transfer cache slot.

Join with `\0` instead, which cannot occur in a valid url or in encoded
params, so the field boundaries cannot be forged by field content.

(cherry picked from commit 3192dccaa3)
2026-07-20 14:39:57 +02:00
Kam e02a0debca refactor(devtools): add alt text to the empty-state screen illustrations
The Angie illustrations on the DevTools empty-state screens (added in
#69786) shipped with an empty `alt` and `aria-hidden="true"`. Give them
descriptive alt text and drop `aria-hidden` to improve accessibility.

(cherry picked from commit 00699f3e66)
2026-07-20 14:25:22 +02:00
Kam 1ecd9c31e5 docs: fix broken link to Angular AI Skills page
The MCP server setup guide linked to /ai/skills, which 404s. The
page lives at /ai/agent-skills. Update the link to point to the
correct route.

Fixes #69838

(cherry picked from commit d6cad90b3a)
2026-07-20 11:50:41 +02:00
Angular Robot e00e2912af build: update all github actions
See associated pull request for more information.
2026-07-20 11:25:38 +02:00
Angular Robot fb953b08ab build: update cross-repo angular dependencies
See associated pull request for more information.
2026-07-20 11:22:48 +02:00
Kam 43ea889d3c docs: document the inlineStyleLanguage workspace config option
The `inlineStyleLanguage` build option has existed since v12 but was
never listed in the workspace configuration reference. Add it to the
"Extra build and test options" table alongside the other style options,
documenting its accepted values (css, less, sass, scss) and default.

Fixes #69801

(cherry picked from commit f032f5ac1f)
2026-07-20 11:21:49 +02:00
Pawel Kozlowski e14ead1093 Revert "fix(forms): preserve intermediate number values in signal forms"
This reverts commit 64d6d47a0c.
2026-07-20 10:40:53 +02:00
Matthew Beck f8df06d702 release: cut the v22.0.7 release v22.0.7 2026-07-15 21:23:21 -07:00
XananasX7 3b82aea861 ci: harden workflow against expression injection
Interpolating GitHub context values directly into `run:` steps creates
an expression-injection vector. Move the affected values into an `env:`
block and reference them as environment variables in the shell script
instead. This prevents shell metacharacters in context values from
altering step behaviour.

Signed-off-by: El Mehdi Abenhazou <mehdiananas007@gmail.com>
(cherry picked from commit d43acaf80c)
2026-07-15 17:44:48 -07:00
Jaime Burgos 64d6d47a0c fix(forms): preserve intermediate number values in signal forms
Preserve raw native input text while editing so parsed model values are not written back on every keystroke.

(cherry picked from commit 2e32872720)
2026-07-15 15:56:52 -07:00
Angular Robot 829d98e9ae build: update cross-repo angular dependencies to v22.0.7
See associated pull request for more information.
2026-07-15 14:49:17 -07:00
splincode fa6a1d26bd test(elements): disambiguate the setTimeout spy type
Bind spyOn explicitly to Window so Jasmine uses the DOM setTimeout signature that returns a number instead of the Node.js Timeout type. Remove the unsafe any cast and the obsolete TODO.

(cherry picked from commit 24a3c63976)
2026-07-15 14:48:32 -07:00
Kam 966e5eb231 feat(devtools): show Angie on the empty-state screens
The DevTools state screens (Angular not detected, unsupported version,
production build) showed a plain Material icon above the message. Show
the Angie mascot instead, matching the treatment already used across
angular.dev (the 404 page, empty search, the preview error state).

Each screen uses a pose that fits its message: the dizzy `error` pose for
"application not detected", `coding-01` for the version-upgrade prompt,
and `sad` for the production build notice.

(cherry picked from commit d4f2313e4d)
2026-07-15 14:48:05 -07:00
cexbrayat 70500e4067 fix(core): preserve explicit input transform write type
If a directive has an input declared as `dismissible = input<boolean>(true, {transform: booleanAttribute});` then the following templates were not compiling:

```
<div directiveName dismissible="true"></div>
<div directiveName dismissible></div>
```

This commit fixes the issue, without breaking contravariant consumers.

(cherry picked from commit 0ae6d81ed2)
2026-07-15 12:02:23 -07:00
arshiya tabasum 91e33aa1de fix(common): avoid prototype lookups in date format caches
The NAMED_FORMATS and DATE_FORMATS caches were plain objects read with a
truthy check keyed by a token from the format string, so a token matching
an inherited Object member (e.g. `__proto__`) resolved to a prototype
value. Create both caches with a null prototype so only real entries are
returned.

(cherry picked from commit 359fb503b8)
2026-07-15 12:01:53 -07:00
Shuaib Hasan Akib a6174d5900 refactor(forms): warn when a text input receives a null value in Signal Forms
Native text `<input type="text">` controls do not support `null` values.
When a Signal Forms model bound to a text input is set to `null`, the value
is silently coerced to an empty string.

(cherry picked from commit 37f3279fe7)
2026-07-15 12:01:17 -07:00
Kristiyan Kostadinov c89f71a74c fix(core): ignore processing instruction syntax in templates
Updates the template parser to detect and ignore processing instruction syntax (e.g. `<? foo ?>` or `<? foo >`). Currently it is being printed out as text.

Fixes #34371.

(cherry picked from commit 68ac204074)
2026-07-15 11:57:06 -07:00
Paweł Maniecki b21d6cdd58 docs: update "browser set" links to avoid bad redirect
"Supported browsers" page got moved from
https://web-platform-dx.github.io/web-features/supported-browsers to https://web-platform-dx.github.io/supported-browsers/

There's a redirect in place, but it drops the query parameter with the date, so all versions link to the current browser set.

(cherry picked from commit ea83f13388)
2026-07-15 11:55:29 -07:00
Kam ae1d81c8c5 feat(docs-infra): greet visitors with Angie in the cookie popup
The cookie consent popup showed only text and two buttons. Add the
Angie greeting pose to it so the first thing a new visitor sees carries
the same mascot treatment already used across the docs (the 404 page,
empty search results, the preview error state).

The message and mascot sit in a flex header row; the two action buttons
now share the row equally so they fill the card instead of leaving a
trailing gap. Layout only, the consent behaviour is unchanged.

(cherry picked from commit 6a3487f7b7)
2026-07-15 11:54:54 -07:00
Cameron Smick e881b962cc refactor(core): move signal debug graph interfaces to primitives/devtools
Move the DebugSignalGraph, DebugSignalGraphEdge, and DebugSignalGraphNode interfaces from packages/core/src/render3/util/signal_debug.ts into the packages/core/primitives/devtools/src package. This decouples the signal graph debug types from runtime render3 utilities and allows devtools and internal core tooling to import them directly from primitives as type-only exports.

(cherry picked from commit d997a96b47)
2026-07-14 11:09:27 -07:00
CYANO-01 b34bf0dce8 fix(platform-browser): prevent ReDoS in SOURCEMAP_URL_REGEXP
Replace the lazy quantifier (.+?) with a negated character class
([^\s*]+) that excludes whitespace and asterisks. Source map URLs
never contain these characters, so the fix is semantically
equivalent while eliminating the O(n²) backtracking path triggered
by unclosed /*# sourceMappingURL= fragments.

Fixes: polynomial ReDoS in addBaseHrefToCssSourceMap
(cherry picked from commit fb6b354fbd)
2026-07-14 10:57:25 -07:00
Sonu Kapoor 20b7dc3023 fix(http): prevent interceptor signal reads from leaking into calling reactive contexts
When `HttpClient` is called from within an `effect()` or other reactive
context, any signal reads performed inside HTTP interceptors were
inadvertently tracked by that context. This caused the effect to
re-execute whenever those signals changed, regardless of whether the
signal was semantically related to the HTTP call.

The fix wraps the interceptor chain invocation in `untracked()` so that
signal reads inside interceptors — both functional (`withInterceptors`)
and class-based (`withInterceptorsFromDi`) — are invisible to the
calling reactive context. This matches the precedent set by the resource
API, which also wraps its loader in `untracked()` for the same reason.

Fixes #58682

(cherry picked from commit 6d043f8657)
2026-07-14 09:21:13 -07:00
LordKay-sudo c88ddde1c9 fix(compiler-cli): re-tag SourceFiles after TsCreateProgramDriver.updateFiles()
TypeScript reuses SourceFile objects between old and new programs, so untagging the old program also untags shared files in the new program. Re-apply shim tags on the new program to prevent getSemanticDiagnostics() crashes with TS 5.5+.

(cherry picked from commit ae0ec7315c)
2026-07-14 09:18:40 -07:00