Commit Graph

37467 Commits

Author SHA1 Message Date
Angular Robot bc9d033fe2 build: lock file maintenance
See associated pull request for more information.
2026-05-27 11:12:33 -07:00
tjshiu 30a8a2c4bd docs: modernize combobox and select guides and examples
Upgrades the guides and interactive examples to use modern signal-based APIs,
restoring the nested search dialogs and introducing datepicker grids.
2026-05-27 11:11:34 -07:00
Kam 8c3e46fb53 docs: fix preposition in libraries naming callout
The naming callout said the ng- prefix is "used from the Angular framework". Change to "used by", matching standard usage and the surrounding prose.
2026-05-27 11:09:40 -07:00
Harmeet Singh 741fcc4abf docs: clarify signals effect import source 2026-05-27 11:08:48 -07:00
Joey Perrott 983433d7f5 build: update dev-infra actions to 649c3afeaa46674507b9625537e49de54a695e2b
Updates the dev-infra action pin to the latest merge commit to resolve the retired Gemini model 404 failure.
2026-05-27 11:07:52 -07:00
Cameron Smick 23f3894c40 refactor(devtools): make the hydration property of DevToolsNode optional
Make the `hydration`` property of `DevToolsNode`` optional as frameworks like Client-Only Wiz don't have the same hydration concept as Angular and will not set one for nodes returned from `getComponentForest`.
2026-05-27 10:54:31 -07:00
Kristiyan Kostadinov abc61aaf7c fix(core): do not register dom triggers when defer blocks are in manual mode
Fixes that we were registering DOM triggers even if the `@defer` block is set up to be rendered manually. This matches the behavior we already have for timer triggers.

Fixes #68800.
2026-05-27 10:53:59 -07:00
Matthieu Riegler d7161fd431 fix(devtools): Add support for null-prototype objects
null-prototype don't inherite from the Object prototype and thus don't have constructors.

fixes #68798
2026-05-27 10:53:32 -07:00
Kam d808866f89 refactor(language-server): drop duplicate isAngularCore helpers in session
session.ts defined isAngularCore, isExternalAngularCore, and
isInternalAngularCore as byte-identical copies of the already-exported
versions in utils.ts. Only isAngularCore was used locally; the other
two were dead. handlers/template_info.ts already imports the utils
version. Remove the duplicates and import isAngularCore from utils.
2026-05-27 10:52:49 -07:00
Bhuvansh855 fdf0bf9a62 fix(docs-infra): improve inline code layout
Remove inline-block layout behavior from inline code elements
to improve wrapping and spacing in multiline documentation
paragraphs.
2026-05-27 10:52:14 -07:00
Joey Perrott a648e8e914 ci: configure setup and use pnpm in benchmark comparison workflow
The benchmark comparison workflow fails because it runs pnpm install
without setting up node and pnpm first. We configure the setup steps
manually so that checkouts from forks are supported.

Additionally, we update the benchmark comparison script (index.mts)
to use pnpm rather than hardcoded yarn commands to install
dependencies when checking out revisions.
2026-05-27 10:51:37 -07:00
Alan Agius 26f4ed5056 fix(dev-infra): draft GitHub release to support immutable releases
Update the release tool to create the GitHub release in a draft state initially and publish it only after the extension asset (.vsix) has been successfully uploaded.

GitHub shifted towards immutable releases. If a release is published instantly upon creation,the assets will not be able to be uploaded.
2026-05-27 10:50:20 -07:00
aparziale fcecf7016e docs: update CDK Overlay URL
Update CDK Overlay URL for strategy select.md and multiselect.md

Fixed #68914
2026-05-27 10:48:39 -07:00
Matthieu Riegler 7977a4b9bc docs(docs-infra): remove firebase studio launcher 2026-05-27 10:48:10 -07:00
Alan Agius e38db9b618 build: add explanation comment to confirmModulesPurge setting
Add a detailed comment to the `confirmModulesPurge: false` setting in
`pnpm-workspace.yaml`. This comment explains that this setting avoids
interactive prompts when `node_modules` needs to be purged and
recreated. This prevents package installation commands from hanging or
failing in non-interactive contexts (such as CI/CD pipelines, container
builds, or automated editor/agent environments) where stdin is
not a TTY.
2026-05-27 10:46:52 -07:00
Cheng-Hsuan Tsai 8f0ac6459e docs: update Angular Aria guides 2026-05-27 10:46:22 -07:00
Cheng-Hsuan Tsai cf2e6ec16d docs: modernize Aria guides 2026-05-27 10:45:49 -07:00
Andrew Scott fa7580061b fix(zone.js): avoid type error on custom object rejection with rejection property
Ensure that when a custom object with a 'rejection' property is thrown as a raw promise rejection, the unhandled promise rejection error logger does not crash with a TypeError while trying to access undefined zone properties.

