Commit Graph

37498 Commits

Author SHA1 Message Date
Andrew Scott 862d27f25c release: bump VSCode extension version to 22.0.0 vsix-22.0.0 2026-06-03 18:14:42 +02:00
cexbrayat e340c283e1 docs: align dev skills examples with style guide
(cherry picked from commit c1b2c58525)
2026-06-03 18:11:51 +02:00
marktechson 4e4242035b docs: update landing page for v22
(cherry picked from commit 20524958b7)
2026-06-03 17:54:55 +02:00
Pawel Kozlowski 24416ce92f docs: update tutorials and playground to v22.0.0
(cherry picked from commit 595660d796)
2026-06-03 17:11:43 +02:00
Pawel Kozlowski 0a3d22a571 docs: update version picker list for v22 release
(cherry picked from commit 95ede172a6)
2026-06-03 17:11:43 +02:00
Joey Perrott 31513301f2 release: bump version of in memory web api
(cherry picked from commit 09c03a2fe1)
2026-06-03 16:36:34 +02:00
Pawel Kozlowski 1cb0524f82 release: cut the v22.0.0 release v22.0.0 2026-06-03 15:03:40 +02:00
Cheng-Hsuan Tsai 3401189488 docs: add Signal Forms integration example to Angular Aria Autocomplete guide
(cherry picked from commit b84e5ef183)
2026-06-03 11:23:27 +02:00
Kam da5a9505ef docs: use Türkiye as the country name in aria autocomplete examples
The aria autocomplete examples list "Turkey" in their country data, but
the country's official name is "Türkiye". Update all nine app.ts variants
to use it.

While there, remove a junk "Imporant" entry from the highlight/retro
variant's list, which is not a country and was a misspelled stray paste.

(cherry picked from commit 192ac021e4)
2026-06-03 11:19:58 +02:00
cexbrayat 8e16aad895 docs: update DI fundamentals to use @Service
(cherry picked from commit a6a3132903)
2026-06-03 11:18:56 +02:00
cexbrayat 62e1d88252 docs: simplify testing setup examples
(cherry picked from commit 3bb602ffe6)
2026-06-03 11:17:48 +02:00
Cheng-Hsuan Tsai 0066a640a2 docs: update Aria Menu focus/hover style and add context menu example
(cherry picked from commit af62d88bbd)
2026-06-03 11:16:19 +02:00
cexbrayat e10647bacd docs: update signal forms conditional rules
(cherry picked from commit ac30e4891a)
2026-06-03 11:06:08 +02:00
Pawel Kozlowski 3ad9eb0217 Revert "fix(core): harden inherit definition feature against polluted prototypes"
This reverts commit f3c924926f.
2026-06-03 11:04:36 +02:00
Matthieu Riegler f3c924926f fix(core): harden inherit definition feature against polluted prototypes
Stop inheritance traversal before built-in prototype objects and only read `ɵcmp`/`ɵdir` when they are own properties of a super type. This prevents polluted inherited properties from being treated as Angular defs during inheritance merging.

Also adds regression tests covering polluted `Object.prototype.ɵdir` and `Object.prototype.ɵcmp` to ensure polluted host metadata is not inherited.

(cherry picked from commit e695379354)
2026-06-02 13:26:02 +02:00
Angular Robot a301ba2878 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-06-02 12:27:30 +02:00
Cheng-Hsuan Tsai 04028c75d7 docs: add testing guides to Angular Aria
(cherry picked from commit a76bc3c849)
2026-06-02 11:25:05 +02:00
Michael Small 36ff378564 docs: fix min/max form template examples
(cherry picked from commit 42391329c2)
2026-06-02 11:23:09 +02:00
Joey Perrott 689d41dd1f fix(docs-infra): secure update-assets script against RCE and SSRF
- Validate storedSha and storedBranch from _build-info.json.
- Validate latestSha returned from GitHub API.
- Validate branch in GithubClient.getShaForBranch and baseSha/headSha in GithubClient.getAffectedFiles.
- Use execFileSync instead of execSync to avoid shell execution.

TAG=agy
CONV=4e3e69ba-3f3d-416b-9ce4-9ef75486d2f3

(cherry picked from commit 3093edcad0)
2026-06-02 11:22:04 +02:00
Ben Hong 3b79a6921a docs: add conditional validation to signal forms validation guide
(cherry picked from commit c0eef66bbe)
2026-06-02 11:20:57 +02:00
Pawel Kozlowski 7584e3519b release: cut the v22.0.0-rc.3 release v22.0.0-rc.3 2026-06-01 22:06:36 +02:00
Alan Agius 7b9130931d fix(platform-server): throw on suspicious URLs and restrict protocol-relative URLs
Currently, the platform-server attempts to neutralize URL hijacking and SSRF
bypasses by collapsing multiple leading slashes in relative paths. However,
sophisticated bypasses using obfuscated protocols (e.g., carriage returns or
newlines) or relative-like backslash paths can still lead to unexpected
origin takeovers.

This commit improves security by doing the following:
- Rejects protocol-relative URLs by throwing an error if they are not
  explicitly permitted via `allowProtocolRelative`.
- Strictly validates resolved URLs against the provided origin using
  `isSafeOriginChange`. If a URL unexpectedly shifts origins, an error
  is thrown.
- Permits origin changes only when standard absolute http/https protocols are
  explicitly declared in the input URL.

(cherry picked from commit 0b19c92d44)
2026-06-01 20:03:30 +02:00
Bhuvansh855 ae12a0932c docs(core): fix typos and grammar in dependency injection guides
(cherry picked from commit ac47524ede)
2026-06-01 18:56:15 +02:00
Matthieu Riegler 9d9855a415 fix(migrations): Make the safe optional chaining idempotent
Our unit tests were missleading, the migration wasn't idempotent and `$safeNavigationMigration` were added multiple times on consecutive runs.

(cherry picked from commit 6038b9ede7)
2026-06-01 18:50:26 +02:00
Matthieu Riegler 5f14b82af8 refactor(core): Update webmcp support to use document.modelContext
The implementation in Chrome 150 moved `modelContext` from the navigator to the document (see webmachinelearning/webmcp/pull/184)

We're also removing the calls to the deprecated `unregisterTool` method.

fixes #68947

(cherry picked from commit 683172b39a)
2026-06-01 18:49:11 +02:00
Matthieu Riegler 012609a714 docs(docs-infra): simplify code block styles
#68940 introduced a regression that broke style for wrapped `code` blocks.
Simplifying the style by droping the unecessary gradient + before workaround fixes the issue.

(cherry picked from commit ec4f08bb94)
2026-06-01 18:37:00 +02:00
Kam ed72aa8b78 refactor(docs-infra): correct misspelled CodeHighlighter class name
The class exported from `code-highlighter.ts` was named `CodeHighligher` (missing the second `h`) and its private field was `cachedHighligher`, both disagreeing with the filename which spells "highlighter" correctly. Rename the class to `CodeHighlighter` and the field to `cachedHighlighter`, and update the sole consumer (`CodeBlock`). Pure rename, no behavior change.

(cherry picked from commit 032fae8b36)
2026-06-01 18:34:53 +02:00
KirtiRamchandani 3482d01bf2 docs: mention Angular Aria in accessibility guide
(cherry picked from commit 9b5952e3a3)
2026-06-01 18:33:38 +02:00
Matthieu Riegler e834c37054 docs: add v22 entries to the update guide
(cherry picked from commit c743af4919)
2026-06-01 18:20:06 +02:00
Matthieu Riegler 61b34836ba docs: align main and 22.0.x for aria guides 2026-06-01 16:34:27 +02:00
Angular Robot 6fee7aaf89 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-06-01 16:31:26 +02:00
Kristiyan Kostadinov 2891f7e787 fix(compiler): move projection attributes into constants
We can save some memory by moving the `attrs` passed into the `projection` instruction into the constant pool.