Also wrap microtask queue draining and task frame counter updates with defensive try-finally blocks to guarantee internal scheduler states are properly reset under any potential call stack exception unwinding scenarios.
2026-05-27 10:45:13 -07:00
SkyZeroZx 31399c2171 fix(service-worker): Preserves HTTP cache mode in asset group requests
Ensures explicit HTTP cache mode from incoming requests is forwarded and maintained when creating fetch requests for assets, aligning with expected fetch behavior and preventing unintended cache handling.
2026-05-27 10:43:14 -07:00
SkyZeroZx 5b0e9663e5 fix(service-worker): Preserves explicit 'credentials: omit' in asset requests
Ensures that explicitly provided `credentials: 'omit'` options are preserved
when creating new requests, preventing unintended credential inclusion.
2026-05-27 10:43:14 -07:00
Alan Agius ce1c0f7ab9 fix(core): normalize tag names in runtime i18n attribute security context lookup (#68868)
Normalize namespaced tag names (e.g., :xhtml:a to a) inside i18nResolveSanitizer before looking up their security context. This ensures custom namespaced tag attributes undergo correct translation sanitization at runtime.

PR Close #68868
2026-05-27 10:40:22 -07:00
Alan Agius 4d79a52b2f fix(compiler): normalize tag names with custom namespaces in DomElementSchemaRegistry (#68868)
Custom XML/XHTML namespaced elements (e.g., <xhtml:a>) fall back to the standard HTML namespace during element creation at compile-time/runtime. However, their property and security context lookups inside the schema registry were incorrectly performed using the full namespaced tag name (e.g., :xhtml:a), which bypassed the default a|href sanitization registry and incorrectly returned SecurityContext.NONE instead of SecurityContext.URL.

This commit introduces tag name normalization inside DomElementSchemaRegistry for custom namespaces (other than the built-in svg and math namespaces). Custom namespaced tag names are now normalized to their simple HTML element counterparts for all registry queries, ensuring that correct property schema validation and dynamic security sanitization rules (such as URL sanitization) are enforced at runtime.

PR Close #68868
2026-05-27 10:40:22 -07:00
Alan Agius 75033d2001 fix(compiler): sanitize dynamic href and xlink:href bindings on SVG a elements (#68868)
Dynamic bindings to `href` and `xlink:href` attributes on SVG `<a>` elements (`<svg:a>`) were previously unmapped in the DOM security schema. As a result, they bypassed sanitization completely, creating a potential XSS vulnerability if bound to untrusted user inputs (e.g., `javascript:` URLs).

This fix mitigates this risk by:

1. Registering `href` and `xlink:href` on `<svg:a>` elements under the `SecurityContext.URL` context in both the compiler and core DOM security schemas.

2. Enabling template compilation to output runtime URL sanitization checks (`ɵɵsanitizeUrl`) on these attributes.

3. Adding regression and verification test cases to ensure dynamic SVG link bindings are safely sanitized at runtime while static values are correctly allowed.

PR Close #68868
2026-05-27 10:40:22 -07:00
Alan Agius 861d37e669 build: update minimum supported Node.js versions
Update the minimum supported Node.js versions for v22 and v24. Specifically, the minimum supported version for Node.js v22 is bumped to v22.22.3, and for v24 it is bumped to v24.15.0. This ensures compatibility with newer runtime versions and coordinates ranges across monorepo packages.
2026-05-27 10:39:17 -07:00
Matthieu Riegler e5f3b9def8 refactor(core): extend sanitization test coverage
This ensures that #68576 actually fixed a sanitization issue on uppercase elements/attributes
2026-05-27 10:38:11 -07:00
Matthieu Riegler 140c4d04cb fix(platform-server): prevent SSRF bypasses via backslash URLs in HttpClient
Encoding backslashes ensures that they are not normalized to slashes and where they could generate a protocol relative URL.
2026-05-27 10:23:29 -07:00
Alan Agius 1307ff355c fix(platform-server): secure location and document initialization against SSRF and path hijack
Normalizes the URL and path parsing logic inside platform-server by consolidating security checks and normalizations into a single, unified parseUrl helper function.

This includes:
- Collapsing multiple consecutive leading slashes and backslashes (e.g., // or /\) to a single forward slash to avoid protocol-relative parsing of path-like & relative inputs.
- Rejecting malformed absolute URLs that are otherwise accepted by lenient DOM parsers like Domino but rejected by standard WHATWG parsers, preventing SSRF / allowedHosts validation bypasses.
- Ensuring parseDocument gets the fully parsed and normalized URL instead of raw, unvalidated configuration values, preventing virtual document hostname adoption/origin hijack.
- Moving parseUrl unit tests into a dedicated url_spec.ts test file to keep platform_location_spec.ts clean and decoupled.
2026-05-27 10:22:36 -07:00
Matthieu Riegler b56e865148 fix(common): sanitize placeholder
The placeholder should be sanitized to prevent CSS/content injection.
2026-05-27 10:21:50 -07:00
Matthieu Riegler dfdfbe34a5 fix(common): add upper bounds for digitsInfo
The prevents the `roundNumber` function from allocating a large array.
2026-05-27 10:20:57 -07:00
Matthieu Riegler d5a489aed3 fix(core): sanitize meta selectors
Ensure that property/name are correctly escaped and doesn't break out of the intended selector.
2026-05-27 10:18:56 -07:00
Alex Rickabaugh 4f9ee3c056 refactor: add g3-only and 3p-only markers to replace specific g3 patches
Replace specific file patches applied during google3 sync with generic comment-based mechanisms.

By adding `// g3-only` prefix comments to g3-specific exports and declarations, and appending `// 3p-only` context to `@internal` tags, we enable generic tooling to handle these modifications during the sync process.

Additionally, wrap 3rd-party-only imports and exports (which should be stripped in google3) with `// 3p-only-start` and `// 3p-only-end` comment markers.

This reduces the need for maintaining custom file-specific patches in google3.

Also, add a comprehensive guide to these sync comment markers in `contributing-docs/google-markers.md` to assist external contributors.

Specifically:
- Add `// 3p-only` context to `@internal` in `directives.ts` for `foreignImports` and `deferredImports`.
- Add `// g3-only` commented exports in `core.ts`.
- Add `// g3-only-start`/`// g3-only-end` commented global declaration block in `zone.ts`.
- Wrap 3p-only imports in `fake_navigation.ts` with `// 3p-only-start` and `// 3p-only-end`.
- Wrap 3p-only exports in `compiler-cli/index.ts` with `// 3p-only-start` and `// 3p-only-end`.
- Add `// g3-only` and `// 3p-only` markers to `shared.ts` for `setDisabledStateDefault` configuration.
- Add `// g3-only` and `// 3p-only` markers to `feature_detection.ts` for semver dependency.
- Add `// g3-only` and `// 3p-only` markers to `domino_adapter.ts` for domino import path.
- Add `// 3p-only` marker to `ng_dev_mode` import in `event_dispatcher.ts`.
- Add `// g3-only` and `// 3p-only` markers to `MOUSE_SPECIAL_SUPPORT` in `event_contract_defines.ts`.
- Add `// g3-only` and `// 3p-only` markers to `BrowserModule` imports in `module.ts` (animations) and `browser.ts` (testing).
- Add `// 3p-only` marker to `goog.d.ts` reference tags in `util.ts` (platform-browser), `types.d.ts`, `ng_i18n_closure_mode.ts`, `tokens.ts`, and `global_utils.ts`.
- Wrap `Default` enum value of `ChangeDetectionStrategy` in `constants.ts` with `// 3p-only-start` and `// 3p-only-end`.
- Add `// g3-only` and `// 3p-only` markers to `LEGACY_OPTIONAL_CHAINING_DEFAULT` in `legacy_optional_chaining_default.ts` and `legacyOptionalChaining` in `directive.ts`.
- Add `// g3-only` and `// 3p-only` markers to `DEFAULT_PARAMS_INHERITANCE_STRATEGY` in `router_state.ts`.
- Add `// g3-only` and `// 3p-only` (and block variants) markers to `@mcp-b/webmcp-types` imports in `declare_tool.ts`, `provide_tools.ts`, and `types.ts`.
- Add `contributing-docs/google-markers.md` guide.

TAG=agy
CONV=cd09a4f3-869a-4f41-949b-c91f1b8f1c51
2026-05-26 16:09:37 -07:00
Alex Rickabaugh 124ba10ead feat(core): add custom set option to linkedSignal
Introduce a custom `set` option in `linkedSignal` options to allow overriding and customizing the default write-back behavior of writable signals. This lets developers route updates back to the source of truth (e.g., converting Fahrenheit back to Celsius) or perform other side effects like updating properties inside a parent signal.

Additionally, the custom callback receives the standard signal setter as its second parameter (`rawSet`) to allow direct internal mutation if desired.

Fixes #59665

TAG=agy
CONV=addbb5c4-4233-49e8-b844-6f732d7d5c72
2026-05-26 16:01:35 -07:00
Alex Rickabaugh 06b004ec5c refactor(compiler): add support for compiling NgModules under isolatedDeclarations
This commit adds support for compiling NgModules in isolated declarations mode.
2026-05-22 14:00:18 -07:00
Andrew Scott df68a96b26 fix(vscode-extension): disable language server in untrusted workspaces
Restrict untrusted workspace support to limited mode. Skip launching the language client and registering commands in restricted mode, and only start them once workspace trust has been explicitly granted.
2026-05-22 12:22:07 -07:00
Andrew Scott d8c871ef80 refactor(vscode-extension): Remove effectively dead code
Since bundled path is at the start of probe locations, it's always going to be found first.
Workspace versions will never be used. getProbeLocations is effectively dead and confusing code.
2026-05-22 09:58:22 -07:00
Andrew Scott 3403e79f9f fix(vscode-extension): restrict jsdoc markdown trust and harden document opening
Restrict JSDoc hover links to the custom openJSDocLink command and implement document
opening using safe workspace APIs.
2026-05-22 09:56:25 -07:00
Andrew Scott 4f4820f410 fix(vscode-extension): prompt for confirmation before loading workspace tsdk
Harden the typescript.tsdk and js/ts.tsdk.path settings loading
in the VS Code extension client.

This change hardens tsdk loading by:
1. Ignoring workspace-level tsdk paths in untrusted workspaces.
2. Prompting the user for explicit confirmation before loading a
   workspace-level tsdk path in trusted workspaces, and saving the
   approval state in a secure, local workspaceState.
2026-05-22 09:52:14 -07:00
Angular Robot dfbe7a6ecd build: update github/codeql-action action to v4.35.5
See associated pull request for more information.
2026-05-21 13:21:30 -07:00
Angular Robot 23e744ec25 build: update all non-major dependencies
See associated pull request for more information.
2026-05-21 13:16:22 -07:00
arturovt 1563aae118 perf(forms): avoid redundant invalidations in parser errors signal
The `errors` linkedSignal in `createParser` had no equality check, so
every reset or recomputation — even to an identical empty array — would
mark downstream dependents as dirty and trigger unnecessary re-renders.

Add `shallowArrayEquals` as the equality function so the signal only
notifies dependents when the error list actually changes.
2026-05-21 10:57:50 -07:00
tjshiu f84653605a docs: modernize autocomplete examples and guide to signal apis 2026-05-21 08:54:04 -07:00
leonsenft fd6ef34ac9 docs: release notes for the v22.0.0-rc.1 release 2026-05-20 15:51:15 -07:00
leonsenft 16195d00bf docs: release notes for the v21.2.14 release 2026-05-20 15:36:37 -07:00
Kam 04f31cce3e docs: link to ng new reference from installation guide
The installation guide walks a developer through `ng new <project-name>` but provides no link to the `ng new` CLI reference, leaving every option the command supports undiscoverable from the install flow. Link `ng new` in the prose to the reference page so options are one click away.
2026-05-20 14:09:32 -07:00
arturovt 3b8503f960 docs: document FormBuilder.group() controlsConfig value shapes
The `@param` JSDoc for `FormBuilder.group()` previously described the argument only as “a collection of child controls”, without explaining the four supported value shapes:

* a raw value
* a `FormControlState`
* a `ControlConfig` tuple
* a pre-built `AbstractControl`

The fact that the second element of a `ControlConfig` tuple can accept `AbstractControlOptions` (for example to configure per-control `updateOn`) was especially non-obvious and undocumented.

This change adds a `@usageNotes` section with concrete examples covering each supported shape.

Closes #43984
2026-05-20 14:07:53 -07:00
Douglas Parker c7e08ebe59 docs: add WebMCP docs
Adds initial documentation of experimental WebMCP APIs.
2026-05-20 14:06:15 -07:00
tjshiu 069b0153aa docs: simplify multiselect examples by removing scroll resets 2026-05-20 14:04:12 -07:00
tjshiu 36500a70e3 docs: simplify multiselect overlay bindings and transitions
Remove the delayed overlayOpen signals and synchronization effects across all 9 multiselect example variations. Bind cdkConnectedOverlayOpen directly to popupExpanded() and remove conditional closing classes to simplify code.
2026-05-20 14:04:12 -07:00
tjshiu 8fa7311c6e docs: modernize multiselect guide and standalone examples
Update the multiselect guide and all 27 interactive examples to utilize
the modern standalone, Signal-based Angular ARIA APIs.

* Modernize all examples (Standard, Material, Retro)
  to use standalone directives, animations, and focus suppression.
* Update the multiselect guide API tables and templates:
  - Document ngComboboxPopup, cdkConnectedOverlay, and disabled input.
  - Document ngListbox selectionMode, focusMode, tabIndex, and value signal.
  - Document activeDescendant active focus tracking with ngComboboxWidget.
2026-05-20 14:04:12 -07:00
tjshiu 62f8449453 docs: modernize select guide and examples 2026-05-20 13:56:47 -07:00