(cherry picked from commit f0b28f6443)
2026-06-01 12:28:36 +02:00
Kam 15f7f8af96 docs: fix esbuild and TensorFlow branding on overview page
The esbuild card on the "What is Angular?" page rendered the bundler name three different ways (title "esbuild", link "ESBuild and Vite", body "Vite and ESBuild") so this unifies on the official lowercase "esbuild"; also corrects "Tensorflow" to "TensorFlow" to match the other brands on its line (Firebase, Material Design, Flutter, Google Cloud) which were already cased correctly.

(cherry picked from commit f777dd112e)
2026-06-01 12:19:10 +02:00
arturovt 3e50a76939 docs: document //i18n(ph="name") placeholder syntax for template interpolations
The `//i18n(ph="name")` comment syntax for naming interpolation placeholders
in templates was not documented anywhere in the i18n guide, despite being a
supported compiler feature with test coverage.

Add a "Name the interpolation placeholder" subsection under "Mark text in
component template" in prepare.md, mirroring the existing subsection in
"Mark text in component code". Includes a cross-reference to the $localize
equivalent (`${var}:name:`) to help readers connect the two approaches.

Closes #52070

(cherry picked from commit 2b44a07ea7)
2026-06-01 12:18:11 +02:00
aparziale 05708e4d6d docs: fix link debbuging and extended-diagnostics
Update link for 'Improve debbuging with better Angular error messages' and 'extended-diagnostics' sections

Fixed #69010

(cherry picked from commit cbc36f59e0)
2026-06-01 12:17:05 +02:00
Kam d82c364fb7 fix(docs-infra): readable contrast for DEV/EXP api badges in light mode
The DEV (developer preview) and EXP (experimental) badges in the API reference list used `--page-background` for text, which is dark in dark mode (working as intended on the pale colored bg) but white in light mode, making the labels invisible against the near-white badge bg. Introduce an `--item-attr-text` CSS variable defaulting to `--page-background` and overridden to `--primary-contrast` in light mode, following the per-mode pattern the file already uses for `--item-attr-base-mix`.

(cherry picked from commit 0010ad5910)
2026-06-01 11:57:56 +02:00
Angular Robot 2652c256d1 build: update pnpm to v10.34.1
See associated pull request for more information.
2026-06-01 11:56:50 +02:00
Kristiyan Kostadinov 8061ca4cf3 fix(docs-infra): round up media queries
Uses 1px increments for media queries, rather than the 0.01px we have now which seem to be a bit too precise and cause the UI to be stuck between states in some cases.

I've also removed some unnecessary `calc`, because the calculation is happening inside Sass already.

Fixes #69020.

(cherry picked from commit 96ed0fe45b)
2026-06-01 11:34:45 +02:00
cexbrayat e81c7e8466 refactor(forms): type built-in getError results
Add overloads for built-in validation error keys so callers get precise error payload types from getError.

This enables signal forms template patterns like:

```html
@if (login.getError('minLength'); as minLengthError) {
  <div>Login should be {{ minLengthError.minLength }} characters</div>
}
```

(cherry picked from commit 45e8fb5d6c)
2026-05-29 14:58:47 +02:00
arturovt e3e25b5a53 fix(core): use Object.create(null) for LOCALE_DATA as a hardening measure
Prior to this commit, `LOCALE_DATA` was initialized as a plain object literal:

```typescript
let LOCALE_DATA: {[localeId: string]: any} = {};
```

While `__proto__` is neutralized by the `replace(/_/g, '-')` sanitization step (becoming `--proto--`), keys like `constructor` and `prototype` pass through unchanged and would modify special properties on `Object.prototype` if used as bracket notation keys on a plain object.

**Example attack through the public API:**

```typescript
// attacker calls the public registerLocaleData API with a crafted localeId
registerLocaleData(data, 'constructor');

// internally becomes:
LOCALE_DATA['constructor'] = data;
// → modifies Object.prototype.constructor for every object in the process

// or with extraData:
registerLocaleData(data, 'constructor', extraData);
// LOCALE_DATA['constructor'][LocaleDataIndex.ExtraData] = extraData;
// → Object.prototype[LocaleDataIndex.ExtraData] = extraData
// → every plain object in the process now has this property
// → affects JSON serialization, property enumeration, and framework internals

// consequence — any subsequent object created in the process is affected:
const user = getUserFromSession();
console.log(user[LocaleDataIndex.ExtraData]); // → attacker-controlled value
```

In a long-running SSR server this pollution persists for the lifetime of the process and affects all subsequent requests from all users.

**The fix** initializes `LOCALE_DATA` with `Object.create(null)`:

```typescript
let LOCALE_DATA: {[localeId: string]: any} = Object.create(null);
```

A null-prototype object has no prototype chain, so any key is treated as a plain string with no special behavior, making prototype pollution impossible regardless of input — without relying on the sanitization step as the sole protection.

(cherry picked from commit 0deac976f3)
2026-05-29 14:55:55 +02:00
arturovt 2d3db59321 fix(zone.js): validate __Zone_symbol_prefix to prevent DOM clobbering attacks
Previously, `__Zone_symbol_prefix` was read directly from `globalThis` without validating its type:

const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__';

This made it possible for DOM clobbering to interfere with Zone’s internal symbol handling. If an attacker injected a DOM element with the same name (for example via a form field or anchor ID), `global['__Zone_symbol_prefix']` could resolve to a DOM element instead of a string. Because DOM elements are truthy, the fallback would not be used, and Zone would construct invalid internal keys (e.g. “[object HTMLFormElement]...”), breaking patching and lookup logic in subtle ways.

This prevents DOM clobbering from influencing Zone’s internal symbol generation and keeps the patching system stable even in the presence of malicious or unexpected global values.

(cherry picked from commit e50f504b2f)
2026-05-29 14:54:21 +02:00
rootvector2 4795b35d5b fix(common): only strip a literal /index.html suffix from URLs
Hit this while exercising `Location.normalize` with route paths that end in non-`.html` suffixes.

The unescaped `.` in the strip regex inside `_stripIndexHtml` matches any character, so e.g. `/foo/indexXhtml` and `/foo/index_html` both collapse to `/foo` before the base-path strip and end up resolving to the wrong route.

Escape the dot so only the literal `/index.html` suffix is stripped.

(cherry picked from commit d109bf90d5)
2026-05-29 13:16:10 +02:00
Alan Agius 6e71049021 refactor(platform-server): clean up and simplify url resolution utility
Trims leading/trailing whitespaces in resolveUrl to normalize input.

(cherry picked from commit e14d34e9ee)
2026-05-29 13:14:15 +02:00
Angular Robot 5f0c9f8bca docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-05-29 12:22:29 +02:00
arturovt c2153b1eb5 docs: document i18n object forms for sourceLocale and locales in angular.json
The `sourceLocale` and `locales` entries in `angular.json` accept object
forms (with `code`, `baseHref`, and `subPath`) that were never documented.

- Add an `i18n options` reference section to workspace-config.md covering
  the full shape of `sourceLocale` and each `locales` entry, including the
  distinction between `baseHref` (HTML only) and `subPath` (HTML + output
  directory name)
- Add `i18n` to the project configuration options table in workspace-config.md
- Expand the suboptions table in merge.md to mention the object forms and
  link to the new reference section

Closes #59664

(cherry picked from commit 2f49d5dba4)
2026-05-29 11:53:56 +02:00
Angular Robot c203b70c53 build: update all github actions
See associated pull request for more information.
2026-05-29 11:48:36 +02:00
tjshiu e8a81ce2d7 docs: remove redundant keydown bindings in autocomplete examples
(cherry picked from commit f0e164e4cb)
2026-05-29 11:46:40 +02:00
tjshiu 4c4e9eba9c docs: add clear buttons inside autocomplete examples
(cherry picked from commit 3939799e18)
2026-05-29 11:46:40 +02:00
Alex Rickabaugh ebd698b90f release: cut the v22.0.0-rc.2 release v22.0.0-rc.2 2026-05-28 10:01:37 -07:00
Angular Robot c1cefe9928 build: update bazel dependencies
See associated pull request for more information.
2026-05-28 16:12:51 +02:00