Compare commits

...

1585 Commits

Author SHA1 Message Date
Alex Rickabaugh fa4e6e6763 release: cut the v21.0.4 release 2025-12-10 16:49:04 -08:00
Angular Robot c937da491c build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-10 16:42:43 -08:00
jnizet 67a5a65a24 docs: fix typos and clarify root effect
(cherry picked from commit c63ef9cb6a)
2025-12-10 12:41:04 -08:00
Chathulanka Gamage 8a31eb8fb8 docs: update control-flow.md to replace else-if with else if
fix incorrect hyphenated form "else-if" and update documentation to match correct syntax "else if"

(cherry picked from commit 7674ada620)
2025-12-10 12:39:25 -08:00
Angular Robot fe581f38fd build: update pnpm to v10.25.0
See associated pull request for more information.
2025-12-10 12:36:08 -08:00
Michael Small de6dc043fb docs: add 'new' to page 'Side effects for non-reactive APIs'
(cherry picked from commit 3ab17876ba)
2025-12-10 12:27:30 -08:00
Matthieu Riegler f20d301bdc refactor: spread rules with glob syntax
prettierignore does not support the glob syntax for multiple extensions.

(cherry picked from commit c429e701fc)
2025-12-10 12:26:57 -08:00
Matthieu Riegler 42c89f1c98 docs: add the version of angular being used to the footer
Include the version of angular being used for the build in the footer of the application

This is a backport of #64863
2025-12-10 12:24:50 -08:00
SkyZeroZx 6930a2e8c8 docs: update forwardRef usage with signals and add HostListener note
(cherry picked from commit bff2dcb93c)
2025-12-10 12:23:33 -08:00
Angular Robot 68a98118d2 build: lock file maintenance
See associated pull request for more information.
2025-12-10 12:22:25 -08:00
Andrew Scott 497c0e36ab refactor(core): Add transition.to property to FakeNavigation
This matches the upstream changes in https://github.com/whatwg/html/commit/f19930f98afeb7565cfc1cbc6a1d4a2086535bca

(cherry picked from commit 5988bdedae)
2025-12-10 10:18:13 -08:00
diegoinost02 7fde186157 docs(forms): document array item validation in Signal Forms
(cherry picked from commit 9dd08c571a)
2025-12-10 10:17:33 -08:00
diegoinost02 8c8bd3e856 docs(forms): add signal forms documentation for validating array items
(cherry picked from commit e6865af8f1)
2025-12-10 10:17:33 -08:00
SkyZeroZx 49fca78f27 docs(docs-infra): Fixes the visibility of the copy link button in API documentation headings
Fixes the visibility of the copy link button in API documentation headings.
The button now appears on hover, improving the user experience.

(cherry picked from commit 15e3407dab)
2025-12-10 10:16:04 -08:00
Shuaib Hasan Akib 2dd971b73e docs: hide menu icons from screen readers in aria example
Add aria-hidden="true" to decorative icon elements in the ARIA menu documentation
example to prevent screen readers from announcing both icon names and labels.
This improves the accessibility experience by ensuring only meaningful text
is announced to screen reader users.

Fixes: #65768
(cherry picked from commit 1c6049584e)
2025-12-10 10:09:41 -08:00
Matthieu Riegler cbb10179c8 fix(forms): allow resetting with empty string
Both empty string and null values should be accepted when resetting

fixes #65949

(cherry picked from commit 14713d0992)
2025-12-10 10:04:58 -08:00
Shuaib Hasan Akib 834593b9c0 docs: use fenced code blocks and format examples
Replaces custom docs-code blocks with fenced Markdown code blocks and reformats examples to improve readability, consistency, and copy-paste behavior.

(cherry picked from commit d0a34a6ca5)
2025-12-10 09:35:56 -08:00
Shuaib Hasan Akib ac6f34a43b fix(docs-infra): parse linenums attribute from triple backtick metadata
The triple backtick code block parser now extracts the linenums attribute
from metadata and applies it to enable line number display in code examples

(cherry picked from commit 1f29577077)
2025-12-10 09:31:48 -08:00
Andrew Scott 01ab257da4 refactor(core): match spec updates for FakeNavigation
Updates FakeNavigation based on updates in https://github.com/whatwg/html/pull/11952

(cherry picked from commit d355205198)
2025-12-10 08:19:28 -08:00
Matthieu Riegler 84f397c831 refactor(core): Support Error like object for on resource errors.
Error like object will be treated as errors.

Related to #61861

(cherry picked from commit 835a643161)
2025-12-10 08:18:24 -08:00
Joey Perrott 96bb4c6ae3 build: add the ignore all rc files flag when running bazel info
Due to a bug in bazel we need to ignore all of the rc files when running bazel info commands

(cherry picked from commit 9ace7d7a0d)
2025-12-09 13:44:49 -08:00
Matthieu Riegler 4043ec5bdd docs: create a separate effect guide
This also includes details about `afterRenderEffect`

WIP.

fixes #63757

(cherry picked from commit 827f5a6fd5)
2025-12-09 13:11:05 -08:00
Kristiyan Kostadinov 65297c6201 fix(compiler-cli): expand type for native controls with a dynamic type
We recently allowed users to have a dynamic input `type` with signal forms, but the logic that infers the value type falls back to `string` even though in theory it can be any of the other types.

These changes expand the inferred type to `string | number | boolean | Date | null` if we detect a dynamic `type` binding.

(cherry picked from commit 8a3f3a91cf)
2025-12-09 13:01:35 -08:00
kirjs 6d7475582f fix(forms): Reuse key in parent in compat structure
This fixes the "Compat nodes do not use keyInParent." error when trying to bind compatField.

(cherry picked from commit 179b4cba67)
2025-12-09 12:59:27 -08:00
arturovt bb0061ba63 refactor(core): wrap operationsCounter calls with ngDevMode checks
Wrap operationsCounter method calls (recordCreate, recordDestroy, reset)
with ngDevMode guards to ensure they are tree-shaken in production builds.

This aligns with the existing pattern where operationsCounter is only
initialized in development mode, and eliminates unnecessary method call
overhead in production.

The optional chaining (?.) is retained as TypeScript doesn't narrow types
based on ngDevMode checks, but the entire expression will be removed during
production builds.

(cherry picked from commit 80dbd74ae8)
2025-12-09 10:38:44 -08:00
Matthieu Riegler ffad78360f refactor(core): add dedicated deprecated signatures for providedIn: any / NgModule.
Those were deprecated by #47616 back in v15.

fixes #65923

(cherry picked from commit 8199945637)
2025-12-09 10:38:14 -08:00
Angular Robot 4bfee61aa7 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-09 10:37:00 -08:00
Miles Malerba f254ff4f2e feat(forms): expose element on signal forms Field directive
This allows for easier focusing of the relevant element based on the
`field` property of a `ValidationError`

(cherry picked from commit aff8b248b3)
2025-12-09 09:47:56 -08:00
Andrew Scott 91532626a9 docs: Update tutorial last step to use markForCheck
Ideally this tutorial would have used signals but didn't. That's a bigger change than
we are able to make right now and there are other things we would like
to update at the same time. This fix is a temporary patch to the
existing content until there is time to redo the tutorial and videos
entirely.

fixes #65863

(cherry picked from commit 200d923436)
2025-12-09 09:39:37 -08:00
Angular Robot d8162373d7 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-09 09:28:32 -08:00
SkyZeroZx 5d73893219 docs(docs-infra): Refactors tutorial generation and updates ng-container docs
Updates the `ng-container` documentation page to use the correct `angular-html` code format and removes an unused CLI documentation file.

(cherry picked from commit 9a6b8e0315)
2025-12-09 09:25:34 -08:00
Kristiyan Kostadinov f901cc9eb3 perf(compiler): chain query creation instructions
We always emit the query creation instructions in a group which makes them good candidates for chaining.

(cherry picked from commit ae1c0dc490)
2025-12-09 09:24:41 -08:00
Andrew Scott a41b0ce025 fix(vscode-extension): Show warning if multiple versions of Angular are detected in workspace
This shows a more prominent warning when multiple versions of Angular
are detected in the workspace and we are forced to choose one to use for
the language server. This also logs those versions with their locations
and directs the user to view the output panel.

fixes #65466

(cherry picked from commit c9dfc6c484)
2025-12-09 09:23:52 -08:00
Matthieu Riegler 182116582e docs(docs-infra): prefer/avoid code block styling
fixes #65866

(cherry picked from commit 3411638f65)
2025-12-09 09:23:17 -08:00
Miles Malerba 5880fbc73c feat(forms): redo the signal forms metadata API
This PR makes a number of changes to the metadata API to address design
flaws in the previous API. Some of the changes include:

- Replaces the previous `MetadataKey` and `AggregateMetadataKey` with a
  single unified `MetadataKey` that is used for all metadata.
- The new `MetadataKey` is only defined for fields that explicitly set
  it in their schema logic
- All metadata now has reducer / aggregate behavior
- The new `MetadataKey` has an option to create a managed key which
  wraps the result of its computed aggregate into some other structure
  such as a `Resource` or `linkedSignal`
- There are now two APIs to create metadata keys
  - `createMetadataKey` for pure computed metadata
  - `createManagedMetadataKey` for metadata that manages its computation
    internally

(cherry picked from commit ebc5c2b083)
2025-12-09 09:21:45 -08:00
Joey Perrott 53f752e7a3 build: update repository to use node 22.21.1 in bazel
The repository was updated to use node 22.21.1 via nvm, but bazel had not been updated to match

(cherry picked from commit 349133374f)
2025-12-09 09:19:19 -08:00
Shuaib Hasan Akib d9522d9033 docs(docs-infra): hide trailing empty line in code examples
Add CSS rule to hide the last empty line in code blocks to prevent displaying
unnecessary empty lines when source files end with a newline character.
The empty line remains in the DOM for proper copy-paste functionality.

(cherry picked from commit 4b9fffaa79)
2025-12-09 09:17:46 -08:00
Gouvernathor 1a4ce250e7 docs(common): Explain how ::ng-deep works
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
(cherry picked from commit 5607f513a7)
2025-12-09 09:16:51 -08:00
cexbrayat 55fc677cef fix(forms): add signals for dirty, hidden, and pending states in custom controls
FormUiControl states that hidden, pending and dirty will be bind in custom controls, but this is currently not the case.

Fixes #65575

(cherry picked from commit 9fe9566581)
2025-12-08 10:30:48 -08:00
Anuj Chhajed 288238abef refactor(core): correct all typeof ngDevMode comparison patterns introduced by #63875
This change replaces all remaining occurrences of `typeof ngDevMode !== undefined`
with the correct `typeof ngDevMode !== 'undefined'` form. This aligns the codebase
with JavaScript typeof semantics and maintains consistency with other Angular code.

(cherry picked from commit 96b79fc393)
2025-12-08 10:30:06 -08:00
Miles Malerba a4c436a058 refactor: followup cleanup for #65758 fallout
Fixes some issues left behind by recent refactor

(cherry picked from commit efde94a525)
2025-12-08 10:28:04 -08:00
mahmoudaboueleneen 7c82f4e410 docs: fix typo in 'components' word in host elements guide
(cherry picked from commit bad758d4ea)
2025-12-08 10:24:10 -08:00
Shuaib Hasan Akib 55709c1de6 refactor(core): use proper type for stringifyTypeFromDebugify parameter
Replace the 'any' type with ClassDebugInfo for the debugInfo parameter in
stringifyTypeFromDebugInfo function. This removes the TODO comment that was
tracking the need for proper typing without creating circular dependencies.

The change improves type safety while avoiding circular imports since
stringify_utils.ts doesn't export anything that definition.ts imports.

(cherry picked from commit 5fd75410a9)
2025-12-08 10:23:21 -08:00
Joey Perrott ed7db0e0a2 build: update to bazel version 8.4.2
Update bazel to use version 8.4.2

(cherry picked from commit aa92f19307)
2025-12-08 10:22:04 -08:00
Alan Agius f18af4b0db build: ignore adev generated content JSON files in Prettier
These files are auto generated.

(cherry picked from commit 22eda59a31)
2025-12-08 10:20:34 -08:00
Matthieu Riegler 10bdae9098 build: enable angular formatting on all html files
This should also be safe on any html file that isn't an angular template

(cherry picked from commit 9d1d742f1b)
2025-12-08 10:19:50 -08:00
Alessio Pelliccione 7f967997fb feat(docs-infra): add complexity level badge
Introduces the new complexity badge in recommendation cards.
The implementation utilizes CSS variables and `color-mix` to efficiently
handle color themes (Basic, Medium, Advanced) and dark mode support.

Closes #65378

(cherry picked from commit 253dc95d63)
2025-12-08 10:05:51 -08:00
Angular Robot b2ea55c969 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-08 09:36:30 -08:00
SkyZeroZx 7ab88c1697 docs: add attribute binding reference in accessibility guide
(cherry picked from commit 70e024ea80)
2025-12-08 09:24:30 -08:00
Shuaib Hasan Akib 46f7986a02 docs: add missing page title to update guide
Fixes the missing page title so the update guide displays a proper heading.

(cherry picked from commit c9cba99407)
2025-12-08 09:23:28 -08:00
SkyZeroZx 3c8b3ac07b docs: Updates tutorial syntaxis highlight
(cherry picked from commit ccf31349c5)
2025-12-08 09:21:48 -08:00
Angular Robot f253f1200d build: update bazel dependencies
See associated pull request for more information.
2025-12-08 09:13:52 -08:00
SkyZeroZx 71568e069c docs: add documentation HOST_TAG_NAME
(cherry picked from commit 6f2ef918e3)
2025-12-08 09:08:55 -08:00
Jessica Janiuk 0352d552a1 docs: Update contributing guidelines
This commit updates the CONTRIBUTING.md file to provide clearer
guidelines for new contributors, including sections on code style,
testing, and the pull request process.

(cherry picked from commit ce4ddf4b47)
2025-12-08 09:06:31 -08:00
Miles Malerba 195c574ca1 test: fix broken adev tests
Fixes a broken adev tests and enables another one that seems to work
fine now

(cherry picked from commit cda56db20f)
2025-12-08 09:04:55 -08:00
SkyZeroZx 56418b108e docs: add documentation for HTTP_TRANSFER_CACHE_ORIGIN_MAP
(cherry picked from commit 7e1e396a00)
2025-12-08 09:00:13 -08:00
SkyZeroZx 5b911d6025 docs(docs-infra): fix hideCopy option to code snippets
Adds the ability to hide the copy button on code snippets.

Updates documentation to use the new `hideCopy` option with the new
markdown code fence syntax.

(cherry picked from commit a4563044ad)
2025-12-08 08:48:25 -08:00
Shuaib Hasan Akib b8ed18c527 docs: fix lazy loading documentation reference
Updates broken or outdated references in the lazy loading guide.

Fixes: #65906
(cherry picked from commit 45aa63308e)
2025-12-08 08:47:45 -08:00
Alan Agius 8bedd996ac build: format manifest files after updating its version
This commit run the formatter during the release.

(cherry picked from commit d2ac93d5ca)
2025-12-08 08:44:01 -08:00
Alan Agius 79ebbf7e36 refactor: move Prettier ignore rules from ng-dev config to .prettierignore
This moves all prettier ignore rules to the prettier config

(cherry picked from commit 52aac81829)
2025-12-08 08:43:11 -08:00
Matthieu Riegler 5d8adf2105 docs(docs-infra): fix next version dropdown
fixes #65912

(cherry picked from commit 13bc1bc721)
2025-12-08 08:42:24 -08:00
Matthieu Riegler bd4cfc88ef docs(docs-infra): expose VERSION from @angular/upgrade
The missing src was responsible for not exposing the symbols during the doc extraction.

fixes #65916

(cherry picked from commit 81cf319534)
2025-12-08 08:41:40 -08:00
kirjs 28e7546edc feat(docs-infra): forward preview error locations
Intercept the WebContainer preview overlay open-in-editor requests and relay them to the editor via postMessage so errors open the matching file.

(cherry picked from commit 789f91bd4f)
2025-12-04 11:45:56 -08:00
kirjs 3d58d10e68 feat(docs-infra): allow navigating to editor error locations
This shows up in a little pop-up, and is clickable now, and leads to exact line

(cherry picked from commit 21b995f4b7)
2025-12-04 11:45:56 -08:00
diegoinost02 ba61579cb7 docs: clarify linkedSignal update behavior
Updates the linkedSignal documentation to specify that it updates its value when the source changes or when any signal referenced in the computation changes, ensuring the description accurately reflects its behavior.

(cherry picked from commit e311f3df72)
2025-12-04 11:42:51 -08:00
Shuaib Hasan Akib ab38d91891 docs: update rxResource changes in updated page
Add both `request` and `loader` changes in rxResource section

(cherry picked from commit abcd6b5bfb)
2025-12-04 11:41:41 -08:00
SkyZeroZx 36cffc72d3 docs: update zone pollution guide highlight syntax
(cherry picked from commit 3adb091c1a)
2025-12-04 11:40:07 -08:00
Kirill Cherkashin 7de8558219 refactor(forms): Break logic.ts into separate files
This would make it easier to navigate

(cherry picked from commit 5be33048cc)
2025-12-04 11:33:26 -08:00
Nakul Sharma d40a517c0f refactor(core): use getComponentDef in stringify_utils
- Use getComponentDef in debugStringifyTypeForError to clean up TODO
- Remove outdated comment from stringify_utils

(cherry picked from commit 0bb8924ab6)
2025-12-04 11:32:17 -08:00
Joey Perrott c3bd22d10d build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-04 11:26:14 -08:00
Alex Rickabaugh bf1c12cd93 fix(forms): memoize reads of child fields in signal forms (#65802)
Previously, navigating a `FieldTree` in signal forms involved reactive reads
of the value of the parent field(s), both directly and via `.childrenMap()`.

This meant that on _any_ change to the value of a field, reactive
notifications would trigger updates of computeds, reruns of effects, etc.
So for example, this effect would run on every change to the form:

```ts
const f = form(signal({data: 'abc', unrelated: 0}));
effect(() => {
  // accessing f.data incurs a dependency on f().value() which changes
  // on every change in the whole form
  console.log(f.data().value());
});
```

This is deeply counterintuitive and troublesome when attempting to write
effect logic, and also results in `computed`s unnecessarily updating.

This change introduces the concept of a "reader" computed, which memoizes
the access of a field at a given key via the reactive graph. With this, the
same `f.data` access above now depends on the `data` reader in `f` only,
which is effectively a constant computed. As a result, the effect only
reruns on changes to `data`'s value, as intended.

PR Close #65802
2025-12-03 12:52:43 -08:00
Alex Rickabaugh 2c12661620 refactor(forms): simplify child field creation (#65802)
Previously, several values were being passed into the creation of
`FieldNodeStructure`s that were only used in the creation of child nodes.
Separately, we also passed a `createChildNode` function which these values
were passed back into.

Instead, this moves the small bit of logic from structure.ts behind the
`createChildNode` callback, which reduces the passing of values back-and-
forth and gives `createChildNode` a much more suitable signature.

PR Close #65802
2025-12-03 12:52:43 -08:00
cexbrayat 565c022a87 build: disable assistant_to_the_branch_manager on forks
It currently fails as it is triggered on push, but requires an angular-robot-key that forks don't have.

(cherry picked from commit fc23fcdd3b)
2025-12-03 12:33:18 -08:00
Angular Robot 4e19d6c072 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-03 12:32:36 -08:00
Joey Perrott fbc43f9272 build: use mjs files for ng-dev configuration
In preperation for ng-dev requiring mjs files for configuration, switch over our usage
2025-12-03 12:30:55 -08:00
Joey Perrott 34caae5978 ci: use defined ng-dev config for deploying docs site
Use the repo defined ng-dev configuration for deploying the docs site

(cherry picked from commit eebcaf49f1)
2025-12-03 11:26:10 -08:00
Shuaib Hasan Akib 2e5d187120 fix(docs-infra): prevent readonly TypeScript keyword from being linked
This updates the docs infrastructure to avoid incorrectly linking the `readonly` keyword in TypeScript examples.

Fixes #65632

(cherry picked from commit 7f8ffa3304)
2025-12-03 16:30:55 +01:00
Pawel Kozlowski c355ffd99e release: cut the v21.0.3 release 2025-12-03 16:18:30 +01:00
SkyZeroZx 6b4ab876e8 feat(forms): Allows transforms on FormUiControl signals
Extends the `FormUiControl` interface to allow `InputSignalWithTransform` in addition to `InputSignal` for its properties.

Fixes #65756

(cherry picked from commit 7d1e502345)
2025-12-03 15:13:06 +01:00
Leon Senft 609699ae17 perf(core): tree shake unused dynamic [field] binding instructions (#65599)
Move the instructions used to dynamically bind a `Field` directive to a
form control onto the `Field` itself. This way the instructions are only
retained if the app uses the `Field` directive.

PR Close #65599
2025-12-03 15:10:50 +01:00
Leon Senft a5dbd4b382 fix(forms): support dynamic [field] bindings (#65599)
Support binding a `Field` directive to a component created dynamically
with `createComponent()`.

Fix #64632

PR Close #65599
2025-12-03 15:10:49 +01:00
Kristiyan Kostadinov 4bb085311e fix(core): unable to inject viewProviders when host directive with providers is present
When registering providers, the DI system assumes that `viewProviders` are registered before plain `providers`. This was reinforced by components always being first in the array of directive matches, only one component being allowed per node and the fact that only components can have `viewProviders`.

This breaks down if there are host directives with `providers` on the component, because they'll execute earlier, throwing off the order of operations.

These changes fix the issue by separating out the resolvers for `viewProviders` and plain `providers` and explicitly running the component's `viewProviders` resolver before any others. This also has the benefit of not attempting to resolve `viewProviders` for directives which are guaranteed not to have them.

Fixes #65724.

(cherry picked from commit 886cf6c452)
2025-12-03 15:09:53 +01:00
Angular Robot 6491df9175 build: lock file maintenance
See associated pull request for more information.
2025-12-03 13:24:37 +01:00
Alan Agius 20474d3f0f fix(http): enable XSRF protection for same-origin absolute URLs
Previously, the XSRF interceptor only added the XSRF token to requests with relative URLs.
This commit updates the interceptor to also add the token to requests with absolute URLs, provided they match the current origin.

(cherry picked from commit 0659d11c85)
2025-12-03 12:19:46 +01:00
Kristiyan Kostadinov 1f1856e897 fix(compiler-cli): check that field radio button values are strings
Adds some type checking code which verifies that the bound `value` on a `Field` radio button is a string.

Fixes #65726.

(cherry picked from commit 6773d3b97d)
2025-12-03 12:19:01 +01:00
arturovt 48b89f9fbe fix(router): handle errors from view transition finished promise
This commit adds a `.catch()` handler to `transition.finished` from `document.startViewTransition` to prevent unhandled promise rejections. The finished promise can reject with `TimeoutError` or `InvalidStateError` when transitions fail during or after the animation phase.

Based on the Blink source code, the `finished` promise can reject with:
* `TimeoutError`: "Transition was aborted because of timeout in DOM update"
* `InvalidStateError`: "Transition was aborted because of invalid state"

This may happen when the DOM update phase exceeds the browser's internal timeout threshold.

(cherry picked from commit b74a0693f2)
2025-12-03 12:17:02 +01:00
Joey Perrott 0f50ea8f97 docs: prevent showing typescript diagnostic errors until the node runtime reaches a ready state
Prevent the overlay box showing diagnostics errors until after the initial setup of the node runtime is completed.

Fixes #52649

(cherry picked from commit 819b640c2d)
2025-12-03 11:54:58 +01:00
Pawel Kozlowski c112ef1808 Revert "build: update cross-repo angular dependencies"
This reverts commit 82d616b681.
2025-12-03 11:34:40 +01:00
Pawel Kozlowski 2a459a0e3f Revert "build: update bazel dependencies"
This reverts commit 42fbb64aec.
2025-12-03 11:34:40 +01:00
Angular Robot 42fbb64aec build: update bazel dependencies
See associated pull request for more information.
2025-12-03 10:12:32 +01:00
Joey Perrott 82d616b681 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-03 10:09:29 +01:00
Joey Perrott 8e837cc226 docs: rename visibleRegion to region
Use the attribute region instead of visibleRegion

(cherry picked from commit 34bedae101)
2025-12-03 10:06:06 +01:00
Joey Perrott 76f784c340 refactor(docs-infra): extract only the visibleRegion
Previously we extracted the regions and only made the visible region visible on the page, but since there is not a need for the
non-visible code to be presented, we don't need to include it in the generated code snippets.

(cherry picked from commit 9b3b5fb4cf)
2025-12-03 10:06:05 +01:00
Kirill Cherkashin e95d2e3a34 docs: Update adev/src/content/guide/forms/signals/models.md
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
(cherry picked from commit 29223c440f)
2025-12-02 19:30:57 +01:00
kirjs 1ee0ff8cfb docs(forms): Polish the docs
- Recommend using form/fields to set the value
- Drop "Dynamic field addition" section as for the above reason

(cherry picked from commit 1fd8303659)
2025-12-02 19:30:57 +01:00
Andrew Scott c2a8934d12 Revert "refactor(router): compress synchronous end to router navigation to single operator"
This reverts commit 71362733cf.
2025-12-02 19:13:07 +01:00
Andrew Scott 71362733cf refactor(router): compress synchronous end to router navigation to single operator
The end of the Router navigation is a block of synchronous logic that
can be compressed into a single operator rather than splitting it across
several, making it harder to step through. The only benefit from the
split is automatic unsubscribe/cancellation, which we can replicate
with an additional 'shouldContinue' check before proceeding.

(cherry picked from commit b7d21e209a)
2025-12-02 16:44:06 +01:00
Kristiyan Kostadinov 5a80a48e96 fix(compiler-cli): avoid allocating an object for signals in production mode
Currently when the signal debug name transform sees something like `const foo = signal(0);`, it transforms the signal into `signal(0, {...(ngDevMode ? { debugName: 'foo' } : {})})`. After minification this becomes `signal(0, {})` which will allocate memory for the empty object literal.

These changes rework the logic to produce `signal(0, ...(ngDevMode ? [{ debugName: 'foo' }] : []))` which will be fully tree shaken away to `signal(0)`.

(cherry picked from commit e30e61b789)
2025-12-02 15:06:55 +01:00
Jessica Janiuk 8c3304c766 fix(core): run animation queue in environment injector context
In the case that a component injector is destroyed before the animation
queue runs, the animation queue would fail to run because it was using a
destroyed injector. This commit changes the animation queue to run in the
context of the EnvironmentInjector, which is not destroyed until the app
is destroyed.

fixes: #65628
(cherry picked from commit d8ab83ca82)
2025-12-02 15:05:21 +01:00
Matthieu Riegler 017672f742 refactor(compiler): Generate the controlCreate instruction after the native element has been created
This is necessary to exclude a race condition where the MutationObserver initialized by the instruction fired before the inputs are binded.

fixes #65678

(cherry picked from commit f35b2ef47c)
2025-12-02 12:59:53 +01:00
Matthieu Riegler 8e0df4083d docs(docs-infra): Show examples on function overloads
(cherry picked from commit a784995a98)
2025-12-02 12:13:16 +01:00
Georgi Serev c0e0010bb9 fix(devtools): hide profiler node details when the frame is changed
Hide the details panel when the user selects a new frame.

(cherry picked from commit 2eaa4d54ad)
2025-12-02 12:05:58 +01:00
Joey Perrott 53e0aaba4e refactor(docs-infra): move header id tracking into RendererContext
Move the header id tracking into the renderer context rather than a global state.  Since the RendererContext is
initialized for each execution of the marked parser, we can store the context of which header ids have been seen within
a single page there which allows us to run these parse interactions in parallel.

(cherry picked from commit a16a70ca74)
2025-12-02 12:03:39 +01:00
Joey Perrott 5ec3bd9c55 refactor(docs-infra): transform all headings using the built in transformer
Rather than manually calling the transformer we use for headings from within a render function, we now properly call into the Renderer to do them
via the tokens they are require instead.  This is being done to allow us to have a per Renderer instance of state instead of a global state, which will
allow us to run marked async and hopefully speed up the pipeline

(cherry picked from commit 8b296543ae)
2025-12-02 12:03:38 +01:00
Tim Deschryver efe4b72abb docs: fix documentation link for currentNavigation method
(cherry picked from commit 680de24c3c)
2025-12-02 12:02:28 +01:00
SkyZeroZx ea45b4d54c docs: add platform-specific implementation and helpers
(cherry picked from commit 0c7508bf56)
2025-12-02 12:00:05 +01:00
Angular Robot 2935fef3af build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-02 10:47:29 +01:00
SkyZeroZx 35b39bd86f docs: improve formatting and fixed numeration issue in attribute directives guide
(cherry picked from commit 03c04d4c83)
2025-12-02 10:45:51 +01:00
SkyZeroZx 893fbdfb04 docs: update syntax highlighting in component documentation
(cherry picked from commit 7fd5890d48)
2025-12-02 10:38:20 +01:00
Gaston f368ab957c docs: add FormArrayDirective documentation to reactive forms guide
Update adev/src/content/guide/forms/reactive-forms.md

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
(cherry picked from commit da99b5d1d0)
2025-12-02 10:36:17 +01:00
Matthieu Riegler 7f289bdc3a docs: fix submit example
`async` keyword is required for the `submit` callback

(cherry picked from commit bc93b398af)
2025-12-02 10:35:10 +01:00
Angular Robot 706d7620e8 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-01 19:36:18 +01:00
SkyZeroZx b4c8c939b0 docs: update notes to use consistent formatting in various guides
(cherry picked from commit aea2465a59)
2025-12-01 19:33:36 +01:00
Angular Robot 48008c2f6f docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-01 19:30:14 +01:00
Shuaib Hasan Akib 8ab759497c docs: format typescript examples and replace <docs-code> with fenced code blocks
Replaced <docs-code language="typescript"  to improved
readability and consistency across documentation.

(cherry picked from commit 3731f07579)
2025-12-01 19:20:23 +01:00
SkyZeroZx dad3d7900f feat(docs-infra): Adds copy link to anchor functionality
Enables copying a direct link to any section by clicking its anchor. Also updates the aria-label to remove the code tag

(cherry picked from commit 4e89bc6244)
2025-12-01 19:19:35 +01:00
Angular Robot c139b35d5d build: update rules_angular digest to 9409450
See associated pull request for more information.
2025-12-01 19:18:09 +01:00
til0r ed32e8c364 docs: fix npm link URL in creating-libraries guide
- Update `npm link` to the official docs URL.
- Keep `pnpm link` reference intact

(cherry picked from commit 721080aaa9)
2025-12-01 18:58:37 +01:00
Pratyush Swain fe863aad05 docs(docs-infra): update NG0910 documentation with new control flow
(cherry picked from commit 27d1ccb2df)
2025-12-01 18:54:02 +01:00
Shuaib Hasan Akib 7efcd9ad4c docs: link inject function to its API reference
Replaced plain code-form usage of `inject` with a link to the
API docs (`/api/core/inject`) to improve navigation and
help readers access detailed reference information more easily.

(cherry picked from commit 7b33554d24)
2025-12-01 18:53:08 +01:00
aparziale 4d036fcc41 docs(docs-infra): Fix Incorrect indentation
Fix Incorrect indentation in hierarchical dependency injection guide

Fix #65722

(cherry picked from commit a850987519)
2025-12-01 18:52:20 +01:00
Shuaib Hasan Akib 74cbe36fa6 docs: update examples to use self-closing tags for consistency with recommended practices
Updated various template examples to use self-closing component tags
(e.g., `<my-comp />`) instead of the expanded form (`<my-comp></my-comp>`),
improving consistency across the documentation and aligning with current
Angular style recommendations.

(cherry picked from commit a464406ebf)
2025-12-01 18:50:54 +01:00
aparziale ce961fe5c0 docs(docs-infra): Fix Drag handle SVG is not visible
Fix Drag handle SVG is not visible. The css style overrides the default behavior

Fixes #65545

(cherry picked from commit 7a39565916)
2025-12-01 18:49:10 +01:00
SkyZeroZx b7ccb308b8 docs(docs-infra): Improves symbol linking for Angular Aria selectors
Improves the symbol linking logic to handle Angular component selectors (e.g., ngCombobox). It attempts to convert Angular selector patterns to their corresponding class names, improving navigation to Angular API documentation.

(cherry picked from commit 2d854e01bc)
2025-12-01 18:47:23 +01:00
galmi bc6cb6830e docs(forms): fix links in signal forms guides and use docs-pill-row links for next steps
(cherry picked from commit 726dfad9db)
2025-12-01 18:46:22 +01:00
Shuaib Hasan Akib cb2847c8d9 fix(docs-infra): truncate long TOC items and add title tooltips
Long TOC entries now truncate with …, and a title attribute is added to display the full label on hover.

Fixes: #65727
(cherry picked from commit 313454bf17)
2025-12-01 18:43:50 +01:00
Ben Hong 8cfe9d8100 docs: update aria listbox selection mode section
(cherry picked from commit 7ea5b66a70)
2025-12-01 18:41:57 +01:00
Kristiyan Kostadinov c46f65df39 docs: fix up font in drag drop examples
Fixes that the CDK drag&drop examples were using a serif font.

(cherry picked from commit 649e2ec1d4)
2025-12-01 18:40:38 +01:00
aparziale 505e1a1f6b docs(docs-infra): fix content projection documentation
Fixed documentation issues in content projection examples.
- Component decorator without '@'
- Self-closing tag for ng-content

Fix #65675

(cherry picked from commit f18dd5e54c)
2025-12-01 18:38:20 +01:00
kirjs 9aab858871 feat(docs-infra): prevent browser save dialog in adev code editor
Add Cmd+S/Ctrl+S keyboard shortcut to the adev code editor that prevents
the annoying browser save dialog from appearing. The shortcut is a no-op
since the editor already has auto-save functionality that persists changes
after 500ms of inactivity.

(cherry picked from commit cb04cee7b2)
2025-12-01 18:36:06 +01:00
Kristiyan Kostadinov 8c4a1524da release: cut the v21.0.2 release 2025-12-01 12:51:18 +01:00
Alan Agius 78fd159b78 fix(compiler): prevent XSS via SVG animation attributeName and MathML/SVG URLs
This commit implements a security fix to prevent XSS vulnerabilities where SVG animation elements (`<animate>`, `<set>`, etc.) could be used to modify the `href` or `xlink:href` attributes of other elements to `javascript:` URLs.

(cherry picked from commit 1c6b0704fb)
2025-12-01 10:27:00 +01:00
SkyZeroZx fec1f1ae5f docs: update code snippets in reference doocumentation
(cherry picked from commit 8f3fdc3e80)
2025-11-26 16:01:17 -05:00
Matthieu Riegler a4084154f2 refactor(migrations): don't migration the server bootstrapApplicaiton on zoneless apps.
With the change we specifically analyse `boostrapApplication` with a config that uses `mergeApplicationConfig`.

fixes #65408

(cherry picked from commit c1dfd9cde6)
2025-11-26 15:58:57 -05:00
aparziale 99b6341ca5 docs(docs-infra): fix form custom control example uses syntax
Fixed form custom control example uses non-working syntax in template

Fix #65647

(cherry picked from commit a3fb41e797)
2025-11-26 15:48:20 -05:00
Matthieu Riegler 4207d89455 docs(docs-infra): fix visible lines/regions
fixes #65552

(cherry picked from commit 1c3868198e)
2025-11-26 13:43:40 -05:00
Matthieu Riegler 1260d1ac6d refactor(devtools): Use the same error message as the signal custom formatter for signal errors
When signals throw errors on read, the devtools will show the same error message as the signal custom formatter.
We also don't log errors anymore to the console as those might be surprising to see as errors and are buggy behavior of the devtools.

(cherry picked from commit a0930e166c)
2025-11-26 13:11:10 -05:00
Matthieu Riegler 151616dd7c refactor(core): show error message on signal error
When a signal throws an error on read. The formatter will show the error message.

(cherry picked from commit 5b720aa2eb)
2025-11-26 13:11:10 -05:00
Leon Senft 0ae14cb746 test(core): test bundling of dynamic component creation and bindings
Add test coverage for bundling dynamic component creation API like
`createComponent()` and `inputBinding()`. This will be used to test that
Signal Forms related features for #64632 can be tree-shaken when unused.

(cherry picked from commit add8c41e5b)
2025-11-26 11:57:18 -05:00
SkyZeroZx 10201b6873 docs(docs-infra): renders inline code snippets in docs pills
Improves the rendering of `DocsPillRow` to correctly display inline code snippets (using backticks) within the pill labels.

(cherry picked from commit ef034c15c1)
2025-11-25 18:30:09 -05:00
kirjs 47a739611a release: cut the v21.0.1 release 2025-11-25 15:04:58 -05:00
Alan Agius 3240d856d9 fix(http): prevent XSRF token leakage to protocol-relative URLs
The XSRF interceptor previously failed to detect protocol-relative URLs (starting with `//`) as absolute URLs. This allowed requests to such URLs to include the XSRF token, potentially leaking it to external domains.

This change updates the interceptor to correctly identify protocol-relative URLs as absolute and exclude them from receiving the XSRF token.

(cherry picked from commit 40790ef980)
2025-11-25 13:47:29 -05:00
Alan Agius 908b5a41a3 refactor: replace getDocument() with inject(DOCUMENT)
This replaces `getDocument()` with `inject(DOCUMENT)` across hydration and transfer state logic.

(cherry picked from commit 400fc82c43)
2025-11-25 13:05:01 -05:00
Kristiyan Kostadinov 6b20adff62 refactor: add mark for signal forms
Adds a mark for signal forms so we can track adoption. Also moves the call for `@let` into `declareLet` since we don't need it to fire as often as in `storeLet`.

(cherry picked from commit c994267f17)
2025-11-25 13:03:46 -05:00
Alan Agius 49ad7c6508 fix(core): use injected DOCUMENT for CSP_NONCE
This ensures that the right document is used and that `CSP_NONCE` can be used in `provideAppInitializer` and `provideEnvironmentInitializer`.

Closes #65624

(cherry picked from commit 3b1fa8235b)
2025-11-25 11:39:23 -05:00
AntonChesnokov 8d3a89a477 fix(compiler-cli): escape angular control flow in jsdoc
Escape @-prefixed template control flow constructs during doc extraction so JSDoc parsing keeps description text intact. Add regression coverage for @for snippets.

(cherry picked from commit 5bfa027d41)
2025-11-25 11:33:29 -05:00
Angelo Parziale 4634b467c2 docs(docs-infra): Fix anchor link DI
Fix anchor link for Dependency Injection Overview.

(cherry picked from commit 346caefa8d)
2025-11-25 11:05:45 -05:00
kirjs e3f5f34732 refactor(forms): Make reset take value
Now you can do form.reset({name: 'cat', age: 4});

(cherry picked from commit dec222d4d7)
2025-11-25 10:51:38 -05:00
Angular Robot 9aa3e92c82 build: lock file maintenance
See associated pull request for more information.
2025-11-25 10:34:12 -05:00
Miles Malerba 7d5c7cf99a feat(forms): add DI option for classes on Field directive
Adds a DI configuration option for signal forms that allows the
developer to specify CSS classes that should be automatically added
by the `Field` directive based on the field's status.

(cherry picked from commit c70e246c23)
2025-11-25 10:33:41 -05:00
SkyZeroZx 477df38d17 docs: improve core package API documentation with additional reference links
(cherry picked from commit 67d41e9bcc)
2025-11-25 10:19:39 -05:00
Cheng-Hsuan Tsai 69d6f8fe2c docs: replace aria grid overview example
(cherry picked from commit 56e059948f)
2025-11-25 10:17:00 -05:00
Leon Senft 8acf5d2756 fix(forms): allow dynamic type bindings on signal form controls
The type checker will no longer prohibit binding the Signal Forms `[field]`
directive to an input with a dynamic `[attr.type]` or `[type]` binding.

(cherry picked from commit 3a1eb07c46)
2025-11-25 09:16:01 -05:00
Oyama Michinoku c9f50b424b docs: fix typo by correcting W3 to W3C
(cherry picked from commit 2102bfe5aa)
2025-11-25 09:14:03 -05:00
Hussein Mahmoud Kandil d5b339c1a3 docs: fix example imports and missing event URL reference
The analytics tracking example contained unused and missing imports,
and it incorrectly referenced the page's URL.
This update fixes the imports and ensures the handler uses `event.url`,
allowing the example to work correctly.

(cherry picked from commit a294e3b94d)
2025-11-25 07:44:08 -05:00
Andrew Scott 0e458c7e12 refactor(core): Remove toggles used for zoneless by default migration
this migration is complete both internally and externally

(cherry picked from commit 51ebe9a4fc)
2025-11-24 16:57:52 -05:00
Kristiyan Kostadinov 70507b8c1c fix(core): debug data causing memory leak for root effects
We track all effects that are created for debugging purposes in the `resolverToEffects` map. This ends up leaking memory for effects registered on long-living resolvers (e.g. on the root injector), because they stay in the array, even if the effect itself has been destroyed.

These changes add a callback to clean up the references.

Fixes #65265.

(cherry picked from commit ca6ab6c914)
2025-11-24 15:26:12 -05:00
Leon Senft 4845a33018 refactor(forms): support custom control directives
Support binding `[field]` to directives that implement
`FormValueControl` or `FormCheckboxControl`.

The `[field]` binds to whichever directive (or component) matches first in the
event there are multiple implementations. We are considering whether to make
this an error state, which could be reported during type checking.

Closes #63910, Closes #64992

(cherry picked from commit f97a1d4856)
2025-11-24 13:48:20 -05:00
Ben Hong 534cc3dc37 docs: standardize aria code examples to not use component suffix
(cherry picked from commit d442c72f87)
2025-11-24 13:28:36 -05:00
Matthieu Riegler 6cb191bade docs: add callout on zone base testing helpers
With zoneless being the default, we need to make these requirements more explicit.

fixes #65539

(cherry picked from commit b34e48bdff)
2025-11-24 13:27:49 -05:00
Joey Perrott 0424a998c9 refactor(docs-infra): make docs-alert an inline token
Migrate docs-alert to be inline instead of block, this ensures that the content is placed within a <p> tag as expected. This is important
for ensuring that the iconography is placed correctly within the wrapper div generated for the alert. Additionally, we refactor the matcher
code to be more efficient, running with fewer loops.

(cherry picked from commit 046501fd33)
2025-11-24 13:26:03 -05:00
Matthieu Riegler 9b0900f0e9 ci: update pullapprove reviewers
Removing Minko from the pool of automatically picked reviewers

(cherry picked from commit 98ceb0a80d)
2025-11-24 13:25:30 -05:00
SkyZeroZx a62162d2ee docs: Update router docs to add references and components input fixed syntaxis
(cherry picked from commit 2ac826867b)
2025-11-24 13:18:31 -05:00
Alessio Pelliccione 9d6b86958a docs(docs-infra): fix missing syntax highlighting
closed angular#65565

(cherry picked from commit 7d20f2071c)
2025-11-24 13:13:25 -05:00
Shuaib Hasan Akib b513008fc8 refactor(common): remove redundant standalone: true as it is default now
-removing `standalone: true` from integration
- removed whitespace

(cherry picked from commit 93cff501e9)
2025-11-24 13:12:18 -05:00
Kristiyan Kostadinov 39c577bc36 fix(compiler-cli): do not type check native controls with ControlValueAccessor
Currently when we detect a `field` binding on a native element, we treat it as a built-in native control. This might not be the case if it's a pre-existing `ControlValueAccessor` relying on the CVA interop.

These changes try to detect any CVA-like directive on the element and disable the additional type checking if there are any.

Fixes #65468.

(cherry picked from commit 6b8720de91)
2025-11-24 13:08:46 -05:00
Kristiyan Kostadinov f0b34854cc refactor(compiler-cli): track public methods during analysis
Updates the directive analysis to track the public methods of the class.

(cherry picked from commit 5cfdd7897b)
2025-11-24 13:08:46 -05:00
Tomer953 f394215b14 fix(migrations): detect structural ngTemplateOutlet and ngComponentOutlet
the common-to-standalone migration only matched [ngTemplateOutlet] and
[ngComponentOutlet] bindings and missed their structural forms
(*ngTemplateOutlet and *ngComponentOutlet). This caused missing imports
when removing CommonModule. This change adds structural directive
patterns so the migration correctly identifies needed imports.

(cherry picked from commit a4f50bdd54)
2025-11-24 12:41:01 -05:00
Shuaib Hasan Akib 70bc3115c5 docs(docs-infra): keep 'Show code' button aligned right and prevent metadata wrapping
Ensures the example viewer header displays correctly by keeping the "Show code"
button aligned to the right and preventing metadata text from wrapping.
Improves layout consistency across documentation examples.

(cherry picked from commit b26fe73a91)
2025-11-24 12:23:40 -05:00
Matthieu Riegler f73cfd5a92 ci: adding myself as optional to the compiler scope
For whenever I feel confortable approving compiler PRs like diagnostics

(cherry picked from commit 9dd7cc13ca)
2025-11-24 12:18:30 -05:00
Alan Agius 6d4e68977f build: update release script to support changelog cherry-picking
This commit updates the release script to support cherry-picking changelog updates to the main branch when releasing from a patch branch. It also introduces a marker in the changelog to separate releases and ensures the GitHub release uses the formatted changelog from disk.

(cherry picked from commit c843a46912)
2025-11-24 12:17:23 -05:00
hawkgs 98520333bd refactor(compiler-cli): add a resource debugName transform (#64172)
Add a TS transform for `resource` (and `httpResource`) `debugName`. Test the transformations.

PR Close #64172
2025-11-24 11:30:13 -05:00
hawkgs 6de8926594 refactor(core): add debug name to resource (#64172)
Decorate `resource` (and `httpResource`) with `debugName`, along with all of its internal signals.

PR Close #64172
2025-11-24 11:30:13 -05:00
Matthieu Riegler 102cb872c7 docs: update devtools guide
- splits the injector inspector into its own guide
- update the screenshots
- add defer block section
- add hydration section

(cherry picked from commit b5ae62c02b)
2025-11-24 11:11:30 -05:00
NicoPolazzi 2739ae4b9d docs: correct signals tutorial inconsistencies in chapters 6-10
(cherry picked from commit 325ab18084)
2025-11-24 11:08:31 -05:00
Shuaib Hasan Akib 4303f5153c docs: html examples and replace <docs-code> with fenced code blocks
Replaced <docs-code language="html" with fenced html for improved readability and consistency across documentation.

(cherry picked from commit 0203dad09b)
2025-11-24 10:38:35 -05:00
Matthieu Riegler 1f20b54256 docs(docs-infra): simplify tab selection
Tab selection relied on the tabs being visible whe nthe example is loaded. That didn't work when `hideCode` was used.

fixes #65550

(cherry picked from commit 119c6ddaeb)
2025-11-24 10:24:42 -05:00
HyperLife1119 2ebe685298 docs: fix order of render phases in lifecycle documentation
(cherry picked from commit b6b6fae483)
2025-11-24 10:22:32 -05:00
Shuaib Hasan Akib cdfc782770 docs: fix internal links showing as external
Replace absolute URLs (https://angular.dev/...) with relative URLs
(/...) to prevent internal documentation links from being treated
as external links and opening in new tabs.

(cherry picked from commit 8f89507a0b)
2025-11-24 10:21:42 -05:00
Kristiyan Kostadinov 290513f5b6 test: remove unnecessary test calls
Removes calls to `TestBed.configureTestingModule` since they aren't necessary.

(cherry picked from commit 26e2092dd1)
2025-11-24 10:18:21 -05:00
Shuaib Hasan Akib d3c3b83f8b fix(docs-infra): update deprecated API link to use correct status value
Replaced `status=deprecated` with the correct numeric value `status=8`
to ensure the Deprecated APIs link resolves properly in the docs.

(cherry picked from commit 16a0b7dfdb)
2025-11-24 10:17:35 -05:00
Yahya-Almubarak 730803ad26 docs: fix typo in tutorial
(cherry picked from commit e501b7e445)
2025-11-24 10:15:05 -05:00
Alan Agius 2d658b3662 build: run e2e in sandbox
Updates the E2E test configuration to run within the Bazel sandbox.

(cherry picked from commit f7f9707508)
2025-11-24 10:03:03 -05:00
Angular Robot c7ae6f3fee build: update all github actions
See associated pull request for more information.
2025-11-24 09:34:02 -05:00
Alan Agius 4eb2d3ea2c docs: update ng serve builder to @angular/build:dev-server and detail proxy path matching behavior.
Closes #53652

(cherry picked from commit b28570b227)
2025-11-24 09:33:27 -05:00
Angular Robot de46b2429f build: update pnpm to v10.23.0
See associated pull request for more information.
2025-11-24 09:30:40 -05:00
Matthieu Riegler 92f0b6687d docs: fix v21 event header image
fixes #65572

(cherry picked from commit 48a05dd38c)
2025-11-24 09:08:22 -05:00
Hussein Mahmoud Kandil 696aaa11e9 docs: fix router event subscription in error handler example
The example incorrectly persisted the error message after a successful
navigation retry because the stream only emitted NavigationError events.
This update removes the filter and returns an empty string for non-error
events, allowing the signal to clear the message on normal navigation.

(cherry picked from commit 72b1f7fd43)
2025-11-22 09:10:57 -05:00
SkyZeroZx a70a191713 docs: Adds signal type checking documentation
(cherry picked from commit 38a354ffa2)
2025-11-21 16:31:16 -05:00
Matthieu Riegler 0ea1e07174 fix(core): apply bootstrap-options migration to platformBrowserDynamic
The migration wasn't applied to projects relying on `platformBrowserDynamic()` prior to this fix.

(cherry picked from commit b6fee3f107)
2025-11-21 16:28:23 -05:00
Shuaib Hasan Akib 5170fd4c05 docs: format JSON examples and replace <docs-code> with fenced code blocks
Replaced <docs-code language="json" for improved
readability and consistency across documentation.

(cherry picked from commit f884c181b3)
2025-11-21 16:23:55 -05:00
Shuaib Hasan Akib b8da1d4fdb docs: format JSON examples and replace <docs-code> with fenced code blocks
Replaced <docs-code language="json" header=".postcssrc.json"> with fenced
JSON code blocks using ```json {header: '.postcssrc.json'} for improved
readability and consistency across documentation.

(cherry picked from commit 68aa83e8cf)
2025-11-21 15:48:45 -05:00
Matthieu Riegler 16babdd74c refactor(devtools): don't query defer nodes
This prevents from throwing errors when selecting defer nodes

(cherry picked from commit 67d3c2529f)
2025-11-21 15:42:57 -05:00
cexbrayat df1d129d0b docs: consistent casing for onpush zoneless migration MCP tool name
The tool has been renamed in the CLI for consistency https://github.com/angular/angular-cli/pull/31866

(cherry picked from commit 88546ab127)
2025-11-21 13:26:02 -05:00
SkyZeroZx 93ef5d410e feat(docs-infra): add docs-image extension for enhanced image handling in markdown
Extends the Markdown parser to support `loading`, `decoding`, and `fetchpriority` attributes for images via curly brace syntax.

(cherry picked from commit 46269be842)
2025-11-21 13:25:02 -05:00
Shuaib Hasan Akib 0331b1f766 docs: format example code blocks for consistency and readability
(cherry picked from commit 6f1329f34a)
2025-11-21 13:24:26 -05:00
Joey Perrott d40770fd94 refactor(docs-infra): remove the multiple code example view modes
Rather than using multiple view modes for code examples, we can just treat the previous snippet mode as
as multifile mode that just only has one file in it.

(cherry picked from commit f61e61ac4f)
2025-11-21 13:22:03 -05:00
Joey Perrott a30fe81ae8 refactor(docs-infra): improve code efficiency for adding line numbers
Only run the code for adding line numbers if line numbers are required, otherwise skip the code block

(cherry picked from commit 88753d6a5a)
2025-11-21 13:20:49 -05:00
Joey Perrott 557cc41ff0 refactor(docs-infra): remove the unnecessary whitespace using shiki
Use a transformer within shiki to remove the unnecessary whitespace between code lines

(cherry picked from commit a873c4eb1a)
2025-11-21 13:20:49 -05:00
Joey Perrott 121997b8c2 refactor(docs-infra): drop support for providing a file diff in docs-code
Drop support for exposing a diff view in the docs-code element as it is unused and costly to even check for

(cherry picked from commit 8ec0a4ee5c)
2025-11-21 13:20:49 -05:00
Joey Perrott 7f7a2187a8 refactor(docs-infra): use shiki for highlighting
Use shiki to perform highlighting instead of a postprocessing action

(cherry picked from commit fee79e37d5)
2025-11-21 13:20:49 -05:00
Joey Perrott 70195636cc fix(docs-infra): link to the snippet location at the proper commit for examples
Within examples, we now link to the github URL using the commit that was made to create adev, rather than
always on main, which may change over time.

(cherry picked from commit a8f46e598a)
2025-11-21 13:19:55 -05:00
Shuaib Hasan Akib 133baadea1 docs: format example code blocks for consistency and readability and keep only file name in header
(cherry picked from commit 9565938534)
2025-11-21 13:17:20 -05:00
Shuaib Hasan Akib 0e13b4713c docs: clarify strictInputAccessModifiers applies to both input types
Update the strictInputAccessModifiers documentation to clarify that:
- The flag applies to both @Input() decorator and input() signal-based inputs
- The checking only applies to inputs, not outputs
- format interface with fenced block

Fixes docs part of #65243

(cherry picked from commit 34fa11ec9d)
2025-11-21 13:16:12 -05:00
SkyZeroZx 6b6af053f9 docs(docs-infra): update syntax highlighting for inline templates in decorators
Updates syntax highlighting rules to properly handle inline templates defined within decorators, improving readability and consistency in code examples

(cherry picked from commit 1672493d1a)
2025-11-21 13:14:57 -05:00
Shuaib Hasan Akib 444be37b41 docs: Indented the <docs-code> blocks inside numbered list items to ensure correct Markdown rendering and prevent the steps from breaking visually.
- Remove path from header

(cherry picked from commit aafc8e75a1)
2025-11-21 13:14:13 -05:00
Ben Hong 1dfce39775 docs: move aria tabs into content organization category
(cherry picked from commit 8f346ad070)
2025-11-21 12:25:39 -05:00
voi99 9d82c86811 docs(forms): update error class to error-list in signal forms example
(cherry picked from commit 5685e3879c)
2025-11-21 12:23:52 -05:00
Shuaib Hasan Akib 11df3d6ca8 docs: remove unnecessary standalone: true from examples
Standalone components are now the default, so explicitly specifying
`standalone: true` is no longer required. Updated relevant documentation
examples to avoid redundant configuration and keep the guides concise.

(cherry picked from commit f825547353)
2025-11-21 12:23:30 -05:00
Alan Agius 36c967e0ef build: automate GitHub release creation for vscode extension
Update the release script to automatically create a GitHub release and upload the VSIX asset.

Example release: https://github.com/angular/angular/releases/tag/vsix-21.0.0

(cherry picked from commit 74405c7e7a)
2025-11-21 12:22:22 -05:00
Angular Robot 77f059910e build: update bazel dependencies
See associated pull request for more information.
2025-11-21 12:21:20 -05:00
Syam Gadde bc34083d34 fix(compiler-cli): ignore non-existent files
Ignore files that fail fs.exists() rather than throw ENOENT.  Some applications deliberately create "broken" symbolic links that are not relevant to compilation (e.g. emacs lock files that link to owner "user@host").

(cherry picked from commit 1628125bcb)
2025-11-21 11:39:01 -05:00
Shuaib Hasan Akib 1cdcd5a947 docs: fix incorrect Signal Forms link
Updated outdated link guide/forms/signal-forms/ to the correct path guide/forms/signals/ to ensure proper navigation.

Fixes: #65461 #65462
(cherry picked from commit 68f5ceeb46)
2025-11-21 10:55:55 -05:00
Ben Hong 053bf98f57 docs: iterate on signal forms essentials guide
(cherry picked from commit b7d91a796b)
2025-11-21 10:48:04 -05:00
Shuaib Hasan Akib 2f44ede102 docs: add missing ARIA patterns and API reference
Adds the missing ARIA usage patterns and links to the relevant API reference
sections to improve accessibility guidance and ensure examples follow recommended
best practices.

(cherry picked from commit cea19803d8)
2025-11-21 10:18:39 -05:00
Alessio Pelliccione 1925721226 refactor(docs-infra): automate algolia index name based on package version
Previously, the Algolia index name was hardcoded in the configuration, requiring manual updates for every new major release branch.

This commit automates the index name selection by deriving the version directly @angular/core. It dynamically assigns:
- `angular_next_dev` for pre-releases (`-next`, `-rc`) and local snapshots (`0.0.0`).
- `angular_vXX` (e.g., `angular_v19`) for stable releases.

(cherry picked from commit 2ddf26e699)
2025-11-20 19:21:34 -05:00
SkyZeroZx b170aa925b docs: updates code block language tags in signal forms
(cherry picked from commit 889afe9aa2)
2025-11-20 19:20:33 -05:00
Raxabi fd44d7b794 docs: Fix missing single quote in the first navigateByUrl example.
(cherry picked from commit ee57b0f2fa)
2025-11-20 19:19:46 -05:00
marktechson c0a8f0c694 docs: fix update guide typo
The update from 20 to 21 featured the wrong number, this fixes that

(cherry picked from commit c4722820e7)
2025-11-20 19:19:19 -05:00
Alan Agius 70fb1d6cf2 ci: try to resolve vscode extension e2e flakes
Update e2e test runner to VS Code 1.102.0, streamline test activation, and manage temporary directories via `TEST_TMPDIR`.

(cherry picked from commit 1a094ddb2b)
2025-11-20 17:03:18 -05:00
Doug Parker da97099e67 docs: correct v21 LTS end date and v20 active end date
Updated to align the v20 active end date with the v21 release date and fix the v21 LTS to be 1-year after the active period ends.

(cherry picked from commit 2ecdb221d3)
2025-11-20 16:47:29 -05:00
Johannes Hoppe 65c39ea324 docs(core): remove outdated regex template restriction in best-practices.md
Regular expressions in templates are now supported as of Angular 21.

(cherry picked from commit 11da7a65c0)
2025-11-20 16:42:55 -05:00
Charles Lyding b9181f1172 docs: prioritize ng add for Tailwind CSS and clarify manual steps
This commit updates the Tailwind CSS integration guide (`adev/src/content/guide/tailwind.md`) to introduce `ng add tailwindcss` as the primary, automated method for integrating Tailwind CSS.

(cherry picked from commit 396c25ef5a)
2025-11-20 15:00:28 -05:00
Angular Robot 82c085d0b6 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-20 14:24:05 -05:00
Devin Chasanoff 72197597b9 docs: add v21 event game
(cherry picked from commit b8fa9cc7d5)
2025-11-20 13:27:49 -05:00
Ben Hong cd86de1447 docs: consolidate patterns and iterate on conclusion for angular aria overview
(cherry picked from commit be6f2f066f)
2025-11-20 12:38:22 -05:00
Matthieu Riegler 5467cdcaff docs: backport content from main 2025-11-20 12:37:13 -05:00
JoostK d7484f0519 refactor(core): let the profiler handle asymmetric events leniently
Although the prior commit has made more profiler events guaranteed symmetric
through the use of finally-blocks, there continue to be some situations
that could potentially result in asymmetric events, e.g. application
bootstrap doesn't guarantee symmetric events. This commit makes the profiler
lenient to these situations by unrolling the stack past the asymmetric event
data, eventually reaching the expected start event.

(cherry picked from commit 913cde8ab4)
2025-11-20 12:30:02 -05:00
JoostK a55482fca3 fix(core): notify profiler events in case of errors
Profiler events are expected to be symmetric, yet in the case of errors this symmetry may break
if events aren't always kept in sync with their corresponding start event. This commit moves
various end events to be run from a finally-block, allowing them to notify the profiler even
when an error has occurred.

Fixes #62947

(cherry picked from commit 3760045e3e)
2025-11-20 12:30:02 -05:00
kirjs cc3b4ae701 docs: remove unnecessary @ts-ignore from signal forms playground
The @ts-ignore comment is no longer needed as the module resolution
issue has been fixed in the playground editor configuration.

(cherry picked from commit bea7358225)
2025-11-20 12:26:25 -05:00
marktechson eadc8deaf8 docs: add 20 to 21 update guide
(cherry picked from commit 183d194025)
2025-11-20 11:46:49 -05:00
Wagner Maciel f349a9168b docs: fix standlone menu overlay
(cherry picked from commit 29185a864f)
2025-11-20 11:20:41 -05:00
David Kingma 630a3b29d8 refactor(core): add debugName option to rxjs-interop toSignal
toSignal predates the debugName option for signals to name the signals in the Angular dev-tools This adds the debugName option to toSignal.

(cherry picked from commit 0812ac3bec)
2025-11-20 10:49:54 -05:00
Charles Lyding 2a614aa25c docs: add note about Karma/Jasmine examples in testing services guide
This guide currently contains Karma/Jasmine specific code examples.
Adding a note to inform readers that Vitest equivalents are being worked on.

(cherry picked from commit 80202bffee)
2025-11-20 10:47:37 -05:00
Alessio Pelliccione 8d6d13afd2 fix(docs-infra): prevent icons from being translated in aria guide
This commit adds the `translate="no"` attribute to the icon elements to ensure they are preserved in their original form and not modified by translation tools.

Closes #65406

(cherry picked from commit 42c05650ff)
2025-11-20 10:47:15 -05:00
Ben Hong cf7579f506 docs: add signal forms custom controls guide
Co-authored-by: Leon Senft <leonsenft@users.noreply.github.com>

docs: add signal forms custom controls guide
(cherry picked from commit fc2e414262)
2025-11-20 10:35:01 -05:00
marktechson f31fbdd0b9 docs: adds a link to the signal forms example
(cherry picked from commit 890414245f)
2025-11-20 00:41:05 +00:00
Charles 88559649bb docs: separate Zone.js-specific testing utilities into new guide
This commit moves documentation for Zone.js-dependent testing utilities
(`waitForAsync`, `fakeAsync`, `tick`, `discardPeriodicTasks`, `flushMicrotasks`)
from `testing/utility-apis.md` to a new dedicated guide:
`testing/zone-js-testing-utilities.md`.

(cherry picked from commit e77fb1fb14)
2025-11-20 00:40:38 +00:00
tsc036 2bf0c52775 refactor(core): export profile event as enum and move profile_types.ts and framework to shared devtools folder
move framework enum and profile_types to a shared folder so it can be used by wiz

(cherry picked from commit 34e1fe235f)
2025-11-19 23:22:53 +00:00
Ben Hong dff1233cc1 docs: add signal forms validation guide 2025-11-19 15:18:16 -08:00
Angular Robot e0026c870a build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-19 15:08:39 -08:00
Joey Perrott 6ead2ce995 build: fix lockfile
Fix the missing lockfile entries
2025-11-19 15:08:06 -08:00
Ben Hong ac54791140 docs: add redirect for angular overview
(cherry picked from commit 4771dc9cf7)
2025-11-19 22:52:42 +00:00
SkyZeroZx cb15142190 docs: Adds documentation for generic type argument to SimpleChanges
(cherry picked from commit e9ba63a4c1)
2025-11-19 22:31:57 +00:00
Joey Perrott a877e8abaa build: update to latest ng-dev tooling for caretaker handoff update
Update to the latest tooling to upate how caretaker handoff is handled, using new standardized groupings

(cherry picked from commit 0bb09dc5ba)
2025-11-19 22:30:20 +00:00
Shuaib Hasan Akib 35dc3ecfda refactor(common): update examples to align with Angular best practices
Updated examples to use the standalone component approach and the latest

(cherry picked from commit c7affdfbc9)
2025-11-19 22:29:53 +00:00
Kristiyan Kostadinov cc1ec09931 perf(core): avoid repeat searches for field directive
The `getControlDirective` is called multiple times, both at init and during each update run. Under the hood it performs a linear search for the `Field` directive.

We can speed this up by finding its index once and reusing it since the array of directive matches is static.

(cherry picked from commit 5e6d8573f4)
2025-11-19 22:28:59 +00:00
Kristiyan Kostadinov 279824c953 refactor(compiler): remove interpolation-related symbols
We removed the ability to customize the interpolation some time ago. These changes remove the remaining code related to them.

(cherry picked from commit 81ce1ba1d9)
2025-11-19 22:28:23 +00:00
Kristiyan Kostadinov 00531864e0 refactor(compiler): remove container blocks config
Removes the ability to specify container blocks when creating an i18n parser. We were only passing in `switch` and it likely won't change.

(cherry picked from commit b6c141bf8b)
2025-11-19 22:28:23 +00:00
Miles Malerba de5fca94c5 fix(forms): run reset as untracked
Run the signal forms `reset()` as untracked so it does not trigger
`effect` to rerun when the model changes

Fixes https://github.com/angular/angular/issues/65322

(cherry picked from commit 7ddf4a6b07)
2025-11-19 22:27:55 +00:00
Alan Agius 47fc721202 refactor: improve release process instructions and vsce login handling
This commit introduces several improvements to the release process:

- Adds a clear warning and instructions to test the extension before merging the release PR
- Removes the explicit `vsce login` command.

(cherry picked from commit 22ad71d752)
2025-11-19 22:22:48 +00:00
Cheng-Hsuan Tsai d9017a4fcc docs: update aria overview page
(cherry picked from commit d2fe8674f1)
2025-11-19 22:11:23 +00:00
Alessio Pelliccione 404e90dd29 docs: add style binding example to style guide
Adds a parallel example for style bindings alongside the existing class binding example, demonstrating the preferred syntax of [style.property] and [style] over [ngStyle] directive.

(cherry picked from commit 7e5fca2608)
2025-11-19 22:09:50 +00:00
Alan Agius 2a38387466 docs: add release document
Adds the initial documentation for the VSCode Angular Language Service release.
2025-11-19 14:08:36 -08:00
Alan Agius f88e950f65 build: add vsce script
Adds a "vsce" script to package.json to facilitate easier VSCE packaging.
2025-11-19 14:08:36 -08:00
Joey Perrott 22f23ee7bc docs: add version 21 to update guide page
(cherry picked from commit 2013261243)
2025-11-19 22:08:10 +00:00
Georgi Serev df37a30924 docs(docs-infra): fix code editor file creation and renaming
Hide the field when the user unfocuses from it; Fill the input with the file name when renaming; Fix file path renaming

(cherry picked from commit 0a33a18fa4)
2025-11-19 22:07:34 +00:00
Ben Hong 1c1b50f180 docs: add signal forms field state management guide
(cherry picked from commit 2ead438634)
2025-11-19 22:07:06 +00:00
Ben Hong 563e505df0 docs: improve instruction for import in signal forms tutorial
(cherry picked from commit fb32a5bafa)
2025-11-19 22:06:16 +00:00
Ben Hong 9e16f0363f docs: add signal forms tutorial
(cherry picked from commit d352484773)
2025-11-19 22:06:15 +00:00
Angular Robot 480e8cfb8c docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-19 14:05:01 -08:00
Devin Chasanoff 4e14a53ab6 docs: add release blog to v21 page
(cherry picked from commit c2317949a8)
2025-11-19 21:34:44 +00:00
Joey Perrott bcab911846 docs: link to v21 blog post in changelog
(cherry picked from commit 1b4d1f88dc)
2025-11-19 21:34:18 +00:00
Jessica Janiuk 685477632f build: bump core zone.js version
this bumps the core dep on zone.js to 0.16.0.

(cherry picked from commit 11ea1a01ff)
2025-11-19 21:22:17 +00:00
Joey Perrott 3d9c82c21d build: provide a specific version of zone.js for the vscode pre standalone test
Use zone.js 0.15.0 specifically instead of moving to a later verison of zone.js for the test

(cherry picked from commit c03883ec54)
2025-11-19 21:07:46 +00:00
Jessica Janiuk 28810e0914 build: bump adev version
Bump adev versions for v21 release

(cherry picked from commit d42d7523ec)
2025-11-19 20:09:29 +00:00
Joey Perrott fe5c9a1e6a release: bump version of in memory web api
(cherry picked from commit 9a663a28f9)
2025-11-19 20:05:54 +00:00
Jessica Janiuk 63a95c7b9e release: cut the v21.0.0 release 2025-11-19 10:07:09 -08:00
Joey Perrott 8b492ce06e docs: update the actively supported versions
Update the actively supported versions table

(cherry picked from commit a51ba9c7a9)
2025-11-19 16:47:51 +00:00
Wagner Maciel f06c1fb834 docs: fix menubar overlay bug
(cherry picked from commit 3e31a9967e)
2025-11-19 16:45:40 +00:00
kirjs ac34824608 fix(docs-infra): add moduleResolution to TypeScript compiler options for playground
This fixes signal forms, but idk if it breas other things

(cherry picked from commit 040af1aaa1)
2025-11-19 16:26:24 +00:00
Cheng-Hsuan Tsai e69855ad13 docs: aria grid replace overview example with a playful one
(cherry picked from commit 1289371474)
2025-11-19 16:18:59 +00:00
Joey Perrott 17b7d56ae9 build: force angular cli to run in non-TTY mode for adev and devapp
Force adev and devapp to run in non-TTY mode so it doesn't create a prompt that can't be interacted with. This will initially have no effect,
but the fix is expected to land in CLI to make this work as expected in the next few days.
2025-11-19 08:14:19 -08:00
Angular Robot 12193b1e36 build: update all github actions
See associated pull request for more information.
2025-11-19 08:13:48 -08:00
Ben Hong 27ef566b98 docs: update aria component api links
(cherry picked from commit d3ea7cbcc9)
2025-11-19 16:12:55 +00:00
Angular Robot 1017cf3b92 build: update bazel dependencies
See associated pull request for more information.
2025-11-19 08:10:35 -08:00
Aristeidis Bampakos 4598ca3766 fix(docs-infra): add install in pnpm
Add missing install option in pnpm command.

(cherry picked from commit 0e1ddce1cb)
2025-11-19 16:10:14 +00:00
Ben Hong 21c126e743 docs: remove redundant labels on aria since section is marked new
(cherry picked from commit 758cd113b3)
2025-11-19 16:08:30 +00:00
Ben Hong ccb0264edb docs: add signal forms playground template
(cherry picked from commit e0eb619c03)
2025-11-19 16:03:57 +00:00
Devin Chasanoff c2c0140532 docs: add v21 banner
(cherry picked from commit 3810422521)
2025-11-19 16:02:18 +00:00
Ben Hong 28c1a2dc72 docs: add signal forms comparison guide
(cherry picked from commit 7a910e66d4)
2025-11-19 01:01:42 +00:00
Matthieu Riegler 36784d70c0 docs: fix docs heading alignment
(cherry picked from commit c7424c8f07)
2025-11-19 01:00:29 +00:00
Ben Hong 012326e914 docs: update angular aria guides structure, subnav menu, and examples
(cherry picked from commit 47eb77ffb1)
2025-11-18 15:29:51 -08:00
Angular Robot 77fc03ffb6 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-18 15:29:10 -08:00
Wagner Maciel 21e288963c docs: aria combobox examples
(cherry picked from commit 114c83ed8b)
2025-11-18 14:55:59 -08:00
Wagner Maciel d285ba27a6 docs: aria menubar examples
(cherry picked from commit 695f4df912)
2025-11-18 14:55:59 -08:00
Wagner Maciel dce20b9289 docs: aria menu examples
(cherry picked from commit 1963bd67cc)
2025-11-18 14:55:59 -08:00
Wagner Maciel 903cb23df9 docs: aria tabs examples
(cherry picked from commit 04859b41a2)
2025-11-18 14:55:59 -08:00
Wagner Maciel 363bcb311c docs: aria autocomplete examples
(cherry picked from commit b2080c8fb0)
2025-11-18 14:55:58 -08:00
Andrew Seguin 1355edde69 docs: hide temporary prerender tabs and multifile docs sections
(cherry picked from commit d4595791d6)
2025-11-18 14:54:52 -08:00
Amy Sorto e08a8e2678 docs: update overview page
(cherry picked from commit 111a7644ef)
2025-11-18 14:54:13 -08:00
Shuaib Hasan Akib 73e9700788 docs: format examples with replacing <docs-code> typescript examples with fenced ts code blocks
Update adev/src/content/reference/migrations/cleanup-unused-imports.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/extended-diagnostics/NG8102.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/extended-diagnostics/NG8103.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/extended-diagnostics/NG8103.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/extended-diagnostics/NG8103.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/migrations/cleanup-unused-imports.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/migrations/cleanup-unused-imports.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>
(cherry picked from commit 27fa993fb8)
2025-11-18 22:11:28 +00:00
Cheng-Hsuan Tsai 40875702b0 docs: add aria tree examples and disable text selection
(cherry picked from commit 24814ce43e)
2025-11-18 22:10:37 +00:00
Andrew Scott 00dcbf2eeb release: bump VSCode extension version to 21.0.0 2025-11-18 14:09:30 -08:00
Angular Robot e43b4dafbf build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-18 11:17:30 -08:00
Cheng-Hsuan Tsai 646d3a0df5 docs: add aria grid examples
(cherry picked from commit d0877a524a)
2025-11-18 19:14:58 +00:00
Cheng-Hsuan Tsai ff6e9c0b7b docs: add aria accordion examples
(cherry picked from commit c639f84347)
2025-11-18 19:14:30 +00:00
Cheng-Hsuan Tsai afc25d1f70 docs: add aria tree examples
(cherry picked from commit 41e9c7b4bf)
2025-11-18 19:13:55 +00:00
Nicolò Polazzi fdb8671493 docs: correct inconsistencies in signals tutorial
(cherry picked from commit 661a554b8d)
2025-11-18 19:11:29 +00:00
Angular Robot 56ba2c8344 build: lock file maintenance
See associated pull request for more information.
2025-11-18 08:17:14 -08:00
Shuaib Hasan Akib ab119a8bad docs: simplify docs-code header by removing paths and keeping only file name and info
(cherry picked from commit 374c36d810)
2025-11-18 16:15:46 +00:00
Shuaib Hasan Akib 6c3840b620 docs: replace legacy <docs-code> with fenced code blocks with highlight metadata
Replaced older <docs-code> components (e.g.
<docs-code language="ts" highlight="3">…</docs-code>)
with modern fenced code blocks using {highlight:[3]} metadata

(cherry picked from commit 0182939d5e)
2025-11-18 16:15:05 +00:00
Devin Chasanoff bc1eb6932f docs: add AI tutor instructions
(cherry picked from commit 631035a2e0)
2025-11-18 16:14:37 +00:00
Angular Robot 1b43bfbbab build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-17 16:35:53 -08:00
Angular Robot 9400afa5ba build: update cross-repo angular dependencies to v21.0.0-rc.3
See associated pull request for more information.
2025-11-17 15:20:16 -08:00
SkyZeroZx 97237483c7 docs: replace @HostListener with host event bindings in attribute directives
(cherry picked from commit c93d02151a)
2025-11-17 23:09:16 +00:00
ljasek cd74b94e9f docs: fix JetBrains AI Assistant MCP JSON configuration
(cherry picked from commit 6d35ab8c28)
2025-11-17 23:08:19 +00:00
hawkgs 91de09423c fix(devtools): refine when signal graph button is shown
Show the signal graph button only when a signal-graph-eligible node from the directive explorer is selected; Fix client app error when a `defer` node is selected (related)

(cherry picked from commit e7a6e31a70)
2025-11-17 22:45:05 +00:00
aparziale 5ffc906dbe docs(docs-infra): add advanced recommendations
Added recommendation in advanced section for redirectTo and canMatch will generate an error. These properties are incompatible together

fixes #65267

(cherry picked from commit c757fd6c29)
2025-11-17 22:40:13 +00:00
Alan Agius 414191e87e build: improve vscode-ng-language-service release process
This commit improves the release process for the vscode-ng-language-service by adding automated changelog generation and updating the package.json version.
2025-11-17 14:35:12 -08:00
Paul Leflon 123464a304 docs: fix markdown table in custom elements guide
(cherry picked from commit f13159f811)
2025-11-17 22:33:37 +00:00
Angelo Parziale cd7dee3fc3 refactor: convert docs-code blocks to inline TypeScript documentation
This PR converts the custom <docs-code> blocks to standard Markdown code blocks with TypeScript syntax highlighting.

(cherry picked from commit 7a2d5116f2)
2025-11-17 22:33:03 +00:00
Jessica Janiuk f279aabfb8 release: cut the v21.0.0-rc.3 release 2025-11-17 13:39:05 -08:00
Angular Robot e8f238a26c build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-17 11:47:21 -08:00
Cheng-Hsuan Tsai 5e66675bb0 docs(docs-infra): fix broken code tabs
When `<mat-tab-group>` is conditionally removed by `@if` it loses the
`<mat-tab>` projected content somehow.

(cherry picked from commit d104acb286)
2025-11-17 19:45:22 +00:00
Joey Perrott 6551b65172 docs: update examples to latest Angular
Updates the adev examples to use Angular 21.0.0-rc.2

(cherry picked from commit 7e70682f2b)
2025-11-17 19:18:01 +00:00
Joey Perrott b7e91839b6 Revert "ci: remove cache usage from pr.yml"
This reverts commit 3760feb5ec.

(cherry picked from commit 25546f6152)
2025-11-17 19:08:57 +00:00
Joey Perrott 655dacd0e4 ci: remove cache usage from ci.yml
Remove the @actions/cache usages from ci.yml

(cherry picked from commit cf07486532)
2025-11-17 19:08:57 +00:00
Angular Robot 652d719388 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-17 10:58:30 -08:00
Angular Robot 1a7b854cfe docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-17 10:57:39 -08:00
Wagner Maciel 7483c961b5 docs: aria listbox examples (#65273)
PR Close #65273
2025-11-17 18:39:01 +00:00
Wagner Maciel 0322f02fe5 docs: multiselect examples (#65273)
PR Close #65273
2025-11-17 18:39:00 +00:00
Wagner Maciel 92c81b862d docs: aria select skins (#65273)
docs: select examples

PR Close #65273
2025-11-17 18:39:00 +00:00
Wagner Maciel a2d6318906 docs: aria toolbar examples (#65273)
docs: aria toolbar retro example

docs: aria toolbar material example

docs: organize aria toolbar examples

docs: vertical examples

docs: final aria toolbar examples

docs: wip aria toolbar docs

PR Close #65273
2025-11-17 18:39:00 +00:00
Ben Hong 68cbcaec93 docs: add aria menubar component guide
(cherry picked from commit 9b87689558)
2025-11-17 18:38:28 +00:00
Jessica Janiuk 210f5ea5ec Revert "docs: replace legacy <docs-code> with fenced code blocks with highlight metadata"
This reverts commit c5c1689348.

(cherry picked from commit b2171c6c14)
2025-11-17 18:37:00 +00:00
Jessica Janiuk 127cadd3fc Revert "refactor(core): let the profiler handle asymmetric events leniently"
This reverts commit da9911f2b4.

(cherry picked from commit 88dfd96ec9)
2025-11-17 18:10:41 +00:00
Jessica Janiuk e430d69603 Revert "fix(core): notify profiler events in case of errors"
This reverts commit af1ba52587.

(cherry picked from commit adc2a57be0)
2025-11-17 18:10:41 +00:00
Matthew Beck ecea909bcc fix(compiler): don't choke on unbalanced parens in declaration block
Following https://github.com/angular/angular/pull/64509 we started
choking on unbalanced closing parentheses in declaration blocks,
specifically in quoted background-image urls. This was reported in
https://github.com/angular/angular/issues/65137.

This occured because we previously (and now again) traverse the entire
declaration block when selecting for :host-context() selectors to shim.
This is an oddity of how we parse styles today, and is likely something
we'd want to remove if we parsed selectors properly.

This change adds a new flag to _splitOnTopLevelCommas which allows it to
continue past unbalanced closing parentheses in the declaration block,
returning _convertColonHostContext to its previous behavior while
keeping support for the extra nesting in :host-context().

(cherry picked from commit 9e7ddcaa10)
2025-11-17 17:46:04 +00:00
Matthieu Riegler 035e07e3be refactor(core): promote the custom track profiler to stable.
We didn't get much report on the feature itself so we feel confident about promoting it to stable. In parallel we'll also land #62959 but one is not blocking the other.

fixes #64996

(cherry picked from commit c15836c8c7)
2025-11-17 17:42:35 +00:00
Matthieu Riegler 91d8d55a80 fix(forms): Set error message of a schema error.
Use the error message of the issue as the error message of the error itself.

fixes #65247

(cherry picked from commit b41a94bc85)
2025-11-17 17:41:57 +00:00
Miles Malerba 6aa4b7ea63 refactor(forms): avoid console warnings when setting NaN
It can be useful for a developer to set `NaN` as the value for a number
input, as a way to say "clear the input". However, directly setting this
value to the `.valueAsNumber` causes a console warning. This PR fixes
the console warning by just doing `.value = ''` when we would otherwise
to `.valueAsNumber = NaN`

(cherry picked from commit f47637426f)
2025-11-17 17:41:32 +00:00
Leon Senft e682f00e29 refactor(forms): reduce boilerplate needed to define custom controls
An early piece of feedback received regarding custom controls hosted on
native inputs was that they required a lot of boilerplate to bind
`FieldState` properties. Each property required an input to accept the
property, and a host binding to forward it to the native control.

(cherry picked from commit c727df5d38)
2025-11-17 17:41:02 +00:00
JoostK 780e37241f refactor(core): let the profiler handle asymmetric events leniently
Although the prior commit has made more profiler events guaranteed symmetric
through the use of finally-blocks, there continue to be some situations
that could potentially result in asymmetric events, e.g. application
bootstrap doesn't guarantee symmetric events. This commit makes the profiler
lenient to these situations by unrolling the stack past the asymmetric event
data, eventually reaching the expected start event.

(cherry picked from commit da9911f2b4)
2025-11-17 17:40:10 +00:00
JoostK 7ada2519f1 fix(core): notify profiler events in case of errors
Profiler events are expected to be symmetric, yet in the case of errors this symmetry may break
if events aren't always kept in sync with their corresponding start event. This commit moves
various end events to be run from a finally-block, allowing them to notify the profiler even
when an error has occurred.

Fixes #62947

(cherry picked from commit af1ba52587)
2025-11-17 17:40:10 +00:00
Joey Perrott cc621ea634 ci: remove cache usage from pr.yml
Remove the @actions/cache usages from pr.yml

(cherry picked from commit 3760feb5ec)
2025-11-17 17:29:52 +00:00
Cheng-Hsuan Tsai b5cd4522d9 docs(docs-infra): aria attribute typo
(cherry picked from commit 4dc226231c)
2025-11-17 17:29:29 +00:00
Cheng-Hsuan Tsai ac4a95e364 docs: add aria grid basic examples: pill list, calendar, and table
(cherry picked from commit 35d8654a02)
2025-11-17 17:29:06 +00:00
Shuaib Hasan Akib f340398141 docs: replace <docs-code> shell examples with fenced shell code blocks
Updated shell command examples to use fenced code blocks (```shell) instead of <docs-code> components, improving formatting consistency and aligning with current documentation standards.

(cherry picked from commit dff9d12bc3)
2025-11-17 17:28:43 +00:00
Cheng-Hsuan Tsai 16abc8a0d5 docs(docs-infra): set max-height to code example
(cherry picked from commit 138e65356b)
2025-11-17 17:28:19 +00:00
SkyZeroZx a7dddcca51 docs: Adds links to relevant guides for APIs in core package
(cherry picked from commit 0432e76171)
2025-11-17 16:47:40 +00:00
SkyZeroZx 697f3616b1 docs: add documentation for HostAttributeToken
(cherry picked from commit d70310896c)
2025-11-17 16:47:03 +00:00
SkyZeroZx 00ffe91c89 refactor(common): removes unused NgModuleFactory config in NgComponentOutlet
Removes the `ngComponentOutletNgModuleFactory`  in `_needToReCreateNgModuleInstance`

(cherry picked from commit 24243e34d9)
2025-11-17 16:46:12 +00:00
Alessio Pelliccione 363a0ddb8b fix(devtools): ensure external docs link opens correctly from extension popup
Adds target="_blank" and rel="noopener noreferrer" to prevent tab-nabbing and follow modern security best practices.

(cherry picked from commit 1aed9408a4)
2025-11-17 16:45:37 +00:00
Shuaib Hasan Akib 8e03261a58 docs: replace legacy <docs-code> with fenced code blocks with highlight metadata
Replaced older <docs-code> components (e.g.
<docs-code language="ts" highlight="3">…</docs-code>)
with modern fenced code blocks using {highlight:[3]} metadata

(cherry picked from commit c5c1689348)
2025-11-17 16:43:41 +00:00
Alessio Pelliccione 5308d83cbd docs(docs-infra): update ARIA binding guidance and remove outdated attr. prefix requirement
(cherry picked from commit bc03c45b60)
2025-11-17 16:43:03 +00:00
Shuaib Hasan Akib 1aaeb98411 docs: replace <docs-code> bash examples with fenced bash code blocks
Updated bash command examples to use fenced code blocks (```bash) instead of <docs-code> components, improving formatting consistency and aligning with current documentation standards.

(cherry picked from commit 7ea60052f0)
2025-11-17 16:42:27 +00:00
hawkgs 30125eeb27 fix(devtools): show profiler exec details only if there are directives
Show the execution details of a captured frame entry only if there are recorded directives.

(cherry picked from commit 68d823a241)
2025-11-17 16:39:39 +00:00
hawkgs cf0552ffa0 fix(devtools): don't round decimal vals previews in the state serializer
The actual numerical data can only be checked in the prop edit mode. This fixes that and makes the real value visible all the time.

(cherry picked from commit d6be289603)
2025-11-17 16:39:13 +00:00
Alessio Pelliccione 67c06a4c12 fix(devtools): forward Angular detection to background
Ensure the content script forwards Angular detection results to the service worker so the popup/icon reflects the page state.

(cherry picked from commit 7d41716703)
2025-11-17 16:38:23 +00:00
hawkgs 7497ad4302 refactor(devtools): increase font weight in the demo app
Increase the global font weight to `500`.

(cherry picked from commit 6fdb12357f)
2025-11-17 16:37:58 +00:00
Leon Senft d89e522a1f fix(forms): debounce updates from interop controls
* Apply any debounce rules to updates from interop controls (if configured).
* Add tests to ensure debouncing works for all control types (native, custom,
  and interop).

(cherry picked from commit b1037ec2f0)
2025-11-17 16:37:29 +00:00
Shuaib Hasan Akib 2bfd841611 docs: replace <docs-code> shell examples with fenced shell code blocks
Updated shell command examples to use fenced code blocks (```shell) instead of components, improving formatting consistency and aligning with current documentation standards.

(cherry picked from commit 576f9ba889)
2025-11-17 16:35:20 +00:00
Shuaib Hasan Akib 70736309f5 docs: improve accessibility with descriptive link and main landmark
- Replaced <a><button></button></a> with a proper <a> containing text and
  aria-label to ensure links have discernible text.

- Added main tag in home page to provide
  a consistent main landmark, improving accessibility for screen readers
  and satisfying WCAG and Lighthouse requirements.

Fixes #65181.

(cherry picked from commit ee5947db38)
2025-11-17 16:32:05 +00:00
Shuaib Hasan Akib c03b1fa8a0 fix(docs-infra): add bash language support for shell prompt rendering
Code blocks with `bash` language identifier were not rendering the `$`
prefix, while `shell` blocks did.

This ensures consistent command-line prompt rendering across both
`bash` and `shell` code blocks in the documentation.

(cherry picked from commit f462684211)
2025-11-17 16:31:31 +00:00
Shuaib Hasan Akib 5f8f007cca docs(docs-infra): simplify file headers in <docs-code> blocks
Removed redundant "src/app/" prefix from file headers (e.g.
"src/app/open-close.component.ts" → "open-close.component.ts")
to keep examples concise and avoid unnecessary path noise.

Aligns with prior cleanup patterns (similar to angular#65016).

(cherry picked from commit 073dcd7ffd)
2025-11-17 16:30:35 +00:00
SkyZeroZx 02061d4b81 docs: add documentation for DOCUMENT injection token usage in SSR
(cherry picked from commit 846d50ab23)
2025-11-17 16:28:05 +00:00
Angelo Parziale b770d39493 docs(docs-infra): add npm link documentation for library development
Add comprehensive guide for using npm link with Angular libraries, including required angular.json.

(cherry picked from commit a458a83133)
2025-11-17 16:26:02 +00:00
Angular Robot d591a64122 build: update bazel dependencies
See associated pull request for more information.
2025-11-17 08:24:23 -08:00
Aristeidis Bampakos 97c18819fa docs: use the new format for the X account
(cherry picked from commit 73295b1087)
2025-11-17 16:22:24 +00:00
Angular Robot 9adc71afef docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-17 08:21:28 -08:00
Charles Lyding 59543d6b19 docs: add bun package manager and standardize order in testing guides
This commit updates the testing documentation to include `bun` as a package manager option in all relevant code examples.

Additionally, it standardizes the presentation of package manager commands by:
- Consistently using a multi-tab format (`<docs-code-multifile>`).
- Enforcing a consistent order: `npm`, `yarn`, `pnpm`, `bun`.

These changes improve the user experience by providing clear instructions for multiple package managers and ensuring consistency across the testing guides.

(cherry picked from commit 599b72ec5a)
2025-11-17 16:11:26 +00:00
Charles Lyding b43ed852dd docs: update testing guides for Vitest and reorder navigation
This commit updates the unit testing, code coverage, and debugging guides to align with the Vitest test runner, which is now the default for new Angular CLI projects.

Key changes include:
- **Unit Testing Overview**: Revised to focus on Vitest, including details on DOM emulation (jsdom/happy-dom), browser testing setup, and custom Vitest configuration via `runnerConfig`. A prominent note links to the Karma-to-Vitest migration guide.
- **Code Coverage**: Updated to reflect Vitest-specific prerequisites (`@vitest/coverage-v8`), command-line flags, and `angular.json` configuration for coverage reporting and threshold enforcement.
- **Debugging**: Completely rewritten to provide instructions for debugging Vitest tests in both Node.js and browser environments using the `--debug` flag.
- **Navigation Reordering**: The 'Testing' section in `sub-navigation-data.ts` has been reordered to present a more logical educational flow, starting with core concepts and progressing to advanced topics and migration.

(cherry picked from commit f5a7719373)
2025-11-17 16:11:26 +00:00
Ben Hong f62e2b599f docs: add draft aria component guides (pt 2)
(cherry picked from commit c61a195391)
2025-11-17 16:09:14 +00:00
portneon 7928ff1637 docs(router): update navigation event example to use event.code
(cherry picked from commit 93d548fba4)
2025-11-17 16:08:33 +00:00
Cheng-Hsuan Tsai 7020ef6c60 docs(docs-infra): make show code button more discoverable when collapsed
(cherry picked from commit 48cff8c128)
2025-11-17 16:07:06 +00:00
hawkgs 97a6f9fd4f docs(docs-infra): fix misaligned tutorials card
Fix the "Deferrable views" illustration which fixes the aligned within the `docs-card`.

(cherry picked from commit 6bfe107404)
2025-11-17 16:06:37 +00:00
Kristiyan Kostadinov 7ec9f357f4 fix(docs-infra): prevent example resets from affecting CDK
The example viewer has some `::ng-deep` styles that are used to reset global styles that leak into the live examples. It works by applying a style like `.docs-example-viewer-preview * {all: revert;}`.

The problem with this is that depending on when the first example is rendered, the styles will be lower or higher in the cascade, thus making the reset unreliable. Furthermore, it can affect structural styles from the CDK which intentionally have low specificity.

These changes move the resets into the global stylesheet to make them more predictable.

(cherry picked from commit 1ba50caefc)
2025-11-17 16:05:15 +00:00
Angular Robot 63ca0de1ec build: update dependency bazel to v7.7.1
See associated pull request for more information.
2025-11-17 08:01:00 -08:00
Shuaib Hasan Akib d365024444 docs(docs-infra): simplify file headers in <docs-code> blocks
Removed redundant "src/app/" prefix from file headers (e.g.,
"src/app/open-close.component.ts" → "open-close.component.ts")
to make code examples cleaner and more focused.

(cherry picked from commit b3adb6001c)
2025-11-17 16:00:25 +00:00
Charles Lyding 31ae88f411 docs: standardize package manager commands in guides
This commit updates the elements and tailwind guides to use the standardized `docs-code-multifile` format for package manager commands. This change introduces `yarn`, `pnpm`, and `bun` alternatives to the existing `npm` commands, providing a consistent experience for users across different package managers.

(cherry picked from commit 6208016026)
2025-11-17 15:59:53 +00:00
Angular Robot 0f5c0dae51 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-17 07:58:36 -08:00
Angular Robot 74b95dec3b build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-14 15:35:56 -08:00
SkyZeroZx a315afbfd3 docs: add formArray clear() example clarifies array manipulation
(cherry picked from commit c1057c69f0)
2025-11-14 23:30:52 +00:00
Miles Malerba e1a7c35370 refactor(forms): improve typing on min & max (#65212)
If we're calling `min` on a path that's guaranteed to be `number` we
don't want to make the users validator function handle the `null` or
`string` cases.

This uncovered an issue in the `SchemaTreePath` type which needed to be
fixed by preventing the model type from being distributed over.

PR Close #65212
2025-11-14 21:56:58 +00:00
Miles Malerba ff4633dab8 refactor(forms): allow passing number|string|null paths to min & max (#65212)
Relaxes the constraints on which paths can be used with the `min` &
`max` validation rules, since people may want to validate a
potentially-null number, or a numeric value represented as a string

PR Close #65212
2025-11-14 21:56:58 +00:00
Wagner Maciel 05cf14ba44 docs: aria toolbar examples
(cherry picked from commit a99e724c60)
2025-11-14 21:56:16 +00:00
Angular Robot ad0c059bb2 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-14 13:55:52 -08:00
Cheng-Hsuan Tsai 3228cce727 docs(docs-infra): enable tabs layout
(cherry picked from commit de234def0e)
2025-11-14 20:24:05 +00:00
Ben Hong 8a5b284ef5 docs: add draft of aria component guides
(cherry picked from commit 8b59653788)
2025-11-14 19:26:50 +00:00
Miles Malerba 966bfae337 build(forms): expose signal forms compat package
Hooks up @angular/forms/signals/compat to be released and have its docs
published

(cherry picked from commit fc1ef79ad4)
2025-11-14 17:23:39 +00:00
Angular Robot 911999e75b docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-14 08:53:42 -08:00
cexbrayat f550f4ab4a docs: ExperimentalIsolatedShadowDom mentions
(cherry picked from commit c137f1fe91)
2025-11-14 16:41:16 +00:00
cexbrayat 1a8dbd79e6 docs: FormArrayDirective mentions
(cherry picked from commit b0dd813664)
2025-11-14 16:40:44 +00:00
Kristiyan Kostadinov 4dda271985 refactor(compiler-cli): split up large file
The `type_check_block.ts` file was getting quite large and difficult to navigate. These changes split up the different pieces of functionality into separate files.

(cherry picked from commit 81bd455de8)
2025-11-14 16:40:14 +00:00
Leon Senft 8e988124ab test(forms): [field] inputs on components should just pass through
Test that a component with a bound `[field]` input is not treated as a
control, and that `fieldBinding` does not include the corresponding
`Field` instance.

(cherry picked from commit acb78eeb7a)
2025-11-14 16:37:45 +00:00
Angular Robot 513c5f5d1c build: update pnpm to v10.22.0
See associated pull request for more information.
2025-11-14 08:35:37 -08:00
Angular Robot 84bf0d26bf build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-14 08:33:42 -08:00
SkyZeroZx 8481939f5b docs: Uses the self-closing tag syntax
(cherry picked from commit 9ec964334e)
2025-11-14 16:32:40 +00:00
KAUSHIK REDDY AWALA 167eb584ed docs(docs-infra): update di factory provider function to use correct parameters
This PR fixes a parameter mismatch in the `apiClientFactory` function documentation example. The factory was previously passing only http and `userService` to the ``ApiClient`` constructor, but the constructor actually requires http, `baseUrl`, and `rateLimitMs` as separate parameters.

Key Changes:

Extracts baseUrl and rateLimitMs from UserService using getter methods
Updates the ApiClient instantiation to pass all three required constructor parameters
Adds a comment explaining the assumption about UserService providing these values

(cherry picked from commit 6f716e400e)
2025-11-14 16:32:12 +00:00
Alan Agius 4fb29588cf fix(docs-infra): update firebase caching regex for generated files
The regex for caching generated files in firebase.json has been updated to
include lowercase letters and underscores in the 8-character hash. This
ensures that files with names like `chunk-CrXHmw_W.js` are correctly
cached.

(cherry picked from commit e840cd547d)
2025-11-14 08:29:06 -08:00
Ben Hong c2a52fd278 docs: add aria toolbar component guide 2025-11-13 16:02:14 -08:00
Cheng-Hsuan Tsai afeba79ac8 docs(docs-infra): hide file tabs when code example is hidden
(cherry picked from commit 6d8c3fc888)
2025-11-13 23:58:14 +00:00
Ben Hong 750da17f48 docs: add signal forms models guide 2025-11-13 15:41:36 -08:00
Angular Robot d7101de374 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-13 15:23:10 -08:00
Angular Robot 99945bf9a5 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-13 15:21:55 -08:00
Joey Perrott 4b0f20830b ci: use hardcoded global approvers group
Use a single hardcoded, within the pullapprove config file, group for global approvers instead of leveraging a github team as a group
2025-11-13 15:13:25 -08:00
Alessio Pelliccione 482e1376e9 docs(docs-infra): improve theme picker accessibility and add animations
(cherry picked from commit 25320ae1eb)
2025-11-13 22:05:12 +00:00
Matthieu Riegler 16d51f6fbe refactor(core): flip ngDevMode condition for formatter
In cases the `ngDevMode` flag hasn't been set, still enable the formatter. What matters is if `ngDevMode` is `false ` we tree shake that away.

(cherry picked from commit 1b895fece6)
2025-11-13 18:01:13 +00:00
SkyZeroZx 9950165145 docs: adds guide references to router APIs
Adds `@see` tags with links to relevant guides in the router documentation.

(cherry picked from commit 718eb7bb3a)
2025-11-13 18:00:24 +00:00
Leon Senft 37463525be refactor(forms): use AbortSignal to cancel debounced updates
Add an `AbortSignal` parameter to `Debouncer`. Implementations may
choose to accept this parameter to be informed when a debounced
operation is aborted. This may be useful for canceling pending timers or
avoiding unnecessary work.

(cherry picked from commit 98ce9a7b17)
2025-11-13 17:59:22 +00:00
Angular Robot 2406172d50 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-13 09:45:50 -08:00
Matthieu Riegler 4f6f9b8e8d docs(docs-infra): Add support for metadata on fenced code blocks
This will help us replace `docs-code` with inline code usages and prevent future indentation issues

(cherry picked from commit f737a9dd5c)
2025-11-13 17:36:17 +00:00
Ben Hong 119be3488e docs: add signal forms overview guide 2025-11-13 09:35:53 -08:00
Shuaib Hasan Akib c12f0159f9 docs: replace <docs-code> block with standard fenced code block for typescript example
Replaced the <docs-code> wrapper with a Markdown fenced code block to improve
copy/paste usability, syntax highlighting consistency, and alignment with current
documentation formatting standards.

Inspired by #65043

(cherry picked from commit 3cfd4361a5)
2025-11-13 17:34:15 +00:00
Kristiyan Kostadinov 67fbd5ff1e fix(core): SSR error in signal forms
Resolves an SSR error, because we weren't checking if `MutationObserver` is available.

(cherry picked from commit 3f80ae74ba)
2025-11-13 17:12:45 +00:00
Matthieu Riegler 0c27954a4d refactor(core): remove resource flag.
This was used to migrate G3 and is no longer necessary.

(cherry picked from commit d1ab73dd87)
2025-11-13 17:12:22 +00:00
Shuaib Hasan Akib c7df828c48 docs: replace <docs-code> block with standard fenced code block for typescript example
Replaced the <docs-code> wrapper with a Markdown fenced code block to improve
copy/paste usability, syntax highlighting consistency, and alignment with current
documentation formatting standards.

Inspired by angular#65043

(cherry picked from commit caaa5ec8e6)
2025-11-13 17:11:26 +00:00
Charles Lyding 50938b786e docs: create Vitest migration guide
This commit introduces a new guide for migrating existing Angular projects from Karma/Jasmine to Vitest.

The guide covers:
- Manual steps for installing dependencies and updating `angular.json`.
- Handling custom `karma.conf.js` configurations.
- Removing Karma-related files and packages.
- Configuring browser mode for Vitest.
- Details on the `refactor-jasmine-vitest` schematic for automated test refactoring.

The guide also clarifies that while Vitest is the default for new projects, migration for existing projects is experimental. It emphasizes reviewing changes and provides guidance on adapting custom Karma configurations to Vitest.

Renames `experimental-unit-test.md` to `migrating-to-vitest.md` and updates `sub-navigation-data.ts` accordingly.

(cherry picked from commit 258c295b92)
2025-11-13 17:10:59 +00:00
Angular Robot 2606b6e938 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-13 09:09:10 -08:00
hawkgs c133f48902 docs(docs-infra): improve playground layout
Improve the layout and optimize the empty space; Introduce some minor improvements to the code editor

(cherry picked from commit 7ab1b3a32a)
2025-11-13 17:07:58 +00:00
SkyZeroZx 31ca56aa20 docs: Fixed mermaid diagram node label contrast in dark mode
(cherry picked from commit b6a91d4c39)
2025-11-12 23:01:40 +00:00
Kristiyan Kostadinov be371292f2 refactor(compiler-cli): rework type checking for signal forms
Reworks the way we approach type checking of signal forms to be closer to the behavior at runtime. There are a couple of scenarios that we handle:

1. For native controls, we now produce simplified type checking code that looks as follows:

```
var t1 = null! as number | string; // Type depends on the input `type`.
t1 = someField().value();
```

2. For custom controls we generate bindings to the individual inputs, rather than checking conformance against `FormValueControl`/`FormCheckboxControl`. This is closer to the behavior at runtime and it allows us to handle generic directives properly.

(cherry picked from commit f7e58577a4)
2025-11-12 21:13:51 +00:00
Kristiyan Kostadinov afda85f24c refactor(core): remove unused type
Removes the `ExtractFromControlValue` type since it won't be necessary anymore.

(cherry picked from commit 14152f69b9)
2025-11-12 21:13:51 +00:00
SkyZeroZx 4d8b97627c docs: update tutorials with self-closing tags, standalone router directives, and fix syntax highlighting
(cherry picked from commit 4544135b1e)
2025-11-12 21:13:27 +00:00
Angular Robot eb9034d4a8 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-12 11:56:11 -08:00
SkyZeroZx dc11db1f37 docs: correct example for RouteReuseStrategy getRouteKey
Update the example to properly demonstrate the getRouteKey method usage fixes #65021

(cherry picked from commit a48029b810)
2025-11-12 19:49:08 +00:00
Angular Robot 16f2c5529a docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-12 11:48:42 -08:00
SkyZeroZx 129e16dc86 docs: correct code block language in error handling and signals interop
(cherry picked from commit 05ef2a5ca9)
2025-11-12 19:35:14 +00:00
Angular Robot 1021b7a394 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-12 11:32:20 -08:00
Angular Robot 18cc2606e3 build: update bazel dependencies
See associated pull request for more information.
2025-11-12 09:41:42 -08:00
Angular Robot 8636f8aa83 build: update pnpm to v10.21.0
See associated pull request for more information.
2025-11-12 09:38:59 -08:00
Ben Hong 4f936cafda docs: iterate on essentials signal forms guide 2025-11-12 09:37:15 -08:00
Ben Hong d02374a45c docs: iterate on signal forms essential guide 2025-11-12 09:37:15 -08:00
Alan Agius a55a96a5fb build: allow any version of @angular/* packages for peer dependencies
This change configures pnpm to allow any version of  `@angular/*` packages to satisfy peer dependencies. This is necessary because `@angular/*` packages are managed within this monorepo, and this rule prevents issues with peer dependency resolution when different versions might be present during development or testing.

(cherry picked from commit 46099910c0)
2025-11-12 09:36:01 -08:00
Andrew Kushnir 909588e57f release: cut the v21.0.0-rc.2 release 2025-11-12 08:39:31 -08:00
Danny Koppenhagen c05cf4145b refactor(core): render additional WAI-ARIA 1.3 property bindings as attributes
Support additional ARIA properties from Accessible Rich Internet Applications (WAI-ARIA) version 1.3.

| attribute | property |
|-----------|----------|
| `aria-activedescendant`           | `ariaActiveDescendantElement` |
| `aria-colindextext`           | `ariaColIndexText` |
| `aria-controls`           | `ariaControlsElements ` |
| `aria-describeyby`           | `ariaDescribedByElements ` |
| `aria-description`           | `ariaDescription` |
| `aria-details`           | `ariaDetailsElements ` |
| `aria-errormessage`           | `ariaErrorMessageElements ` |
| `aria-flowto`           | `ariaFlowToElements ` |
| `aria-labelledby`           | `ariaLabelledByElements ` |
| `aria-owns`           | `ariaOwnsElements ` |
| `aria-rowindextext`           | `ariaRowIndexText ` |

closes #64847

(cherry picked from commit c3e82fb2d5)
2025-11-11 14:09:02 -08:00
Matthew Beck 814b2713f5 fix(compiler): support complex selectors in :nth-child()
:nth-child() (and its siblings) support complex expressions, e.g.
`:nth-child(2n of :is(.foo, .bar))`. Previously we'd choke because of
the `:is()`. Now, we reuse the `_parenSuffix` subexpression to match
nested parentheses the same way we do for :host() and :host-context().
Note that we only support 3 levels of nesting, so a selector like
`:nth-child(n of :is(:has(:not(.foo))))` will still break.

I'll say yet again that we really should add a proper parser so we stop
getting bug reports like this :)

Fixes #64913

(cherry picked from commit 24cfd5a0ed)
2025-11-11 14:03:37 -08:00
Alan Agius 7811d95b89 refactor(core): improve resource loading with async/await
Refactor  to use async/await for clearer asynchronous operations and enhanced error handling.
Simplify resource caching and streamline the resolution of component templates and styles.
Update  in the router to align with the new async resource resolution.

(cherry picked from commit 4ed8781301)
2025-11-11 12:50:19 -08:00
Andrew Scott e5b0a9739c Revert "feat(service-worker): notify clients about version failures (#62718)"
This reverts commit 6d011687ec.

issue #63500 reproduces at head on the main branch in the dev app.
Reverting this change along resolves it.

fixes https://github.com/angular/angular/issues/63500

(cherry picked from commit 4af408afcb)
2025-11-11 12:48:49 -08:00
Leon Senft a278ee358c feat(forms): add debounce() rule for signal forms
The `debounce()` rule allows developers to control when changes to a
form control are synchronized to the form model.

This feature necessitated some changes to `FieldState`:

  * `controlValue` is a new signal property that represents the current
    value of a form field as it appears in its corresponding control.

  * `value` conceptually remains unchanged; however, its value may lag
    behind that of `controlValue` if a `debounce()` rule is applied.

The `debounce()` rule essentially manages when changes to `controlValue` are
synchronized to `value`. The intent is that an expensive or slow
validation rule can react to the debounced `value`, rather than a more
frequently changing `controlValue`.

Directly updating `value` immediately updates `controlValue`, and cancels any
pending debounced updates.

When multiple `debounce()` rules are applied to the same field, the last
currently active rule is used to debounce an update. These rules are
applied to child fields as well, unless they override them with their
own rule.

(cherry picked from commit d337cfb68f)
2025-11-11 12:00:13 -08:00
Leon Senft 33ed7d116b refactor(forms): do not infer accumulated metadata type from initial value
This removes the need to specify type arguments for
`reducedMetadataKey()` when the value returned from the `getIntial`
callback is a subtype of the accumulated type.

(cherry picked from commit 8866934334)
2025-11-11 12:00:12 -08:00
Angular Robot fc3a28e647 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-11 11:51:32 -08:00
Angular Robot baf33d01c1 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-11 10:21:35 -08:00
Doug Parker c9f977833e fix(core): skip Angular formatting when formatting signals recursively
The flag `skipFormatting` got renamed to `ngSkipFormatting` during review of https://github.com/angular/angular/pull/64000, but a couple usages got missed, causing some unfortunate UI recursion.

(cherry picked from commit 490435bf76)
2025-11-11 10:14:33 -08:00
Kristiyan Kostadinov 20319fea85 refactor(compiler): remove unused code
The `fullInheritane` flag from the metadata and the `CopyDefinitionFeature` that it controls appear to no longer be used since `fullInheritance` is always false. The feature appears to have been there to support ngcc which was removed some time ago.

(cherry picked from commit 8277906455)
2025-11-11 10:04:32 -08:00
Angular Robot 91dbb4b4c1 build: lock file maintenance
See associated pull request for more information.
2025-11-11 08:48:21 -08:00
SkyZeroZx 8765b66f5a docs: add reference to Built-in Pipes in multiple pipe files
(cherry picked from commit d999667b57)
2025-11-11 08:47:12 -08:00
Matthieu Riegler 6213cbf1a8 refactor(core): rename ExperimentalIsolatedShadowDom to IsolatedShadowDom
This API is still experimental

(cherry picked from commit 21ca49cf62)
2025-11-11 08:46:10 -08:00
Matthieu Riegler 5e86299ec4 docs(docs-infra): Add support for experimental enum entries
(cherry picked from commit 16e61f5dd0)
2025-11-11 08:46:09 -08:00
RobinReinecke 557213e211 docs: correct mermaid code block formatting
(cherry picked from commit 07703875b5)
2025-11-11 08:33:32 -08:00
SkyZeroZx c72efd67de docs: improve discoverability in service worker documentation
(cherry picked from commit dde18c2303)
2025-11-11 08:32:19 -08:00
cexbrayat eea81c2733 docs: remove error mentions in signal forms docs
`error` no longer exists and is called `validate`

(cherry picked from commit 800b01f5a1)
2025-11-11 08:30:13 -08:00
Devin Chasanoff 2019940ddc docs: add links to SDUI example and livestream
(cherry picked from commit 5af33724a4)
2025-11-10 14:16:23 -08:00
arturovt ab98e71c41 fix(common): remove placeholder image listeners once view is removed
Prior to this commit, attempting to resolve a `ChangeDetectorRef` after views or app have been destroyed would result in an error. In this commit, we clean up listeners once the view is destroyed, before the placeholder loads or fails to load.

(cherry picked from commit feb86e3fde)
2025-11-10 12:05:24 -08:00
Shuaib Hasan Akib e5a19cb736 refactor(router): add ngDevMode guards to InjectionToken names and cleanup imports
Wraps InjectionToken names with `typeof ngDevMode !== 'undefined' && ngDevMode`
checks to enable tree-shaking of descriptive token names in production builds.
This ensures debug-only strings are removed from production bundles, reducing size.

Also removes unused imports found during refactor.

(cherry picked from commit b0b834d7f1)
2025-11-10 12:04:35 -08:00
arturovt 8ab084754b refactor(core): mark VERSION as @__PURE__ for better tree-shaking
Annotate the `new Version(...)` call with `/* @__PURE__ */` to signal to optimizers that the constructor is side-effect free.

Without this hint, bundlers such as Terser or ESBuild may conservatively retain the `VERSION` instantiation even when unused. With the annotation, the constant can be tree-shaken away in production builds if not referenced, reducing bundle size.

(cherry picked from commit d3f67f6ca8)
2025-11-10 12:04:09 -08:00
Alan Agius 5f1436779c docs: use markdown code fences in service worker docs
Replaces the <docs-code> component with standard markdown code fences in the service worker documentation. This improves the readability and maintainability of the documentation.

(cherry picked from commit d42f9ce3a9)
2025-11-10 12:03:36 -08:00
Angular Robot 63418fb938 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-10 10:35:02 -08:00
SkyZeroZx 650af71026 refactor(http): migrate XSRF classes to use inject() function
Remove constructor injection in favor of inject() calls

(cherry picked from commit 55be477979)
2025-11-10 09:49:14 -08:00
arturovt 9db114f4ff refactor(router): replace Optional with inject() flags
Replace `@Optional() link: RouterLink` constructor parameter with
`link = inject(RouterLink, {optional: true})` to enable tree-shaking
of the `Optional` decorator and its factory scaffolding.

Bundle size reduction: `Optional` is a runtime value created by
`makeParamDecorator()`. Even in production builds, ESBuild and other
bundlers must keep their factory code because it is referenced via
`Optional`. With `inject()`, this class is no longer referenced,
allowing it and the `makeParamDecorator` scaffolding to be tree-shaken
when unused elsewhere.

Note: This updates the constructor signature but should not be
considered a breaking change. Angular's official guidance is that
directives, components, and pipes should be instantiated by the
framework, not by user code. Directly calling `new RouterLinkActive(...)`
is an unsupported pattern that goes against Angular's design principles.

(cherry picked from commit 7724a9460d)
2025-11-10 09:48:36 -08:00
Angular Robot afa2ac2801 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-10 08:24:22 -08:00
Shuaib Hasan Akib 5092a89e96 docs: add shell language to CLI installation examples
Added `language="shell"` to installation command examples to display
the shell prompt `$` icon consistently across npm, pnpm, yarn, and bun
code blocks.

(cherry picked from commit 27d54654e3)
2025-11-10 08:01:34 -08:00
Shuaib Hasan Akib af0ed124c4 docs(docs-infra): simplify file headers in <docs-code> blocks
Removed redundant "src/app/" prefix from file headers (e.g.,
"src/app/open-close.component.ts" → "open-close.component.ts")
to make code examples cleaner and more focused.

(cherry picked from commit e0a4bdd72b)
2025-11-10 08:00:38 -08:00
Shuaib Hasan Akib 55360994af docs(docs-infra): removed unused import and use self-closing syntax for component
(cherry picked from commit 8c6619a531)
2025-11-10 08:00:11 -08:00
SkyZeroZx 511200265b docs: improve discoverability of forms
(cherry picked from commit e3fc57e8fc)
2025-11-10 07:57:48 -08:00
jnizet 0e13ae5dfc fix(docs-infra): avoid double slash in sitemap urls
Previously, the URLs in the  generated sitemap contained double slashes between the host and the path. It's not the case anymore.

fix #65022

(cherry picked from commit afe5fc0399)
2025-11-10 07:53:44 -08:00
SkyZeroZx 50a9ca0bb1 docs: correct import path and self-closing tag in ng-content example
(cherry picked from commit 6a2f4a88de)
2025-11-10 07:52:51 -08:00
Matthew Beck b69763c728 test(compiler): add test for :host:has(> .foo)
I took a quick look at my recent changes to see if I had inadvertently
fixed this bug, but I couldn't seem to reproduce it even before my
changes. Seems like it's working, though.

Closes #58436

(cherry picked from commit 4b871b139b)
2025-11-10 07:51:21 -08:00
arturovt a8b123c18d refactor(core): tree-shake REF_EXTRACTOR_REGEXP (and dependencies)
`new RegExp()` with computed strings can't be analyzed statically. The bundler can't prove the template string evaluation has no side effects; as thus this expression is considered a side-effect.

(cherry picked from commit 7f95f02d05)
2025-11-10 07:48:42 -08:00
Leon Senft 2667d8c23d refactor(forms): remove a TODO and simplify update on <select> mutations
Remove an unnecessary TODO comment. The native `<select>` tracks its
`value` by keeping track of the selected `<option>`. Thus if the value
was set *before* the corresponding option is created, the `<select>`
will ignore it, but the framework doesn't know that and will cache the
bound value anyways. Therefore, checking if the value changed since it
was last bound when the mutation that creates the selected `<option>`
occurs would in fact prevent a needed update, leaving the `<select>` and
field values out of sync.

Furthermore, we know the control type is a native `<select>` element, so
we can update its value directly instead of going through
`updateNativeControl()` which would perform a redundant input type
check.

(cherry picked from commit 44cd18c183)
2025-11-10 07:48:01 -08:00
hawkgs 6c025fa709 refactor(devtools): update inspect icon
Use a custom version of Material `pin_end` icon that doesn't have a dot.

(cherry picked from commit 402f396b76)
2025-11-10 07:47:18 -08:00
Ben Hong 1876c7c48c docs: add draft for aria autocomplete component guide 2025-11-10 07:46:48 -08:00
Danny Koppenhagen 590244a8f9 docs(core): add a11y considerations related to @defer()
closes #53466

(cherry picked from commit d2b854b37e)
2025-11-07 15:27:15 -08:00
Andrew Scott 647e640603 refactor(core): Extract NavigateEvent cancel steps based on recent spec update
This updates the cancel/abort steps of fake navigation to match the
current spec.

Relevant commit seems to be
* https://github.com/whatwg/html/commit/b0b40cca16f5d04b7fdca5a1bdca32cc6f824689

(cherry picked from commit 8bccd8671c)
2025-11-07 12:54:18 -08:00
Andrew Scott 916ff6a340 refactor(core): Update commit steps of PlatformNavigation fake to match spec updates
Brings commit steps in line with recent spec updates

* https://github.com/whatwg/html/commit/a3809244c003103243e769855aa4c5792b8937e3
* https://github.com/whatwg/html/commit/bd347bdfebc558f4009109c101bf7fb495400031

(cherry picked from commit 7a5ac69144)
2025-11-07 12:54:17 -08:00
Angular Robot 6db214899a docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-07 12:52:12 -08:00
Leon Senft 781a3299f9 perf(forms): only update interop controls when bound field changes
https://github.com/angular/angular/pull/64590 implemented change
detection for field bindings, but only for those bound to native or
custom form controls. This change extends that optimization to apply to
field bindings on interoperable controls built using Reactive Forms as well.

(cherry picked from commit 850f0d6b3d)
2025-11-07 11:58:20 -08:00
Kristiyan Kostadinov c81620f2c1 refactor(compiler-cli): update set of required inputs
Updates the required inputs that can be ignored for form controls.

(cherry picked from commit 877678345a)
2025-11-07 11:57:53 -08:00
Kristiyan Kostadinov cc25f96f02 test(forms): fix type checking errors in signal form tests
Fixes some type checking errors in the signal forms tests that accumulated while there wasn't any type checking.

(cherry picked from commit 10915f2f5f)
2025-11-07 11:57:53 -08:00
Kristiyan Kostadinov 71ab11ccf0 fix(compiler-cli): make field detection logic more robust
Currently the logic for detecting `Field` directives only works if it's imported from `@angular/forms/signals` which doesn't cover our own tests.

These changes make the check more robust.

(cherry picked from commit 0b6b78ca74)
2025-11-07 11:57:53 -08:00
Kristiyan Kostadinov 5b55200edf fix(compiler-cli): allow value to be set on radio fields
Updates the logic that checks for unsupported bindigns to allow `value` to be set on `radio` controls.

(cherry picked from commit a61e01d51f)
2025-11-07 11:57:53 -08:00
Kristiyan Kostadinov bd322ca410 fix(compiler-cli): do not flag custom control required inputs as missing when field is present
Adds some logic that won't report the `value` or `checked` inputs as missing when the `Field` directive is present since it will bind to the inputs implicitly.

(cherry picked from commit 165634264e)
2025-11-07 11:57:53 -08:00
Kristiyan Kostadinov 01290ab275 fix(compiler-cli): use any when checking field interface conformance
Switches to checking against `FormValueControl<any>` instead of `FormValueControl<unknown>` when checking whether custom controls conform to the interface.

Fixes #64946.

(cherry picked from commit 4d0778529f)
2025-11-07 11:57:53 -08:00
Andrew Scott 89095946cf fix(language-service): address potential memory leak during project creation
This addresses a potential memory leak in plugin-factory.ts.
The require call inside the create function reloads the entire language
service module for every new project, which is inefficient and could be a cause of the memory leak during branch
switching. This ensures the module is loaded only once and the same
instance is shared across all projects.

(cherry picked from commit 4405725943)
2025-11-07 11:57:25 -08:00
Alan Agius aada582e96 build: update rules_angular to latest
Update `rules_angular` to latest.
2025-11-07 11:43:47 -08:00
Alan Agius 1e53f4e957 refactor: exclude tsconfig.json from VSIX package contents (#64991)
The  file is no longer included in the VSCode extension package.
This change updates the golden file and the  file to reflect this exclusion.

PR Close #64991
2025-11-07 11:36:31 -08:00
Alan Agius 8967d9bc40 test: add golden file test for VSCode extension package contents (#64991)
This commit introduces a golden file test to verify the contents of the VSCode extension package.
The test ensures that the list of files included in the extension package remains consistent.

A new Bazel rule  is added to generate the list of files, and  is used to compare it against the golden file. A helper script  is also added to facilitate the generation of the golden file.

PR Close #64991
2025-11-07 11:36:31 -08:00
Matthew Beck f54cc4f28a fix(compiler): support commas in :host() argument
This change adds support for commas in :host() arguments (e.g.
`:host(:not(.foo, .bar))` as well as in nested parens when the argument
is applied without parens (e.g. `:host:not(:has(.foo, .bar))`).
Previously these selectors would receive an extra `[nghost]` attr, e.g.
`[nghost]:not(.foo, [nghost].bar)`.

I didn't file a bug for this one, but it's also blocking on an internal
LSC. Like the other CSS changes, I'll run a TGP to confirm this isn't
breaking.

(cherry picked from commit 680c3c7bff)
2025-11-07 10:43:37 -08:00
Shuaib Hasan Akib 0552e728a8 docs(docs-infra): use self-closing syntax for component examples
Replaced multiple component tags such as `<example></example>` with
self-closing syntax (`<example />`) across documentation examples.
This improves readability and aligns with the current Angular
style conventions.

(cherry picked from commit a2cd36777a)
2025-11-07 10:24:41 -08:00
Charles Lyding 31846ded2d docs: remove invalid service dependency guide section
The current section `Services with dependencies` within the testing services
guide is non-functional and has been removed. The example service is using
`inject` but the test code is using constructor-based injection. The further
sections discuss the use of TestBed to adjust providers which better handles
these cases.

(cherry picked from commit e3143036ba)
2025-11-07 10:23:50 -08:00
SkyZeroZx 46c1a80b8f docs(docs-infra): refactor update to use host property and refactor isWindows
(cherry picked from commit dff803514e)
2025-11-07 10:13:26 -08:00
Alon Mishne dec8d74ecf docs: Update MCP docs to include all current stable and experimental tools
(cherry picked from commit b481fee049)
2025-11-07 10:12:33 -08:00
Charles Lyding 27b355b220 docs: Update testing guides for Vitest and Karma
This commit updates the testing documentation to reflect the introduction of Vitest as the default test runner, while ensuring Karma testing instructions are still available.

Key changes include:
- Adding a new guide for "Testing with Karma" (`guide/testing/karma.md`).
- Updating the "Code Coverage" guide (`guide/testing/code-coverage.md`) to use `angular.json` for coverage enforcement and referencing Vitest documentation.
- Modifying the "Testing Overview" guide (`guide/testing/overview.md`) to introduce Vitest as the default, update `ng test` output examples, and link to the new Karma guide.
- Updating navigation data to include the new Karma testing guide.

(cherry picked from commit 2a2397acc4)
2025-11-07 10:10:29 -08:00
Andrew Scott 3f7111a9c3 fix(language-server): fix directory renaming on Windows
Hopefully addresses issues on Windows where fs.watch on a directory
locks that directory.

fixes https://github.com/angular/vscode-ng-language-service/issues/1398

(cherry picked from commit c91d8203a2)
2025-11-07 10:10:00 -08:00
Miles Malerba a3cb1dfd1a refactor(forms): nicer type errors
By intersecting with `object` instead of `unknown` in the primitive and
`FormControl` cases, we get TypeScript to show nicer type errors that
mention `FieldTree<...>` insetad of `() => FieldState<...>`

(cherry picked from commit 0efb3f6d1f)
2025-11-07 15:45:08 +00:00
SkyZeroZx b15325f409 refactor(devtools): replace HostListener with host metadata for keydown handling
Uses host metadata instead of the HostListener decorator for keydown events

(cherry picked from commit c74367c5de)
2025-11-07 15:44:46 +00:00
khanhkhanhlele 59798a13dd docs: Fix typos in some files
(cherry picked from commit a625f6bb20)
2025-11-07 15:44:08 +00:00
Angular Robot 8e73f54f38 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-06 15:28:28 -08:00
tsc036 e69ada4ceb refactor(core): move profile_types.ts to primtives
move profile_types.ts so the types can be used in Wiz code

(cherry picked from commit cf47ce2db9)
2025-11-06 22:22:38 +00:00
Miles Malerba 6d6fda8610 refactor(forms): allow FieldTree of recursive type
Adjusts our typings to work better with recursive types and avoid
infinite recursion in the type system.

(cherry picked from commit faccf03ee0)
2025-11-06 21:43:46 +00:00
Miles Malerba 9ea1c2216d refactor(forms): expose pathKeys as part of the API
Currently we maintain the pathKeys internally, but do not expose them
through the `FieldContext`, this PR updates the `FieldContext` to expose
this property.

(cherry picked from commit 2fd8dc9195)
2025-11-06 21:43:15 +00:00
Miles Malerba 8b4195fe7e refactor(forms): support dynamic object logic
extends `applyEach` to work on objects as well, conditionally applying
logic to each property of the object.

(cherry picked from commit c9058087ae)
2025-11-06 21:42:51 +00:00
Angular Robot 86a9feb9b5 build: update cross-repo angular dependencies to v21.0.0-rc.1
See associated pull request for more information.
2025-11-06 13:22:03 -08:00
Jessica Janiuk dcfd7fe399 Revert "build: restrain visibility to compiler-cli subpackages (#64732)"
This reverts commit acaa1e6104.
2025-11-06 13:09:27 -08:00
Jessica Janiuk 7c0daeac89 Revert "refactor(compiler-cli): remove deep imports from compiler-cli (#64732)"
This reverts commit af16b48ac7.
2025-11-06 13:09:27 -08:00
Matthieu Riegler acaa1e6104 build: restrain visibility to compiler-cli subpackages (#64732)
This should solve future deep imports issues.

PR Close #64732
2025-11-06 20:01:27 +00:00
Matthieu Riegler af16b48ac7 refactor(compiler-cli): remove deep imports from compiler-cli (#64732)
Accessed symbols are grouped into dedicated `private` entries

PR Close #64732
2025-11-06 20:01:27 +00:00
SkyZeroZx 593f902f24 refactor(platform-browser): remove unused Platform ID dependency from DomRendererFactory2
Eliminates the unnecessary injection and usage of Platform ID in the renderer factory logic, along with related test scaffolding cleanup

(cherry picked from commit 5343001835)
2025-11-06 20:00:50 +00:00
Angular Robot de2ff121d5 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-06 11:56:14 -08:00
arturovt e90f9e418c refactor(forms): tree-shake ngControlStatusHost and ngGroupStatusHost
This commit removes `ngGroupStatusHost` variable because it's a side-effect, ending up preserving `ngControlStatusHost` and `ngGroupStatusHost`.

(cherry picked from commit 9f76fb61df)
2025-11-06 18:57:48 +00:00
Matthew Berry aad6ced0ef fix(compiler): support one additional level of nesting in :host()
Previously we supported one level of nested parentheses inside of a
`:host()` selector, e.g. `:host(:not(p))`. This caused a breakage in g3
when I migrated a selector from `:host:not(:has(p))` to
`:host(:not(:has(p)))`. This change adds support for just one more level
of nesting.

It'd be nice to move everything to a real CSS parser (or even update it
to count parentheses like I did with :host-context()), but I wasn't able
to get that to work in ~20 minutes and I'm focusing on other things at
the moment.

This change punts the problem until somebody tries to use just one more
level of nesting in a selector.

Fixes #64830

(cherry picked from commit 444143758e)
2025-11-06 18:53:47 +00:00
kirjs 3bbcae6ce8 refactor(forms): add compatForm
This allows using reactive form controls in signal forms

(cherry picked from commit 60447945bc)
2025-11-06 18:51:31 +00:00
Alan Agius 3bed9f0f16 build: format md files
This commit configures prettier to format markdown files.
2025-11-06 10:07:13 -08:00
Miles Malerba 60ce31fb62 test(forms): re-enable some disabled tests
Adjusts test behavior to reflect current implementation and enables them

(cherry picked from commit fa02d96508)
2025-11-06 17:41:31 +00:00
Jessica Janiuk a3c2fe819a Revert "refactor(common): Removes unused imports to clean up dependencies"
This reverts commit 6d3e0f1a51.
2025-11-06 09:05:05 -08:00
SkyZeroZx 6d3e0f1a51 refactor(common): Removes unused imports to clean up dependencies
Eliminates unnecessary imports to reduce clutter and improve maintainability

(cherry picked from commit ca3ef38143)
2025-11-06 16:35:32 +00:00
tsc036 b30bcc514d refactor(core): export types from primitives
export Version type and a type for linkedSignal previous value so they can be used for the Wiz implementations

(cherry picked from commit 104f7d57c1)
2025-11-06 16:34:58 +00:00
SkyZeroZx d8c656bd58 docs: correct formatting in dependency injection guides
(cherry picked from commit 61066071cf)
2025-11-06 16:34:31 +00:00
Joey Perrott 26995e2082 fix(docs-infra): properly expose the prerendered routes for sitemap generation
Properly expose the prerendered routes for sitemap generation rather than only copying the browser directory
2025-11-06 07:52:22 -08:00
Joey Perrott 5fb0b80f10 feat(docs-infra): generate the sitemap for angular.dev
We automatically generate the sitemap for the angular.dev deployment and include it in the assets pushed
to firebase.

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2025-11-06 07:52:22 -08:00
Miles Malerba f3e2252f4b refactor(forms): add better support for Object.keys and Symbol.iterator
Improves support for using `Object.keys` (and related methods) and
`Symbol.iterator` to work with a `FieldTree` of unknown shape.

(cherry picked from commit e87f423d90)
2025-11-06 15:51:31 +00:00
Miles Malerba d1f4c8c18c refactor(forms): improved select support
When we set the `value` on a `<select>` element we're really just
setting the selected `<option>`. It treats the selected option as the
source of truth, rather than the actual value. This means that if
options are added or removed or their value changes, the `<select>` may
wind up with a different `value` than what's in our model.

This PR resolves this issue by adding a `MutationObserver` to the select
that is used to resync its value to the model whenever the options may
have changed.

(cherry picked from commit 194b41199b)
2025-11-06 15:49:09 +00:00
Angular Robot 87ffa3ca28 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-06 07:47:27 -08:00
Angular Robot f0ffd9bebd build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-05 15:26:25 -08:00
Joey Perrott 827a267511 build: update diff release package script
Update the diff relase package script to properly recursively apply the chmod and support a flag for writing the
diff to a file instead of only logging it to the console.

(cherry picked from commit de1f22cf2c)
2025-11-05 23:24:53 +00:00
Angular Robot 086ce4b40f build: update all github actions
See associated pull request for more information.
2025-11-05 15:17:38 -08:00
Angular Robot 0a75a0aee2 build: update bazel dependencies
See associated pull request for more information.
2025-11-05 15:17:18 -08:00
Miles Malerba 4bdd317596 docs: improve docs generation for namespaces (#64747)
Improves docs epxerience for interfaces / type aliases that are merged
with a namespace.

PR Close #64747
2025-11-05 22:42:59 +00:00
Miles Malerba c3b4bea951 refactor(forms): improve discoverability of ValidationError flavors (#64747)
Improves discoverability by putting the WithField, WithoutField, etc as
subtypes of the main ValidationError type

PR Close #64747
2025-11-05 22:42:59 +00:00
Erik Wegner bf19fd499f docs: Add the missing function call to use the signal's actual value
(cherry picked from commit e18aac88d4)
2025-11-05 11:47:20 -08:00
Andrew Scott 24f9d760a6 release: cut the v21.0.0-rc.1 release 2025-11-05 19:27:38 +00:00
Matthieu Riegler 01c5ba50d2 docs(docs-infra): fix heading layout on mobile
Long code blocks overflow the headings on narrow screen (like mobiles), this messes up the global layout of the page. With the ellipsis with fix that.

fixes #64845

(cherry picked from commit 7f44345db3)
2025-11-05 09:49:53 -08:00
Andrew Scott d3d2a3416f build: 20.3.3 release notes
update release notes for 20.3.3 of vscode extension
2025-11-05 17:36:29 +00:00
Andrew Scott 3a63bfda94 build: 20.3.2 release for vscode extension
changelog and version bump for 20.3.2
2025-11-05 17:36:29 +00:00
Kristiyan Kostadinov bdecb0345a test(compiler-cli): set up TCB tests for signal forms
Adds TCB-specific tests for the generated code in signal forms since they tend to be a bit easier to read and follow.

(cherry picked from commit 748caf9a74)
2025-11-05 09:35:53 -08:00
Kristiyan Kostadinov 0e081a6ef9 refactor(compiler-cli): check that custom control conforms to control interfaces
Generates additional type checking code to ensure that custom control conform to either `FormValueControl` or `FormCheckboxControl`.

(cherry picked from commit 3c7751020e)
2025-11-05 09:35:53 -08:00
Kristiyan Kostadinov 93283e076f refactor(compiler-cli): flag unsupported static bindings on field directives
Expands the diagnostic for unuspported bindings on fields to also capture static attributes.

(cherry picked from commit 04ed91071b)
2025-11-05 09:35:52 -08:00
Kristiyan Kostadinov d1a9258ed2 refactor(compiler-cli): split up form field ops
Splits up the custom form field and native form field into two separate `TcbOp`s with a shared base class.

(cherry picked from commit a5b596b83d)
2025-11-05 09:35:51 -08:00
Kristiyan Kostadinov c371251e4c fix(compiler-cli): report invalid bindings on form controls
Adds validation that users don't bind to unsupported properties on nodes with the `Field` directive.

(cherry picked from commit f20103a1d7)
2025-11-05 09:35:51 -08:00
Kristiyan Kostadinov 471da8a311 fix(compiler-cli): infer type of custom field controls
Adds the logic to infer the type of a custom field control that's on the same element as the `Field` directive.

(cherry picked from commit 948e2f4f01)
2025-11-05 09:35:51 -08:00
Kristiyan Kostadinov 6df098f76c refactor(core): add utility type for extracting the value of a custom control
Adds the `ɵExtractFormControlValue` type that we can use during template type checking to extract the type of a custom control.

(cherry picked from commit 4b68bddd62)
2025-11-05 09:35:50 -08:00
Kristiyan Kostadinov 96cb0cffda fix(compiler-cli): infer types of signal forms set on native inputs
Sets up the logic for inferring the type of the signal form that is set on a native `input`, `textarea` or `select`.

(cherry picked from commit 6b51fc3e9d)
2025-11-05 09:35:50 -08:00
Kristiyan Kostadinov a021006276 refactor(compiler-cli): allow the forms module to be loaded in tests
Updates the testing utilities to allow for `@angular/forms` to be loaded.

(cherry picked from commit c5ac77cb32)
2025-11-05 09:35:50 -08:00
SkyZeroZx 47578e0967 refactor(common): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens

(cherry picked from commit 7c49c5338f)
2025-11-05 09:08:44 -08:00
SkyZeroZx 6de14b14e0 refactor(http): simplifies destruction tracking using destroyed property
Replaces the manual destroyed state with destroyed property

(cherry picked from commit 44435ea97b)
2025-11-05 09:05:34 -08:00
Jessica Janiuk a453d603c0 fix(core): skip leave animations on view swaps
We accounted for skipping leave animations during moves, but not swaps.
This accounts for the swap cases and updates how we deal with swaps and
moves. Now we always queue animations and then essentially dequeue them
if we attach them back in the same render pass.

fixes: #64818
fixes: #64730
(cherry picked from commit 373d263834)
2025-11-05 09:04:21 -08:00
Alan Agius 78c12b32e8 build: update typescript dependency for vscode-ng-language-service
Updates the typescript dependency to 5.9.3 in vscode-ng-language-service/package.json
and updates pnpm-lock.yaml accordingly.

(cherry picked from commit 3ef2edc076)
2025-11-05 09:02:41 -08:00
Leon Senft 507b3466ee perf(forms): implement change detection for field control bindings
For each field state property, check if it has changed since the last
time it was checked before writing it the corresponding form control
property.

The `pattern` and `required` properties of the field state now return a
default value rather than `undefined` if not defined by metadata.

(cherry picked from commit 41be02da2f)
2025-11-04 16:11:33 -08:00
Angular Robot bb267d1f04 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-05 00:07:49 +00:00
Lukas Matta e1f933fed0 fix(migrations): Prevent removal of templates referenced with preceding whitespace characters
In https://github.com/angular/angular/pull/64745, a fix was introduced for templates referenced with a trailing semicolon. However, templates are still incorrectly removed when there are whitespace characters before the template name.

This commit updates the control flow migration logic to ensure templates referenced with preceding whitespace are not removed.

Fixes #64854

(cherry picked from commit 5b210e97af)
2025-11-04 15:26:08 -08:00
SkyZeroZx 9c59ea869a docs(docs-infra): add missing meta tags for author, keywords, and Twitter
(cherry picked from commit b5e37ffb77)
2025-11-04 14:58:34 -08:00
Angular Robot 9596020956 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-04 19:16:54 +00:00
Angular Robot 0b1339ef34 build: lock file maintenance
See associated pull request for more information.
2025-11-04 18:56:49 +00:00
Andrew Scott 65d6c9317a build: release VSCode extension 20.3.1
bump version and readme for vscode extension release
2025-11-04 18:54:06 +00:00
Jan Martin bb839bec33 ci: update handle for jkrems/hybrist
The username was changed earlier today and the old username is no
longer in use.
2025-11-04 17:48:38 +00:00
Gerome Grignon 3ccda42182 docs(router): uniformize lazy loading syntax
(cherry picked from commit 8f49af90d0)
2025-11-04 09:39:21 -08:00
SkyZeroZx 36f4c9b299 refactor(core): Removes unused flag for onDestroy
Eliminates an unnecessary configuration flag

(cherry picked from commit 2ad1b5979f)
2025-11-03 20:21:07 -08:00
SkyZeroZx 3140b87fd6 docs: simplify tutorial signals with self-closing component tags
(cherry picked from commit b61847f877)
2025-11-03 16:34:46 -08:00
SkyZeroZx 250e4c4a82 docs: Update highlight inputs & code block formatting in component guides
(cherry picked from commit 82a579c7e6)
2025-11-03 16:32:48 -08:00
SkyZeroZx 33f833984d refactor(platform-browser): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens

(cherry picked from commit 97169b4689)
2025-11-03 16:31:58 -08:00
SkyZeroZx 1b5e2c84b5 refactor(platform-server): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens

(cherry picked from commit 5e4437baf8)
2025-11-03 16:31:58 -08:00
SkyZeroZx f32a364045 refactor(router): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens

(cherry picked from commit 67da4eb04c)
2025-11-03 16:31:58 -08:00
SkyZeroZx d3ed745653 refactor(forms): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens

(cherry picked from commit 78e6716f40)
2025-11-03 16:31:58 -08:00
SkyZeroZx 20fa3841ba refactor(core): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens

(cherry picked from commit 64efbc53aa)
2025-11-03 16:31:58 -08:00
Shuaib Hasan Akib 34f53aad06 docs: remove standalone: true since it's now the default
Removes redundant `standalone: true` declarations from code examples.
Standalone components are now the default in Angular, so the flag is
no longer necessary in documentation snippets.

(cherry picked from commit c4c7fb88ac)
2025-11-03 16:27:04 -08:00
Angular Robot a702c87833 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-04 00:00:22 +00:00
marktechson fcd5f9f0ef docs: add v21 landing page
Adds a new landing page for developer events, starting with the v21 page. It also includes an ICS file link for calendar invites. Also updated the tests for the docs-pill to support two new attributes so developers can add the event to their calendars.

(cherry picked from commit 7a422c209a)
2025-11-03 15:59:31 -08:00
Matthieu Riegler 6b3fdf3e9f docs: remove feature from changelog.
#64584 reverted that change
2025-11-03 23:29:55 +00:00
SkyZeroZx d66384db49 docs(docs-infra): Improve font loading performance with preconnect
Adds preconnect links for Google Fonts domains to establish early
connections, reducing latency and improving font loading speed

(cherry picked from commit ffa19ddd3f)
2025-11-03 14:31:09 -08:00
Angular Robot 97c31ae1a8 build: update dependency bazel to v7.7.0
See associated pull request for more information.
2025-11-03 22:27:46 +00:00
SkyZeroZx 92f7052bc3 docs(docs-infra): Updates page title strategy to sync meta tags
Ensures that page title changes are reflected in relevant meta tags for improved SEO and sharing support

(cherry picked from commit 429672d6ab)
2025-11-03 13:30:21 -08:00
Kristiyan Kostadinov 4c6e29f72f fix(compiler-cli): make required inputs diagnostic less noisy
Currently when a required input is missing, we produce a diagnostic on the entire start tag. This can be really noisy if there are already some attributes on the element.

This change switch to only highlighting the tag name instead.

(cherry picked from commit f233f7420a)
2025-11-03 13:27:54 -08:00
Matthieu Riegler dc99f4c55a docs(docs-infra): ensure all redirections are absolute
fixes #64824

(cherry picked from commit 434ddbcfc9)
2025-11-03 13:01:54 -08:00
Angular Robot 32a166bdb7 build: update bazel dependencies
See associated pull request for more information.
2025-11-03 20:18:33 +00:00
Matthieu Riegler 5d75d0ec30 refactor(core): Replace usages of the Function type for animations
`Function` is usually not recommended as its not specific enough.

(cherry picked from commit 79b7ac722a)
2025-11-03 12:05:09 -08:00
Angular Robot 303bff6740 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-03 19:52:27 +00:00
Angular Robot ac97c72495 build: update pnpm to v10.20.0
See associated pull request for more information.
2025-11-03 19:49:47 +00:00
SkyZeroZx a44083a2b9 docs(devtools): Removes comment about enum deprecation
Removes comment about enum deprecation

(cherry picked from commit a0fe177682)
2025-10-30 12:40:23 -07:00
SkyZeroZx c4742322dc refactor(devtools): Removes redundant input undefined in angularVersion
Simplifies the initialization of the version input by removing
an unnecessary undefined

(cherry picked from commit bd27e96273)
2025-10-30 12:40:22 -07:00
Kristiyan Kostadinov a4fe078969 refactor(common): remove unused import (#64699)
Cleans up unused code to improve readability and maintainability.

PR Close #64699
2025-10-30 19:27:34 +00:00
Ben Hong fee4baf5e5 docs: update dependency injection guides (part 1) (#63652)
PR Close #63652
2025-10-30 19:22:42 +00:00
Alan Agius 26f4944586 ci: refactor cross-repo documentation update scripts (#64792)
Consolidate separate scripts for updating Aria, CDK, and CLI documentation into a single, unified  script. This change streamlines the documentation update process and improves maintainability. The workflow file has been updated to use the new consolidated script.

PR Close #64792
2025-10-30 19:19:21 +00:00
Matthieu Riegler d23bb3cf6d docs(docs-infra): allow cors for json files (#64783)
fixes #64710

PR Close #64783
2025-10-30 17:50:07 +00:00
SkyZeroZx eb78d3552c docs: Standardize route parameter input signal & code block tags in routing docs (#64788)
PR Close #64788
2025-10-30 17:48:00 +00:00
Angular Robot c721de112c build: update cross-repo angular dependencies (#64781)
See associated pull request for more information.

PR Close #64781
2025-10-30 17:47:12 +00:00
aparziale ca0e77b25f fix(docs-infra): Cannot find module message (#64701)
Fixed the import error message in the editor section. The build would complete successfully, but an error message would be incorrectly reported.

PR Close #64701
2025-10-30 17:42:27 +00:00
Ben Hong 58f921d34c docs: add essential signal forms guide (#64665)
PR Close #64665
2025-10-30 17:24:58 +00:00
Joey Perrott 7a4813104c ci: make the github action fail when a firebase command fails (#64801)
When a firebase command line execution fails, the github action should be shown as failing instead of continuing to attempt to run and resulting in
an exit code of 0 and success

PR Close #64801
2025-10-30 17:24:27 +00:00
Angular Robot 90452f53df docs: update Angular Aria apis (#64804)
Updated Angular Aria api files.

PR Close #64804
2025-10-30 17:17:32 +00:00
Andrew Scott 60cc3cbde4 refactor(core): Move patch toggles inside functions to allow tree shaking
In general, global level const will cause DCE bailouts.

(cherry picked from commit fb569ef614)
2025-10-29 13:57:56 -07:00
Matthieu Riegler 366392b692 refactor(compiler): desambiguate and export RegularExpressionLiteralExpr
This allows all symbols used by `ExpressionVisitor` to be accessible.

(cherry picked from commit cfba831966)
2025-10-29 13:45:20 -07:00
Cheng-Hsuan Tsai 81b18fcbb7 ci: add workflow to copy and generate aria api pages
- add a script to copy Aria API json files from `angular/aria-builds`.
- build Aria API docs from json files.

(cherry picked from commit 3784fbcc12)
2025-10-29 13:38:40 -07:00
Matthieu Riegler 20b4b2c43c refactor(core): expose isWritableSignal to the publicApi
This is alongside the already exisiting isSignal()

fixes #64763

(cherry picked from commit 76adbbcd0a)
2025-10-29 13:31:53 -07:00
Miles Malerba 981fabc9b6 feat(docs-infra): add support for namespaces
Adds support for generating docs for namespaces (and merged declarations
of namespace + type)

(cherry picked from commit 662f0e5c00)
2025-10-29 13:22:26 -07:00
paszesoft 2a06e2b138 docs: Rename TodoListItem to UserProfile and fix usage of isValidUserId
(cherry picked from commit 6cc6d93e70)
2025-10-29 18:49:47 +01:00
paszesoft c9f8671960 Update button disabled property logic in template logical bug fix
isValidUserId = true is logically wrong to use to disable the Save button.
So is logically wrong to use isValidUserId = false to enable the Save button.
Also the default state of this button should be most likely disabled, if we are bothering to check, so the initial value of the signal should most likely be set to true.
To resolve these 2 issues, I propose to use:
- isInValidUserId instead of isValidUserId and:
- isInValidUserId = signal(true); // isValidUserId = signal(false);
After these 2 changes the snippet should make logical sense.

(cherry picked from commit b5dae85b27)
2025-10-29 18:49:47 +01:00
SkyZeroZx 207a26c125 docs(docs-infra): Prevent empty extends clause in interface documentation
Interfaces with no extends clause were incorrectly rendered with a trailing extends keyword followed by nothing, resulting in invalid TypeScript syntax

(cherry picked from commit f3d056a065)
2025-10-29 18:48:35 +01:00
Shuaib Hasan Akib ed500e42e6 fix(docs-infra): extract header attribute as title in multifile code snippets
The DocViewer component's getCodeSnippetsFromMultifileWrapper method was not
extracting the header attribute from nested <docs-code> elements, causing the
ExampleViewer to fall back to displaying file paths instead of custom headers
in tab labels.

This change adds title extraction from the header attribute when processing
multifile code snippets, ensuring that custom headers are properly displayed
in the code viewer tabs.

Fixes #64760

(cherry picked from commit 5d8b76b4fa)
2025-10-29 18:48:05 +01:00
Angular Robot 81fcfe5cbc docs: update Angular CLI help
Updated Angular CLI help contents.
2025-10-29 18:47:13 +01:00
Kristiyan Kostadinov 07b6fcac59 release: cut the v21.0.0-rc.0 release 2025-10-29 18:43:43 +01:00
Kristiyan Kostadinov db72aeff78 release: cut the v21.0.0-next.10 release 2025-10-29 18:40:08 +01:00
Lukas Matta 95344c19f3 fix(migrations): Do not remove a template if it is referenced even with a trailing semilocon
This commit fixes a behavior where under certain conditions, the migration script ignored
a template reference with a trailing semicolon and incorrectly removed the definition
of a referenced template.

Fixes #64741

(cherry picked from commit 64cb08529d)
2025-10-29 10:51:01 +01:00
Alan Agius feac577414 build: update typescript to 5.9.3
The beta version was unused in the pnpmfile.

(cherry picked from commit 13c386936b)
2025-10-29 10:46:50 +01:00
Angular Robot 209f0f964f build: update github/codeql-action action to v4.31.0
See associated pull request for more information.
2025-10-29 10:44:25 +01:00
Angular Robot ba5ca63330 build: update dependency node to v22.21.1
See associated pull request for more information.
2025-10-29 10:43:26 +01:00
Miles Malerba 9cecae81de docs(forms): make FIELD experimental
Adds `@experimental` tag to `FIELD`

(cherry picked from commit a7180b65db)
2025-10-29 10:40:53 +01:00
Miles Malerba e0a9cfc973 refactor(forms): rename the logic property on FieldPathNode
`logic` was a confusing name, as it is a logic builder instance, not a
logic instance.

(cherry picked from commit 3d70d68676)
2025-10-29 10:40:10 +01:00
Miles Malerba 60c8e2779c refactor(forms): preserve logic order when apply is used on root path
In some cases the logic order was not preserved properly when using `apply`. In particular this occurs when some logic is registered on a child of the root, followed by an apply to the root, followed by further logic registered on a child. In this case the final registered logic wound up running before the applied logic.

This happened because `FieldPathNode` for a child path was caching its `LogicNodeBuilder` at creation time. This meant that if the parent's `LogicNodeBuilder` changed (e.g., due to an `apply` call), the child would still be using the old one.

This commit fixes the issue by dynamically resolving the `LogicNodeBuilder` for a child path whenever it is accessed.

(cherry picked from commit fa13a167f1)
2025-10-29 10:40:09 +01:00
Alan Agius 6e004caa5b refactor(docs-infra): switch to unit test builder for unit tests
- Deletes the old Karma configuration and test entry point.
- Updates `angular.json` to use the `@angular/build` builders.
- Adjusts test files to align with the new setup.
2025-10-28 20:53:12 +01:00
Miles Malerba 07e56596a5 refactor(forms): track arrays in a parent array by index
This commit changes arrays in a parent array to be tracked the same way
as primitive values like strings and numbers. This is necessary because
the tracking key symbol used to maintain identity for objects in an
array does not survive the array spread operation:

```
return {...oldValue} // tracking symbol preserved ✅
return [...oldValue] // tracking symbol lost ❌
```

(cherry picked from commit f80b51a738)
2025-10-28 20:52:54 +01:00
Alan Agius ebdfd71f50 refactor(migrations): exclude all @angular/* packages from schematics bundle
This change updates the rollup configuration for the core schematics to exclude all `@angular/*` packages from the bundle. This is possible following https://github.com/angular/angular/pull/64703

This significantly reduces the size of the `@angular/core` schematics bundle, resulting in a size reduction to 5.8mb.

(cherry picked from commit b4e798ed87)
2025-10-28 20:51:53 +01:00
kirjs d74fb923cc refactor(forms): Allow returning plain values from validators
This makes the API nicer to use

(cherry picked from commit c57bbaa87d)
2025-10-28 20:50:48 +01:00
kirjs 07b9be1d2c refactor(forms): Allow returning plain values from validators
This makes the API nicer to use

(cherry picked from commit 8562e29be4)
2025-10-28 20:50:48 +01:00
kirjs 71a6266dd3 refactor(forms): Allow returning plain values from validators
This makes the API nicer to use

(cherry picked from commit 28847c9a19)
2025-10-28 20:50:48 +01:00
kirjs 2c2ea2c0da refactor(forms): Allow returning plain values from validators
This makes the API nicer to use

(cherry picked from commit b5c29d0d0a)
2025-10-28 20:50:48 +01:00
Angular Robot 098f6751ef build: update cross-repo angular dependencies
See associated pull request for more information.
2025-10-28 20:49:10 +01:00
Angular Robot b41a0704ec build: update cross-repo angular dependencies
See associated pull request for more information.
2025-10-28 10:26:32 -07:00
Matthieu Riegler d1d5c724e3 docs(docs-infra): allow cors for json files
fixes #64710

(cherry picked from commit f2de963bf3)
2025-10-28 16:55:57 +01:00
Matthieu Riegler 4f21ea72cb refactor(compiler-cli): Remove deep imports of compiler-cli in angular/core
migration schematics will pull from `compiler-cli/private/migrations`
core tests will pull from `compiler-cli/private/testing`

(cherry picked from commit 8e50cdb930)
2025-10-28 15:58:59 +01:00
Shuaib Hasan Akib c0a50bf18f fix(docs-infra): update guide navigation to remain active with query params
The navigation list component was using `routerLinkActive` with
`{ exact: true }`, which required an exact URL match including query
parameters. When visiting `/update-guide?v=19.0-20.0&l=1`, the link
`/update-guide` didn't match, so the active class wasn't applied.

Updated `routerLinkActiveOptions` to ignore query parameters while
maintaining exact path matching so the navigation item stays highlighted
when interacting with the update guide form.

(cherry picked from commit 33a872d90a)
2025-10-28 15:58:29 +01:00
Andrew Scott d303cde96d refactor(core): Remove zone toggles for test and standalone
The migration is complete internally. All that remains is bootstrapModule

(cherry picked from commit a253739ac8)
2025-10-28 15:58:02 +01:00
arielbackenroth 3fbaaa0176 refactor(http): add hooks for propagating traces across XHR callbacks.
Enables propagating a trace across XHR callbacks by providing a hook for
wrapping the callback with a function bound to the send trace context.

(cherry picked from commit 07b8e953f4)
2025-10-28 15:09:00 +01:00
tjshiu 3617167d3c docs: align adev best practices with llm-eval
(cherry picked from commit 763db3a70b)
2025-10-28 15:08:17 +01:00
Angular Robot 81b876582c build: lock file maintenance
See associated pull request for more information.
2025-10-28 10:27:50 +01:00
Shuaib Hasan Akib 845c1cd63e docs: remove shell language from terminal output block
Changed terminal output code block in installation.md from shell
language to plain text to prevent rendering of shell prompt ($).
The block displays read-only log output that users should not
execute as commands.

(cherry picked from commit e9b29c359d)
2025-10-28 10:26:53 +01:00
Angular Robot c87d1e0d84 docs: update Angular CLI help
Updated Angular CLI help contents.
2025-10-28 10:26:25 +01:00
Matthieu Riegler 7b77336603 docs: callout for provide function order
(cherry picked from commit be731deb7c)
2025-10-28 10:25:00 +01:00
Shuaib Hasan Akib ba719f4d15 refactor(router): remove redundant default value from routerOutletData input
Since `input()` defaults to `undefined`, the explicit initializer was unnecessary.
This improves clarity and reduces boilerplate.

(cherry picked from commit 8291760f9b)
2025-10-28 10:24:27 +01:00
Matt Lewis 54ad2304e3 fix(core): Clear lView from IcuIteratorState when stack is empty to prevent memory leak
If a component template contains an icu expression it is being retained until the next change detection cycle for that template. This results in a net retention of only ever a single copy of the given lView but that creates an opportunity for compounding leaks.

Change the icu i18n_icu_container_visitor to free the IcuIteratorState retained lView when the stack is empty so that garbage collection can occur when the view is discarded.

(cherry picked from commit 59e648913c)
2025-10-27 19:42:22 +01:00
SkyZeroZx 05bfda484e refactor(devtools): Improves clipboard error feedback with snackbar and logging
Enhances user experience by displaying a snackbar notification when clipboard copy fails, and logs detailed error information via the message bus

(cherry picked from commit bfcaf17005)
2025-10-27 19:41:57 +01:00
Matthieu Riegler ce5ca247e5 refactor(migrations): use the applicationProviders for the zoneless migration
PR #64354 introduced the `applicationProviders` for `bootstrapModule`, this allows a simpler migration output.

(cherry picked from commit eec6669733)
2025-10-27 19:41:32 +01:00
Angular Robot 8511759706 build: update rules_angular digest to 1f1aa3e
See associated pull request for more information.
2025-10-27 17:14:19 +01:00
Angular Robot 87eb11f961 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-10-27 17:14:00 +01:00
Alan Agius 843f30afc9 build: reduce package size of @angular/core
The schematics bundle size is reduced by externalizing @angular/compiler. This reduces the package size from 11mb to 9.1mb.

(cherry picked from commit 9d00c6892f)
2025-10-27 17:12:51 +01:00
csorrentino bd780366e8 refactor(forms): add onError callback to validateHttp for HTTP errors
Adds onError callback inside validateHttp validator in signal forms

PR-Close: #63949
(cherry picked from commit a5678f6f2b)
2025-10-27 17:12:28 +01:00
Matthew Beck 04dd75ba94 fix(compiler): support arbitrary nesting in :host-context()
Previously we supported one level of nested pseudo-element selectors
inside :host-context(), e.g. :host-context(:is(.foo, .bar)). This was
based on a regex-based approach. We could support deeper levels of
nesting by updating the regex, but using a regex approach prohibits us
from supporting arbitrary nesting.

Rather than just adding one more level to the existing expression, I've
added a new generator function which splits selectors on commas in a
parenthesis-aware way. This allows us to support arbitrary nesting.

It's likely we'll want to reuse this in other places where we're not as
careful today. We'll probably do this on a request-based basis, though.

Fixes #59176

(cherry picked from commit b478e91068)
2025-10-27 13:40:50 +01:00
Alan Agius fdedc24794 build: remove unused rollup-plugin-sourcemaps dependency
This dependency is not used as we use `rollup-plugin-sourcemaps2` instead.

(cherry picked from commit 7a187a3bfd)
2025-10-27 13:40:02 +01:00
Alan Agius 350a16a28f build: add @babel/core to list of rollup_runtime_deps
This will be needed following https://github.com/devversion/rules_angular/pull/72

(cherry picked from commit fffd34bb6e)
2025-10-27 13:39:36 +01:00
Alan Agius a1b4e381e6 build: refactor location of best-practices.md
This commit moves the best-practices.md file from adev/src/context to packages/core/resources. The BUILD.bazel files and other configuration files have been updated to reflect this change.

(cherry picked from commit 25e8bcbdf6)
2025-10-27 09:31:39 +01:00
Shuaib Hasan Akib e62da0d1c7 fix(docs-infra): preserve shell class for multifile code blocks
The ExampleViewer component was extracting only innerHTML from code
blocks in multifile examples, which lost the shell class applied by
the formatCode function. This caused the $ prompt to not appear for
shell commands in multifile blocks even when language="shell" was set.

Modified the Snippet interface to track shell language state and
updated getCodeSnippetsFromMultifileWrapper and getStandaloneCodeSnippet
methods to preserve the shell class. Updated example-viewer template
to conditionally apply the shell class to the code wrapper element.

Fixes inconsistency between standalone and multifile shell code blocks.

(cherry picked from commit 27e183330e)
2025-10-27 09:29:42 +01:00
idembele70 00a996dd12 docs: fix accessibility of @empty block message
(cherry picked from commit 202fceed73)
2025-10-27 09:29:15 +01:00
Angular Robot 38606bb99a build: update cross-repo angular dependencies
See associated pull request for more information.
2025-10-27 09:28:44 +01:00
Miles Malerba 22c012c985 refactor(forms): fix some typos
Fix some typos in signal forms code

(cherry picked from commit 01e1ad2b37)
2025-10-27 09:27:05 +01:00
Alan Agius 9b77b43241 refactor(docs-infra): streamline adev build configuration
This commit introduces a number of changes to streamline the build configuration for adev, the documentation application.

(cherry picked from commit 53287bce9b)
2025-10-27 09:26:25 +01:00
SkyZeroZx 3bc260c630 docs: Adds guide links to HTTP API docs for better discoverability
(cherry picked from commit c5e6b8bdc8)
2025-10-27 09:26:01 +01:00
aparziale 91eb1e1fe2 refactor: inject an instance of typescript-vfs.worker
Modified tsVfsWorker worker initialization logic

(cherry picked from commit e155a1e9d7)
2025-10-27 09:25:00 +01:00
AleksanderBodurri cbeedb03d4 refactor(devtools): use getRouterInstance to replace manual parsing logic
Previously we would look in the DI tree for a token named 'Router' and resolve its value.

Now we use the already existing getRouterInstance, which depends on ng global debug APIs to get the router instance of an application.

(cherry picked from commit c963569c0e)
2025-10-27 09:23:20 +01:00
Andrew Scott 7a2d029f51 refactor(router): Add provider for integrating with Navigation API and Location shim
This adds a (private) provider for integrating with the browser Navigation API.
This provider ensures that interactions with the `Location` service
use the underlying platform navigation rather than the history and
location APIs.

(cherry picked from commit dd09da8ba2)
2025-10-27 09:22:00 +01:00
Kristiyan Kostadinov 9e8b4eb686 fix(docs-infra): fix broken adev tests
Fixes some adev tests that are broken on main.

(cherry picked from commit b5f8d0b5b1)
2025-10-24 21:28:32 +02:00
Alan Agius e9f55a8817 Revert "build: refactor location of best-practices.md"
This reverts commit 07a51872d5.

(cherry picked from commit 620e2c4926)
2025-10-24 19:02:42 +02:00
Angular Robot 5099ed4f18 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-10-24 18:48:39 +02:00
Matthieu Riegler d8388b210a docs(docs-infra): Support linking to individual playground templates
(cherry picked from commit 6e7b3c2aa6)
2025-10-24 18:47:14 +02:00
SkyZeroZx 2abf2fb501 feat(common): Blocks IPv6 localhost from preconnect checks
Prevents unnecessary preconnect warnings by adding IPv6 loopback ('[::1]') to the blocklist.

(cherry picked from commit a3639e2258)
2025-10-24 18:46:48 +02:00
SkyZeroZx fd65ebca0f refactor(common): Add missing OnDestroy interface in PreconnectLinkChecker
The OnDestroy interface was implemented but not declared; this adds the missing interface declaration

(cherry picked from commit 207baad322)
2025-10-24 18:46:48 +02:00
Andrew Scott de5b0661e9 fix(zone.js): Support jasmine v6
This fixes the jasmine patch to ensure we are patching the private APIs
off of the right location, which changed in v6.

see https://github.com/jasmine/jasmine/commit/168ff0a751b6280b170ce097410d77a4c7c1f449

(cherry picked from commit 48abe007d9)
2025-10-24 18:46:09 +02:00
Alan Agius fb13537949 build: refactor location of best-practices.md
This commit moves the best-practices.md file from adev/src/context to packages/core/resources. The BUILD.bazel files and other configuration files have been updated to reflect this change.

(cherry picked from commit 07a51872d5)
2025-10-24 18:45:36 +02:00
Angular Robot d430d99965 docs: update Angular CLI help
Updated Angular CLI help contents.
2025-10-24 15:29:27 +02:00
Angular Robot a8f1784970 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-10-24 15:26:00 +02:00
jase88 4f5a4a4297 docs: update workspace configuration link in security documentation
(cherry picked from commit cdfd073448)
2025-10-24 15:25:15 +02:00
SkyZeroZx 17a71e9c59 docs: Fix syntax highlighting & formatting in HTTP guide
(cherry picked from commit b1a0bad342)
2025-10-24 15:24:02 +02:00
Matthieu Riegler c89062b130 docs(docs-infra): enable strict templates
(cherry picked from commit 57af0d7e1b)
2025-10-24 15:23:32 +02:00
Angular Robot c02aa80c5e docs: update Angular CDK apis (#64642)
Updated Angular CDK api files.

PR Close #64642
2025-10-24 09:38:54 +02:00
Angular Robot ebdef35a6b build: update cypress-io/github-action action to v6.10.3 (#64636)
See associated pull request for more information.

PR Close #64636
2025-10-24 09:36:34 +02:00
Angular Robot c590401e74 build: update cross-repo angular dependencies (#64630)
See associated pull request for more information.

PR Close #64630
2025-10-24 09:33:45 +02:00
Alan Agius 9c518fcfc5 build: enable auto merge strategy for pull requests (#64624)
This commit enables the 'auto' merge strategy for pull requests.
This strategy automatically determines the best merge method based on the
pull request's commits.

The auto merge strategy can:
- Delegate to the autosquash merge strategy if the PR has fixup/squash
  commits against multiple normal commits.
- Squash commits if the PR has only one normal commit and some
  fixup/squash commits.
- Rebase commits if the PR has no fixup/squash commits.

This improves the developer experience by automating the merge process. A
key benefit is that PRs that can be cleanly rebased will now appear as
'merged' in GitHub's UI, providing a clearer history than the previous
'unmerged' status that could occur with squashing.

Additionally, `dev-infra` and `bazel` are removed from the exempted scopes
for target labels as they are no longer necessary.

PR Close #64624
2025-10-24 09:32:13 +02:00
Matthieu Riegler a1ac9a6415 fix(forms): interop supports CVAs with signals (#64618)
The directive implemnetation might set CVA values during the template evaluation. Since the template is a reactive context we need to untrack when setting the CVA values to prevent writing to signals in a reactive context.

fixes #64614

PR Close #64618
2025-10-24 09:31:39 +02:00
Miles Malerba aa389a691b fix(core): ensure @for iteration over field is reactive (#64113)
When working with a proxy object such as signal forms' `Field`,
accessing the `lenght` or `Symbol.iterator` may trgger a reactive read.
This change ensures that `@for` properly captrues this before clearing
the active consumer.

PR Close #64113
2025-10-24 09:29:29 +02:00
Miles Malerba 0af83e6855 test(forms): test reactive iteration over array field (#64113)
Adds a test that verifies @for iteration over an array field is actually
reactive to new items being added to the array.

PR Close #64113
2025-10-24 09:29:29 +02:00
Angular Robot d7e85a4da5 docs: update Angular CLI help (#64620)
Updated Angular CLI help contents.

PR Close #64620
2025-10-23 18:24:28 +02:00
Angular Robot 4ce1ffc65c build: update cross-repo angular dependencies (#64623)
See associated pull request for more information.

PR Close #64623
2025-10-23 18:23:56 +02:00
Miles Malerba 02f7263133 refactor(forms): rename files related to metadata (#64603)
Renames some files to reflect the property => metadata name change

PR Close #64603
2025-10-23 18:13:16 +02:00
Miles Malerba a6a5fd7b7d refactor(forms): rename field state related to metdata (#64603)
Renames the field state related to metadata to reflect the new
"metadata" name. In particular:
- `property(...)` is renamed to `metadata(...)`
- `hasProperty(...)` is renamed to `hasMetadata(...)`

PR Close #64603
2025-10-23 18:13:16 +02:00
Miles Malerba f3c547b750 refactor(forms): rename logic functions related to metadata (#64603)
Renames logic functions related to metadata to align with the new
"metadata" name. Notably:
- `property(...)` => `metadata(...)`
- `aggregateProperty(...)` => `aggregateMetadata(...)`

PR Close #64603
2025-10-23 18:13:16 +02:00
Miles Malerba d963e7c035 refactor(forms): rename Property and AggregateProperty (#64603)
These have been renamed to `MetadataKey` and `AggregateMetadataKey`
respectively. The team consensus is that the term "property" is so
overloaded that it makes the topic difficult to explain & discuss, hence
the rename.

PR Close #64603
2025-10-23 18:13:16 +02:00
Angular Robot 0385c8163a build: update cross-repo angular dependencies (#64617)
See associated pull request for more information.

PR Close #64617
2025-10-23 16:00:22 +02:00
Angular Robot c443c07225 build: update cross-repo angular dependencies (#64610)
See associated pull request for more information.

PR Close #64610
2025-10-23 12:39:58 +02:00
Angular Robot b23c876d2a build: update pnpm to v10.19.0 (#64608)
See associated pull request for more information.

PR Close #64608
2025-10-23 12:38:35 +02:00
Angular Robot 29fd414a05 build: update dependency aspect_rules_js to v2.7.0 (#64607)
See associated pull request for more information.

PR Close #64607
2025-10-23 12:37:55 +02:00
SkyZeroZx 87afeb833b docs: Add router config options (#64529)
PR Close #64529
2025-10-23 12:34:58 +02:00
Andrew Scott b7cefeb864 fix(router): handle parenthesized outlets without a name in DefaultUrlSerializer (#64507)
Previously, the `DefaultUrlSerializer` would incorrectly parse URLs with a parenthesized outlet that did not have a name, such as `/(left)`. This would result in an `undefined` outlet name in the serialized URL.

This commit fixes the issue by ensuring that parenthesized outlets without a name are treated as primary outlets.

fixes #58516. Based on the description, either the URL was constructed
manually or by custom serializer.

PR Close #64507
2025-10-23 12:33:59 +02:00
Andrew Scott 292b9e3da5 refactor(zone.js): Improve missing proxy zone error for jest imported (#64497)
test functions

This improves the fakeAsync error message when importing it, describe,
etc from jest

We will not be further expanding the ZoneJS patches to support
additional use-cases.

fixes #47603

PR Close #64497
2025-10-22 23:26:25 +00:00
Angular Robot de2ee6ebd5 docs: update Angular CDK apis (#64599)
Updated Angular CDK api files.

PR Close #64599
2025-10-22 21:57:17 +00:00
Angular Robot d183153545 build: update cross-repo angular dependencies (#64602)
See associated pull request for more information.

PR Close #64602
2025-10-22 21:46:06 +00:00
Jessica Janiuk 2b51a838b2 release: cut the v21.0.0-next.9 release 2025-10-22 14:24:57 -07:00
Jessica Janiuk fcf7eeec45 docs: release notes for the v20.3.7 release 2025-10-22 14:07:48 -07:00
Angular Robot 893af8b64c build: update cross-repo angular dependencies (#64593)
See associated pull request for more information.

PR Close #64593
2025-10-22 20:24:15 +00:00
Jessica Janiuk 81bd671906 fix(core): prevent duplicate nodes from being retained with fast animate.leave` calls (#64592)
We were clearing duplicate nodes when `animate.enter` fired fast, but not when solely `animate.leave` is fired and rapid toggles occur. This ensures that the `cancelLeavingNodes` function is called in all cases instead of just enter animations.

fixes: #64581

PR Close #64592
2025-10-22 19:07:34 +00:00
kirjs a3e91b2e96 refactor(forms): Add a test better documenting behavior of the error function in built-in validators (#63993)
We will need to find a better way to name it.

PR Close #63993
2025-10-22 18:27:37 +00:00
Jessica Janiuk e039c6be02 refactor(compiler): Throw an error when old and new animations are used together (#64569)
This adds a new compilation error if someone attempts to put legacy animations and `animate.enter` or `animate.leave` in the same component.

PR Close #64569
2025-10-22 17:14:47 +00:00
Matthieu Riegler 1f389b8b97 fix(compiler-cli): missingStructuralDirective diagnostic produces false negatives (#64579)
Fixes a bug in the missingStructuralDirective diagnostic where structural directives with missing imports were not reported when the element using the structural directive contained other directives

Fixes #64467

co-authored-by: Matt Lewis <npm@mattlewis.me>

PR Close #64579
2025-10-22 16:41:27 +00:00
Kristiyan Kostadinov 9d48e534e2 Revert "feat(router): allow router outlet to be set on ng-container (#64562)" (#64584)
This reverts commit 2bd764a3c4.

PR Close #64584
2025-10-22 16:35:38 +00:00
Angular Robot 99271bbeed build: update cross-repo angular dependencies (#64587)
See associated pull request for more information.

PR Close #64587
2025-10-22 15:53:09 +00:00
Angular Robot 9fef846f99 build: update cross-repo angular dependencies (#64585)
See associated pull request for more information.

PR Close #64585
2025-10-22 15:25:37 +00:00
Angular Robot 5cca9e60b2 build: update cross-repo angular dependencies (#64582)
See associated pull request for more information.

Closes #64576 as a pr takeover

PR Close #64582
2025-10-22 14:50:04 +00:00
Matthieu Riegler 9126d0d616 docs(docs-infra): fix example viewer (#64580)
It was a regression introduced by #63915

PR Close #64580
2025-10-22 14:35:03 +00:00
SkyZeroZx 22270492f5 docs(docs-infra): Add OnPush change detection for components (#64570)
Improves Angular's OnPush change detection strategy for main and search history components

PR Close #64570
2025-10-22 14:34:26 +00:00
Jessica Janiuk 59a7163194 docs: update animation guide with compatibility details (#64567)
This adds a section about using legacy animations alongside animate.enter and leave.

PR Close #64567
2025-10-22 14:30:43 +00:00
Angular Robot 23498a3146 build: update dependency @types/node to v24.9.1 (#64571)
See associated pull request for more information.

PR Close #64571
2025-10-22 14:30:03 +00:00
Angular Robot 584dd4ac5b build: update dependency rules_nodejs to v6.6.0 (#64572)
See associated pull request for more information.

PR Close #64572
2025-10-22 14:22:48 +00:00
Joey Perrott a1868c9d13 feat(common): update to cldr 47 (#64032)
Update to CLDR version 47 for localization

PR Close #64032
2025-10-21 23:23:30 +00:00
Jessica Janiuk 70332b0453 fix(core): pass element removal property through in all locations (#64565)
The `requireSynchronousElementRemoval` property was not being passed in all the locations it was needed. This was preventing leave animation timing from behaving properly in some cases.

fixes: #64525

PR Close #64565
2025-10-21 18:08:34 +00:00
Leon Senft fd9af2afaf fix(forms): only propagate schema defined properties from field to control (#64446)
Prior to this change, `FieldState` defined a signal for each built-in
property. This unfortunately meant that the `Field` directive had no way
of knowing which property had actually been defined in the schema, and
would thus attempt to propagate them all to the bound form control. This
meant that the default values of these signals would override the
default or template defined values of these control properties.

Now these properties are `undefined` by default, and only initialized if
defined in the schema. Thus the `Field` directive will not attempt to
bind any properties that aren't explicitly managed by the schema.

PR Close #64446
2025-10-21 17:38:34 +00:00
Leon Senft 4261a8c583 refactor(forms): use FormValueControl instead of FormUiControl (#64446)
`FormUiControl` is the base type used for shared properties of
`FormValueControl` and `FormCheckboxControl`.

PR Close #64446
2025-10-21 17:38:34 +00:00
Leon Senft 6fca0e03ff test(forms): propagate pattern property to custom control input (#64446)
Note that unlike the other built-in properties, `pattern` is not
propagated to native controls so the lack of symmetry with other
property tests is intentional.

PR Close #64446
2025-10-21 17:38:34 +00:00
cexbrayat 9c5e969f51 fix(forms): bind invalid input in custom controls (#64526)
FormUiControl has an `invalid` input signal, but it was not bound by the control instructions.

PR Close #64526
2025-10-21 17:37:58 +00:00
JoostK 2b257b3659 fix(animations): account for Element.animate exceptions (#64506)
In certain scenarios `Element.animate` fails, manifesting in an exception (Firefox)
or a null return value (Chromium). The null value is not conform WebIDL but handled
gracefully in this commit regardless.

Closes #64486

PR Close #64506
2025-10-21 16:49:42 +00:00
Kristiyan Kostadinov 2bd764a3c4 feat(router): allow router outlet to be set on ng-container (#64562)
Updates the selector for `RouterOutlet` to allow for it to be set on an `ng-container`. This allows it to not render the host node which can affect the layout.

Fixes #64553.

PR Close #64562
2025-10-21 16:49:06 +00:00
Angular Robot 3d9837b4aa build: update dependency node to v22.21.0 (#64558)
See associated pull request for more information.

PR Close #64558
2025-10-21 16:46:35 +00:00
Angular Robot ba7ca96173 build: update dependency @types/node to v24.9.0 (#64557)
See associated pull request for more information.

PR Close #64557
2025-10-21 16:46:04 +00:00
Angular Robot da2603e699 build: update rules_browsers digest to 6a699bf (#64556)
See associated pull request for more information.

PR Close #64556
2025-10-21 16:44:08 +00:00
Angular Robot d9126eaed1 build: update cross-repo angular dependencies (#64563)
See associated pull request for more information.

PR Close #64563
2025-10-21 16:41:47 +00:00
Kristiyan Kostadinov 196fa500a3 fix(common): properly type ngComponentOutlet (#64561)
Resolves an older TODO about properly typing the `ngComponentOutlet` input.

PR Close #64561
2025-10-21 15:25:13 +00:00
SkyZeroZx 581a05a592 docs: Standardizes code example formatting in Angular Tools and fixed highlight (#64554)
PR Close #64554
2025-10-21 15:19:27 +00:00
Matthieu Riegler 50a55d6afb refactor(devtools): use preview value in property editor (#64552)
This way only the `preview` property handles the `Signal()` wrapper (and not individual components anymore)

PR Close #64552
2025-10-21 15:18:56 +00:00
Jessica Janiuk 44127bf53f refactor(core): clarify comments on enter animation queuing (#64550)
This just updates the comments and adds some tests to verify some of the queuing behavior for enter animations.

PR Close #64550
2025-10-21 15:17:13 +00:00
SkyZeroZx 1923e52b12 refactor(core): Removes unused trigger parameter from scheduleDelayedPrefetching (#64517)
Simplifies delayed prefetching calls by eliminating an unnecessary trigger argument

PR Close #64517
2025-10-21 15:16:39 +00:00
SkyZeroZx 5e55b87202 docs(docs-infra): Improves navigation list readability by balancing text wrapping (#64512)
Balances text wrapping for navigation items to enhance readability

PR Close #64512
2025-10-21 15:14:35 +00:00
SkyZeroZx a17ce50a21 docs: Add DestroyRef.destroyed and usage in lifecycle guide (#64422)
PR Close #64422
2025-10-21 15:12:49 +00:00
SkyZeroZx 8d1e9796d6 docs: add references to SSR guide for caching options (#64347)
PR Close #64347
2025-10-21 15:12:15 +00:00
cexbrayat bc9c814ca7 refactor(forms): remove Mutable from signal forms public API (#64436)
The `Mutable` type is only used internally in the `addDefaultField` function, so it can be avoided to be publicly exposed.

PR Close #64436
2025-10-20 21:20:11 +00:00
Andrew Scott 7afc193016 fix(router): Fix outlet serialization and parsing with no primary children (#64505)
this fixes tree creation, serialization, and parsing of trees created with
children outlets and no primary path

fixes #62384

PR Close #64505
2025-10-20 21:18:46 +00:00
Matthieu Riegler 54636eacca docs(docs-infra): Extract multiple extends statements for interfaces (#64539)
fixes #64528

PR Close #64539
2025-10-20 21:18:13 +00:00
Angular Robot dff4a27590 build: update cross-repo angular dependencies (#64547)
See associated pull request for more information.

PR Close #64547
2025-10-20 21:16:31 +00:00
hawkgs 9b7a79af3a refactor(devtools): update debug signal node type to match core type (#64127)
Use a union string type instead of a generic string.

PR Close #64127
2025-10-20 20:15:46 +00:00
hawkgs daaad1e6b0 refactor(core): narrow down ReactiveNode.kind type (#64127)
Use a string union type instead of a generic string.

PR Close #64127
2025-10-20 20:15:46 +00:00
Andrew Scott f6a73f1913 fix(router): Respect custom UrlSerializer handling of query parameters (#64449)
Previously, query parameters passed to `router.createUrlTree` were simply converted to strings. This meant that any custom serialization logic in a custom `UrlSerializer` was not applied. This could lead to inconsistencies between navigations triggered from the URL bar (which are parsed by the serializer) and navigations triggered programmatically.

This change ensures that query parameters are normalized using the provided `UrlSerializer`. The values are serialized and then parsed to ensure they are in the same format as if they had come from a URL. This allows custom serializers to handle complex objects in query parameters consistently.

Fixes https://github.com/angular/angular/issues/47307

PR Close #64449
2025-10-20 18:42:56 +00:00
Andrew Scott 7fb7511124 fix(router): Surface parse errors in Router.parseUrl (#64503)
logs error in addition to fallback parse

fixes #54937

PR Close #64503
2025-10-20 17:51:29 +00:00
Kristiyan Kostadinov c2d376b85a feat(core): make SimpleChanges generic (#64535)
Currently it's easy to make a mistake when accessing properties on `SimpleChanges`, because the keys aren't typed. These changes add an optional generic to the interface so that users can get a compilation error if they make a typo.

A few things to note:
1. The generic argument is optional and we revert to the old behavior if one isn't passed for backwards compatibility.
2. All of the keys are optional, because they aren't guaranteed to be present for any `ngOnChanges` invocation.
3. We unwrap the values of input signals to match the behavior at runtime.

Fixes #17560.

PR Close #64535
2025-10-20 17:49:39 +00:00
Kristiyan Kostadinov f1f24b9697 refactor(core): move interfaces around (#64535)
Moves the `SimpleChange` and lifecycle hook interfaces so that they can import other symbols from `core`.

PR Close #64535
2025-10-20 17:49:39 +00:00
Andrew Scott 80e00ff4e5 fix(language-service): prevent interpolation from superseding block braces (#64392)
This change omits the injection of the template syntaxes inside any
existing block scope. The injection is not needed because the template
and expression scopes are included explicitly as patterns where
appropriate under the template-blocks definitions.

This change prevents the interpolation curly braces from superseding the
match for the open curly of the block body. This issue also happens with
ICUs (#62697), but those do not have any named scopes to exclude as of
today.

fixes https://github.com/angular/vscode-ng-language-service/issues/1991

PR Close #64392
2025-10-20 17:49:04 +00:00
Andrew Scott 25d45ba32d refactor(router): Use promise array for loadComponent (#64450)
This further simplifies the `loadComponent` logic in the Router by using
the promise returned from the config loader directly instead of
converting it to an observable.

PR Close #64450
2025-10-20 17:11:23 +00:00
Angular Robot 657f310373 build: update cross-repo angular dependencies (#64544)
See associated pull request for more information.

PR Close #64544
2025-10-20 17:09:12 +00:00
Angular Robot fad6e1351e build: update all non-major dependencies (#64514)
See associated pull request for more information.

PR Close #64514
2025-10-20 16:13:17 +00:00
Angular Robot aca2f758d3 build: lock file maintenance (#64533)
See associated pull request for more information.

PR Close #64533
2025-10-20 16:03:34 +00:00
Jessica Janiuk e464aac177 build: bump leftover dependency of typescript (#64543)
This package json was missed when we recently bumped ts versions.

PR Close #64543
2025-10-20 15:37:18 +00:00
Leon Senft 505bde1fed fix(forms): mark field as dirty when value is changed by ControlValueAccessor (#64471)
This corresponds with fixes made for native and custom signal form
controls: https://github.com/angular/angular/pull/64483.

PR Close #64471
2025-10-20 15:35:42 +00:00
Leon Senft a0f3960270 refactor(forms): prefix framework-private methods on Field with ɵ (#64471)
These methods are only intended to be used internally within framework
instructions. Prefix them with `ɵ` to indicate that they are
framework-private and should not be called from user code.

PR Close #64471
2025-10-20 15:35:42 +00:00
Leon Senft 94b0afec00 fix(forms): implement interoperability between signal forms and reactive forms (#64471)
Add support for interoperability between signal forms and reactive forms that
commit effccffde0 had removed.

A signal forms field can once again be bound to any element or component with a
`ControlValueAccessor`.

PR Close #64471
2025-10-20 15:35:42 +00:00
AleksanderBodurri 9a1735aee8 fix(devtools): revert router tree dashed edges for lazy routes (#64532)
From my investigation what I know for sure:
- when the graph pans or zooms it updates the transform property on the g element, which in turn causes the browser to repaint the visible space in the g element
- stroke-dasharray is the cause of major performance issues in large graphs.

What I suspect:
- When the g element repaints, it also has to repaint all of the child svg elements. When the dashed line path svgs repaint, the stroke-dasharray calculation is not GPU accelerated, but instead occurs on the CPU, causing extreme lag whenever the svg graph is panned or zoomed.

Temporary solution: remove this dashed edge functionality. We can investigate alternatives for communicated that a path is lazy loaded.

Future long term solution: migrate to canvas based graph renderer for router tree and injector graph.

PR Close #64532
2025-10-20 15:32:49 +00:00
Angular Robot 9c7029c57a build: update dependency @types/firefox-webext-browser to v143 (#64518)
See associated pull request for more information.

PR Close #64518
2025-10-20 14:51:17 +00:00
Angular Robot 8a946ac8df build: update rules_browsers digest to 0e0949d (#64536)
See associated pull request for more information.

PR Close #64536
2025-10-20 14:49:03 +00:00
Alan Agius 373580c706 docs: add browser support for v21 (#64540)
Adds the browser support information for Angular v21, setting the baseline date to 2025-10-20.

PR Close #64540
2025-10-20 14:46:14 +00:00
Matthieu Riegler 69749800c9 docs: add more details on critical inlining. (#64292)
fixes #42682

PR Close #64292
2025-10-20 14:45:37 +00:00
Angular Robot 810505fa2e build: update github/codeql-action action to v4.30.9 (#64520)
See associated pull request for more information.

PR Close #64520
2025-10-20 14:41:03 +00:00
Jessica Janiuk 75c1849fb3 Revert "fix(compiler-cli): missingStructuralDirective diagnostic produces false negatives (#64470)" (#64541)
This reverts commit c1d870bd38.

PR Close #64541
2025-10-20 14:39:18 +00:00
Jessica Janiuk c60ab336c9 Revert "fix(router): Respect custom UrlSerializer handling of query parameters (#64449)" (#64511)
This reverts commit 46ae034c70.

PR Close #64511
2025-10-18 00:19:40 +00:00
Jessica Janiuk e7bdf87ebc Revert "refactor(router): Use promise array for loadComponent (#64450)" (#64510)
This reverts commit cc5d698e0a.

PR Close #64510
2025-10-18 00:19:07 +00:00
Matt Lewis c1d870bd38 fix(compiler-cli): missingStructuralDirective diagnostic produces false negatives (#64470)
Fixes a bug in the missingStructuralDirective diagnostic where structural directives with missing imports were not reported when the element using the structural directive contained other directives

Fixes #64467

PR Close #64470
2025-10-17 19:57:59 +00:00
SkyZeroZx 9a7529dd66 fix(compiler): correctly compile long numeric HTML entities (#64297)
Fixes an issue where long numeric HTML entities (e.g. &#x1F6C8;) were incorrectly compiled due to the use of 4-digit

PR Close #64297
2025-10-17 18:23:44 +00:00
Alan Agius 062a696673 refactor(platform-server): use URL constructor for robust parsing (#64494)
The existing implementation of `PlatformLocation` uses a custom URL parsing mechanism that can be brittle and doesn't properly update the `href` property. This change refactors the URL parsing to use the native `URL` constructor, providing more robust and accurate parsing of URLs, which also correctly updates the `href` property.

The tests for `PlatformLocation` have also been moved to a dedicated file to improve organization and clarity.

PR Close #64494
2025-10-17 18:17:15 +00:00
Andrew Scott cc5d698e0a refactor(router): Use promise array for loadComponent (#64450)
This further simplifies the `loadComponent` logic in the Router by using
the promise returned from the config loader directly instead of
converting it to an observable.

PR Close #64450
2025-10-17 17:41:30 +00:00
SkyZeroZx 44554d2d09 docs: Update FormArray.push usage (#64499)
PR Close #64499
2025-10-17 17:40:51 +00:00
Andrew Scott 46ae034c70 fix(router): Respect custom UrlSerializer handling of query parameters (#64449)
Previously, query parameters passed to `router.createUrlTree` were simply converted to strings. This meant that any custom serialization logic in a custom `UrlSerializer` was not applied. This could lead to inconsistencies between navigations triggered from the URL bar (which are parsed by the serializer) and navigations triggered programmatically.

This change ensures that query parameters are normalized using the provided `UrlSerializer`. The values are serialized and then parsed to ensure they are in the same format as if they had come from a URL. This allows custom serializers to handle complex objects in query parameters consistently.

Fixes https://github.com/angular/angular/issues/47307

PR Close #64449
2025-10-17 17:30:46 +00:00
Angular Robot 1d40465d5f build: update cross-repo angular dependencies (#64495)
See associated pull request for more information.

PR Close #64495
2025-10-17 16:05:29 +00:00
Leon Senft 3529877772 fix(forms): mark field as dirty when value is changed by a bound control (#64483)
Fix https://github.com/angular/angular/issues/64465.
Fix https://github.com/angular/angular/issues/63623.

PR Close #64483
2025-10-17 16:02:16 +00:00
Leon Senft 348a8f3195 test(forms): remove redundant test cases (#64483)
These were made redundant by https://github.com/angular/angular/pull/63884.

PR Close #64483
2025-10-17 16:02:16 +00:00
Leon Senft e9740662c3 test(forms): field directive marks field as touched on 'blur' events (#64485)
This was implemented but missing a test case.

PR Close #64485
2025-10-17 14:53:02 +00:00
SkyZeroZx ecb2507c8b docs(docs-infra): Corrects repo name typo in entry parsing logic (#64487)
Ensures the repository reference uses the correct name to prevent confusion and maintain consistency across generated documentation entries.

PR Close #64487
2025-10-17 14:52:24 +00:00
SkyZeroZx 7d7b4be762 docs: add matrix parameters docs and examples (#64459)
PR Close #64459
2025-10-17 14:45:55 +00:00
Angular Robot 10aa4f9cf3 build: update all non-major dependencies (#64488)
See associated pull request for more information.

PR Close #64488
2025-10-17 14:37:21 +00:00
Alan Agius 3cfa6e872d build: remove unused commit message scopes (#64492)
Removes a number of commit message scopes that are no longer in use.

- `bazel`: Now part of `dev-infra`
- `changelog`: The changelog is autogenerated and doesn't have dedicated commits.
- `packaging`: Is handled by `dev-infra` as well.

PR Close #64492
2025-10-17 14:31:36 +00:00
SkyZeroZx 60c62bd771 docs: Documents sourcesContent option for source maps (#64482)
PR Close #64482
2025-10-17 14:29:51 +00:00
Uaena_Alex_John 2761d9e518 docs: Change import statement to use 'inject' function (#64491)
PR Close #64491
2025-10-17 14:29:12 +00:00
Jessica Janiuk c241038111 fix(core): update symbols (#64481)
the DeferComponent symbols got added twice.

PR Close #64481
2025-10-16 21:31:53 +00:00
Jessica Janiuk f7776faa72 docs: release notes for the v20.3.6 release 2025-10-16 13:29:57 -07:00
Matthieu Riegler 95e1632650 refactor(platform-browser): remove unecessary export. (#64469)
The usage has been removed from g3.

PR Close #64469
2025-10-16 18:52:54 +00:00
Matthieu Riegler b7c47d8fad refactor(devtools): Create a separate type of signals for after effect phases. (#64315)
With this change, we ensure afterRenderEffect phases nodes appear more like "effects" than regular signal node.

PR Close #64315
2025-10-16 18:47:13 +00:00
Angular Robot 4833fa75eb build: update cross-repo angular dependencies (#64474)
See associated pull request for more information.

PR Close #64474
2025-10-16 18:22:00 +00:00
Jessica Janiuk aab73671e4 fix(core): update animation scheduling (#64441)
In some rare cases, it seems the animation queue disappears despite being afterEveryRender. This updates the animation scheduler to be afterNextRender instead and only schedules it when we need to.

fixes: #64423

PR Close #64441
2025-10-16 17:35:49 +00:00
SkyZeroZx 9e4ba3ea71 docs: Fixes DI guide reference missing ')' in see tag (#64457)
PR Close #64457
2025-10-16 17:34:17 +00:00
Jessica Janiuk dfdcbf7f91 refactor(compiler): add ts-ignore for typescript upgrade (#64468)
This is a quick ts-ignore add to suppress something for later.

PR Close #64468
2025-10-16 17:32:19 +00:00
Angular Robot ffeb342148 build: update cross-repo angular dependencies (#64472)
See associated pull request for more information.

PR Close #64472
2025-10-16 17:30:07 +00:00
Matthieu Riegler 2e4659648a refactor(zone.js): remove legacy browser support (#63511)
This commit removes the support for legacy browsers.

BREAKING CHANGE: IE/Non-Chromium Edge are not supported anymore.

PR Close #63511
2025-10-16 14:58:45 +00:00
SkyZeroZx df780fae18 docs: Add docs for EVENT_MANAGER_PLUGINS (#64453)
PR Close #64453
2025-10-16 14:54:47 +00:00
SkyZeroZx 6af231e2d6 refactor(devtools): Replace console warnings with snackbar notifications (#64458)
Improves user experience by displaying UI notifications when attempting to view source for unsupported routes, replacing developer-only console warnings with visible snackbars

PR Close #64458
2025-10-16 14:41:34 +00:00
Matthieu Riegler 1ea5a993f2 docs(docs-infra): use separate index for next.angular.dev (#64318)
With this commit we start using a separate index for the next doc site.

PR Close #64318
2025-10-16 14:39:22 +00:00
SkyZeroZx 574f74da55 docs: Add dataurl and base64 in atrribute loader (#64419)
PR Close #64419
2025-10-16 14:38:50 +00:00
hawkgs 134ff540b5 fix(devtools): directive-forest minor UI fixes (#64426)
- Fix the hydration icons when the text from the nodes exceeds the component width
- Align and slightly enlarge the arrow icons

PR Close #64426
2025-10-16 14:37:12 +00:00
Andrew Scott 570ea346e3 docs: update release notes for vscode extension (#64454)
updates release notes for the 20.3.0 release

PR Close #64454
2025-10-16 14:35:25 +00:00
Angular Robot e77d3fb064 build: update all non-major dependencies (#64460)
See associated pull request for more information.

PR Close #64460
2025-10-16 14:34:51 +00:00
Angular Robot a7ba2f5e65 build: update cross-repo angular dependencies (#64452)
See associated pull request for more information.

PR Close #64452
2025-10-15 22:42:54 +00:00
Matthieu Riegler 29c397f883 fix(platform-browser): DomEventsPlugin should always be the last plugin to be called for supports(). (#50394)
This fixes the issues when `BrowserModule` is not the first module imported.

Fixes #37149 #37850

PR Close #50394
2025-10-15 21:12:46 +00:00
SkyZeroZx 32cb1cc23d docs: Adds documentation for accessing parent resolver data (#64398)
PR Close #64398
2025-10-15 21:10:06 +00:00
Angular Robot 9b9ae42841 docs: update Angular CLI help (#64433)
Updated Angular CLI help contents.

PR Close #64433
2025-10-15 11:47:13 -07:00
Angular Robot 3e8e48c918 build: update cross-repo angular dependencies (#64438)
See associated pull request for more information.

PR Close #64438
2025-10-15 10:49:59 -07:00
Danny Koppenhagen 4c35682ee5 docs: fix closing tag for whitespace examples (#64425)
PR Close #64425
2025-10-15 10:48:44 -07:00
SkyZeroZx e63ea3f102 docs: update service worker documentation with additional references (#64353)
PR Close #64353
2025-10-15 10:47:48 -07:00
Angular Robot 7572a272a8 build: update pnpm to v10.18.3 (#64431)
See associated pull request for more information.

PR Close #64431
2025-10-15 10:44:22 -07:00
SkyZeroZx 13b0706cc5 docs: Add injection context for lazy route loading (#64412)
PR Close #64412
2025-10-15 10:41:53 -07:00
Matthieu Riegler ae4880f5fd docs(docs-infra): fix mobile banner layout (#64408)
PR Close #64408
2025-10-15 10:41:04 -07:00
Matthieu Riegler 17528628fa refactor(devtools): Router viz is only from 20.3.5 onward (#64415)
This is following some updated in #64411

PR Close #64415
2025-10-15 10:39:32 -07:00
aparziale 338ac3b2ef refactor(migrations): unit test signal migration adjustment (#64393)
Move unit test from spec file to golden test

PR Close #64393
2025-10-15 10:38:57 -07:00
Matthieu Riegler 2f8066adbe refactor(devtools): remove "changes" entry. (#64338)
This is just the same value as total time spent. Also it is confusing to some users.

fixes #51206

PR Close #64338
2025-10-15 10:38:20 -07:00
SkyZeroZx 75fc16b261 feat(migrations): Adds support for CommonModule to standalone migration (#64138)
Introduces a migration that replaces CommonModule usage with individual imports from @angular/common, aligning with Angular's standalone component approach and improving module import clarity

PR Close #64138
2025-10-15 10:37:37 -07:00
Joey Perrott 13e18cafff build: migrate vscode extension into repo (#63924) (#64049)
Migrate the vscode extension for angular into this repository.

PR Close #63924

PR Close #64049
2025-10-15 10:37:02 -07:00
Jan Martin 23c62832e5 release: bump Angular DevTools version to 1.4.1 (#64445)
PR Close #64445
2025-10-15 10:35:24 -07:00
Andrew Kushnir 013effddef release: cut the v21.0.0-next.8 release 2025-10-15 10:16:13 -07:00
Andrew Kushnir e3fa24d6ce docs: release notes for the v20.3.5 release 2025-10-15 10:09:12 -07:00
Angular Robot 3d1777bf93 build: update cross-repo angular dependencies (#64414)
See associated pull request for more information.

PR Close #64414
2025-10-14 15:41:49 -07:00
Andrew Kushnir fc65107506 Revert "refactor(core): add debug name to resource (#64172)" (#64418)
This reverts commit 63180067aa.

PR Close #64418
2025-10-14 14:28:16 -07:00
Andrew Kushnir a2d8adb395 Revert "refactor(compiler-cli): add a resource debugName transform (#64172)" (#64418)
This reverts commit e941e6b80f.

PR Close #64418
2025-10-14 14:28:16 -07:00
JoostK 49377d274a perf(compiler-cli): fix performance of "interpolated signal not invoked" check (#64410)
This fixes a performance regression from #63754, which is almost a revert of the
prior performance fix in #57291; the latter was provided as quick fix to address
the severe performance overhead this extended diagnostic used to have, with #57337
as follow-up change to address the false negatives that were introduced in #57291.
That follow-up never landed, though, so this commit is re-applying the changes
from #57337 to fix the performance regression.

Fixes #64403

PR Close #64410
2025-10-14 13:47:20 -07:00
Jessica Janiuk 0ed6c93960 fix(core): fixes regression in animate.leave function bindings (#64413)
When adding and removing items in a `@for` loop, the `animate.leave` event binding instruction was not updated to use the same logic as the class function when the animation queue was added. We were not returning the correct signature for the `animate.leave` function, which caused the animation to not trigger correctly. This updates the event binding instruction to use the same logic as the class function when adding the animation to the queue.

fixes: #64336

PR Close #64413
2025-10-14 13:46:38 -07:00
Angular Robot 4d1d962492 build: lock file maintenance (#64376)
See associated pull request for more information.

PR Close #64376
2025-10-14 12:21:32 -07:00
Matthieu Riegler d03970f9d1 refactor(compiler-cli): remove canVisitStructuralAttributes from TemplateCheckWithVisitor (#63809)
This enables checking of expressions of structural directives in template diagnostics.

PR Close #63809
2025-10-14 11:56:14 -07:00
Matthieu Riegler dd2f53b9cd refactor(core): warning when hydration trigger is used without hydration being enabled (#64185)
This replaces the error we were throwing before the change. This allows component with defer triggerrs to be used on both SSR'd and CSR.

fixes #64184

PR Close #64185
2025-10-14 11:55:21 -07:00
hawkgs e941e6b80f refactor(compiler-cli): add a resource debugName transform (#64172)
Add a TS transform for `resource` (and `httpResource`) `debugName`. Test the transformations.

PR Close #64172
2025-10-14 09:31:41 -07:00
hawkgs 63180067aa refactor(core): add debug name to resource (#64172)
Decorate `resource` (and `httpResource`) with `debugName`, along with all of its internal signals.

PR Close #64172
2025-10-14 09:31:41 -07:00
Jessica Janiuk e228102378 fix(core): Prevents early style pruning with leave animations (#64335)
In some cases, the leave animation stylesheets were getting pruned too early due to the renderer removal happening before the animation function was run. This ensures that while queuing a leave animation, we guarantee the lView is referenced in the leaving animations set. This guarantees the style sheet pruning knows about the animations existing and skips the prune step.

fixes: #64326

PR Close #64335
2025-10-14 09:30:32 -07:00
Kristiyan Kostadinov ab415f3d7f fix(core): control not recognized when input has directive injecting ViewContainerRef (#64368)
When a directive injects a `ViewContainerRef`, the runtime inserts a container that was throwing off the logic that recognizes native controls.

These changes switch to check if the node is a native control through the `TNode`. This also makes it a bit less prone to breaking during SSR.

Fixes #64362.

PR Close #64368
2025-10-14 09:29:58 -07:00
hawkgs 356dc4c952 refactor(devtools): add clear button to the directive explorer filter (#64407)
Add a standard clear button after the matches nav buttons.

PR Close #64407
2025-10-14 09:28:39 -07:00
Angular Robot 12d179329a build: update cross-repo angular dependencies (#64405)
See associated pull request for more information.

PR Close #64405
2025-10-14 09:27:31 -07:00
hawkgs dffb16afdf refactor(devtools): use lighter property-tab bg only when there are directives (#64404)
Use the contrasting background color only when there are directives to inspect; Drop obsolete CDK drag

PR Close #64404
2025-10-14 09:26:56 -07:00
Alan Agius 569388ecf1 build: remove ANGULAR_PACKAGE file from snapshot builds (#64402)
This was needed for NGCC which has been removed a long time ago.

PR Close #64402
2025-10-14 09:26:19 -07:00
Angular Robot 002481b27b build: update all non-major dependencies (#64399)
See associated pull request for more information.

PR Close #64399
2025-10-14 09:25:42 -07:00
Matthieu Riegler f232fa5d71 docs: Add mentions of the autoCsp option (#64290)
And also in the incompatibility of `CSP_NONCE` with `inlineCritical`.

fixes #61037

PR Close #64290
2025-10-14 09:23:20 -07:00
SkyZeroZx c0510cd94c docs: Removes standalone flag from drag-drop examples (#64395)
PR Close #64395
2025-10-13 15:58:32 -07:00
Andrew Scott 2a7a5de53f feat(core): Allow passing application providers in bootstrapModule options (#64354)
This commit adds `applicationProviders` to the `bootstrapModule` options
object. This allows specifying additional providers at the location of
bootstrap, which makes default providers much easier to accomplish.

Using this, we can refine the approach taken for downgrade_module to use
this more direct API rather than the additional provider variable dance.

PR Close #64354
2025-10-13 15:10:10 -07:00
Andrew Scott 693b81fa3d refactor(core): fix ZoneJS-by-default providers for async downgradeModule (#64354)
This fixes the code to retain ZoneJS by default in the providers for
downgradeModule when the `bootstrapModule` is used. Prior to this
change, the async `bootstrapModule`/`compileNgModuleFactory` could be
called multiple times through `downgradeModule` before
`bootstrapModuleFactory` got called and used the zone providers.

Note: marked refactor since this only applies to the -next release and
we shouldn't have this change in the changelog as a fix.

PR Close #64354
2025-10-13 15:10:10 -07:00
Leon Senft 32f86d35f7 perf(forms): optimize [field] binding instructions (#64351)
Caches information about the kind of form control that a `TNode`
represents in `TNodeFlags`. This avoids redundant computations on
subsequent template create and update passes.

Renames the `INVALID_CONTROL_HOST` error code to
`INVALID_FIELD_DIRECTIVE_HOST` for clarity and adds a test for it.

PR Close #64351
2025-10-13 13:02:17 -07:00
Angular Robot 6a96844667 build: update cross-repo angular dependencies (#64390)
See associated pull request for more information.

PR Close #64390
2025-10-13 11:29:47 -07:00
Angular Robot edcf65842a docs: update Angular CDK apis (#64386)
Updated Angular CDK api files.

PR Close #64386
2025-10-13 11:29:13 -07:00
Joey Perrott eb80c3075f build: update symbol extractor tests to stabalize the order of the symbols listed (#64389)
Update to ensure that the symbols in the list of extracted symbols is consistent even when multiple bundle files are extracted from.

PR Close #64389
2025-10-13 11:12:54 -07:00
SkyZeroZx 861cee34e0 feat(migrations): Adds migration for deprecated router testing module (#64217)
Introduces a schematic to replace deprecated router testing imports

PR Close #64217
2025-10-13 11:09:29 -07:00
SkyZeroZx 1ffcfb625a feat(migrations): Adds migration for deprecated router testing module (#64217)
Introduces a schematic to replace deprecated router testing imports

PR Close #64217
2025-10-13 11:09:29 -07:00
SkyZeroZx 563dbd998c feat(compiler-cli): Adds diagnostic for misconfigured @defer triggers (#64069)
Warns when @defer blocks define unreachable or redundant triggers, such as multiple main triggers, ineffective prefetches, or timer delays not scheduled before rendering.

PR Close #64069
2025-10-13 11:06:01 -07:00
Oliver Lang eee8eab4b6 docs: improve clarity of self-closing tag migration example (#64388)
Replaces inline comments with structured Before and After sections
to enhance readability and consistency. This helps developers better
understand the transformation from non-self-closing to self-closing
tags during migration.

PR Close #64388
2025-10-13 10:01:02 -07:00
SkyZeroZx 2739b7975b feat(http): add referrerPolicy option to HttpResource (#64283)
Adds support for the `referrerPolicy` option in `HttpResource`, allowing developers to control how much referrer information is sent with each HTTP request.

PR Close #64283
2025-10-13 10:00:27 -07:00
Andrew Scott 2c85d2802f refactor(router): update route config loading to use async/await (#64322)
This simplifies code by using async/await instead of rxjs in the config
loading internals. While loadChildren/loadComponent could _technically_
return a synchronous value, the expectation is that this would be used
for dynamic imports, which are necessarily async.

PR Close #64322
2025-10-13 09:58:10 -07:00
Alan Agius 09a927a1d4 ci: remove cache-node-modules from checkout-and-setup-node (#64387)
This option no longer exists and the new default is to cache the PNPM store.

PR Close #64387
2025-10-13 09:29:07 -07:00
Matthieu Riegler 62cda789a8 refactor(compiler): Improve pipe in track expression error (#64321)
Throw a parse error for a better context awareness.

fixes #64316

PR Close #64321
2025-10-13 08:59:56 -07:00
Miles Malerba 2fdd4da2a8 refactor(forms): rename the control directive to the field directive (#64300)
Renames the control directive and the input that users set to bind a
field to a UI control.

Previously users would do:

```
<input [control]="someField">
```

Now users will do:

```
<input [filed]="someField">
```

PR Close #64300
2025-10-13 08:59:13 -07:00
Miles Malerba 0acc91ef51 refactor(forms): move files in preparation for rename (#64300)
Renames several files related to the "control" directive to reflect its
new name, the "field" directive

PR Close #64300
2025-10-13 08:59:13 -07:00
Angular Robot 84f6e36e19 build: update pnpm to v10.18.2 (#64358)
See associated pull request for more information.

PR Close #64358
2025-10-13 08:42:16 -07:00
Angular Robot 53f1dcbbcc build: update github/codeql-action action to v4.30.8 (#64370)
See associated pull request for more information.

PR Close #64370
2025-10-13 08:39:51 -07:00
aparziale e99bbd3d2a fix(migrations): migrating input with more than 1 usage in a method (#64367)
When the migration command was run for inputs, if the input had more than one reference in a method the migration would generate incorrect code

Fixes #63018

PR Close #64367
2025-10-13 08:37:10 -07:00
SkyZeroZx 4b965f5b77 refactor(docs-infra): remove unused error reporting handler and related tests (#64385)
The error reporting handler was no longer referenced in the application.

PR Close #64385
2025-10-13 08:36:08 -07:00
Jens Kuehlers c8869248b9 docs: add TS+Node version requirements for v21 (#64384)
PR Close #64384
2025-10-13 08:35:24 -07:00
Shuaib Hasan Akib 945cde8700 docs: update MDN reference links to main documentation pages (#64383)
Replaces old deep-linked MDN tutorial URLs with top-level documentation
links for JavaScript, HTML, and CSS to provide more general and reliable references.

PR Close #64383
2025-10-13 08:34:52 -07:00
Matthieu Riegler 0feba1c70e docs(docs-infra): Add user to the open files (#64380)
fixes #64345

PR Close #64380
2025-10-13 08:33:57 -07:00
SkyZeroZx 4054c975ed docs: update router behavior to correct syntax highlighting (#64375)
PR Close #64375
2025-10-13 08:33:17 -07:00
SkyZeroZx 479ffc1d4e docs: Documents utility functions for narrowing form control types (#64373)
PR Close #64373
2025-10-13 08:32:29 -07:00
aparziale 98189d47a6 docs: fix typo in route-guards guide (#64366)
Fix typo in route-guards guide: “useres” → “users”

Fixes #64363

PR Close #64366
2025-10-13 08:31:48 -07:00
Oswin Sutton de0d46a34b docs: add missing code formatting around @defer in templates/defer guide (#64357)
PR Close #64357
2025-10-13 08:31:13 -07:00
SkyZeroZx 58e51bfcbc docs: Add example Unhandled errors in Angular documentation (#64356)
PR Close #64356
2025-10-13 08:30:25 -07:00
Shuaib Hasan Akib 450a38b072 refactor(common): sync examples with Angular style guide (#64167)
Updated examples to align with the latest Angular style:
- Removed `standalone: false` since it is unnecessary.
- Dropped module-based implementation in favor of standalone.

PR Close #64167
2025-10-13 08:29:44 -07:00
Alan Agius a6268d45e0 build: align git tags with package.json version for snapshot builds (#64350)
This commit updates the scripts to use the version from `package.json` for snapshot builds, ensuring that the git tags are aligned with the package version. This change simplifies referencing snapshot builds in the  `package.json` file.

PR Close #64350
2025-10-13 08:28:53 -07:00
SkyZeroZx 5fd686f063 docs: refactor popup example to use inject function (#64349)
PR Close #64349
2025-10-13 08:27:50 -07:00
Alan Agius 36c7d5196e build: remove workspace overrides from pnpm config (#64348)
This removes the 'overrides' section from the pnpm-workspace.yaml file as these are now redundant.

PR Close #64348
2025-10-13 08:27:07 -07:00
hawkgs 0b204a8321 fix(devtools): property-view-tree layout (#64343)
Fix various issues related to `property-view-tree` layout.

PR Close #64343
2025-10-13 08:26:29 -07:00
Matthieu Riegler 3e3b6e8134 docs(docs-infra): Fix animation bug on iPhones (#64342)
PR Close #64342
2025-10-13 08:25:47 -07:00
Angular Robot 863ff3919d build: update all non-major dependencies (#64329)
See associated pull request for more information.

PR Close #64329
2025-10-13 08:25:13 -07:00
Alan Agius e34776a102 build: correctly use snapshot build repo (#64341)
This package depends on `@angulad/language-service` and not `@angular/language-server`.
PR Close #64341
2025-10-10 08:43:11 -07:00
Matthieu Riegler 2ecbc4e643 docs: add a callout that adding/removing to formArray doesn't not mark dirty (#64337)
fixes #36788

PR Close #64337
2025-10-10 08:13:55 -07:00
Angular Robot dc37100538 build: update bazel dependencies (#64330)
See associated pull request for more information.

PR Close #64330
2025-10-10 08:12:19 -07:00
SkyZeroZx 249fbb3981 docs: add example for assertInInjectionContext (#64325)
PR Close #64325
2025-10-10 06:51:44 -07:00
Alan Agius 8693959fc7 build: use snapshot builds for dependencies in @angular/language-server (#64334)
This commit introduces a mechanism to use snapshot builds for @angular/language-service dependencies when building the VSCode extension.

A new --//:enable_snapshot_repo_deps flag allows swapping the stable versioned dependency with a snapshot build from the angular/language-server-builds GitHub repository. This enables testing and development against the latest unreleased version of the language service.

PR Close #64334
2025-10-10 06:48:51 -07:00
Angular Robot 94067fb0e4 build: update dependency bazel to v7.6.2 (#64328)
See associated pull request for more information.

PR Close #64328
2025-10-10 06:46:26 -07:00
Shuaib Hasan Akib d7f2ac3342 docs: fix rxResource example to return object from params function (#64327)
Previously, the example returned a plain value instead of an object,
causing destructuring in the `stream` function to fail. Updated to
`params: () => ({ userId: this.userId() })` for correctness.

fixes: #64313

Update adev/src/content/ecosystem/rxjs-interop/signals-interop.md

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

PR Close #64327
2025-10-10 06:45:18 -07:00
Matthieu Riegler 59c152833e docs: add check for non-existing anchor (#64309)
This is only for the anchors on the same document for now.
Commit also includes some reformating.

fixes #64303

PR Close #64309
2025-10-10 06:43:51 -07:00
SkyZeroZx a397ca35fa docs: Add unified control state change events (#64279)
PR Close #64279
2025-10-10 06:42:34 -07:00
SkyZeroZx 3013226acf docs: Adds documentation for image decoding attribute (#64261)
Expands the image optimization guide to explain browser image decoding strategies

PR Close #64261
2025-10-10 06:41:32 -07:00
Matthieu Riegler 7ad02b9805 refactor(devtools): fix parameter matching. (#64260)
Adding some typing to infer the expected types and drop the usages of `arguments` which isn't really typesafe.

The argument mis-match didn't result in an issue because they didn't end up being used futher down the line.

fix 63973

PR Close #64260
2025-10-10 06:40:43 -07:00
SkyZeroZx 88a15be06a docs: Add programmatic component input/output/directive binding (#64240)
Expands the guide to explain how inputs, outputs, and directives can be provided when creating components programmatically

PR Close #64240
2025-10-10 06:39:56 -07:00
Kristiyan Kostadinov d73d9acbfb build: fix broken test (#64319)
Fixes a test that didn't exist when the recent metadata PR was created.

PR Close #64319
2025-10-09 11:35:29 -07:00
Andrew Scott e1da41ffdf fix(router): Scroll restoration should use instant scroll behavior for traversals (#64299)
When the scroll position is being restored, this change upates the
behavior to use 'instant' rather than the default 'auto', which will
be whatever the browser behavior is for 'window.scrollTo'. The 'smooth'
behavior does not match how browsers behavior when performing a
traversal navigation for MPAs, which is 'instant'.

related to #58258

PR Close #64299
2025-10-09 11:13:45 -07:00
Alan Agius 3c9ed3d529 test: make xvfb start and stop async (#64310)
The `xvfb.start()` and `xvfb.stop()` methods are asynchronous but were being called synchronously. This can lead to race conditions where the tests start running before the virtual frame buffer is fully initialized, or the process exits before it's fully stopped.

This commit promisifies the `start` and `stop` methods to ensure they are properly awaited, making the e2e test setup more robust.

PR Close #64310
2025-10-09 11:09:37 -07:00
Kristiyan Kostadinov ab98b2425f fix(compiler-cli): capture metadata for undecorated fields (#63957)
Currently if `TestBed.overrideComponent` is used on a class that uses initializer APIs (e.g. `input()`), the initializer metadata will be wiped out, because `overrideComponent` re-compiles the class with the information set by `setClassMetadata`. `setClassMetadata` only captures decorated members at the moment.

These changes introduce some logic to capture the new initializer-based APIs in `setClassMetadata` as well.

Fixes #57944.

PR Close #63957
2025-10-09 14:02:16 -04:00
Kristiyan Kostadinov f28355a80b refactor(compiler): expose member decorator identifiers (#63957)
Adds the member decorators to the map of exposed compiler symbols.

PR Close #63957
2025-10-09 14:02:16 -04:00
Kristiyan Kostadinov 8ceac0b8e9 refactor(compiler-cli): track member metadata using output AST (#63957)
Reworks the logic that tracks the decorator metadata for members to do so using the output AST, rather than wrapping the TypeScript AST. This makes it easier to programmatically generate new members that weren't part of the TypeScript AST before.

PR Close #63957
2025-10-09 14:02:16 -04:00
Alan Agius 9af3cf7b0b build: migrate to in-repo ts_project with strict deps (#64306)
This commit migrates the vscode-ng-language-service to use the in-repo `ts_project` macro, which has strict dependency checking enabled. This improves build-time dependency validation and helps ensure that all dependencies are explicitly declared.

As part of this change, redundant `tsconfig.json` files have been removed in favor of a centralized configuration, and `jasmine_test` rules have been updated to the standard macro. A minor code adjustment in `server/src/session.ts` was also made to improve error handling.

PR Close #64306
2025-10-09 10:00:31 -07:00
Alan Agius 1c07cb0e1e build: add @angular/language-server to framework release output (#64306)
This change updates the build configuration to include the
@angular/language-server package in the standard framework release
output.

By integrating it into the release train, we ensure that it is versioned and published consistently with the rest of the Angular framework.

PR Close #64306
2025-10-09 10:00:31 -07:00
Alan Agius ad279efd90 build: use @angular/language-service from source (#64306)
This commit updates the VSCode Angular Language Service extension to use the `@angular/language-service` package built from source within the workspace, rather than a version downloaded from npm.

This change simplifies development and testing by ensuring the extension always uses the latest code from the local repository. The Bazel build configuration, VSCode launch settings, and e2e tests have been updated to reflect this change.

PR Close #64306
2025-10-09 10:00:31 -07:00
Alan Agius 461eeda6d9 build: remove unneeded language-service dependency (#64306)
The `@angular/language-service` package was not needed for integration tests or benchmarks. Removing this dependency simplifies the build configuration.

PR Close #64306
2025-10-09 10:00:31 -07:00
Angular Robot 22a1001b0f build: update github/codeql-action action to v4 (#64285)
See associated pull request for more information.

PR Close #64285
2025-10-09 06:39:54 -07:00
Angular Robot 8cd1b43d42 build: update cross-repo angular dependencies (#64282)
See associated pull request for more information.

PR Close #64282
2025-10-09 06:39:05 -07:00
Kristiyan Kostadinov 68df976692 docs: mention new viewport trigger syntax in docs (#64130)
Updates the docs to mention the new options for the `viewport` trigger.

PR Close #64130
2025-10-09 05:32:21 -07:00
Kristiyan Kostadinov ad2376435b feat(core): support IntersectionObserver options in viewport triggers (#64130)
Adds support for customizing the `IntersectionObserver` options for the `on viewport`, `prefetch on viewport` and `hydrate on viewport` triggers.

Note that the options need to be a static object literal, e.g. `@defer (on viewport(trigger, {rootMargin: '123px'})`.

Fixes #52799.

PR Close #64130
2025-10-09 05:32:21 -07:00
Kristiyan Kostadinov ddeef60db2 refactor(compiler): support viewport trigger options in pipeline (#64130)
Updates the template pipeline to support options for the `viewport` triggers.

PR Close #64130
2025-10-09 05:32:20 -07:00
Kristiyan Kostadinov e2367c8855 refactor(compiler-cli): type check viewport trigger options (#64130)
Updates the template type checker to check the options of the `viewport` trigger against `IntersectionObserver`.

PR Close #64130
2025-10-09 05:32:20 -07:00
Kristiyan Kostadinov f3207000fd refactor(compiler): parse options parameter on viewport triggers (#64130)
Updates the template parser and AST to capture a second object literal parameter on `viewport` triggers.

PR Close #64130
2025-10-09 05:32:20 -07:00
Kristiyan Kostadinov 64336715cd refactor(compiler): track span information about defer trigger parameters (#64130)
Currently we produce the string value of a defer `on` trigger by concatenating the string values of all of its tokens. This ends up ignoring whitespaces which in turn throws off source spans.

These changes switch to producing the string by taking the text between the start and end tokens, as well as tracking the start index.

PR Close #64130
2025-10-09 05:32:20 -07:00
Matthieu Riegler 8654020d56 refactor(core): use the ValueEqualityFn from core (#64247)
Instead of the non-public primitive one.

PR Close #64247
2025-10-09 05:31:34 -07:00
Shuaib Hasan Akib 489711d75c docs(docs-infra): add rel="noopener" to external links with target="_blank" in ExternalLink directive (#64276)
PR Close #64276
2025-10-09 05:29:30 -07:00
Angular Robot f521c1fd76 build: update github/codeql-action action to v3.30.7 (#64284)
See associated pull request for more information.

PR Close #64284
2025-10-09 05:25:22 -07:00
Angular Robot cb6f8d4228 build: update all non-major dependencies (#64265)
See associated pull request for more information.

PR Close #64265
2025-10-09 05:23:34 -07:00
hawkgs 5da78459fe refactor(devtools): make devtools resizing in the demo app easier (#64307)
Set `pointer-events` of the `iframe` to `none` while dragging. This should stop the events context interference and make resizing of the panel easier.

PR Close #64307
2025-10-09 05:21:48 -07:00
SkyZeroZx 6bc391c3d4 refactor(docs-infra): replace @Input with signal input for ignoredElementsIds in ClickOutside directive (#64302)
replace @Input with signal input for ignoredElementsIds in ClickOutside directive

PR Close #64302
2025-10-09 05:21:02 -07:00
SkyZeroZx 4bcbac121c docs: Replace ngIf programmatic rendering to control flow (#64301)
PR Close #64301
2025-10-09 05:20:20 -07:00
Angular Robot cbaf69088e build: update bazel dependencies (#64195)
See associated pull request for more information.

PR Close #64195
2025-10-09 05:17:52 -07:00
Matthieu Riegler a1cc00577d docs: update banner with AI RFC (#64107)
PR Close #64107
2025-10-09 05:17:06 -07:00
Matthew Berry 4fce3cad5e test(compiler): fix a @keyframes style encapsulation test (#64036)
I've updated the test to assert what I believe it was trying to assert
before. Without this change, the CSS is invalid so it's unclear what
behavior we're demonstrating.

PR Close #64036
2025-10-09 05:16:18 -07:00
Leon Senft 4c264c949a test(forms): make custom controls in test implement FormUiControl (#63884)
Fix type issues revealed by implementing the expected interface.

PR Close #63884
2025-10-09 05:15:21 -07:00
Leon Senft 71e8672837 fix(forms): test that minLength/maxLength properties are propagated to controls (#63884)
Ensure that minLength and maxLength are only bound to native input elements that
support them.

PR Close #63884
2025-10-09 05:15:21 -07:00
Leon Senft acd7c83597 fix(forms): test that min/max properties are propagated to controls (#63884)
Fix a bug where the min property of a form field was not correctly
propagated to custom controls. Also ensure that min and max are only
bound to native input elements that support them.

PR Close #63884
2025-10-09 05:15:21 -07:00
Leon Senft f4d1017c25 fix(forms): test that common field states are propagated to controls (#63884)
Fix several typos caught by the added test cases:

* `disabled` attribute for native controls
* `readonly` property for custom controls

Note that the `name` test cases have been marked `pending()` due to
https://github.com/angular/angular/issues/63882.

PR Close #63884
2025-10-09 05:15:21 -07:00
Alan Agius e873c22617 build: clean up language service integration tests and Bazel dependencies (#64271)
The legacy `workspace` integration test asset folder has been removed as it was unused and no longer representative of modern Angular CLI workspaces.

In line with this cleanup, the Bazel dependency definitions for the integration tests have been reorganized. Runtime data dependencies have been moved from the `js_test` rules to the `data` attribute of their corresponding `ts_project` rules. This is a cleaner and more appropriate approach as it co-locates a test's runtime data dependencies with its source code definition, making the relationship between the code and its required assets more explicit and improving the overall maintainability of the build configuration.

PR Close #64271
2025-10-08 20:08:47 -07:00
Miles Malerba 808d6aef90 release: cut the v21.0.0-next.7 release 2025-10-08 10:59:41 -04:00
Miles Malerba ec4775d642 docs: release notes for the v20.3.4 release 2025-10-08 10:51:13 -04:00
Alan Agius 76c8d045ed build: update rules_sass to 1184a80751a21af8348f308abc5b38a41f26850e (#64288)
This included a fix to build the repo on Linux ARM64 which is needed by the Firefox team

https://github.com/devversion/rules_sass/pull/37

PR Close #64288
2025-10-08 10:12:26 +00:00
Alan Agius 47b66b1418 release: bump Angular DevTools version to 1.4.0 (#64287)
PR Close #64287
2025-10-08 08:19:50 +00:00
SkyZeroZx 5cbdefcf11 feat(http): add support for fetch referrerPolicy option in HttpClient (#64116)
Introduces a referrer policy option for HTTP requests to allow specifying the referrer information sent, improving privacy and security controls.

PR Close #64116
2025-10-07 20:45:34 -04:00
Milo 0ed13485c8 refactor(devtools): stabilize signal graph (#64263)
remove experimental signal graph toggle, enable the signal graph by default if it is available

PR Close #64263
2025-10-07 20:44:03 -04:00
Matthieu Riegler 77a4011e64 docs: add providers caveat on the service (#64269)
fixes #60955

PR Close #64269
2025-10-07 20:40:19 -04:00
Matthieu Riegler 69b3c05b9e docs: add mentions host style bindings (#64257)
Also adds a section about css custom properties

fixes #64256

PR Close #64257
2025-10-07 20:39:40 -04:00
Alan Agius dd7bb9007f build: update repository URL to point to monorepo (#64220)
The repository URL in `package.json` is updated to point to the `angular/angular` monorepo. This ensures that the package metadata correctly reflects its location within the main repository.

PR Close #64220
2025-10-07 20:38:37 -04:00
Alan Agius d86f681cd4 build: update supported Node.js versions for language-service (#64220)
The supported Node.js versions for the language service server are updated to align with the versions supported by Angular. This ensures a consistent and stable environment for developers.

PR Close #64220
2025-10-07 20:38:36 -04:00
Alan Agius 66999dd65b build: enable breakpoints in source files (#64220)
This commit revamps the debugging setup and enabling developers to set breakpoints directly in the source TypeScript files.

Key changes include:
- Updated `launch.json` with source map path overrides to correctly map compiled output back to the original source code.
- Switched from `external` to `linked` sourcemaps in the Bazel build configuration for better debugging support.
- Consolidated the recommended VSCode settings into the main `launch.json` and `tasks.json`, removing the separate `recommended-*.json` files.
- Updated the debugging documentation to reflect the new, simplified workflow.

These changes significantly improve the developer experience for contributors working on the language service, making it much easier to debug and troubleshoot issues.

This applies to both the framework packages and vscode-ng-langugage-service.

PR Close #64220
2025-10-07 20:38:36 -04:00
Alan Agius 90d3b7f834 build: align VSCode extension build with vsce (#64220)
This commit refactors the VSCode extension's build and launch configurations to align with `vsce` and `pnpm` workspaces.

The following changes are included:
- Updated `.vscode/launch.json` to use new `vsce:` prefixed tasks and simplified launch configurations.
- Updated `.vscode/tasks.json` to use `pnpm` workspace commands for watching and packaging the extension.
- Adjusted `BUILD.bazel` and `package.json` files to reflect the new build output paths.

These changes streamline the development workflow for the VSCode extension, making it easier to build, debug, and package.

PR Close #64220
2025-10-07 20:38:36 -04:00
utshow-rehman b49db1644e docs(docs-infra): refactor navigation code based on angular style guide (#64177)
PR Close #64177
2025-10-07 20:29:54 -04:00
Alan Agius 7eee93da1a build: remove empty globs (#64270)
Remove globs that do not match any files.

PR Close #64270
2025-10-07 20:28:11 -04:00
Angular Robot a15688c2da build: update pnpm to v10.18.1 (#64264)
See associated pull request for more information.

PR Close #64264
2025-10-07 20:24:42 -04:00
AleksanderBodurri ac0eb2318c fix(devtools): fix incorrect styling of nodes between renders (#63979)
Previously, the router tree would not properly clean up css classes placed on nodes which would lead to some nodes being incorrectly visualized after each update.

PR Close #63979
2025-10-07 20:19:22 -04:00
Alan Agius 858e37cf83 build: update cross-repo angular dependencies (#64255)
See associated pull request for more information.

Closes #64212 as a pr takeover

PR Close #64255
2025-10-07 20:15:46 -04:00
Jessica Janiuk e279f30199 fix(core): prevent early exit from leave animations when multiple transitions are present (#64225)
Our code ensuring host binding composition for animations was causing the early exit and removal of
elements when multiple transitions were present on the same element. This commit fixes the issue by
ensuring that we properly keep track of all the promise resolvers on the LView and then only
call them once we've properly waited for the longest animation to finish.

fixes: #64209

PR Close #64225
2025-10-06 15:34:26 -04:00
Jessica Janiuk 3b60eb4ace refactor(core): allow animationend to process if we don't have a longest animation (#64225)
There may be cases where the longest animation info has been cleaned up before the end animation fires. We should still do the end processing in that case.

PR Close #64225
2025-10-06 15:34:26 -04:00
Jessica Janiuk a52a2afb6e refactor(core): fix animations host binding tests (#64225)
These tests were not properly validating against the host binding changes due to the fact that the styles were on the wrong components in some of the host binding cases.

PR Close #64225
2025-10-06 15:34:26 -04:00
Shuaib Hasan Akib 91c4f99d23 refactor(docs-infra): improve CustomErrorHandler for clarity and best practices (#64237)
Use `implements ErrorHandler` instead of extending the base class to follow Angular
conventions. Marked injected dependencies as `readonly`, made `openErrorSnackBar`
private, and improved overall code consistency.

PR Close #64237
2025-10-06 15:33:42 -04:00
Kristiyan Kostadinov 62bbce63b7 fix(migrations): remove error for no matching files in control flow migration (#64253)
Now that the control flow migration is running as a part of `ng update`, we need to be a bit forgiving about there not being any matching files since it can break the entire update process.

These changes switch the error to a warning and it counts the files for the entire workspace, not the individual projects.

PR Close #64253
2025-10-06 15:29:25 -04:00
Angular Robot 470dca1c01 build: lock file maintenance (#64252)
See associated pull request for more information.

PR Close #64252
2025-10-06 15:23:00 -04:00
Jaime Burgos 930460896c docs: add documentation for routerOutletData input and its usage (#64242)
PR Close #64242
2025-10-06 15:20:05 -04:00
SkyZeroZx fa75e4afb4 docs: Adds guide for customizing page titles with TitleStrategy (#64238)
Improves documentation by explaining how to implement and configure a custom title strategy for centralized control over page titles

PR Close #64238
2025-10-06 15:17:58 -04:00
Matthieu Riegler 1ffc643737 docs(docs-infra): fix @example in class members (#64249)
eg: ApplicationRef

PR Close #64249
2025-10-06 15:11:31 -04:00
SkyZeroZx 9f5197a754 docs: add equal option to toSignal for custom value comparison (#64241)
PR Close #64241
2025-10-06 15:09:49 -04:00
Alan Agius fd8383a959 ci: cache vscode binary in CI (#64219)
Caches the downloaded vscode binary in the CI workflows to speed up the e2e tests for the vscode extension. This avoids downloading vscode on every CI run.

PR Close #64219
2025-10-06 15:04:49 -04:00
Alan Agius 8358c19cb1 test: address flakiness in e2e tests (#64219)
It was noted that there are some flakes in CI.
Using seed '29976' it was narrowed down to the e2e tests for the vscode extension.

PR Close #64219
2025-10-06 15:04:49 -04:00
Angular Robot 5739890335 build: update github/codeql-action action to v3.30.6 (#64245)
See associated pull request for more information.

PR Close #64245
2025-10-06 15:01:39 -04:00
AleksanderBodurri 32ed78bcbe fix(devtools): optimize object sanitization logic (#64234)
Previously this would take ~3500ms adev.

This updated logic avoids the constant JSON.stringify implementation and instead checks for serializable values directly.

After this change this code path for adev takes less than 20ms.

(Benchmarks taken on an M1 Macbook Pro)

PR Close #64234
2025-10-06 15:00:19 -04:00
Angular Robot 1828230c6f build: update all non-major dependencies (#64231)
See associated pull request for more information.

PR Close #64231
2025-10-06 14:59:50 -04:00
Angular Robot da0982a5fd build: update pnpm to v10.18.0 (#64232)
See associated pull request for more information.

PR Close #64232
2025-10-06 14:57:16 -04:00
Leon Senft effccffde0 refactor(core): add framework support for binding form controls (#63773)
Move most of the implementation of the `Control` directive into core
framework instructions. This allows field state changes to be propagated
to their corresponding UI controls directly during execution of a
template update block, instead of relying on `effect()`s to synchronize
each change later during the update (and too late in the case of
required inputs).

* Define a private API in `@angular/core` for signal forms to implement:
  * `ɵControl` for the `Control` directive.
  * `ɵFieldState` for the control's associated `FieldState`.
* Emit specialized instructions when compiling a `[control]` binding:
  * `ɵɵcontrolCreate` sets up the `ɵControl` directive if present,
    determines whether it's bound to a native control element or a
    custom control component, and adds the appropriate event listeners
    to notify the `ɵFieldState` of UI changes.
  * `ɵɵcontrol` propagates changes from `ɵFieldState` properties to their
    corresponding UI control properties (in additional to binding the `control`
    property itself).

PR Close #63773
2025-10-04 13:21:55 -07:00
Leon Senft 42e1062bc5 refactor(core): add specialized instruction for [control] bindings (#63773)
* Emit a `ɵɵcontrol` instruction in place of `ɵɵproperty` for property
  bindings named "control". This instruction cannot be chained, but is
  otherwise functionally equivalent.

* Upcoming changes will use the `ɵɵcontrol` instruction to bind a signal
  form field to a UI control (be it a native element or custom directive).

PR Close #63773
2025-10-04 13:21:55 -07:00
Jessica Janiuk 548ea027f6 fix(core): ensure missing leave animations don't queue leave animations (#64226)
There was a bug in the logic for checking if a leave animation exists for a node. This was affecting timing of nodes with enter animations.

PR Close #64226
2025-10-03 13:28:54 -07:00
Matthieu Riegler ab780a7786 docs: add info about disabling request caching (#64216)
fixes #64210

PR Close #64216
2025-10-03 17:18:59 +00:00
Matthieu Riegler e40307803a refactor(devtools): visual separation between directives in the property tab (#64222)
also a drive by clean-up to remove some `ng-deep` stylings

PR Close #64222
2025-10-03 15:05:50 +00:00
Miles Malerba 34dd3f647a refactor(forms): rename Field to FieldTree (#64214)
There are two primary reasons for this renaming:
1. It better reflects the actual nature of the proxy object, namely that
   the form is represented as a tree, and that this object is used for
   navigating the tree structure (while `FieldState` is used for getting
   the state at a particular point in the structure).
2. This frees up the name `Field` to be used for the directive that
   binds a `FieldTree` to a UI control.

PR Close #64214
2025-10-03 07:59:31 -07:00
Angular Robot e0b9d9b437 build: update all non-major dependencies (#64218)
See associated pull request for more information.

PR Close #64218
2025-10-03 07:51:33 -07:00
SkyZeroZx d3e76b1956 fix(migrations): preserve component imports when pruning NgModules in standalone migration (#64186)
This fix preserves component imports by adding missing  statements and replacing module references with the correct component

PR Close #64186
2025-10-02 13:54:14 -07:00
Angular Robot e23815bb7d build: update dependency typescript to v5.9.3 (#64207)
See associated pull request for more information.

Closes #64192 as a pr takeover

PR Close #64207
2025-10-02 20:48:42 +00:00
Angular Robot 47048639f8 build: update peter-evans/create-or-update-comment action to v5 (#64211)
See associated pull request for more information.

PR Close #64211
2025-10-02 13:25:15 -07:00
Alan Agius 8146fc2817 test: fix vscode language service e2e tests (#64197)
Fix the e2e test suite for the vscode language service extension and run it in CI.

PR Close #64197
2025-10-02 13:03:24 -07:00
Andrew Scott 5e61e8d3c3 fix(router): Fix memory leak through Navigation.abort and canDeactivate guards (#64141)
This commit updates the internal transition to handle context retention
through the abort function. This retention chain included the
previousNavigation and setting this to a noop function resolves the
issue.

fixes #63983

PR Close #64141
2025-10-02 17:31:42 +00:00
Shuaib Hasan Akib 015d582801 docs(docs-infra): keep file name visible when code block is hidden (#64204)
Ensures that file names remain visible even if the associated code block
is collapsed or hidden, improving readability and context in the docs.

PR Close #64204
2025-10-02 17:30:45 +00:00
Matthieu Riegler 9eac43cf46 feat(common): Support of optional keys for the KeyValue pipe (#48814)
This commit is extending the capabilities of the KeyValue pipe by allowing interfaces with optional keys.

fixes angular#46867

PR Close #48814
2025-10-02 16:58:40 +00:00
Jessica Janiuk dd7c4cd9d1 fix(core): Fixes animations in conjunction with content projection (#63776)
Content Projected nodes are not destroyed and recreated, like every other
situation. Enter and Leave animations were ephemeral and are
expected to run once, and then be cleared. This means that for content projection
cases, the animations would only ever work the first time they were shown / hid.

In order to resolve this, we move to an animation queue that re-runs the animation
functions stored in the LView. In most cases, this animation will run once on creation.
For content projection, the enter and leave animations will fire more than once. Animations
are stored on the LView, but indexed and scheduled by whichever RNode needs to be animated.
So we only run animations for an affected RNode, rather than potentially all in the LView.

This also moves the queue to afterRender, which is safer than right after template
execution in refreshView.

fixes: #63418
fixes: #64065
fixes: #63901

PR Close #63776
2025-10-02 16:56:00 +00:00
Yasin Aslan cb56fbfddb fix(core): handle undefined CSS time values in parseCssTimeUnitsToMs function (#64181)
Improve error handling when `rawDelays` contains fewer items than `transitionedProperties`, preventing a toLowerCase of undefined error in `parseCssTimeUnitsToMs`.

PR Close #64181
2025-10-02 08:13:48 -07:00
Shuaib Hasan Akib b22f73d54f docs(docs-infra): update styles to align checkbox with label (#64202)
Removed extra spacing and removed center alignment so that checkboxes and
their labels are visually consistent.

PR Close #64202
2025-10-02 08:11:59 -07:00
Alan Agius 595c668142 docs: update website URL in license banners (#64183)
Replace angular.io with angular.dev
PR Close #64183
2025-10-02 07:56:58 -07:00
Angular Robot 50866b6e87 build: update all non-major dependencies (#64191)
See associated pull request for more information.

PR Close #64191
2025-10-02 07:52:17 -07:00
Jeremy Kescher 0e4e17cd97 refactor(http): HttpResponseBase.statusText (#64176)
Since HTTP/2, responses no longer contain a status text besides the status code, which caused our default value of 'OK' to be used in HttpErrorResponse.message.

DEPRECATED: `HttpResponseBase.statusText` is deprecated

PR Close #64176
2025-10-02 07:50:29 -07:00
Taygan Caldwell 6169fa5888 fix(devtools): stop second component tree traversal, if devtools metadata is placed on the body tag (#64161)
Stop multiple component tree traversals if the app root is the body tag. This caused the devtools ui to duplicate the component information, if the app root was the body tag

PR Close #64161
2025-10-02 07:46:56 -07:00
Miles Malerba 823384207b refactor(forms): Add a lightweight DI token for Control (#64188)
This will allow optionally injecting the Control directive without
importing the full directive.

PR Close #64188
2025-10-02 07:45:29 -07:00
kirjs 732635b382 release: cut the v21.0.0-next.6 release 2025-10-02 08:25:16 -04:00
kirjs 4699ccfb0d docs: release notes for the v20.3.3 release 2025-10-02 08:07:17 -04:00
Angular Robot 7bc4ec4ff7 build: update cross-repo angular dependencies to v21.0.0-next.6 (#64187)
See associated pull request for more information.

PR Close #64187
2025-10-01 22:48:33 +00:00
kirjs d892aabf6e Revert "fix(core): Fixes animations in conjunction with content projection (#63776)" (#64189)
This reverts commit 1cb16fddb5.

PR Close #64189
2025-10-01 22:42:40 +00:00
Chintan Kavathia be0455adda fix(elements): return value on signal input getter (#62113)
BREAKING CHANGE: Fix signal input getter behavior in custom elements.

Before this change, signal inputs in custom elements required function calls to access their values (`elementRef.newInput()`), while decorator inputs were accessed directly (`elementRef.oldInput`). This inconsistency caused confusion and typing difficulties.

The getter behavior has been standardized so signal inputs can now be accessed directly, matching the behavior of decorator inputs:

Before:
- Decorator Input: `elementRef.oldInput`
- Signal Input: `elementRef.newInput()`

After:
- Decorator Input: `elementRef.oldInput`
- Signal Input: `elementRef.newInput`

closes #62097

PR Close #62113
2025-10-01 13:52:34 -04:00
Angular Robot c0e1c41663 build: update ossf/scorecard-action action to v2.4.3 (#64164)
See associated pull request for more information.

PR Close #64164
2025-10-01 13:45:47 -04:00
Angular Robot 851c07bd7a build: update all non-major dependencies (#64148)
See associated pull request for more information.

PR Close #64148
2025-10-01 13:26:44 -04:00
Shuaib Hasan Akib 61624fde3f refactor(common): update NgIf, ngComponentOutlet and ngTemplateOutlet examples and remove redundant standalone flag (#64155)
Removed `standalone: true` since it is now the default
and no longer necessary.

refactor(common): update ngComponentOutlet and ngTemplateOutlet examples and remove redundant standalone flag

Removed `standalone: true` since it is now the default
and no longer necessary.

PR Close #64155
2025-10-01 13:22:44 -04:00
Angular Robot ee7d49a6d3 docs: update Angular CLI help (#64174)
Updated Angular CLI help contents.

PR Close #64174
2025-10-01 13:13:51 -04:00
kirjs 05370837fc Revert "feat(common): Support of optional keys for the KeyValue pipe (#48814)" (#64179)
This reverts commit 99c5269ee8.

PR Close #64179
2025-10-01 12:45:32 -04:00
Angular Robot 1b102c2817 build: update dependency @types/jsdom to v27 (#64165)
See associated pull request for more information.

PR Close #64165
2025-10-01 11:53:21 -04:00
Matthieu Riegler d16d624b90 refactor(core): run control-flow migration by default (#64136)
After adding the control flow migration as optional in v20, we enable it by default in v21.

PR Close #64136
2025-10-01 11:51:33 -04:00
Angular Robot 2f6caef636 build: update bazel dependencies (#64169)
See associated pull request for more information.

PR Close #64169
2025-10-01 11:15:00 -04:00
SkyZeroZx 51a0b59389 fix(migrations): handle shorthand property declarations in NgModule (#64160)
The migration now correctly detects shorthand declarations in NgModule metadata

PR Close #64160
2025-10-01 10:41:15 -04:00
Angular Robot 5319177638 build: update dependency ng-packagr to v21.0.0-next.4 (#64170)
See associated pull request for more information.

PR Close #64170
2025-10-01 10:36:29 -04:00
Alan Agius 3bd4362ff1 docs: update APF docs for new .d.ts layout (#64168)
The Angular Package Format has been updated to group all TypeScript declaration files (`.d.ts`) under a single `types/` directory within the package. Previously, these files were located at the package root or within entry-point specific directories.

This commit updates the APF documentation to reflect this new structure, including:
- The example file layout.
- The file purpose description table.
- The `package.json` exports field example.
- The legacy typings field example.

This brings the documentation in line with the current package structure, providing accurate guidance for library authors and tool developers.

PR Close #64168
2025-10-01 09:41:32 -04:00
Jessica Janiuk 1cb16fddb5 fix(core): Fixes animations in conjunction with content projection (#63776)
Content Projected nodes are not destroyed and recreated, like every other
situation. Enter and Leave animations were ephemeral and are
expected to run once, and then be cleared. This means that for content projection
cases, the animations would only ever work the first time they were shown / hid.

In order to resolve this, we move to an animation queue that re-runs the animation
functions stored in the LView. In most cases, this animation will run once on creation.
For content projection, the enter and leave animations will fire more than once. Animations
are stored on the LView, but indexed and scheduled by whichever RNode needs to be animated.
So we only run animations for an affected RNode, rather than potentially all in the LView.

This also moves the queue to afterRender, which is safer than right after template
execution in refreshView.

fixes: #63418
fixes: #64065
fixes: #63901

PR Close #63776
2025-10-01 09:07:38 -04:00
Matthieu Riegler f866132642 docs: add allowed-host mention (#64145)
and other dev-server options

PR Close #64145
2025-10-01 09:03:07 -04:00
Matthieu Riegler 99c5269ee8 feat(common): Support of optional keys for the KeyValue pipe (#48814)
This commit is extending the capabilities of the KeyValue pipe by allowing interfaces with optional keys.

fixes #46867

PR Close #48814
2025-10-01 08:58:47 -04:00
Kristiyan Kostadinov 159be56709 fix(compiler): recover template literals with broken expressions (#64150)
Fixes two issues that were preventing template literals from being recovered properly if one of the interpolated expressions is broken:
1. We weren't updating the expected brace counter when an interpolation starts which in turn was throwing off the recovery logic in `skip`.
2. When producing tokens for template literals, we were treating the closing brace as an operator whereas other places treat it as a character. Even after fixing the first issue, this was preventing the recovery logic from working correctly.

Fixes #63940.

PR Close #64150
2025-09-30 16:01:50 -04:00
aparziale 31bc9e4111 fix(migrations): skip migration for inputs with 'this' references (#64142)
Prevents migration of @input() properties that contain references to 'this' in their initializer functions. This ensures that functions accessing class members via 'this' remain unchanged, preventing potential build errors.

PR Close #64142
2025-09-30 15:32:44 -04:00
Shuaib Hasan Akib 7345bdc06b refactor(common): update pipe examples and remove redundant standalone flag (#64135)
Updated pipe examples to explicitly import the pipe for clarity and
correctness. Also removed `standalone: true` since it is now the default
and no longer necessary.

PR Close #64135
2025-09-30 15:31:11 -04:00
hawkgs c3a949a52d refactor(compiler-cli): include linkedSignal in the signal debugName transformer (#64106)
Add support for `linkedSignal`s in the signal `debugName` transformer. Continuation of #63346

PR Close #64106
2025-09-30 14:52:15 -04:00
Alan Agius 23e6eb3308 refactor(language-service): move typescript to dependencies (#64159)
This is actually a runtime dependency and is marked as external in esbuild

PR Close #64159
2025-09-30 14:50:22 -04:00
Andrew Scott 0b0bd8e12c refactor(language-service): remove some old ivy/pre-apf things (#64157)
This removes the pre_apf test project, which is far out of support as well as some references to ivy

PR Close #64157
2025-09-30 14:48:24 -04:00
Angular Robot 05d57e0a9b docs: update Angular CLI help (#64158)
Updated Angular CLI help contents.

PR Close #64158
2025-09-30 14:47:35 -04:00
Matthieu Riegler 2aca6da583 refactor(core): Add custom formatters for Signals (#64000)
This commit adds a devmode only formatter for Angular signals

Custom formatters must also be enabled in the browser devtools.

PR Close #64000
2025-09-30 13:49:26 -04:00
Matthieu Riegler 899c25f8d0 docs: add mention of host-context() being spec deprecated but still supported (#64153)
PR Close #64153
2025-09-30 13:36:51 -04:00
Alan Agius 20bb459c7a build: update dependencies and build config (#64154)
The VS Code extension build is failing due to some dependency issues. This commit updates the dependencies and build configuration to fix the build.

- Update `pnpm-lock.yaml` to reflect the dependency changes.
- Update `BUILD.bazel` files to adjust the external dependencies for `esbuild` and to correctly package the VSIX file.

PR Close #64154
2025-09-30 12:35:07 -04:00
Matthieu Riegler 563bc386b2 docs(docs-infra): fix app-scroller offset. (#64144)
Guide heading need different scroll offsets depending on the width of the screen. (The menu position varies).

PR Close #64144
2025-09-30 11:05:26 -04:00
Matthieu Riegler 7a29cdc0f5 docs(docs-infra): prevent to call section.scrollIntoView on the server side (#64038)
PR Close #64038
2025-09-30 11:00:57 -04:00
Matthieu Riegler a10eb38f76 feat(devtools): Add possibility to log directive instances and their prop values (#64143)
The improves debug possibilties via the Angular devtools

fixes #62235

PR Close #64143
2025-09-30 10:30:58 -04:00
Shuaib Hasan Akib 9a913dcfa9 docs(docs-infra): clean up code and use inferred types where possible (#64139)
PR Close #64139
2025-09-29 16:48:11 -04:00
Matthieu Riegler 04462ed67f refactor(compiler): Remove the interpolation config (#64071)
After #63474, we don't need that anymore.

PR Close #64071
2025-09-29 15:29:46 -04:00
Alan Agius fc643c9044 build: adopt moduleResolution: "bundler" (#64125)
This commit updates the TypeScript configuration across the project to use `moduleResolution: "bundler"`. This modernizes our module resolution strategy to align with current TypeScript best practices and bundler behaviors.

The following changes are included:
- Updated `tsconfig.json` files to set `moduleResolution` to `"bundler"`.
- Updated the `rules_angular` bazel dependency to a version compatible with these changes.
- Adjusted related test files and golden files to reflect the new module resolution strategy.

PR Close #64125
2025-09-29 14:20:23 -04:00
SkyZeroZx 377d1a0aea docs: Adds guide for custom HTTP parameter encoding (#64119)
PR Close #64119
2025-09-29 13:30:56 -04:00
Angular Robot 824bab57c7 build: update cross-repo angular dependencies (#64093)
See associated pull request for more information.

PR Close #64093
2025-09-29 13:10:15 -04:00
Matthieu Riegler 44d2ec5a05 refactor(devtools): guard value reads in the serializer (#64096)
Some properties (like gets) might throw when we try to read them.
With this commit we fail gracefuly and show a warning message for the property that can't be read.

fixes #56755

PR Close #64096
2025-09-29 13:08:11 -04:00
Joey Perrott 78cee8eca3 ci: correctly check for outputPaths to exist before deleting them (#64137)
Properly check if the output paths for each npm package exists before ensuring they are deleted when building all packages

PR Close #64137
2025-09-29 12:01:34 -04:00
Angular Robot 3b28ee1daa build: lock file maintenance (#64126)
See associated pull request for more information.

PR Close #64126
2025-09-29 11:55:51 -04:00
Angular Robot 68c207701d build: update github/codeql-action action to v3.30.5 (#64120)
See associated pull request for more information.

PR Close #64120
2025-09-29 10:49:27 -04:00
Angular Robot 508090aaed build: update all non-major dependencies (#64111)
See associated pull request for more information.

PR Close #64111
2025-09-29 10:14:09 -04:00
Matthieu Riegler 4fe0ac5a87 refactor(devtools): themed devtool tab icons for firefox (#64122)
With this change, Firefox get a different tab icon when the dark theme is enabled

fixes #52980

PR Close #64122
2025-09-29 09:31:03 -04:00
Angular Robot 686faf1715 build: update dependency tar.bzl to v0.5.6 (#64114)
See associated pull request for more information.

PR Close #64114
2025-09-29 09:27:42 -04:00
Alan Agius 9787d3c4d6 docs: remove note about node.js 17+ (#64129)
This note is pretty old and the mentioned behaviour has been the default for a number of major version.

PR Close #64129
2025-09-29 09:25:00 -04:00
Angular Robot 3e5b6469eb build: update bazel dependencies (#64109)
See associated pull request for more information.

PR Close #64109
2025-09-26 15:55:15 -04:00
Jessica Janiuk 221d5687ae Revert "refactor(compiler): Remove the interpolation config (#64071)" (#64110)
This reverts commit 768a09d3c3.

PR Close #64110
2025-09-26 15:16:53 -04:00
Matthieu Riegler bd48349b76 refactor(compiler): throw on attribute bindings for ng-container (#64072)
They are never valid on ng-container.
fixes #53760

PR Close #64072
2025-09-26 13:53:00 -04:00
Joey Perrott 758f0883f5 test(core): remove shelljs from core schematics tests (#64042)
Remove shelljs usage from core schematic tests and use builtins instead

PR Close #64042
2025-09-26 13:14:09 -04:00
Joey Perrott 9c29a40e1a build: remove shelljs from build scripts (#64042)
Remove shelljs from package building scripts

PR Close #64042
2025-09-26 13:14:09 -04:00
Joey Perrott e31f4bc597 build: update goldens management script to drop shelljs (#64042)
Update goldens management script to drop shelljs usage

PR Close #64042
2025-09-26 13:14:09 -04:00
Joey Perrott 0eb13d94a5 build: remove shelljs from release package diff script (#64042)
Remove the shelljs usage from package diff script

PR Close #64042
2025-09-26 13:14:08 -04:00
Joey Perrott 422a3b9ae6 test(zone.js): refactor tests to remove usage of shelljs (#64042)
Remove shelljs from zone.js tests

PR Close #64042
2025-09-26 13:14:08 -04:00
Matthieu Riegler 768a09d3c3 refactor(compiler): Remove the interpolation config (#64071)
After #63474, we don't need that anymore.

PR Close #64071
2025-09-26 12:36:50 -04:00
Angular Robot 8a1e36bf5d build: update dependency @lezer/html to v1.3.11 (#64097)
See associated pull request for more information.

PR Close #64097
2025-09-26 11:55:40 -04:00
hawkgs caee728d3b fix(devtools): signal graph linkedSignal node UI (#64105)
Fix the colors of `linkedSignal`s. Use grayish colors for unknown/unhandled signals.

PR Close #64105
2025-09-26 11:55:00 -04:00
Angular Robot 238ccc7e49 docs: update Angular CLI help (#64103)
Updated Angular CLI help contents.

PR Close #64103
2025-09-26 09:55:53 -04:00
Alan Agius ee02976909 ci: correct paths for disabled projects (#64102)
The paths for `pre_apf_project` and `pre_standalone_project` in the renovate configuration were missing the `package.json` suffix. This resulted in renovate not being able to find and disable updates for these projects as intended.

This commit corrects the paths to include `package.json`.

PR Close #64102
2025-09-26 09:48:27 -04:00
Jens Kuehlers 597d6e7145 docs: add StateOfJS survey banner (#64083)
PR Close #64083
2025-09-26 09:37:23 -04:00
Ankita Sood 8ff536bda8 docs: update text (#64095)
replace `above` with `below`
PR Close #64095
2025-09-26 09:34:00 -04:00
Alan Agius 14d5b0e5a9 refactor: make language service integration tests hermetic (#64098)
The language service integration tests were modifying files in the source tree, which made them flaky and non-hermetic. This also required the tests to be run with `no-remote-exec` and `no-sandbox` tags in Bazel.

This commit refactors the tests to copy the test projects to a temporary directory before running the tests. This makes the tests more robust, isolated, and allows them to be run remotely and in a sandbox.

Additionally, dependencies for the `pre_apf_project` and `pre_standalone_project` test fixtures have been reverted to older Angular versions. This is to ensure we are correctly testing against legacy project setups as was originally intended.

PR Close #64098
2025-09-26 08:30:44 -04:00
Matthieu Riegler e2fd79bfdb docs: add warning to AbstractControl.setErrors (#64063)
fixes #38191

PR Close #64063
2025-09-25 16:29:52 -04:00
Alan Agius 6fee508dab refactor: break circular dependency in integration tests (#64091)
The lsp integration tests had a circular dependency with other integration tests, which made the build setup complex and fragile. This was previously handled by using 'copy_to_bin', which is not ideal as it hides the true dependency graph.

This commit refactors the build configuration to break this cycle by introducing a dedicated 'ts_project' for the lsp tests with its own 'tsconfig.json'. This change simplifies the build logic and makes dependencies explicit.

PR Close #64091
2025-09-25 16:16:10 -04:00
Jad Chahed 3d2e1a670f docs: fix XLIFF 1.2 specification URL in i18n translation files guide (#64075)
PR Close #64075
2025-09-25 15:36:19 -04:00
Jessica Janiuk 8a0c9ca8be fix(core): prevents unintended early termination of leave animations and hoisting (#64088)
The event listeners for animationstart and animationend weren't properly checking whether the animation event fired matched the node we're bound to, since animation events bubble. This resulted in child node animation events bubbling up and causing elements to get prematurely removed.

fixes: #64084

PR Close #64088
2025-09-25 15:33:30 -04:00
Angular Robot 566077ff05 build: update all github actions (#64079)
See associated pull request for more information.

PR Close #64079
2025-09-25 15:11:14 -04:00
hawkgs a45e6fd44a fix(devtools): signal graph effect node (#64076)
Add a label and some other minor UI tweaks.

PR Close #64076
2025-09-25 15:03:15 -04:00
Angular Robot 8ddd7d60a9 build: update all non-major dependencies (#64080)
See associated pull request for more information.

PR Close #64080
2025-09-25 15:01:56 -04:00
Angular Robot 68c0f5b230 build: update dependency node to v22.20.0 (#64081)
See associated pull request for more information.

PR Close #64081
2025-09-25 15:01:11 -04:00
Joey Perrott 497dce962d ci: update pullapprove config (#64086)
Update the pullapprove config to include vscode-ng-language-service

PR Close #64086
2025-09-25 14:34:41 -04:00
Matthieu Riegler d7dead37d2 docs: fix homepage width (#64087)
Long term, we probably need to rework how adev behave on very large screen.

PR Close #64087
2025-09-25 14:28:32 -04:00
Alan Agius cd2376186a build: mark lsp integration test as flaky (#64085)
The lsp integration test is flaky and can fail intermittently. This change marks the test as `flaky = True` to prevent it from failing the build.

Additionally, the `no-remote` tag is updated to `no-remote-exec`. The former disables remote caching, while the test can still benefit from it.

PR Close #64085
2025-09-25 14:22:24 -04:00
Matthieu Riegler 1dee0d38b7 build: add .vscode files back to the .gitignore (#64059)
Especially `.vscode/settings` are meant to be local files.

PR Close #64059
2025-09-25 14:15:59 -04:00
Alan Agius fe0e5ab294 build: bump vscode-tmgrammar-test to 0.1.3 (#64078)
Update `vscode-tmgrammar-test`.

PR Close #64078
2025-09-25 10:58:41 -04:00
Alan Agius 9fd8d40d00 ci: authenticate to Bazel RBE (#64070)
This commit configures the Bazel RBE setup action to use the 'RBE_TRUSTED_BUILDS_USER' secret for authentication. This is necessary to ensure that the CI can properly connect to the remote build execution environment.

PR Close #64070
2025-09-25 10:43:02 -04:00
Doug Parker 45e3f77353 refactor(devtools): remove hard newlines from reviewer note (#64062)
These newlines aren't necessary and potentially forced undesired formatting on the reviewer.

PR Close #64062
2025-09-25 10:36:41 -04:00
Doug Parker b76fb9a808 refactor(devtools): update release script to use /pull/new endpoint (#64062)
This jumps straight to the "Open a pull request" screen rather than having the user click through the compare screen to start a PR.

PR Close #64062
2025-09-25 10:36:41 -04:00
Doug Parker e9b6ceb14d refactor(devtools): update DevTools release script to resolve origin URL (#64062)
`git config` only lists the configured value, but `git remote get-url` actually resolves the URL and is more stable.

I had a local configuration which aliased `gh:` to the appropriate GitHub URL:

```
[url "git@github.com:"]
    insteadOf = "gh:"
    pushInsteadOf = "git@github.com"
```

In this scenario, `git config` returns `gh:dgp1130/angular`, but `git remote get-url` returns `git@github.com:dgp1130/angular`, which is what the subsequent regex expects.

PR Close #64062
2025-09-25 10:36:41 -04:00
Alan Agius 95fa943b20 refactor: update dependencies and build configurations (#64073)
This commit updates several dependencies to their latest versions and adjusts the build configurations accordingly.

Key changes include:
- Upgraded various development and runtime dependencies.
- Removed outdated jasmine test runner configuration.
- Updated Bazel build files to align with new dependency structures.

Some dependencies like `vscode-language*` have been added to Renovate's ignore list as they require a more significant refactoring effort that is planned for a future update.

PR Close #64073
2025-09-25 10:26:19 -04:00
Alan Agius 64e28ccf81 build: update cross-repo angular dependencies (#64073)
See associated pull request for more information.

Closes #64043 as a pr takeover

PR Close #64073
2025-09-25 10:26:19 -04:00
Jessica Janiuk 0e8e7bac6c release: cut the v21.0.0-next.5 release 2025-09-24 16:27:20 -07:00
Jessica Janiuk b1d9373371 docs: release notes for the v20.3.2 release 2025-09-24 16:24:04 -07:00
Angular Robot 057eff6f4b build: update dependency prettier to v3 (#64053)
See associated pull request for more information.

PR Close #64053
2025-09-24 21:49:53 +00:00
Angular Robot 090c0bb944 build: update dependency vsce to v2 (#64054)
See associated pull request for more information.

PR Close #64054
2025-09-24 21:27:23 +00:00
Angular Robot 429b7588d8 build: update dependency lru-cache to v11 (#64051)
See associated pull request for more information.

PR Close #64051
2025-09-24 21:25:57 +00:00
Angular Robot c791519a64 build: update dependency cross-env to v10 (#64050)
See associated pull request for more information.

PR Close #64050
2025-09-24 21:25:23 +00:00
Angular Robot 3cf009bde1 build: update dependency yallist to v5 (#64060)
See associated pull request for more information.

PR Close #64060
2025-09-24 21:23:58 +00:00
Doug Parker e8beaa42c0 release: bump Angular DevTools version to 1.3.0 (#64044)
PR Close #64044
2025-09-24 13:54:14 -07:00
Joey Perrott 863c7eaafe build: migrate vscode extension into repo (#63924)
Migrate the vscode extension for angular into this repository.

PR Close #63924
2025-09-24 20:24:32 +00:00
Matthieu Riegler 25e93f0d01 docs(docs-infra): scroll offset for headings (#64039)
PR Close #64039
2025-09-24 20:23:41 +00:00
Matthieu Riegler e498c3034b docs(docs-infra): fix playground layout (#64037)
PR Close #64037
2025-09-24 20:21:05 +00:00
hawkgs 0b2018d153 docs(docs-infra): align docs-step number to the heading (#64035)
Fix misaligned number element.

PR Close #64035
2025-09-24 18:31:42 +00:00
Matthieu Riegler c0d88c37c9 fix(forms): Emit FormResetEvent when resetting control (#64024)
Prior to this change, the event was emitted by the Form Directive. With the change, it is now emitted at the control level.

fixes #58894

PR Close #64024
2025-09-24 16:48:32 +00:00
Matthieu Riegler fffc7cf1c4 refactor(migrations): migrate usages of getTestBed.initTestEnvironment (#63997)
This commit also removes code paths that were only useful for G3.

PR Close #63997
2025-09-24 16:03:40 +00:00
aparziale b96afb4bfc fix(migrations): handle reused templates in control flow migration (#63996)
The control flow migration was incorrectly removing `ng-template` elements in scenarios where they were referenced by multiple `*ngIf` directives' `else` clauses and also used independently via `ngTemplateOutlet`.

PR Close #63996
2025-09-24 16:01:58 +00:00
Matthieu Riegler 7e8e310868 refactor(compiler-cli): Don't emit optional chain non nullable diagnostics on indexed access. (#64007)
When `noUncheckedIndexedAccess` is not enabled, indexed accesses do not include `undefined` in the type.
This makes the OptionalChainNotNullableCheck inconvenient when wanting to safe guard an indexed access (and when the typings isn't helping you).

Ideally project should enable `noUncheckedIndexedAccess` for better typesafety, but this is often inconveninent (we do not enable it by default) and often not the resort of the developer.

So more better coding convinience,  `OptionalChainNotNullableCheck` will not raise an error/warning on indexed Acessed followed by an optional chaining when `noUncheckedIndexedAccess` is not enabled.

See also #63809 which will detect more cases

PR Close #64007
2025-09-24 15:08:05 +00:00
Joey Perrott a9145f3856 Revert "feat(common): update to cldr 47 (#63923)" (#64031)
This reverts commit 8ca3e3a0bc.

PR Close #64031
2025-09-24 15:03:43 +00:00
Devin Chasanoff 1216c491fd docs: add ai_tutor mcp tool docs (#63946)
PR Close #63946
2025-09-24 15:01:06 +00:00
Joey Perrott 7a7bc274cc ci: use release config when deploying adev (#64030)
Use the release config when deploying to adev to ensure that the version stamping is in place and correct

PR Close #64030
2025-09-24 14:50:46 +00:00
Angular Robot 3a9b8d8b8f docs: update Angular CLI help (#64019)
Updated Angular CLI help contents.

PR Close #64019
2025-09-24 14:42:32 +00:00
Matthieu Riegler 513539b98c docs(docs-infra): tutorial navigation list component (#64027)
fixes #63516

PR Close #64027
2025-09-24 14:30:14 +00:00
AleksanderBodurri 521c2a7646 feat(devtools): Change lazy/eager visualization by using dashed lines and correctly positioned edge arrows (#63980)
Previously we would visualize route config "types" by colouring different nodes.

Now the we only colour nodes to represent the active route path. Lazy loaded routes are represented with dashed line edges that point in the direction of loading.

PR Close #63980
2025-09-24 14:25:28 +00:00
Shuaib Hasan Akib 99cf1388e8 docs: not external link (#64025)
PR Close #64025
2025-09-24 14:24:57 +00:00
Angular Robot 1b7f17b015 build: update all non-major dependencies (#64018)
See associated pull request for more information.

PR Close #64018
2025-09-24 14:23:17 +00:00
Angular Robot 19b87864fa build: update cross-repo angular dependencies (#64020)
See associated pull request for more information.

PR Close #64020
2025-09-24 14:21:50 +00:00
Angular Robot f36a5049b5 build: update pnpm to v10.17.1 (#64015)
See associated pull request for more information.

PR Close #64015
2025-09-23 21:40:03 +00:00
Angular Robot 4230442b5c build: update cross-repo angular dependencies (#64011)
See associated pull request for more information.

PR Close #64011
2025-09-23 19:58:36 +00:00
Joey Perrott 8ca3e3a0bc feat(common): update to cldr 47 (#63923)
Update to CLDR version 47 for localization

PR Close #63923
2025-09-23 19:57:00 +00:00
Avcharov Hryhorii 1279364c3a refactor(core): improve linkedSignal type definitions, add debugName to options (#63346)
Add debugName for having ability to visualize linkedSignal name in devtools signal graph

PR Close #63346
2025-09-23 18:15:49 +00:00
Joey Perrott ee2fb08167 build: update to latest version of rules_browsers (#64009)
Update to latest version to address firefox timeout issues

PR Close #64009
2025-09-23 18:00:41 +00:00
cexbrayat 57aad4550f docs: angular does not support BigInt literal values (#64010)
PR Close #64010
2025-09-23 17:58:12 +00:00
JoostK 50d9d55f49 fix(core): fix narrowing of Resource.hasValue() (#63994)
This commit changes `Resource.hasValue()` and its derived types to improve narrowing
of resources whose generic type either does not include `undefined` (i.e. when a default
value has been provided) or when the generic type is `unknown`. This fixes the undesirable
behavior where `hasValue()` would cause the `else` branch of an `hasValue()` conditional
to have a narrowed type of `never`, given that the `hasValue()`'s type guard covers the
entire type range already (meaning that the type in the else-branch cannot be inhabited
in the type system, yielding the `never` type).

By making the `hasValue()` method only a type guard when the generic type includes `undefined`
these problems are avoided.

Fixes #60766
Fixes #63545
Fixes #63982

PR Close #63994
2025-09-23 14:20:55 +00:00
hawkgs 31769e6309 docs(docs-infra): fix home page UI issues on Firefox and Safari (#64006)
Fix broken banners and "Learn More" icons.

PR Close #64006
2025-09-23 14:19:03 +00:00
Cheng-Hsuan Tsai 60267282c7 docs(docs-infra): fix docs-card padding (#64004)
PR Close #64004
2025-09-23 14:18:31 +00:00
Angular Robot d6283de397 build: update dependency aspect_bazel_lib to v2.21.2 (#64002)
See associated pull request for more information.

PR Close #64002
2025-09-23 14:16:29 +00:00
Matthieu Riegler 3d1e8fa08b docs: add types category for signal forms API entries (#63967)
PR Close #63967
2025-09-22 22:47:38 +00:00
Angular Robot 304d91f784 build: update cross-repo angular dependencies (#63998)
See associated pull request for more information.

PR Close #63998
2025-09-22 22:36:50 +00:00
Milo 5406e1a84b refactor(core): use version>0 instead of hasRun (#62467)
this saves a field for effect and watch nodes

PR Close #62467
2025-09-22 16:51:50 +00:00
SkyZeroZx 3bd91ded43 fix(compiler-cli): resolve import alias in defer blocks (#63966)
Fixes an error where using an alias in a defer block caused the compiler CLI to fail when parsing. The resolution logic in ComponentDecoratorHandler was updated to correctly handle deferred dependencies with aliased imports.

PR Close #63966
2025-09-22 15:52:16 +00:00
Angular Robot a7e48514eb build: lock file maintenance (#63984)
See associated pull request for more information.

PR Close #63984
2025-09-22 15:04:30 +00:00
Ezequiel Cicala a2d98cc8d3 docs: add missing signal function (#63974)
The `buttonClasses` variable should be a signal according to the example, so we added the call.
PR Close #63974
2025-09-22 14:41:17 +00:00
Steven Chim e88f484ccb docs: fix typo in component bindings jsdoc (#63969)
PR Close #63969
2025-09-22 14:33:06 +00:00
Shuaib Hasan Akib 9067d12107 docs: fix typo "DO" → "Do" (#63988)
PR Close #63988
2025-09-22 14:30:55 +00:00
Shuaib Hasan Akib eb532f5768 docs(docs-infra): makes property signal (#63976)
PR Close #63976
2025-09-22 14:30:12 +00:00
Kristiyan Kostadinov f5b50ec20d refactor: clean up explicit standalone flags from tests (#63963)
Since standalone is the default, we can dropn the `standalone: true` flags from our tests.

PR Close #63963
2025-09-22 14:27:34 +00:00
hawkgs e628c8e889 docs(docs-infra): fix nav menu for tablets (#63990)
Make broken nav menu visible for tablets.

PR Close #63990
2025-09-22 14:25:03 +00:00
hawkgs e49121e044 docs(docs-infra): fix home page sections padding for smaller viewports (#63990)
Fix paddings for smaller viewports.

PR Close #63990
2025-09-22 14:25:03 +00:00
Angular Robot 6165a9f00b build: update all non-major dependencies (#63964)
See associated pull request for more information.

PR Close #63964
2025-09-22 14:24:32 +00:00
hawkgs 6f9f1ca6fe docs(docs-infra): don't discard favorites in search history when reselected (#63906)
Do not downgrade favorites to recent search results when you reselect them via the search results list.

PR Close #63906
2025-09-22 14:22:19 +00:00
Matthieu Riegler 6782f7148d docs: remove api grouping toggle (#63961)
PR Close #63961
2025-09-19 22:13:21 +00:00
Matthieu Riegler 40ae5af444 docs: callout for HMR+Defer (#63958)
fixes #60846

PR Close #63958
2025-09-19 21:35:36 +00:00
Matthieu Riegler c50d659509 refactor(core): protect InjectionToken usage of ngDevMode (#63875)
Since those are top level APIs, `ngDevMode` might not be available at runtime if they're invoked before the variable is set.

fixes #62796

PR Close #63875
2025-09-19 21:27:45 +00:00
Jessica Janiuk dde5badb71 fix(core): prevent animations renderer from impacting animate.leave (#63921)
This adds an optional flag to the renderer on `removeChild` called `requireSynchronousElementRemoval`, which can tell any downstream renderer that elements need to be removed synchronously. This gets passed down to the legacy animation renderer to ensure that any elements that set this flag aren't impacted by that renderers changes to timing.

fixes: #63893

PR Close #63921
2025-09-19 21:26:18 +00:00
Matthieu Riegler 56cb0931ef refactor(core): drop the usage of PromiseSettledResult<void> (#63955)
`PromiseSettledResult<void>` requires the ES2020 typings. Those might not be provided (or `skipLibCheck` is not enabled).

fixes #63931

PR Close #63955
2025-09-19 20:27:25 +00:00
Matthieu Riegler e835c359f7 docs: Add categories to form apis (#63938)
PR Close #63938
2025-09-19 20:21:16 +00:00
Matthieu Riegler 0a4ad9867b docs: add mention of the output structure. (#63916)
fixes #57247

PR Close #63916
2025-09-19 19:55:46 +00:00
Jessica Janiuk 2d232b39d4 Revert "refactor(compiler-cli): track member metadata using output AST (#63904)" (#63952)
This reverts commit ffe94b3a89.

PR Close #63952
2025-09-19 18:59:42 +00:00
Jessica Janiuk 5d538b21fd Revert "refactor(compiler): expose member decorator identifiers (#63904)" (#63952)
This reverts commit ef0ff78de2.

PR Close #63952
2025-09-19 18:59:42 +00:00
Jessica Janiuk 9d3cd16f33 Revert "fix(compiler-cli): capture metadata for undecorated fields (#63904)" (#63952)
This reverts commit 4c091abba6.

PR Close #63952
2025-09-19 18:59:41 +00:00
kirjs b60d5e49b1 refactor(forms): get rid of watFor in validation status spec (#63948)
It was flaky, and now it is not flaky

PR Close #63948
2025-09-19 17:59:32 +00:00
Jessica Janiuk db8f716a0e Revert "docs: Add categories to form apis (#63938)" (#63950)
This reverts commit 0c4feb8e9e.

PR Close #63950
2025-09-19 17:58:10 +00:00
Matthieu Riegler 0c4feb8e9e docs: Add categories to form apis (#63938)
PR Close #63938
2025-09-19 17:02:57 +00:00
Alan Agius b725af9924 docs: add documentation for NG0401 error (#63947)
PR Close #63947
2025-09-19 17:01:20 +00:00
Angular Robot 5a0225d9f9 build: update all non-major dependencies (#63928)
See associated pull request for more information.

PR Close #63928
2025-09-19 17:00:49 +00:00
Matthieu Riegler fec7c288e9 fix(core): Error on invalid APP_ID (#63252)
An invalid APP_ID could be responsible to generating broken CSS selectors. (eg `:` is an example for a character that breaks a selector by being a separator for pseudo-selectors.)
We now throw an error if the provided value is not alphanumerical

PR Close #63252
2025-09-19 15:00:10 +00:00
Angular Robot eeb07ddabf build: update dependency jasmine-spec-reporter to v7 (#63919)
See associated pull request for more information.

PR Close #63919
2025-09-19 14:57:53 +00:00
Angular Robot 8891ee492e build: update dependency concurrently to v9 (#63918)
See associated pull request for more information.

PR Close #63918
2025-09-19 14:54:12 +00:00
Leon Senft f008045ded fix(core): do not rename ARIA property bindings to attributes (#63925)
https://github.com/angular/angular/pull/62630 made it so that all ARIA
property bindings would write to their corresponding attribute instead.
The primary motivation for this change was to ensure that ARIA
attributes were always rendered correctly on the server, where the
emulated DOM may not correctly reflect ARIA properties as attributes.
Furthermore, this change added support for binding to ARIA attributes
using the property binding syntax (e.g. `[aria-label]`).

Unfortunately, https://github.com/angular/angular/pull/62630 relied on
the incorrect assumptions that an ARIA property name could be converted
to its attribute name (without hardcoding the conversion), and that the
value of an ARIA property matched its corresponding attribute. For
example, the `ariaLabelledByElements` property's value is an array of
DOM elements, while the corresponding `aria-labelledby` attribute's
value is a string containing the IDs of the DOM elements.

This partially reverts https://github.com/angular/angular/pull/62630 so
that only property bindings with ARIA attribute names (begin with
`aria-`) are converted to attribute bindings.

* `[ariaLabel]` will revert to binding to the `ariaLabel` property.
* `[aria-label]` will continue binding to the `aria-label` attribute.

Note the only difference between `[aria-label]` and `[attr.aria-label]`
is that the former will attempt to bind to inputs of the same name while
the latter will not.

PR Close #63925
2025-09-19 14:50:39 +00:00
Matthieu Riegler f1be5ae5dc refactor(core): fix MockRenderer in unit tests. (#63936)
This allows us to drop a test only check in the runtime.

PR Close #63936
2025-09-19 14:50:07 +00:00
Matt Lewis aeb3e6c6a5 fix(migrations): handle import aliases to the same module name (#63934)
Fixes a bug in the standalone migration where 2 imported modules have the same class name but 1 is imported with an alias and would not be added to the component imports array when migrating

Fixes #63913

PR Close #63934
2025-09-19 14:48:32 +00:00
Matthieu Riegler 445e84e370 docs(docs-infra): use Github theme colors for the code edition (#63944)
fixes #52654

PR Close #63944
2025-09-19 14:46:40 +00:00
Angular Robot 05afb49de9 build: update dependency serve to v14 (#63920)
See associated pull request for more information.

PR Close #63920
2025-09-19 14:46:09 +00:00
Shuaib Hasan Akib cc1032bd92 docs(docs-infra): removed unused common module (#63915)
PR Close #63915
2025-09-19 14:44:44 +00:00
Matthieu Riegler 5eb9f57ae8 docs: Introduce API category sorting (#63914)
PR Close #63914
2025-09-19 14:44:10 +00:00
Angular Robot 4328ea8cfb build: update cross-repo angular dependencies (#63929)
See associated pull request for more information.

PR Close #63929
2025-09-19 14:40:22 +00:00
Alan Agius 00a1f99e8d test: update integration test dependencies (#63937)
During a previous PR review, it was noted that the `next` tag was causing confusion. This commit updates the dependencies for the integration tests to resolve this ambiguity and ensure clarity going forward.

Additionally, this change uses the `link:` protocol to ensure that `pnpm i` does not fail when lockfiles or dependencies are updated outside of Bazel.

PR Close #63937
2025-09-19 14:38:42 +00:00
Alan Agius 3e571a2faf ci: optimize adev CI workflows (#63941)
This commit introduces several optimizations to the adev CI workflows:

- The adev preview build now uses a more powerful runner and creates a production build.
- Remote execution is disabled for adev builds to improve performance.

Note: Bazel cache is still being used, and the built times are reduces by about 10mins when the cache is missed.

PR Close #63941
2025-09-19 14:38:11 +00:00
Kristiyan Kostadinov 4c091abba6 fix(compiler-cli): capture metadata for undecorated fields (#63904)
Currently if `TestBed.overrideComponent` is used on a class that uses initializer APIs (e.g. `input()`), the initializer metadata will be wiped out, because `overrideComponent` re-compiles the class with the information set by `setClassMetadata`. `setClassMetadata` only captures decorated members at the moment.

These changes introduce some logic to capture the new initializer-based APIs in `setClassMetadata` as well.

Fixes #57944.

PR Close #63904
2025-09-18 21:30:15 +00:00
Kristiyan Kostadinov ef0ff78de2 refactor(compiler): expose member decorator identifiers (#63904)
Adds the member decorators to the map of exposed compiler symbols.

PR Close #63904
2025-09-18 21:30:15 +00:00
Kristiyan Kostadinov ffe94b3a89 refactor(compiler-cli): track member metadata using output AST (#63904)
Reworks the logic that tracks the decorator metadata for members to do so using the output AST, rather than wrapping the TypeScript AST. This makes it easier to programmatically generate new members that weren't part of the TypeScript AST before.

PR Close #63904
2025-09-18 21:30:15 +00:00
aparziale 307e4eafef refactor(migrations): remove common module if there are no references (#63892)
ngclass-to-class migration removes commonModule if there are no references that use it

PR Close #63892
2025-09-18 20:18:43 +00:00
Matthieu Riegler f6548adf8f docs: re-add ai event banner on homepage (#63922)
PR Close #63922
2025-09-18 20:15:31 +00:00
SkyZeroZx e426302cca refactor(core): Remove duplicate code getSelectedTNode (#63897)
clean up duplicate functions

PR Close #63897
2025-09-18 16:04:25 +00:00
Angular Robot 2951e85e99 build: update cross-repo angular dependencies (#63917)
See associated pull request for more information.

PR Close #63917
2025-09-18 16:02:17 +00:00
Kristiyan Kostadinov e1ae765672 docs: add regular expressions to table of supported literals (#63887)
Updates the docs to mention that regular expressions are supported.

PR Close #63887
2025-09-18 15:08:56 +00:00
Kristiyan Kostadinov bb381b707e refactor(compiler): integrate regular expression literals into pipeline (#63887)
Adds support for regular expression literals in the template pipeline and adds some logic to optimize non-global ones.

PR Close #63887
2025-09-18 15:08:56 +00:00
Kristiyan Kostadinov f57b104ccd refactor(compiler-cli): support regular expression literals in AOT compiler (#63887)
Handles regular expression literals across the template type checker and the various translators.

PR Close #63887
2025-09-18 15:08:56 +00:00
Kristiyan Kostadinov 2971a001c6 refactor(compiler): add output AST node for regular expressions (#63887)
Adds the `RegularExpressionLiteral` node to the output AST.

PR Close #63887
2025-09-18 15:08:56 +00:00
Kristiyan Kostadinov 539717f58a feat(core): support regular expressions in templates (#63887)
Updates the template syntax to support inline regular expressions.

PR Close #63887
2025-09-18 15:08:56 +00:00
Kristiyan Kostadinov c1559ece52 refactor(compiler): tokenize regular expression literals (#63887)
Updates the expression lexer to produce tokens for regular expression literals.

PR Close #63887
2025-09-18 15:08:56 +00:00
Damian Sire 2da0fef2a5 docs: apply grammar fixes to ai/overview.md (#63896)
PR Close #63896
2025-09-18 15:08:19 +00:00
Angular Robot 5cb1bbb96e build: update rules_sass digest to 4a54e0e (#63898)
See associated pull request for more information.

PR Close #63898
2025-09-18 14:59:07 +00:00
AleksanderBodurri 4fa3b2673e feat(devtools): display provider count on injector tree nodes (#63632)
Allows the tree visualizer to display a sublabel for each node.

Used by the injector tree to display provider count for each injector.

PR Close #63632
2025-09-18 14:56:47 +00:00
Alan Agius 950ffd001e build: remove yarn from integration tests, switch to pnpm (#63902)
This commit removes Yarn as a package manager for integration tests and migrates to pnpm. This change aims to standardize package management across the project, leveraging pnpm's efficiency and consistent behavior for dependency resolution and installation.

PR Close #63902
2025-09-18 14:39:51 +00:00
Angular Robot 5c74339dfc build: update cross-repo angular dependencies (#63902)
See associated pull request for more information.

Closes #63890 as a pr takeover

PR Close #63902
2025-09-18 14:39:51 +00:00
Andrew Scott 8ad26edb72 refactor(platform-browser): Remove zone provideres from BrowserTestingModule (#63872)
This removes the Zone providers from the `BrowserTestingModule`. These
already exist by default in all other entrypoints to Angular
environments (TestBed compiler, bootstrapModule, and createApplication).

PR Close #63872
2025-09-17 21:17:59 +00:00
Devin Chasanoff 52b614ce55 docs: add web codegen scorer to docs (#63886)
PR Close #63886
2025-09-17 21:15:41 +00:00
Jessica Janiuk b018c9a481 release: cut the v21.0.0-next.4 release 2025-09-17 14:13:22 -07:00
Jessica Janiuk 95207b6b52 docs: release notes for the v20.3.1 release 2025-09-17 13:56:39 -07:00
Andrew Kushnir a53ef1d69a Revert "refactor(compiler): tokenize regular expression literals (#63857)" (#63883)
This reverts commit 8a69c0629b.

PR Close #63883
2025-09-17 19:36:17 +00:00
Andrew Kushnir ae55578b92 Revert "feat(core): support regular expressions in templates (#63857)" (#63883)
This reverts commit 328a2bf719.

PR Close #63883
2025-09-17 19:36:17 +00:00
Andrew Kushnir c7e0c8b06a Revert "refactor(compiler): add output AST node for regular expressions (#63857)" (#63883)
This reverts commit a1288f8d66.

PR Close #63883
2025-09-17 19:36:17 +00:00
Andrew Kushnir f53c6543db Revert "refactor(compiler-cli): support regular expression literals in AOT compiler (#63857)" (#63883)
This reverts commit f2ef838c06.

PR Close #63883
2025-09-17 19:36:17 +00:00
Andrew Kushnir 0a81784de2 Revert "refactor(compiler): integrate regular expression literals into pipeline (#63857)" (#63883)
This reverts commit dd77233cdf.

PR Close #63883
2025-09-17 19:36:17 +00:00
Andrew Kushnir f0883e5eb9 Revert "docs: add regular expressions to table of supported literals (#63857)" (#63883)
This reverts commit 32c98e08a1.

PR Close #63883
2025-09-17 19:36:17 +00:00
Jan Martin 7d3919ed11 release: bump Angular DevTools version to 1.2.1 (#63879)
PR Close #63879
2025-09-17 10:57:05 -07:00
arturovt dee6ef89c7 refactor(core): tree-shake HOST_TAG_NAME in prod (#63861)
Previously, HOST_TAG_NAME had its __NG_ELEMENT_ID__ set at the top level. This
prevented tree-shaking, since the bundler had to keep the assignment as a
potential side effect even when the token was never used.

This change moves the token creation and __NG_ELEMENT_ID__ assignment into a
@__PURE__ IIFE. If HOST_TAG_NAME is not injected anywhere, the IIFE result is
unused and can be dropped entirely by the optimizer. If it is used, the token
still behaves the same at runtime.

PR Close #63861
2025-09-17 17:40:35 +00:00
Jessica Janiuk 36b542d365 Revert "build: update dependency @types/node to v24.5.1 (#63853)" (#63878)
This reverts commit f354f0a3af.

PR Close #63878
2025-09-17 17:36:59 +00:00
Kristiyan Kostadinov 32c98e08a1 docs: add regular expressions to table of supported literals (#63857)
Updates the docs to mention that regular expressions are supported.

PR Close #63857
2025-09-17 16:06:51 +00:00
Kristiyan Kostadinov dd77233cdf refactor(compiler): integrate regular expression literals into pipeline (#63857)
Adds support for regular expression literals in the template pipeline and adds some logic to optimize non-global ones.

PR Close #63857
2025-09-17 16:06:51 +00:00
Kristiyan Kostadinov f2ef838c06 refactor(compiler-cli): support regular expression literals in AOT compiler (#63857)
Handles regular expression literals across the template type checker and the various translators.

PR Close #63857
2025-09-17 16:06:51 +00:00
Kristiyan Kostadinov a1288f8d66 refactor(compiler): add output AST node for regular expressions (#63857)
Adds the `RegularExpressionLiteral` node to the output AST.

PR Close #63857
2025-09-17 16:06:51 +00:00
Kristiyan Kostadinov 328a2bf719 feat(core): support regular expressions in templates (#63857)
Updates the template syntax to support inline regular expressions.

PR Close #63857
2025-09-17 16:06:51 +00:00
Kristiyan Kostadinov 8a69c0629b refactor(compiler): tokenize regular expression literals (#63857)
Updates the expression lexer to produce tokens for regular expression literals.

PR Close #63857
2025-09-17 16:06:50 +00:00
JoostK 89cf62f907 fix(compiler-cli): only bind inputs that are part of microsyntax to a structural directive (#52453)
Prior to this change the template type-check generator would incorrectly apply inputs
and attributes to a structural directive, where only the bindings as present in microsyntax
are actually bound to the directive. This introduced a problem where usages of template
variables could not be resolved, because the template variables are out-of-scope of the
template element itself.

Closes #49931

PR Close #52453
2025-09-17 16:05:04 +00:00
Alan Agius 420af0bcc0 build: update pnpm to v10.17.0 (#63870)
pnpm v10.17.0 adds support for wildcards in 'minimumReleaseAgeExclude'. This simplifies the configuration by allowing the use of '@angular-devkit/*' and '@angular/*' instead of listing each package individually.

PR Close #63870
2025-09-17 16:04:18 +00:00
Matthieu Riegler af33647145 refactor(core): remove usages of Promise.withResolvers (#63856)
Promise.withResolvers is Baseline 2024. Our policy is to support browsers in the scope of Basline widely available.

Fixes #63855

PR Close #63856
2025-09-17 15:21:51 +00:00
Matthieu Riegler e52338466f refactor(common): trim undefined from locale data. (#63520)
This is an optimization to shave of unecessary data.

fixes #42315

PR Close #63520
2025-09-17 14:57:16 +00:00
hawkgs b4960da4f1 docs(docs-infra): store search result fragment in search history (#63866)
Store the search result page fragment/sub-label in the search history and render it in the history items.

PR Close #63866
2025-09-17 14:56:31 +00:00
hawkgs 39cbb97dfc docs(docs-infra): always include fragment in search results (#63866)
Always include page fragment/sub-title in the search dialog results.

PR Close #63866
2025-09-17 14:56:31 +00:00
Walter Breakell 5f41f141ee docs: fix pluralization error in templates guide (#63854)
PR Close #63854
2025-09-17 14:52:32 +00:00
Angular Robot f354f0a3af build: update dependency @types/node to v24.5.1 (#63853)
See associated pull request for more information.

PR Close #63853
2025-09-17 14:51:59 +00:00
Angular Robot 5fa2c05f60 build: update cross-repo angular dependencies (#63864)
See associated pull request for more information.

PR Close #63864
2025-09-17 14:32:27 +00:00
Matthieu Riegler 400536fd12 docs: fix homepage typos (#63868)
fixes #63867

PR Close #63868
2025-09-17 14:31:54 +00:00
Paul Gschwendtner 4b2cc12bc4 ci: remove myself from unavailability (#63863)
Removes myself from unavailability.

PR Close #63863
2025-09-17 14:27:42 +00:00
Alan Agius 944768a601 build: enable minimumReleaseAge to mitigate dependency chain attacks (#63862)
This change configures pnpm's `minimumReleaseAge` setting to 1 day (1440 minutes). This is a security measure to mitigate dependency chain attacks, where malicious actors publish a new version of a dependency with malicious code and then trick users into updating to it before it can be discovered and reported.

By delaying the adoption of new releases, we reduce the window of opportunity for such attacks. The list of excluded packages contains trusted and frequently updated dependencies from the Angular team, which are considered safe to use without this delay.

PR Close #63862
2025-09-17 14:27:10 +00:00
Andrew Scott 0d028e0f77 refactor(platform-browser): Remove zonejs compatibility detector (#63847)
The zoneless scheduler is always enabled, so if hydration works with zoneless, it works
for all Angular apps. There is no need for detection of custom zone implementations

PR Close #63847
2025-09-16 22:16:49 +00:00
Joey Perrott 1fec2a2cb0 build: remove bazel flag usage for adev (#63845)
Previously we used a configuration flag for adev, instead we now separate into two different targets since our flag didn't
need to cause a full reanalysis to run since everything before the final target should be a cache hit.

PR Close #63845
2025-09-16 20:49:04 +00:00
Matthieu Riegler 809a4ed8c1 feat(core): Add migration for zoneless by default. (#63042)
This commit adds a migration that updates applications enable Zone change detection when Angular is zoneless by default.

PR Close #63042
2025-09-16 20:48:29 +00:00
Andrew Scott 1352fbdbf2 fix(core): Drop special-case disables automatic change detection scheduling (#63846)
This commit drops special-case handling for old-style "zoneless" that
would disable the internal scheduler when zoneless was not explicitly
enabled but Zone was not defined. This scheduler is now enabled in _all_
applications, providing consistent expectations for developers.

BREAKING CHANGE: Using a combination of `provideZoneChangeDetection`
while also removing ZoneJS polyfills will no longer result in the
internal scheduler being disabled. All Angular applications now
consistenly use the same scheduler, and those with the Zone change detection
provider include additional automatic scheduling behaviors based on
NgZone stabilization.

PR Close #63846
2025-09-16 20:43:17 +00:00
Andrew Scott d5e00f9591 refactor(core): Make the zoneless-by-default change a flag flip (#63382)
This makes the zoneless-by-default change a flag flip that can be
individually enabled in tests, createApplication, and bootstrapModule
for gradual rollout. In addition, the "require on CD provider" check is
also made individually flippable for gradual rollout.

PR Close #63382
2025-09-16 18:56:54 +00:00
Andrew Scott 45fed3d201 fix(core): Remove Zone-based change provider from internals by default (#63382)
This change removes the internally provided `ZoneJS`-based change
detection scheduler. This makes Angular Zoneless by default and allows
tree-shaking of the Zone change detection providers.

BREAKING CHANGE: Angular no longer provides a change detection scheduler
for ZoneJS-based change detection by default. Add
`provideZoneChangeDetection` to the providers of your
`bootstrapApplication` function or your `AppModule` (if using
`bootstrapModule`). This provider addition will be covered by an
automated migration.

PR Close #63382
2025-09-16 18:56:53 +00:00
Matthieu Riegler 07b4c12984 refactor(core): prevent input migration from introducing a breaking change (#63547)
Non-typed `transform` functions were stripped by the migration prior to this commit (while still logging an error).
This behavior will now only happen with `--best-effort`.

#63541

PR Close #63547
2025-09-16 18:53:50 +00:00
Matthieu Riegler d9369d199f docs(docs-infra): Show package name for API references (#63831)
PR Close #63831
2025-09-16 17:36:50 +00:00
Matthieu Riegler 331e35c283 docs(docs-infra): fix colors (#63842)
fixes #63841

PR Close #63842
2025-09-16 17:36:18 +00:00
Andrew Scott 6d5c45d13d refactor(core): Remove unused token (#63819)
this removes an unused token from the core package

PR Close #63819
2025-09-16 16:52:53 +00:00
Kristiyan Kostadinov 8f59295019 refactor(core): remove unnecessary deps arrays (#63823)
We don't need to use the `deps` array syntax anymore since we have the `inject` function. These changes clean up the relevant usages.

PR Close #63823
2025-09-16 16:51:52 +00:00
Kristiyan Kostadinov 7fd3db0423 fix(compiler-cli): remove internal syntax-related flags (#63787)
Removes the `_enableBlockSyntax` and `_enableLetSyntax` flags in favor of detecting them based on the Angular version.

PR Close #63787
2025-09-16 16:51:17 +00:00
Angular Robot 7fcae0a914 build: update cross-repo angular dependencies (#63839)
See associated pull request for more information.

PR Close #63839
2025-09-16 16:49:21 +00:00
Matthieu Riegler d53ac26d4e docs(docs-infra): new home page (#63662)
ADEV is getting a new home page!
This is a first iteration.

PR Close #63662
2025-09-16 16:21:32 +00:00
aparziale 4133b08d93 fix(migrations): fix route-lazy-loading migration (#63818)
route-lazy-loading migration now supports routes when exported by default

PR Close #63818
2025-09-16 15:53:47 +00:00
arturovt b4acc79af6 refactor(core): swap dev/prod error handling order in injector for tree-shaking (#63354)
In production builds, `ngDevMode` is replaced with `false`, so the guard compiles to `return;`. However, bundlers like ESBuild still keep the remaining statements after the return as unreachable code instead of removing them. This leaves behind unnecessary dead code in the output.

Technically, the body is unreachable. But to prove that, the bundler must be 100% certain that:

- `return` cannot be removed by some transform
- there's no later transformation that changes control flow

As thus, it's always conservative.

This also allows dropping `assertDefined`, which was previously
referenced only inside `prependTokenToDependencyPath`. With the
function now fully inlined and dev-only, `assertDefined` is also
eliminated from production builds, further reducing bundle size.

PR Close #63354
2025-09-16 15:53:11 +00:00
Matthieu Riegler e43d9b95c1 docs(docs-infra): Use port 4201 for adev (#63834)
Having a changing port might be annoying. The best compromise is probably to use a less common port than the default used by the CLI.

PR Close #63834
2025-09-16 15:18:11 +00:00
Matthieu Riegler 5612ad5b45 docs: add alert about routelinkactive being a content query (#63829)
This commit also fixes an issue with alert that we're parse correctly if they were at the end of the markdown string

fixes #52877

PR Close #63829
2025-09-16 15:15:24 +00:00
Rahul Kamat a943e7cb05 refactor(core): Update async-test.ts to use globalThis polyfill (#57505)
This updates async-test to use globalThis instead of what it was using.

PR Close #57505
2025-09-16 15:10:04 +00:00
Matthieu Riegler 5ce4d9522d docs: update doc to clear up difference between toObservable/ outputToObservable (#63836)
TLDR: only `toObservable` emits synchronously on subscription.

fixes #57224

PR Close #63836
2025-09-16 15:00:54 +00:00
Matthieu Riegler 73bf0c6094 docs: high level architecture mention in readme (#63828)
fixes #59293

PR Close #63828
2025-09-16 15:00:16 +00:00
Shuaib Hasan Akib 1004418040 docs: remove leading $ from script examples (#63795)
Copy-pasting commands like `$ pnpm lint` caused errors in shells (e.g. zsh). Updated docs to use `pnpm lint` directly so they run without modification.

PR Close #63795
2025-09-16 14:54:03 +00:00
Angular Robot 1c7b9d8b93 build: update dependency @types/node to v24.5.0 (#63820)
See associated pull request for more information.

PR Close #63820
2025-09-16 14:52:04 +00:00
Angular Robot 9707ac1e0b build: update dependency aspect_rules_js to v2.6.0 (#63821)
See associated pull request for more information.

PR Close #63821
2025-09-16 14:45:58 +00:00
Andrew Scott d9e597f341 refactor(upgrade): use zone-based change detection by default (#63814)
To avoid the need for specifying `provideZoneChangeDetection` in any/all
modules used with `downgradedModule`, this change adds the zone-based change detection
providers by default. This also adds the zone providers to
`UpgradeModule` by default as well.

PR Close #63814
2025-09-16 14:45:28 +00:00
Andrew Scott 0bb68a8187 refactor(upgrade): downgradeModule uses zone-based change detection by default (#63814)
To avoid the need for specifying `provideZoneChangeDetection` in any/all
modules used with `downgradedModule`, this change adds the zone-based change detection
providers by default.

PR Close #63814
2025-09-16 14:45:28 +00:00
Andrew Scott 412d5af92c refactor(upgrade): downgradeModule uses zone-based change detection by default (#63814)
To avoid the need for specifying `provideZoneChangeDetection` in any/all
modules used with `downgradedModule`, this change adds the zone-based change detection
providers by default.

PR Close #63814
2025-09-16 14:45:28 +00:00
arturovt 7e0cf41563 refactor(core): wrap checkNoChanges body in if (ngDevMode) for better tree-shaking (#63387)
The `checkNoChanges` method previously used an early-return guard:

  if (!ngDevMode) return;
  // dev-only code ...

In production builds, `ngDevMode` is replaced with `false`, so the
guard compiles to `return;`. However, bundlers like ESBuild
still keep the remaining statements after the return as unreachable
code instead of removing them. This leaves behind unnecessary dead
code in the output.

This commit updates the method to instead wrap the full body:

  if (ngDevMode) {
    // dev-only code ...
  }

With this change, the method collapses to an empty function in
production builds:

  checkNoChanges() {}

This ensures that the dev-only logic and its dependencies
(e.g. `checkNoChangesInternal`, `UseExhaustiveCheckNoChanges`) can be
fully tree-shaken, reducing bundle size.

PR Close #63387
2025-09-15 21:11:39 +00:00
SkyZeroZx 321eecce3d docs(benchpress): Remove TODOs in Statistic (#63534)
Remove TODOs in Statistic

PR Close #63534
2025-09-15 20:36:17 +00:00
aparziale 8dc8914c8a feat(migrations): add migration to convert ngStyle to use style (#63517)
Add migration to convert ngStyle to use style

PR Close #63517
2025-09-15 20:16:16 +00:00
hawkgs 8b43fcec1a fix(devtools): router tree legend overflow (#63813)
Set `overflow` to `hidden` so the router tree legend doesn't overflow its parent container.

PR Close #63813
2025-09-15 19:37:19 +00:00
Matthieu Riegler 9a16718b13 refactor(core): remove deprecated interpolation option on Components. (#63474)
This option was deprecated by #55778.

BREAKING CHANGE: The `interpolation` option on Components has been removed. Only the default `{{ ... }}` is now supported.

PR Close #63474
2025-09-15 19:35:03 +00:00
Matthieu Riegler 6dff287bb8 refactor(compiler-cli): Add a diagnostic to detect forbiden invocations of required initializers (#63614)
The diagnostic will raise an error when required initializers (input, model, queries) are invoked the context of property initializers and contructors.

Docs will be provided in a follow-up

fixes #63602

PR Close #63614
2025-09-15 19:34:32 +00:00
Matthieu Riegler 803dc8e44c fix(compiler): Add support for aria-invalid (#63748)
The `aria-invalid` attribute was supported but the `ariaInvalid` property was unknown by the schema.

fixes #63744

PR Close #63748
2025-09-15 18:41:16 +00:00
Matthieu Riegler a5e5dbbc16 refactor(core): remove moduleId from Component metadata (#63482)
It was deprecated by #49496 as it had no effect.

BREAKING CHANGE: `moduleId` was removed from `Component` metadata.

PR Close #63482
2025-09-15 18:23:46 +00:00
Uaena_Alex_John 247393131e docs: Update outputs.md to demonstrate how to use event data (#63732)
PR Close #63732
2025-09-15 17:09:18 +00:00
Jessica Janiuk de8be9784d ci: update pullapprove public-api rules (#63737)
This reduces the required reviews to 1 and requested reviewers to 2 to reduce friction.

PR Close #63737
2025-09-15 17:03:42 +00:00
SkyZeroZx d201cd2c2b feat(forms): Prevents marking fields as touched/dirty when state is hidden/readonly/disabled (#63633)
Ensures fields that are hidden, disabled, or readonly cannot be marked as touched or dirty, improving form state integrity

PR Close #63633
2025-09-15 16:52:15 +00:00
Kristiyan Kostadinov 0a60e355e1 fix(compiler-cli): signal not invoked diagnostic not raised when input has same name in template (#63754)
The diagnostic that flags signals which haven't been invoked has some logic to skip over inputs, however it was looking at the used directives across the entire template, not the ones on the specific node.

Fixes #63739.

PR Close #63754
2025-09-15 15:50:45 +00:00
Walter Breakell d6e3a6945b docs: correct grammar in next steps intro paragraph (#63803)
PR Close #63803
2025-09-15 15:50:10 +00:00
hawkgs d476f881af fix(devtools): minor UI issues in transfer state tab (#63810)
Fix some Material-related table regressions and change some font sizes.

PR Close #63810
2025-09-15 15:48:26 +00:00
Matthieu Riegler 7209424995 docs: fix detail about linkedSignal's previous value. (#63811)
fixes #63655

PR Close #63811
2025-09-15 15:46:23 +00:00
Damian Sire cf45e6191f docs: update Gemini model version in AI overview (#63800)
This change updates the Gemini model version from 2.0 Flash to 2.5 Flash on the AI overview page to align with the official Genkit documentation.

The source documentation at https://genkit.dev/docs/frameworks/angular/ has been updated, and this commit ensures our documentation reflects that change accurately.

PR Close #63800
2025-09-15 15:45:49 +00:00
hawkgs cfe0f03544 refactor(devtools): add a close button to the injector-provides pane (#63808)
Add a close button to the Injector Providers pane in the Injector Tree.

PR Close #63808
2025-09-15 15:40:00 +00:00
SkyZeroZx 3327de1b88 docs: add documentation for NG02802 warning about HttpTransferCache headers (#63802)
add documentation for NG02802 warning about HttpTransferCache headers

PR Close #63802
2025-09-15 15:38:24 +00:00
SkyZeroZx d2163f3701 test(platform-server): add test for transfer state data in nested defer blocks (#63801)
Add test for transfer state data in nested defer blocks

PR Close #63801
2025-09-15 15:34:59 +00:00
Damian Sire 002699bcef docs: clarify usage of docs-infra scope in commit messages (#63799)
The contribution guide is updated to provide clearer instructions on when to use the `docs-infra` scope versus the `docs` type.

This change helps contributors understand that `docs-infra` should only be used for infrastructure-related changes (application code, tooling, configuration) within the `/adev` directory. For simple content modifications, such as editing a `.md` file, `docs` without a scope is the correct choice.

PR Close #63799
2025-09-15 15:33:15 +00:00
Angular Robot fa69d33ba2 build: lock file maintenance (#63806)
See associated pull request for more information.

PR Close #63806
2025-09-15 15:29:52 +00:00
Angular Robot 8952674621 build: update dependency jsdom to v27 (#63780)
See associated pull request for more information.

PR Close #63780
2025-09-15 15:28:37 +00:00
Oleg Ivanitski 420703f8fb fix(docs-infra): fix guide content width (#63798)
This commit fixes the width of the content section, specifically the
reactive forms and template-driven forms section

Closes #63798

PR Close #63798
2025-09-15 15:25:40 +00:00
Shuaib Hasan Akib 53ef785067 docs(docs-infra): add missing type="button" for accessibility and to remove dev tools warning (#63784)
PR Close #63784
2025-09-15 15:25:08 +00:00
Angular Robot 71b3591e31 build: update cross-repo angular dependencies (#63785)
See associated pull request for more information.

PR Close #63785
2025-09-15 15:23:02 +00:00
Damian Sire 2b440f41fd docs: correct typos in AI design patterns guide (#63788)
PR Close #63788
2025-09-15 15:02:59 +00:00
Shuaib Hasan Akib 7e828e3d39 docs(docs-infra): code style improvement and component update (#63557)
- Improved code style consistency in docs-infra
- Updated app.component.ts for enhancements

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

PR Close #63557
2025-09-15 15:02:24 +00:00
Angular Robot 2327c3b31c build: update pnpm to v10.16.1 (#63793)
See associated pull request for more information.

PR Close #63793
2025-09-15 14:43:04 +00:00
Angular Robot f2bc4b5955 build: update all non-major dependencies (#63779)
See associated pull request for more information.

PR Close #63779
2025-09-15 14:39:22 +00:00
Joey Perrott 85994fb1fd build: update branches and versioning information (#63772)
Update the branches and versioning guide to include information about the `target: feature` and `target: automation` labels.

PR Close #63772
2025-09-12 21:45:49 +00:00
Jessica Janiuk 62ad4db465 refactor(core): Reorganize and cleanup animations code (#63775)
This is a pure re-organization of the animations code. No functionality changes, but it should be easier to navigate now. Utility classes have been moved to a `utils.ts` file. The related functions in the instructions have been grouped closer together.

PR Close #63775
2025-09-12 21:41:51 +00:00
Angular Robot bd2a84b885 build: update pnpm to v10.16.0 (#63769)
See associated pull request for more information.

PR Close #63769
2025-09-12 17:44:46 +00:00
Angular Robot 284fc7d753 build: update cross-repo angular dependencies (#63767)
See associated pull request for more information.

PR Close #63767
2025-09-12 17:21:24 +00:00
hawkgs f8cea65c88 refactor(devtools): property-tab folder structure (#63759)
Re-organize components and use separate BUILD files.

PR Close #63759
2025-09-12 16:49:25 +00:00
martincampagnoli 4c1da71d84 docs: update signal-queries.md (#63726)
PR Close #63726
2025-09-12 16:48:53 +00:00
Angular Robot 09730ba09f build: update cross-repo angular dependencies (#63764)
See associated pull request for more information.

PR Close #63764
2025-09-12 16:46:50 +00:00
Alan Agius 73bed56a9c ci: add automation label to update cdk apis and cli help workflow (#63753)
Adds the 'target: automation' label to the 'update-cdk-apis' and 'update-cli-help' jobs in the 'update-cdk-apis-and-cli-help.yml' workflow. This will help to better track and manage automation tasks.

PR Close #63753
2025-09-12 16:45:23 +00:00
Alan Agius 39edc9387f ci: use static target: automation label in renovate config (#63752)
The logic to update the renovate config during the release to switch the target labels from target: rc to target: patch has been removed. Instead, a static target: automation label is added to the default renovate preset.

PR Close #63752
2025-09-12 16:44:50 +00:00
Matthieu Riegler 5fd6022f7c docs(docs-infra): move the navigation related files (#63729)
* separate directory
* dedicated file for redirections

PR Close #63729
2025-09-12 16:05:03 +00:00
Shuaib Hasan Akib 26b55c18fd docs: update Creating service with CLI (#63714)
Update adev/src/content/guide/di/creating-injectable-service.md

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

PR Close #63714
2025-09-12 15:51:18 +00:00
Jessica Janiuk a4001c440f fix(core): Prevent leave animations on a move operation (#63745)
When a user has `animate.leave` on a list of items in a `@for`, but are only showing a subset using a computed, removing the second to last item results in a move operation on the last item. There's no native atomic move API in the browser. So this results in the element being detached and attached at its new index. The detaching of the node resulted in leave animations firing.
This fix addresses this by adding a flag in the `LView[ANIMATIONS]` `AnimationLViewData` interface to allow for skipping animations. During list reconciliation, we set this flag so that the animations are skipped over. The flag is flipped back after the move operation is complete.

There is one complication that results from this. The index adjustment of elements in the list happens synchronously while the leave animation is asynchronous. This results in the leaving item getting shifted to the end of the list. This is not ideal but likely can be addressed in a future refactor.

fixes: #63544

PR Close #63745
2025-09-12 15:21:24 +00:00
hawkgs 464bff95ef refactor(devtools): intergrate the TreeVisualizer into the TreeVisualizerHost component (#63530)
Use the `TreeVisualizer` internally in the host component instead of managing these separately in their client components.

PR Close #63530
2025-09-12 15:08:36 +00:00
Angular Robot 32751cce7d build: update cross-repo angular dependencies (#63750)
See associated pull request for more information.

PR Close #63750
2025-09-12 15:07:04 +00:00
Shuaib Hasan Akib f41313c3b5 docs(docs-infra): replace deprecated big tag (#63738)
Update adev/src/content/introduction/what-is-angular.md

Co-authored-by: Joey Perrott <josephperrott@gmail.com>

PR Close #63738
2025-09-12 15:04:57 +00:00
Jens Kuehlers a7b0620410 docs: fix links and remove second banner (#63755)
PR Close #63755
2025-09-12 09:51:16 +02:00
Ben Hong ff6f1527db docs: add di synonym (#63743)
PR Close #63743
2025-09-11 21:51:09 +00:00
Angular Robot 334f489775 build: update cross-repo angular dependencies to v21.0.0-next.3 (#63742)
See associated pull request for more information.

PR Close #63742
2025-09-11 21:18:30 +00:00
Joey Perrott 2d06f4ae83 build: automatically select a random available port when running adev locally (#63740)
Previously we relied on the default port of 4200, but if it was already in use then we would run into issues where the cli provided a prompt which we were unable to respond to. Instead we now request port 0 which will automatically find an available port.

PR Close #63740
2025-09-11 21:17:59 +00:00
SkyZeroZx cbcfe949aa docs: Adds guide for extending Angular service worker (#63629)
Documents how to create custom service worker scripts to handle push notifications, background sync, and other events by importing and extending Angular's default behavior

PR Close #63629
2025-09-11 17:40:47 +00:00
Andrew Scott bd54106708 refactor(router): update error checks extending error (#63487)
I forgot about the "setPrototypeOf" fix and had a recency bias for the
NotFoundError in the signal primitives.

PR Close #63487
2025-09-11 16:55:58 +00:00
hawkgs 4a16245af0 refactor(devtools): double the Angular app detection attempts (#63271)
Increases the total attempt time from 5s to 10s.

PR Close #63271
2025-09-11 16:55:28 +00:00
Jens Kuehlers a53a15c518 docs: add banner for Angular AI developer event (#63734)
PR Close #63734
2025-09-11 16:50:31 +00:00
Angular Robot 19c2f9c49b build: update cross-repo angular dependencies (#63721)
See associated pull request for more information.

PR Close #63721
2025-09-11 16:37:46 +00:00
Alan Agius 5a1c7ee7ea ci: fallback to last known branch when branch does not exist downstream (#63733)
When a new branch is created for a feature, it may not exist in the downstream repo. For example, during an exceptional minor release. In such scenarios, we fallback to the last known branch. This was previously handled in a catch block, but this change makes the fallback more explicit.

PR Close #63733
2025-09-11 16:31:57 +00:00
Rocky Meza 663f48cfc1 refactor(core): Split consumerBefore/AfterComputation (#62549)
This makes it possible to batch effects, where we can "reopen" consumers
during initial render and then finalize them after we are finally done
adding all the effects to a batch:

```
function createBatch() {
  const effect = // ... create effect node
  resetConsumerBeforeComputation(effect);
  return effect;
}

// pseudo-code
function appendEffect(effectBatch, updater) {
  if (value is a signal) {
    const prevConsumer = setActiveConsumer(effectBatch.node);
    const output = value();
    setActiveConsumer(prevConsumer);
    effectBatch.push({ signal, updater });
    return output;
  }
}

function finalizeBatch(effectBatch) {
  if (effectBatch.length > 0) {
    finalizeConsumerAfterComputation(effectBatch.node);
  }
}

const effectBatch = createBatchEffectNode();
appendEffect(signal1, (newValue) => /* something */);
appendEffect(signal2, (newValue) => /* something different */);
finalizeBatch(effectBatch);
```

PR Close #62549
2025-09-11 15:47:33 +00:00
Angular Robot a8fae2aae0 build: update all non-major dependencies (#63715)
See associated pull request for more information.

PR Close #63715
2025-09-11 15:41:55 +00:00
Angular Robot 902d352fca build: update github/codeql-action action to v3.30.3 (#63716)
See associated pull request for more information.

PR Close #63716
2025-09-11 15:41:24 +00:00
Matthieu Riegler 34ad7f7f5a ci: keep tailwind at v3 (#63720)
We'd like to keep tailwind at v3 for now

PR Close #63720
2025-09-11 15:39:58 +00:00
Alan Agius 37e1edaf7f build: mark pnpapi as external for esbuild (#63723)
In the `deploy-docs-site` GitHub action, esbuild fails to resolve `pnpapi` during the bundling process. This is because `pnpapi` is a dependency that is available in the Node.js environment at runtime and should not be bundled.

This commit marks `pnpapi` as an external dependency for esbuild to prevent it from being bundled and resolve the build failure.

```
✘ [ERROR] Could not resolve "pnpapi" [plugin bazel-sandbox]
```

See: https://github.com/angular/angular/pull/63722#issuecomment-3278922553

PR Close #63723
2025-09-11 15:36:34 +00:00
Alan Agius aa1bf88181 build: remove manual release note for Firefox addon (#63731)
The reviewer note for Firefox addons included a message that was intended for manual releases. This is no longer necessary with the automated release process.

PR Close #63731
2025-09-11 15:36:03 +00:00
Alan Agius eec0bdcbb6 build: create release branch from FETCH_HEAD (#63731)
When creating the release branch, it should be based on the latest upstream changes to avoid building a release on a stale commit.

PR Close #63731
2025-09-11 15:36:03 +00:00
Alan Agius cdf5d6763f release: bump Angular DevTools version to 1.2.0 (#63730)
PR Close #63730
2025-09-11 07:13:52 -07:00
Devin Chasanoff 97b0796229 docs: update mcp guide (#63664)
PR Close #63664
2025-09-10 23:07:50 +00:00
Cheng-Hsuan Tsai d9483fab50 docs(docs-infra): enable using Tailwind CSS in code examples (#63583)
PR Close #63583
2025-09-10 23:01:36 +00:00
Matthieu Riegler 7a4b225c57 refactor(common): improve typing of ngComponentOutletContent (#63674)
Dropping `any` in favor of `Node` for better type safety and clarity.

BREAKING CHANGE: `ngComponentOutletContent` is now of type `Node[][] | undefined` instead of `any[][] | undefined`.

fixes #63538

PR Close #63674
2025-09-10 22:26:27 +00:00
Jessica Janiuk 4924108630 refactor(core): dispatch enter and leave animations at the right times (#63450)
This updates the enter and leave logic to use the stored LView data to dispatch the enter and leave animations at the right points in the lifecycle. This should fix issues with signals not being available yet, parallel animations, and also eliminate the need for the element registry.

fixes: #63391
fixes: #63388
fixes: #63369

PR Close #63450
2025-09-10 22:24:00 +00:00
Jessica Janiuk bf499f2fca refactor(core): track enter and leave animations in LView (#63450)
This tracks the enter and leave functions in the LView to be executed at a safe time for change detection.

PR Close #63450
2025-09-10 22:24:00 +00:00
Matthieu Riegler 4d535cfaa4 refactor(core): Error logs links point to the archived version of the docs (#63512)
In order to point the right context, links in error messages will target the archived version of the online doc site (v*.angular.io).

See #44650

PR Close #63512
2025-09-10 22:21:10 +00:00
Alan Agius 64a7bdce73 ci: add fallback logic for downstream branch resolution in the CLI and CDK update action (#63678)
In some cases, such as when a new exceptional minor branch is created. The branch may not exist in the downstream repo. For example, during an exceptional minor release (e.g. FW 20.3.x and Components: 20.2.x).

This commit introduces a fallback mechanism to handle such scenarios. If the current branch is not found in the downstream repository, the script will now fall back to the last known branch from the build information. This ensures that the files can be updated properly.

PR Close #63678
2025-09-10 22:19:30 +00:00
Angular Robot 6e773374fb build: update cross-repo angular dependencies (#63708)
See associated pull request for more information.

PR Close #63708
2025-09-10 22:17:45 +00:00
Matthieu Riegler 5220cea223 build: add a noDuplicateEnumValue rule (#63483)
It caught several legitimate issues.
In the cases I wasn't sure, I just disabled the rule.

fixes #45843

PR Close #63483
2025-09-10 22:16:10 +00:00
Shuaib Hasan Akib ec141a322b docs(docs-infra): remove deprecated module and add test cases (#63497)
PR Close #63497
2025-09-10 22:15:38 +00:00
Matthieu Riegler d55abc222b docs: fix hostbinding. (#63509)
HostBindings only work on properties and getters. Not methods.

fixes #57909

PR Close #63509
2025-09-10 22:13:45 +00:00
Matthieu Riegler f2d136f86c docs(docs-infra): cleanup tsconfig (#63641)
PR Close #63641
2025-09-10 22:13:15 +00:00
Alan Agius 1590663e7d build: introduce and document pnpm run devtools:release command (#63599)
This commit introduces a new `pnpm run devtools:release` command to streamline the Angular DevTools release process.

The command automates the entire release workflow, including checking for new commits, updating version numbers, creating a release commit, and guiding the user through the publishing steps for both Chrome and Firefox extensions.

The `devtools/docs/release.md` documentation has been updated to reflect the use of this new command, providing a single entry point for the release process.

A new script `devtools/tools/release.mts` has been added to implement the release logic, and `package.json` has been updated to include the new script.

PR Close #63599
2025-09-10 22:11:44 +00:00
hawkgs ce4ab17858 fix(devtools): property-tab-header layout for elements (#63682)
Fix SCSS scoping issue that breaks the `property-tab-header` layout for elements.

PR Close #63682
2025-09-10 22:11:13 +00:00
hawkgs 94a0880128 fix(devtools): keep the selected node visible when the directive tree resizes (#63681)
Keep the selected node (component/element) visible when the directive tree component resizes (e.g. signal graph pane becomes visible).

Closes #63670

PR Close #63681
2025-09-10 22:07:07 +00:00
hawkgs d05680a260 feat(devtools): add a close button to the signal details panel (#63680)
Add a close button to the signal graph details panel.

Closes #63671

PR Close #63680
2025-09-10 22:06:36 +00:00
Alan Agius 39337cfe55 docs: update supported Angular versions to include 20.3.x (#63679)
The versions now include the exceptional minor release.

PR Close #63679
2025-09-10 21:59:52 +00:00
Ashna Wiar 1c35e71414 docs: typo in signals-interop (#63683)
- typo in reference to @angular/core/rxjs-interop
PR Close #63683
2025-09-10 21:59:21 +00:00
Andrew Scott fb3082fa06 build: fix symbol tests (#63709)
update golden files after cross repo dep updates

PR Close #63709
2025-09-10 13:30:00 -07:00
Alan Agius f642fcf145 build: update cross-repo angular dependencies (#63706)
See associated pull request for more information.

Closes #63685 as a pr takeover

PR Close #63706
2025-09-10 12:10:15 -07:00
Andrew Scott 17395e45f7 docs: release notes for the v18.2.14 release 2025-09-10 11:50:19 -07:00
Alan Agius fde699bbf4 docs: release notes for the v19.2.15 release (#63699)
PR Close #63699
2025-09-10 11:15:07 -07:00
Alan Agius 4c3cc02bad build: update @angular/ng-dev to latest SHA (#63700)
Attempt to fix LTS release.

PR Close #63700
2025-09-10 11:14:23 -07:00
Alan Agius 9487dc650c build: update @angular/ng-dev to latest SHA (#63696)
Attempt to fix LTS release.

PR Close #63696
2025-09-10 10:30:34 -07:00
Joey Perrott 48fee39af7 build: update @angular/ng-dev to latest SHA (#63695)
Attempt to fix LTS release.

PR Close #63695
2025-09-10 10:09:55 -07:00
Jessica Janiuk 3d6eeab2e0 fix(core): prevent animation events from being cleaned up on destroy (#63414)
This will allow manually subscribed animation events to still fire when using `animate.leave`. Otherwise they were being cleaned up before the animations happened.

fixes: #63391

PR Close #63414
2025-09-10 10:07:19 -07:00
Alan Agius 4f69e035b0 build: update @angular/ng-dev to latest SHA (#63693)
Attempt to fix LTS release.

PR Close #63693
2025-09-10 09:04:51 -07:00
Andrew Scott 687b30121f release: cut the v21.0.0-next.3 release 2025-09-10 08:12:26 -07:00
Andrew Scott 9586d480ea docs: release notes for the v20.3.0 release 2025-09-10 08:07:11 -07:00
Andrew Scott 01025752f6 docs: release notes for the v20.3.0-rc.0 release 2025-09-10 07:58:40 -07:00
Angular Robot 7569da13b7 build: update all non-major dependencies (#63661)
See associated pull request for more information.

Closes #63504 as a pr takeover

PR Close #63661
2025-09-10 07:11:54 -07:00
Angular Robot 0c64a06ea2 build: update cross-repo angular dependencies (#63570)
See associated pull request for more information.

PR Close #63570
2025-09-09 16:37:28 -07:00
Joey Perrott 97d3615b5e build: create a script and ci setup for managing and uploading known synonyms for algolia (#63663)
Create a system to allow for managing synonyms in algolia to allow for central management of them.

PR Close #63663
2025-09-09 15:45:47 -07:00
Andrew Scott c3576506b3 refactor(core): Update tests for zoneless by default (#63668)
This updates tests and examples only to prepare for zoneless by default.

These changes were identified and made as part of #63382. Anything that
failed gets `provideZoneChangeDetection` unless the fixes were easily
and quickly determined.

It also adds the zoneless provider to the `initTestEnvironment` calls
for tests in this repo to prevent regressions before #63382 is merged.

PR Close #63668
2025-09-09 14:41:56 -07:00
Kristiyan Kostadinov 0571b335b9 feat(compiler-cli): enable type checking of host bindings by default (#63654)
Type checking of host bindings was added in v20. We're now confident enough in it to enable it by default.

BREAKING CHANGE:
* Previously hidden type issues in host bindings may show up in your builds. Either resolve the type issues or set `"typeCheckHostBindings": false` in the `angularCompilerOptions` section of your tsconfig.

PR Close #63654
2025-09-09 14:34:29 -07:00
Miles Malerba 1e614ec68c docs: add missing component harness docs (#63620)
Add some documentation that's mentioned in the material.angular.dev version of the component hanress docs, but was missing from the adev version.

PR Close #63620
2025-09-09 14:29:27 -07:00
Ben Hong 9ffc83e163 docs: add signals tutorial (#62750)
PR Close #62750
2025-09-09 12:57:14 -07:00
Ben Hong 86a4e2a082 docs: add dedicated signals tutorial (#62750)
PR Close #62750
2025-09-09 12:57:14 -07:00
Christian Sarnataro c18c0ee317 docs: fixed typo in output page (#63646)
Change `initiaize` to `initialize`

PR Close #63646
2025-09-09 12:56:00 -07:00
Angular Robot 6d12f10a3f build: update github/codeql-action action to v3.30.2 (#63621)
See associated pull request for more information.

PR Close #63621
2025-09-09 12:44:01 -07:00
Alan Agius 63fd98db8d ci: update runs-on to ubuntu-latest (#63656)
This commit updates the `runs-on` configuration in the CI workflows
(`ci.yml`, `manual.yml`, `pr.yml`) from specific `ubuntu-latest-Xcore`
labels to the more general `ubuntu-latest`. This change reduces
resource consumption. This change should not be needed for RBE and remote cache.

PR Close #63656
2025-09-09 12:34:21 -07:00
Alan Agius bf0f257c58 ci: update renovate base branch to 20.3.x (#63666)
Updates the Renovate bot configuration to include the 20.3.x branch in `baseBranchPatterns`.

PR Close #63666
2025-09-09 12:13:24 -07:00
Miles Malerba dce31fbe8b docs: add missing drag & drop docs (#63619)
Add some documentation that's mentioned in the material.angular.dev
version of the drag & drop docs, but was missing from the adev version.

PR Close #63619
2025-09-09 12:09:52 -07:00
Alan Agius 28926ba92c feat(core): introduce BootstrapContext for improved server bootstrapping (#63562)
This commit introduces a number of changes to the server bootstrapping process to make it more robust and less error-prone, especially for concurrent requests.

Previously, the server rendering process relied on a module-level global platform injector. This could lead to issues in server-side rendering environments where multiple requests are processed concurrently, as they could inadvertently share or overwrite the global injector state.

The new approach introduces a `BootstrapContext` that is passed to the `bootstrapApplication` function. This context provides a platform reference that is scoped to the individual request, ensuring that each server-side render has an isolated platform injector. This prevents state leakage between concurrent requests and makes the overall process more reliable.

BREAKING CHANGE:
The server-side bootstrapping process has been changed to eliminate the reliance on a global platform injector.

Before:
```ts
const bootstrap = () => bootstrapApplication(AppComponent, config);
```

After:
```ts
const bootstrap = (context: BootstrapContext) =>
  bootstrapApplication(AppComponent, config, context);
```

A schematic is provided to automatically update `main.server.ts` files to pass the `BootstrapContext` to the `bootstrapApplication` call.

In addition, `getPlatform()` and `destroyPlatform()` will now return `null` and be a no-op respectively when running in a server environment.

PR Close #63562
2025-09-09 10:57:09 -07:00
Matthieu Riegler 3dc5056242 Revert "test(devtools): create e2e test cases for injector tree feature (#62844)" (#63653)
This reverts commit 785af438bc.

PR Close #63653
2025-09-09 08:38:58 +02:00
Shuaib Hasan Akib 17d54792b9 docs: Update Language Service IDE list (#63647)
PR Close #63647
2025-09-08 16:31:22 -07:00
Angular Robot 2fd0b57e7d build: lock file maintenance (#63634)
See associated pull request for more information.

PR Close #63634
2025-09-08 15:16:44 -07:00
Shuaib Hasan Akib efb94743af docs: should not conditionally include <ng-content> in IMPORTANT block (#63580)
PR Close #63580
2025-09-08 14:53:11 -07:00
Shuaib Hasan Akib be790e5f5c docs(docs-infra): prevent empty h3 tags when title is empty (#63573)
Conditionally render h3 element only when title attribute has content

PR Close #63573
2025-09-08 14:50:47 -07:00
Matthieu Riegler c8c4399791 docs: remove installation (#63508)
We don't have that section in other parts of the docs, package name is already mentionned.

fixes #62691

PR Close #63508
2025-09-08 14:22:51 -07:00
Miles Malerba 00a1806eaa refactor(forms): add validateStandardSchema to public api (#63616)
Add `validateStandardSchema` which was accidentally omitted from the
public api.

PR Close #63616
2025-09-08 13:58:55 -07:00
Miles Malerba 1233f7319d refactor(forms): move control directive under api (#63616)
Moves the control directive under api/ since it is part of the public
API. Also removes the interop abstract control from the public API

PR Close #63616
2025-09-08 13:58:55 -07:00
Miles Malerba 6d3f6542b4 refactor(forms): mark all signal forms apis as experimental (#63616)
Ensure that each public API symbol in @angular/forms/signals is marked
as `@experimental`

PR Close #63616
2025-09-08 13:58:55 -07:00
AleksanderBodurri 785af438bc test(devtools): create e2e test cases for injector tree feature (#62844)
Tests validate the current behaviour of the injector tree feature.

- Nodes should be displaying on entering the tab
- Hide framework / Hide injectors with no providers flags should filter the tree properly
- Providers side tab should be able to be opened and filtered properly using the 2 filter input fields for token and type

PR Close #62844
2025-09-08 13:57:14 -07:00
Matthieu Riegler 8e8a3fe8cf refactor(compiler-cli): add support for if/switch to the non-invoked signal diagnostic (#63502)
This commit adds the support to the existing "interpolated_signal_not_invoked" diagnostic (even though it's not really a interpolation)

PR Close #63502
2025-09-08 13:17:04 -07:00
Shuaib Hasan Akib 8ab078aa73 docs: update template examples to use signal-based viewChild instead of decorator-based @ViewChild (#63630)
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

PR Close #63630
2025-09-08 12:52:27 -07:00
Joey Perrott 1078954db1 build: properly override the repo for rules_angular (#63584)
Override the repo "rules_angular_configurable_deps" correctly so that the actual compiler and compiler-cli from the local repo is used

PR Close #63584
2025-09-08 12:34:52 -07:00
Shuaib Hasan Akib 08fb6864c9 docs: update package link (#63579)
PR Close #63579
2025-09-08 12:33:54 -07:00
Jessica Janiuk 7ab63d1f10 docs: add CSS transitions note on animate.enter (#63618)
PR Close #63618
2025-09-08 12:32:02 -07:00
aparziale 655a99d0c6 fix(migrations): fix bug in ngclass-to-class migration (#63617)
Fix bug in ngclass-to-class migration. The migrateSpaceSeparatedKey option was configured incorrectly and I added a test case

PR Close #63617
2025-09-08 12:30:00 -07:00
Angular Robot 06d99abd70 docs: update Angular CDK apis (#63645)
Updated Angular CDK api files.

PR Close #63645
2025-09-08 12:28:50 -07:00
Matthieu Riegler 1f21de8be4 docs: improve headings of docs (#63604)
This is an attemp to improve the indexation of those pages by making SSR and i18N important

PR Close #63604
2025-09-08 12:10:25 -07:00
Avcharov Hryhorii 160e065d35 feat(devtools): store last selected tab in settings (#63594)
Store last selected tab after application refresh

PR Close #63594
2025-09-08 11:18:14 -07:00
Joey Perrott c6711a1316 build: add additional comments explaining deep imports in adev (#63644)
Add additional comment to explain why deep imports are required for building adev using the angular cli

PR Close #63644
2025-09-08 11:15:06 -07:00
Shuaib Hasan Akib e7fbee0a13 docs(docs-infra): quote title attributes in links (#63578)
Prevent broken HTML when link titles contain spaces by properly quoting the title attribute

PR Close #63578
2025-09-08 10:14:47 -07:00
AleksanderBodurri 4f256d3b00 test(devtools): write some e2e tests for the transfer state tab (#62843)
Tests validate the current behaviour of the transfer state feature:

- Tab can be made visible by enabling in the settings menu
- Transfer state component displays keys total and size
- Validates the existence of the mock content present in https://github.com/angular/angular/tree/main/devtools/src/app/transfer-state.ts

PR Close #62843
2025-09-08 10:11:35 -07:00
Miles Malerba bacda4f41b refactor(forms): add support for binding number fields to date inputs (#63585)
In addition to `value` and `valueAsDate`, the date type fields work with
`valueAsNumber` as well, treating it as epoch miliseconds.

PR Close #63585
2025-09-05 14:00:34 -07:00
Miles Malerba 681b13c40f refactor(forms): add support for more input types (#63585)
Adds additional handling for input types that handle numbers:
- number
- range
- datetime-local

As well as input types that handle dates:
- date
- month
- week
- time
- *not* datetime-local which does not allow setting valueAsDate

This PR allows binding either a `Field<string>` or `Field<number>` to
the number type inputs and a `Field<string>`, `Field<numebr>`, or
`Field<Date | null>` to the date type inputs. Binding uses the
corresponding `.value`, `.valueAsNumber`, or `.valueAsDate` according to
the type of the `Field`.

When reading new values out of the input, the `Control` directive will
read the property that aligns with the type of the existing value in the
`Field` and write back the same type.

PR Close #63585
2025-09-05 14:00:34 -07:00
Kristiyan Kostadinov c0791e1887 fix(core): drop support for TypeScript 5.8 (#63589)
Updates the version range to drop support for TypeScript 5.8.

BREAKING CHANGE:
* TypeScript versions less than 5.9 are no longer supported.

PR Close #63589
2025-09-05 13:54:40 -07:00
Kristiyan Kostadinov ecef955185 docs: update examples to latest Angular and TypeScript (#63589)
Updates the adev examples to use TypeScript 5.9 and Angular 20.2.

PR Close #63589
2025-09-05 13:54:40 -07:00
Alan Agius af55552284 build: update @types/node to version ^20.18.8 (#63611)
Version 18 is quite old and no longer supported.

PR Close #63611
2025-09-05 13:48:16 -07:00
Matthieu Riegler 0809439278 docs(docs-infra): fix mini share icon URL. (#63586)
fixes #63569

PR Close #63586
2025-09-05 13:08:14 -07:00
Alan Agius f560536f08 test: increase mermaid spec timeout to reduce flakes (#63610)
The mermaid spec test can be flaky due to timeouts. This commit increases the timeout to 25 seconds to make the test more reliable.

PR Close #63610
2025-09-05 12:53:49 -07:00
Joey Perrott fe349827ef build: separate zone.js dependencies into their own directory (#63425)
Separate out zone.js dependencies

PR Close #63425
2025-09-05 12:52:55 -07:00
Cheng-Hsuan Tsai 38de2b3ad4 docs: Add Angular Aria document skeletons (#63605)
PR Close #63605
2025-09-05 12:52:13 -07:00
Cheng-Hsuan Tsai 8401f8940f docs(docs-infra): allow collapse code example (#63559)
PR Close #63559
2025-09-04 15:25:23 -07:00
Alan Agius 0b47781c31 build: remove patch for @angular/build (#63601)
This is no longer needed.

PR Close #63601
2025-09-04 15:24:38 -07:00
Shuaib Hasan Akib 3099f91440 docs: uses signal, implement TODOs, and fix typos (#63603)
PR Close #63603
2025-09-04 15:21:00 -07:00
Avcharov Hryhorii ef025880cc fix: remove refresh button from transfer state tab (#63592)
TransferState is only written into the DOM once during SSR and is not kept in sync with the runtime state on the client. Pressing the refresh button always re-reads the initial serialized script tag, which never changes after bootstrap.

PR Close #63592
2025-09-04 09:23:23 -07:00
Alan Agius 948b8113ed release: bump Angular DevTools version to 1.1.44 (#63596)
PR Close #63596
2025-09-04 13:47:49 +02:00
Miles Malerba 835aad7994 release: cut the v21.0.0-next.2 release 2025-09-03 12:45:26 -07:00
Miles Malerba c918f61afc docs: release notes for the v20.2.4 release 2025-09-03 12:38:10 -07:00
Joey Perrott 8738b81785 build: use common jasmine rule from dev-infra (#63568)
Use the new common jasmine rule from dev-infra which include sourcemap rewriting support and esm file loading

PR Close #63568
2025-09-03 16:34:08 +00:00
Joey Perrott 9e8e6e7e7d build: add zone.js/test/typings to bazelignore (#63568)
Add the zone.js/test/typings node_modules directory to the bazelignore list

PR Close #63568
2025-09-03 16:34:08 +00:00
Angular Robot 19c84ca111 build: update cross-repo angular dependencies (#63565)
See associated pull request for more information.

PR Close #63565
2025-09-03 16:33:05 +00:00
cexbrayat b717f6dce6 docs: typos in ngClass migration (#63564)
PR Close #63564
2025-09-03 16:31:31 +00:00
Shuaib Hasan Akib 2c6be8a141 docs: discourage use of ng as a component or directive selector prefix (#63567)
PR Close #63567
2025-09-03 09:31:15 -07:00
Alan Agius 49d5de4233 refactor(platform-server): simplify transfer state serialization tracking (#63525)
The logic to track if the transfer state has been serialized is simplified by removing the need for `APP_ID`. Instead of maintaining a `Set` of application IDs, a simple boolean flag is used.

PR Close #63525
2025-09-03 09:15:52 -07:00
Alan Agius ee73dc9553 fix(platform-server): prevent false warning for duplicate state serialization (#63525)
The `TRANSFER_STATE_SERIALIZED_FOR_APPID` provider was previously configured at the platform level, causing its state to be shared across all concurrent server-side rendering requests. This created a race condition where one request could see the `appId` from a different, concurrent request, leading to false warnings about duplicate state serialization.

This commit changes the provider's scope to ensure that each application instance gets its own unique state. This correctly isolates the serialization check to each individual request, resolving the issue of false warnings in concurrent environments.

Closes #63524

PR Close #63525
2025-09-03 09:15:52 -07:00
Shuaib Hasan Akib e6949ad355 docs: fix #63555 (#63560)
PR Close #63560
2025-09-03 09:01:37 -07:00
AleksanderBodurri d006721f30 feat(devtools): clean up router tree for stable release (#63081)
Addresses some cleanup items for the router tree:

- No longer loads router ng global APIs as a side effect of importing the router. Rather this is now a runtime step that occurs when provideRouter is called.
- No longer depends on router.navigateByUrl in Angular DevTools. There is now a dedicated global util for this
- Router instance logic no longer depends on token name
- Prevents navigating to lazy or redirect routes (these don't have an associated component)

PR Close #63081
2025-09-02 20:59:15 -07:00
Andrew Scott 475ed59ec6 refactor(core): export zoneless provider token privately (#63558)
This needs to be used internally for a short time when we require one of the providers

PR Close #63558
2025-09-02 20:52:38 -07:00
Angular Robot 6148a40a1b build: lock file maintenance (#63522)
See associated pull request for more information.

PR Close #63522
2025-09-02 12:44:13 -07:00
Angular Robot 4fb8c46bfd docs: update Angular CLI help (#63552)
Updated Angular CLI help contents.

PR Close #63552
2025-09-02 12:39:30 -07:00
Andrew Scott 4c36659ba9 refactor(router): Add handling for empty observables in guards (#63546)
This fixes a bug introduced in #63485 where `firstValueFrom` was used. This
doesn't work in all situations here because some observables don't
emit before completing. These errors should result in the route matching
logic moving on to the next route.

Note: This is marked as a refactor rather than fix because the commit above is not in
any release yet.

PR Close #63546
2025-09-02 11:50:49 -07:00
Alan Agius ce8db665f9 refactor(platform-browser): remove deprecated ApplicationConfig export (#63529)
Removes the deprecated `ApplicationConfig` export from `@angular/platform-browser`.
This export was deprecated in a prior version and developers should import `ApplicationConfig` from `@angular/core` instead.

BREAKING CHANGE:

The deprecated `ApplicationConfig` export from `@angular/platform-browser` has been removed.
Please import `ApplicationConfig` from `@angular/core` instead.

PR Close #63529
2025-09-02 11:48:19 -07:00
Andrew Scott 92e09adc0a fix(core): Remove ignoreChangesOutsideZone option (#62700)
This option was introduced out of caution as a way for developers to opt out of
the new behavior in v18 which scheduled change detection even when
events happened outside the NgZone. After monitoring the results post-release, we
have determined that this feature is working as desired and do not believe it
should ever be disabled by setting this option to `true`.

This option was deprecated in v18.2, less than 3 months after it was
introduced in v18. We do not really expect it to be used.

BREAKING CHANGE: `ignoreChangesOutsideZone` is no longer available as an
option for configuring ZoneJS change detection behavior.

PR Close #62700
2025-09-02 11:01:44 -07:00
aparziale 06f4fd4456 fix(core): Fixed inject migration schematics for migrate destructured properties (#62832)
Fixes #62626 - Properties used with the destructor are also managed during migration.

PR Close #62832
2025-09-02 10:59:46 -07:00
Angular Robot 1e6d311180 build: update cross-repo angular dependencies (#63548)
See associated pull request for more information.

PR Close #63548
2025-09-02 17:07:44 +00:00
Angular Robot c331d3df19 build: update github/codeql-action action to v3.30.0 (#63539)
See associated pull request for more information.

PR Close #63539
2025-09-02 17:06:12 +00:00
Matthieu Riegler 7aa9350dc7 build: use cldr typings (#63519)
This replaces an `any`.

PR Close #63519
2025-09-02 16:50:34 +00:00
Matthieu Riegler 31c689a5f4 docs(docs-infra): highlight & parse api descriptions. (#63536)
The prevent future regression of this, this commit introduces additional tests.

PR Close #63536
2025-09-02 16:49:10 +00:00
Shuaib Hasan Akib e63608d4d2 docs(docs-infra): signal property should be readonly (#63166)
PR Close #63166
2025-09-02 16:44:12 +00:00
hawkgs 01bbafd47e fix(devtools): runtime errors caused by tree node snapping and tab change (#63531)
Fix the runtime errors caused by the tree visualizer node auto-snapping when a tab is changed. The errors are caused since we only visually hide the tabs.

PR Close #63531
2025-09-02 16:43:32 +00:00
Shuaib hasan akib 66a2ae4cc0 docs: fix wrong file reference and update Tailwind CSS guide link (#63533)
PR Close #63533
2025-09-02 16:42:06 +00:00
SkyZeroZx 4640471d4d docs: Add docs responseType in HttpEvent (#63518)
Add docs responseType in HttpEvent

PR Close #63518
2025-09-02 16:41:33 +00:00
Angular Robot 61c155ee0a build: update pnpm to v10.15.1 (#63526)
See associated pull request for more information.

PR Close #63526
2025-09-02 16:39:46 +00:00
Shuaib hasan akib 668ced9154 docs(docs-infra): export class (#63506)
PR Close #63506
2025-09-02 16:36:47 +00:00
Shuaib Hasan Akib 15416067e2 docs(docs-infra): apply migration script changes (#63514)
PR Close #63514
2025-09-02 09:32:00 -07:00
Shuaib Hasan Akib db8b44cf8c docs(docs-infra): marks properties protected used in template (#63513)
PR Close #63513
2025-09-02 09:31:29 -07:00
Duncan Faulkner 96d5b8e199 docs: add full example for multiple content projections with card-title and card-body components (#63515)
PR Close #63515
2025-09-02 09:28:47 -07:00
Andrew Scott d399d7d02b fix(core): Explicit Zone CD in TestBed providers should not override TestBed error handler (#63404)
The internal error handler in TestBed rethrows errors to prevent them
from being silently ignored in tests. Prior to this commit, tests which
used `provideZoneChangeDetection` in the providers would override the
internal error handler of TestBed and prevent these errors from being
rethrown.

BREAKING CHANGE: (test only) - Using `provideZoneChangeDetection` in the
TestBed providers would previously prevent `TestBed` from rethrowing
errors as it should. Errors in the test will now be rethrown, regardless
of the usage of `provideZoneChangeDetection`. Tests should be adjusted to
prevent or account for these errors. As in previous major versions,
this behavior can be disabled with `rethrowApplicationErrors: false` in
`configureTestingModule` as a last resort.

PR Close #63404
2025-09-02 09:26:44 -07:00
Andrew Scott 541613e758 refactor(core): Update zone and zoneless error to be a warning instead (#63457)
This updates the error thrown when both `provideZoneChangeDetection` and
`provideZonelessChangeDetection` are both used in the application
providers to be a warning instead. The reasons for this are twofold:

1. The migration we need for using zoneless by default isn't perfect and
   may add `provideZoneChangeDetection` when the zoneless provider
   exists. This change will prevent that from causing an error
2. There might be valid situations where a "default" is used in a common
   provider but that can be overridden by individal applications. In
   tests, we do allow this type of thing, where `initTestEnvironment`
   may have a default but individual tests might want to use a different
   one. The same logic might apply to applications in some environments.

PR Close #63457
2025-09-02 09:25:23 -07:00
Andrew Scott 4df3b17b47 refactor(core): Add internal option to require at least one cd provider (#63486)
This option would require one of either the zone or zoneless provider so
applications don't accidentally enable zoneless when the default flips if we
missed it in the migration. It'll be a hard failure at bootstrap, but that's a
lot easier to notice than zoneless getting turned on accidentally since
many things might just work.

PR Close #63486
2025-09-02 09:24:33 -07:00
Miles Malerba 16fa983989 ci: add more team members as approvers (#63495)
adds amishne, leonsenft, mattrbeck to approve but not receive review
requests

PR Close #63495
2025-08-29 15:12:13 -07:00
Miles Malerba db95a5c763 refactor(forms): loosen the error and disabled type on FormUiControl (#63455)
This allows passing errors and disabled reasons that did not originate
from `@angular/forms/signals` in case the the control is being used
separately from the forms system

PR Close #63455
2025-08-29 14:44:13 -07:00
Miles Malerba 10ef96adb3 fix(forms): consistent treatment of empty (#63456)
Removes custom handling of emptiness in several of the validators and
replaces it with a common `isEmpty` check. The common empty check
considered the following values to be empty: `null`, `undefined`, `''`,
`false`, `NaN`

Generally most validators should treat an empty value as valid. This
aligns with both the behavior or native HTML validators and reactive
forms validators.

As an example, consider an optional email field. If the email validator
considered empty string to be an invalid email, there would be no way
for the user to not enter it.

There are several exceptions to this rule:
- `required` whose entire purpose is to ensure that the field is *not*
  empty
- `validateStandardSchema` which should subject all values including
  empty ones to the specified standard schema. It is up to the schema to
  decide whether an empty value is valid or not
- `validate`/`validateAsync` which leaves it up to the user's custom
  validation logic to decide if an empty value is valid.

PR Close #63456
2025-08-29 14:43:03 -07:00
Miles Malerba 862495c238 build: configure signal forms for release (#63458)
Configures signal forms to release as `@angular/forms/signals`

PR Close #63458
2025-08-29 14:31:35 -07:00
Shuaib Hasan Akib e75b04fb62 docs(docs-infra): properties should be readonly (#63492)
PR Close #63492
2025-08-29 14:06:33 -07:00
Sean Bright e48ba58b3c docs: fix up some clunky wording (#63491)
PR Close #63491
2025-08-29 14:06:01 -07:00
Andrew Scott bbb46e50d4 refactor(router): Add firstValueFrom helper (#63485)
This fixes a bug introduced in #62994 where `toPromise` was used. This
doesn't work in all situations here because some observables don't
complete. This only affected the redirect path, since the others are
already behind other rxjs code which takes the first value from the user
guards.

Note: This is marked as a refactor rather than fix because the commit above is not in
any release yet.

PR Close #63485
2025-08-29 19:02:04 +00:00
Jan Melcher d1edb714cd docs: fix rxResource example (#63484)
PR Close #63484
2025-08-29 19:00:16 +00:00
Andrew Scott 6e1599d4cc refactor(router): Add internal flag to control async vs rxjs recognize (#62994)
To aid in hitting external breaking change deadlines without pressure
of fixing everything in g3 first, add an internal opt out flag.

This also adds a privately exported provider to revert to the old
rxjs-based behavior, which can be synchronous, until any issues that
come up are addressed.

PR Close #62994
2025-08-29 08:55:13 -07:00
Andrew Scott 5b53535dd1 fix(router): Update recognize stage to use internally async/await (#62994)
This is effectively a revert of https://github.com/angular/angular/commit/72e6a948bb8ec58f14b87d297d5f81baf2e1942d.
Debugging the recognize stage is considerably easier with async/await
stacks compared to rxjs. This also improves maintainability and is a
better 1:1 with server-side logic that has been implemented to match
and can be more easily kept in sync.

This also ensures that the recognize step is always async, whereas it
can sometimes be synchronous with rxjs.

BREAKING CHANGE: Router navigations may take several additional
microtasks to complete. Tests have been found to often be highly
dependent on the exact timing of navigation completions with respect to
the microtask queue. The most common fix for tests is to ensure all
navigations have been completed before making assertions. On rare
occasions, this can also affect production applications. This can be
caused by multiple subscriptions to router state throughout the application,
both of which trigger navigations that happened to not conflict with the
previous timing.

PR Close #62994
2025-08-29 08:55:13 -07:00
Angular Robot 78b2279609 build: update cross-repo angular dependencies (#63477)
See associated pull request for more information.

PR Close #63477
2025-08-29 08:53:15 -07:00
Matthieu Riegler 021ead5399 refactor(animations): remove dependency on @angular/common (#63248)
`DOCUMENT` was move to `@angular/core`, so we don't need to depend on common anymore.

PR Close #63248
2025-08-29 08:51:31 -07:00
Angular Robot dcd81d94d2 build: update cross-repo angular dependencies to 06d3af5 (#63475)
See associated pull request for more information.

PR Close #63475
2025-08-29 13:45:29 +00:00
Angular Robot 3fb02ed1e0 build: update google-github-actions/auth action to v3 (#63461)
See associated pull request for more information.

PR Close #63461
2025-08-29 13:19:48 +00:00
Shuaib hasan akib a3938d550e docs(docs-infra): makes signal readonly (#63449)
PR Close #63449
2025-08-29 13:01:53 +00:00
Maryannah 1199756c9f docs: update documentation for Vitest use (#62798)
PR Close #62798
2025-08-29 13:00:53 +00:00
Emiliano González c6cd636e70 docs: Correct description of lesson outcome (#62710)
PR Close #62710
2025-08-29 13:00:21 +00:00
Angular Robot fd2a72ec4f build: update cross-repo angular dependencies (#63467)
See associated pull request for more information.

PR Close #63467
2025-08-29 12:58:34 +00:00
Angular Robot b48be649b7 build: update dependency node to v22.19.0 (#63460)
See associated pull request for more information.

PR Close #63460
2025-08-29 12:57:04 +00:00
Angular Robot 94f42abc6d build: update google-github-actions/auth digest to c200f36 (#63459)
See associated pull request for more information.

PR Close #63459
2025-08-29 12:55:18 +00:00
Jessica Janiuk 1875d5c5a3 docs: release notes for the v20.2.3 release 2025-08-29 14:35:09 +02:00
Jessica Janiuk 0a82138d4b fix(compiler): fixes regression with event parsing and animate prefix (#63470)
The new animations was not correctly looking for the `.` when parsing bindings. This resulted in arbitrary event bindings creating animate.leave instruction calls.

fixes: #63466

PR Close #63470
2025-08-29 11:53:30 +00:00
Angular Robot 1a26fd3c92 build: update all non-major dependencies (#63412)
See associated pull request for more information.

PR Close #63412
2025-08-28 18:54:12 +00:00
Andrew Scott c795960ada feat(common): Add experimental support for the Navigation API (#63406)
The navigation API is part of interop 2025. You can find the
implementation status for each major browser here:

https://wpt.fyi/results/navigation-api?label=master&label=experimental&aligned&view=interop&q=label%3Ainterop-2025-navigation

https://developer.mozilla.org/en-US/docs/Web/API/Navigation_API

BREAKING CHANGE: (test only) - `TestBed` now provides a fake `PlatformLocation`
implementation that supports the Navigation API. This may break some
tests, though we have not observed any failures internally. You can revert to the
old default for `TestBed` by providing the `MockPlatformLocation` from
`@angular/common/testing` in your providers:
`{provide: PlatformLocation, useClass: MockPlatformLocation}`

PR Close #63406
2025-08-28 11:48:03 -07:00
Doug Parker 147c7430f2 release: bump Angular DevTools to 1.0.44 (#63452)
PR Close #63452
2025-08-28 10:36:59 -07:00
Angular Robot c9b215bb5c build: update cross-repo angular dependencies (#63443)
See associated pull request for more information.

PR Close #63443
2025-08-28 09:54:27 -07:00
Matthieu Riegler 2f5f975cb5 refactor(forms): fix dependencies (#63451)
common/http was missing

PR Close #63451
2025-08-28 09:43:39 -07:00
Hongxu Xu 1f4c5f72aa refactor(bazel): reduce build deps (#63348)
clean up deps in bazel build scripts

PR Close #63348
2025-08-28 09:16:10 -07:00
Angular Robot cac08526a9 docs: update Angular CLI help (#63445)
Updated Angular CLI help contents.

PR Close #63445
2025-08-28 09:12:24 -07:00
Miles Malerba b8314bd340 feat(forms): add experimental signal-based forms (#63408)
This commit introduces an experimental version of a new signal-based forms API for Angular. This new API aims to explore how signals can be leveraged to create a more declarative, intuitive, and reactive way of handling forms.

The primary goals of this new signal-based approach are:

*   **Signal-centric Design:** Place signals at the core of the forms experience, enabling a truly reactive programming model for form state and logic.
*   **Declarative Logic:** Allow developers to define form behavior, such as validation and conditional fields, declaratively using TypeScript. This moves logic out of the template and into a typed, testable schema.
*   **Developer-Owned Data Model:** The library does not maintain a copy of data in a form model, but instead read and write it via a developer-provided `WritableSignal`, eliminating the need for applications to synchronize their data with the form system.
*   **Interoperability:** A key design goal is seamless interoperability with existing reactive forms, allowing for incremental adoption.
*   **Bridging Template and Reactive Forms:** This exploration hopes to close the gap between template and reactive forms, offering a unified and more powerful approach that combines the best aspects of both.

This initial version of the experimental API includes the core building blocks, such as the `form()` function, `Field` and `FieldState` objects, and a `[control]` directive for binding to UI elements. It also introduces a schema-based system for defining validation, conditional logic, and other form behaviors.

Note: This is an early, experimental API. It is not yet complete and is subject to change based on feedback and further exploration.

Co-authored-by: Kirill Cherkashin <kirts@google.com>
Co-authored-by: Alex Rickabaugh <alxhub@users.noreply.github.com>
Co-authored-by: Leon Senft <leonsenft@users.noreply.github.com>
Co-authored-by: Dylan Hunn <dylhunn@gmail.com>
Co-authored-by: Michael Small <michael-small@users.noreply.github.com>

PR Close #63408
2025-08-28 09:02:43 -07:00
Alan Agius a1d1cdf1e3 build: remove rulesJsInteropMode (#63448)
This is no longer needed.

PR Close #63448
2025-08-28 08:49:24 -07:00
Matthieu Riegler a92c0ea4c0 docs(docs-infra): remove unused example (#63426)
PR Close #63426
2025-08-28 08:47:54 -07:00
Milo 09cb177e5b build: simplify pnpm scripts in package.json (#63310)
remove unnecessary pnpm prefix for bin scripts from node_modules

PR Close #63310
2025-08-28 08:46:23 -07:00
Vincent 9ae9875384 fix(core): Prevent an error on cleanup when an rxResource stream threw before returning an Observable (#63342)
Before this commit, it was wrongly assumed that the stream subscription could not be `undefined`.

Fixes #63341

PR Close #63342
2025-08-28 08:44:51 -07:00
arturovt ec65663d5e refactor(core): replace Optional/SkipSelf deps with inject() flags (#63386)
This commit updates provider definitions that relied on the `deps` array
with `new Optional()` and `new SkipSelf()` to instead use the modern
`inject(..., { optional: true, skipSelf: true })` API.

Previously:
  deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]

Now:
  const parent = inject(KeyValueDiffers, { optional: true, skipSelf: true });

**Bundle size reduction**: `Optional` and `SkipSelf` are runtime values
created by `makeParamDecorator()`. Even in production builds, esbuild
and other bundlers must keep their factory code because they are
referenced with `new Optional()` / `new SkipSelf()`. With `inject()`,
those classes are no longer referenced, allowing them and the
`makeParamDecorator` scaffolding to be tree-shaken when unused.

As a result, production bundles can drop both `Optional`, `SkipSelf`, and
their supporting factory code when not used elsewhere, reducing code size
while keeping the same behavior.

PR Close #63386
2025-08-28 08:43:17 -07:00
SkyZeroZx 07e678872f feat(http): Add reponseType property to HttpResponse and HttpErrorResponse (#63043)
Add support for the Fetch API's responseType property in HttpResponse and HttpErrorResponse when using HttpClient with the withFetch provider.

PR Close #63043
2025-08-28 08:34:56 -07:00
Jessica Janiuk ed3d1f246b fix(core): Fix cancellation of animation enter classes (#63442)
When toggling visibility on an element over and over, the enter animations were supposed to be cancelled and then the classes removed. There was a race condition happening that resulted in the cancelled animation being the leave animation. Rather than using the animation.cancel functionality, it's safer to just remove the enter classes.

fixes: #63439

PR Close #63442
2025-08-28 14:11:05 +00:00
Alan Agius 99cf0281c6 ci: remove old options from workflows (#63441)
The `cache-node-modules` option has been removed as pnpm store cache is enabled by default.

PR Close #63441
2025-08-28 14:05:45 +00:00
Alan Agius 1730ea13ac ci: fix and improve devtools step (#63441)
This commit updates the devtools step by disabling the package manager cache. This change is necessary because Cypress downloads its binary to a cache directory during installation, which requires a post-install script. However, when the cache is hit this is skipped.

This update also disables `pnpm install` in the Cypress action to avoid a redundant installation step. And adds a seperate cache for the downloaded Cypress binary.

See: https://docs.cypress.io/app/get-started/install-cypress#pnpm-configuration

PR Close #63441
2025-08-28 14:05:44 +00:00
Alan Agius 6235d3433c ci: only run postUpdateTasks when needed (#63440)
This commit changes the `postUpdateTasks` logic to be executed only for the needed managers.

PR Close #63440
2025-08-28 14:05:14 +00:00
SkyZeroZx 8f8d113881 docs: Add docs service worker to new options (#63436)
Add docs service worker to new options

PR Close #63436
2025-08-28 10:20:52 +00:00
Joey Perrott 7ccf368236 build: define typescript version via string in module.bazel file (#63431)
Within our module.bazel file when describing the version of typescript to use for rules_ts, we use ts_version instead of ts_version_from to prevent our package.json file from being
part of the set of files used to calculate the sha for the lock file.  Any unrelated change to the version of the typescript file would end up causing our lockfile to be out of date.
This amount of churn has proven to be too much for our current setup. We instead now test to validate the versions defined in the package.json and MODULE.bazel files match.

PR Close #63431
2025-08-28 09:50:55 +00:00
Matthieu Riegler b2ed21b642 build: remove unused deps (#63417)
They aren't used anymore

PR Close #63417
2025-08-27 16:58:49 -07:00
Shuaib Hasan Akib d635e6c07e docs(docs-infra): tooltip on hover and message after copied (#63167)
PR Close #63167
2025-08-27 16:56:44 -07:00
Angular Robot 0d57dfbcf0 docs: update Angular CLI help (#63419)
Updated Angular CLI help contents.

PR Close #63419
2025-08-27 16:33:42 -07:00
Ben Hong 059e0d3dfd docs: add customizing route behavior guide for router (#63398)
PR Close #63398
2025-08-27 16:18:39 -07:00
Shuaib Hasan Akib 4c82b84c5b docs(docs-infra): mark properties as readonly if they shouldn't change (#63200)
PR Close #63200
2025-08-27 16:16:25 -07:00
Angular Robot 58cb2bec32 build: update cross-repo angular dependencies (#63395)
See associated pull request for more information.

PR Close #63395
2025-08-27 16:13:08 -07:00
Matthieu Riegler 1bb30c7e49 docs(docs-infra): remove dependency on html-entities (#63416)
HTML entities are now supported, we don't need to convert them.

PR Close #63416
2025-08-27 11:40:50 -07:00
arturovt eee3e5a4df refactor(core): mark VERSION as @__PURE__ for better tree-shaking (#63400)
Annotate the `new Version(...)` call with `/* @__PURE__ */` to signal to
optimizers that the constructor is side-effect free.

Without this hint, bundlers such as Terser or ESBuild may conservatively
retain the `VERSION` instantiation even when unused. With the annotation,
the constant can be tree-shaken away in production builds if not referenced,
reducing bundle size.

PR Close #63400
2025-08-27 11:39:06 -07:00
arturovt 538de86a72 fix(core): avoid injecting internal error handler from a destroyed injector (#62275)
This commit prevents lazy injection of the internal `ErrorHandler` from a destroyed injector, which would otherwise result in a secondary "destroyed injector" error.

The `handleUncaughtError` function is used in a wrapped event listener that invokes the `ErrorHandler` if the listener throws. A simple case in a micro-frontend application:

```ts
onNavigationToAnotherApp() {
  this.appRef.destroy();
  do_some_stuff_ie_loggin_that_may_throw();
}
```

If the function throws an error, Angular attempts to inject the `ErrorHandler` from a destroyed injector.

PR Close #62275
2025-08-27 11:35:54 -07:00
Alexander Melde 3a3bd364d1 docs: update to new standalone default behavior (#63329)
When declaring directives, the standalone flag is set to true by default in current Angular versions.

The docs for the directive decorator should correctly explain the default behavior, while still mentioning when to set it to false.

PR Close #63329
2025-08-27 11:26:13 -07:00
Matthieu Riegler 6489af7678 refactor(http): rework the HttpEvent union to improve narrowing. (#63267)
Prior to this change, `HttpProgressEvent` could not be narrowed to `HttpDownloadProgressEvent` or `HttpUploadProgressEvent`

PR Close #63267
2025-08-27 11:25:02 -07:00
Joey Perrott f0ee681ad7 build: move macros/build set up for zone.js into zone.js directories (#63421)
Move the zone_bundle and configurations into zone.js's tool directory

PR Close #63421
2025-08-27 11:23:57 -07:00
Joey Perrott 17c232afd5 build: remove unused macros (#63421)
Remove unused macro files

PR Close #63421
2025-08-27 11:23:57 -07:00
Joey Perrott 6e4d71e022 build: remove ts_project_interop file (#63421)
Remove the ts_project_interop.bzl file that no longer does interop work

PR Close #63421
2025-08-27 11:23:57 -07:00
Joey Perrott b4ae94d5ef refactor: remove TODOs which have been corrected (#63421)
Remove TODOs which were addressed but the comment was not removed

PR Close #63421
2025-08-27 11:23:57 -07:00
Matthieu Riegler 0133964ff4 docs: remove IsolatedShadowDOM for the v10=>v11 suggestions (#63415)
PR Close #63415
2025-08-27 11:18:24 -07:00
Jessica Janiuk fa0f11f6e8 refactor(core): prevent timeout from applying to non-event animation bindings (#63393)
The 4 second removal timeout was applying in all cases, but it should only actually apply to the situation where the event binding syntax is used for animate.leave. This ensures that's the only case in which it'll apply.

PR Close #63393
2025-08-27 11:17:40 -07:00
Andrew Scott 8e4b7e47f4 refactor(core): Reorder resolve/reject in relation to navigate[error/success] (#63377)
Order was changed in https://github.com/whatwg/html/pull/11512 (see that
PR for details as to why).

https://whatpr.org/html/10919/nav-history-apis.html#abort-a-navigateevent

PR Close #63377
2025-08-27 11:16:53 -07:00
Andrew Scott f86846555b fix(upgrade): Remove deprecated UpgradeAdapter (#61659)
Deprecated since v5. Use `upgrade/static` instead, which also supports aot.

BREAKING CHANGE: `UpgradeAdapter` is no longer available. Use
`upgrade/static` instead

PR Close #61659
2025-08-27 11:11:29 -07:00
Andrew Kushnir 478eebe607 release: cut the v21.0.0-next.1 release 2025-08-27 11:00:14 -07:00
Andrew Kushnir 01f44ee37c docs: release notes for the v20.2.2 release 2025-08-27 10:54:53 -07:00
Matthieu Riegler f4f5a8ab81 ci: pin create-pull-request version to sha (#63409)
This is a new security requirement to prevent dependency compromission.

PR Close #63409
2025-08-27 07:36:12 -07:00
Taygan Caldwell a43057c059 refactor(core): Create a base effect interface and prototype to be used by both angular and wiz. (#62931)
Add a common effect interface and prototype to be used to create the wiz and angular effects.

PR Close #62931
2025-08-26 14:48:32 -07:00
Joey Perrott dfa2044af9 build: fix strict deps failure (#63403)
Fix the remaining strict deps failure

PR Close #63403
2025-08-26 11:46:43 -07:00
Jessica Janiuk a0388409e3 fix(compiler): fixes animations on elements with structural directives (#63390)
The animate instructions were getting applied to the container comment nodes as well as the element nodes. This prevents that on the compiler level.

fixes: #63371

PR Close #63390
2025-08-26 09:47:07 -07:00
Joey Perrott c15b8ed631 build: enable strict deps enforcement for ts_project (#63375)
Enable strict_deps testings for all ts_project and ng_project targets in the repo

PR Close #63375
2025-08-26 09:46:30 -07:00
Avcharov Hryhorii aff8bb222c refactor(devtools): provide signalGraphEnabled via settings service (#63374)
signalGraphEnabled was previously passed down the component tree.
This change refactors the logic to use the settings service instead,
which already holds the value and allows sharing it across components.

PR Close #63374
2025-08-26 09:42:12 -07:00
Avcharov Hryhorii 1cb113cdec fix(devtools): prevent profiler bars flickering after change detection (#63350)
Without trackBy cdkVirtualFor rerenders full list after in each update

PR Close #63350
2025-08-26 09:41:08 -07:00
Angular Robot 67d4449db4 build: update cross-repo angular dependencies (#63379)
See associated pull request for more information.

PR Close #63379
2025-08-25 16:29:23 -07:00
Joey Perrott 2fcafb65c5 build: rename defaults2.bzl to defaults.bzl (#63383)
Use defaults.bzl for the common macros

PR Close #63383
2025-08-25 15:45:01 -07:00
Angular Robot 1febf523e3 build: update dependency @bazel/ibazel to v0.26.10 (#63373)
See associated pull request for more information.

PR Close #63373
2025-08-25 15:39:30 -07:00
Angular Robot fca6122d09 build: lock file maintenance (#63359)
See associated pull request for more information.

PR Close #63359
2025-08-25 15:35:54 -07:00
Matthieu Riegler 47dc4ffd1a docs(docs-infra): share markdown rendering and highlighting code between api-gen and guides (#63357)
This reduces code duplication and improves the maintability.

PR Close #63357
2025-08-25 15:33:55 -07:00
Angular Robot 5a111064b8 build: update cross-repo angular dependencies (#63338)
See associated pull request for more information.

PR Close #63338
2025-08-25 10:49:29 -07:00
arturovt 1ebba5442f refactor(common): drop X-Request-URL (#61943)
This commit drops the `X-Request-URL` header. It was a non-standard HTTP response header, deprecated long ago and never part of any official specification. Modern browsers now expose the final URL via the `XMLHttpRequest.responseURL` property, as defined in the WHATWG spec.

PR Close #61943
2025-08-25 08:45:19 -07:00
Angular Robot d025a07329 build: update all non-major dependencies (#63344)
See associated pull request for more information.

PR Close #63344
2025-08-25 08:37:54 -07:00
Angular Robot c716ccffec build: update bazel dependencies (#63343)
See associated pull request for more information.

PR Close #63343
2025-08-25 08:36:09 -07:00
Jessica Janiuk 9139fe0d95 fix(core): Fixes animate.leave binding to a string with spaces (#63366)
This fixes the rare case that someone uses binding syntax with `animate.leave` providing a value with a string that has spaces in it. For example:

```
<example `[animate.leave]="'class-a class-b"` />
```

fixes: #63365

PR Close #63366
2025-08-25 08:33:30 -07:00
AleksanderBodurri 4dec06d724 fix(devtools): correct path to load fonts for devtools devserver (#63358)
This broke in c35c0c7f2f. This commit changes the path to load the external stylesheet to reflect the new directory path.

PR Close #63358
2025-08-25 08:31:56 -07:00
Jessica Janiuk 5af3222e35 docs: update paths and references to animations guides (#63368)
This updates the adev navigation to consider the new enter-and-leave path to be the definitive animations guide.
It also prefixes all the prior animations package docs with legacy and updates all links.

PR Close #63368
2025-08-25 08:21:57 -07:00
Jessica Janiuk 1e3196b0c9 docs: add important service worker note (#63364)
This adds an important note about the service worker to indicate we are not accepting new features.

PR Close #63364
2025-08-25 08:18:31 -07:00
Jessica Janiuk 3b674e8cb3 docs: update animations guide important note (#63363)
PR Close #63363
2025-08-25 08:17:43 -07:00
Matthieu Riegler 0cd75257de refactor(docs-infra): ensure we're not creating nested anchor elements. (#63352)
With #63162, we added automatic link creation on API symbols. The side effect was that we created HTML in some specific cases. For example with the docs-card we could have nested anchor elements which is invalid.

This commit prevent creating nested links inside docs-cards.
fixes #63351

PR Close #63352
2025-08-25 08:16:20 -07:00
Matthieu Riegler 05df189731 refactor(docs-infra): rename testing into test. (#63352)
We usually name `test` our test directories and `testing` for the testing helpers.

PR Close #63352
2025-08-25 08:16:20 -07:00
Joey Perrott 3df1dccebe refactor: various build and import specificer fixes for strict deps (#63323)
Change direct deps in bazel targets and import specifiers within files to maintain strict deps requirements ahead of enabling strict deps tests in the repo

PR Close #63323
2025-08-22 14:45:00 -07:00
Shuaib Hasan Akib a9d4ccfff3 docs(docs-infra): Replace page enums by constants (#63335)
PR Close #63335
2025-08-22 14:42:52 -07:00
Matthieu Riegler 983cc2f6fd ci: add myself to review fw-general (#63337)
Also adding myself to be assigned some adev PRs

PR Close #63337
2025-08-22 12:27:36 -07:00
Shuaib Hasan Akib a84227263d docs(docs-infra): fix spelling (#63334)
PR Close #63334
2025-08-22 12:01:49 -07:00
Angular Robot 56a8408de4 build: update github/codeql-action action to v3.29.11 (#63325)
See associated pull request for more information.

PR Close #63325
2025-08-22 11:27:52 -07:00
Angular Robot c6c08f6365 build: update cross-repo angular dependencies (#63315)
See associated pull request for more information.

PR Close #63315
2025-08-22 11:25:30 -07:00
Jessica Janiuk 37ead5ffb5 fix(core): Ensures @for loop animations never get cancelled (#63328)
There's special logic in place to prevent duplicate nodes from showing up in the case when an `@if` toggles a view quickly. This had the unfortunate side effect of causing `@for` leave animations to get cancelled when an add and remove happened simultaneously, even if it was a different index. This fix prevents that from happening in the `@for` loop case.

fixes: #63307

PR Close #63328
2025-08-22 11:23:15 -07:00
Jessica Janiuk 18c9352d21 fix(core): fix memory leak with leaving nodes tracking (#63328)
This ensures the nodes are properly cleaned up from the leaving nodes map.

PR Close #63328
2025-08-22 11:23:15 -07:00
Matthieu Riegler d16a992b12 refactor(core): remove the deprecated ImportedNgModuleProviders type. (#63277)
Use the `EnvironmentProviders` type instead

PR Close #63277
2025-08-22 11:22:22 -07:00
Angular Robot 6f541b81d2 build: update dependency rollup to v4.47.1 (#63304)
See associated pull request for more information.

PR Close #63304
2025-08-21 14:13:28 -07:00
Angular Robot 36a36ea034 docs: update Angular CLI help (#63296)
Updated Angular CLI help contents.

PR Close #63296
2025-08-21 14:11:36 -07:00
Angular Robot 69df2c0f8a build: update dependency cypress to v15 (#63303)
See associated pull request for more information.

PR Close #63303
2025-08-21 11:43:24 -07:00
aparziale 7a336c159d refactor(migrations): centralize parseTemplate method (#62983)
refactor - Moved parseTemplate logic to a shared utility function to improve code reuse and maintainability

PR Close #62983
2025-08-21 11:41:32 -07:00
aparziale 6ddb250391 feat(migrations): add migration to convert ngClass to use class (#62983)
feat #61661 - add migration to convert ngClass to use class

PR Close #62983
2025-08-21 11:41:32 -07:00
Matthieu Riegler 7d6ae95807 docs(docs-infra): fix mermaid rendering (#63311)
A recent update of mermaid change the html output. `rect` became `path`.

fixes #63308

PR Close #63311
2025-08-21 10:06:32 -07:00
Matthieu Riegler da06239a41 docs(docs-infra): Add exemption list for linking symbols. (#63309)
PR Close #63309
2025-08-21 10:05:55 -07:00
Matthieu Riegler 0dd95c503f feat(forms): Add FormArrayDirective (#55880)
The `FormArrayDirective` will allow to have a `FormArray` as a top-level form object.

* `NgControlStatusGroup` directive will be applied to the `FormArrayDirective`
* `NgForm` will still create a `FormGroup`

Fixes angular#30264

BREAKING CHANGE: This new directive will conflict with existing FormArray directives or formArray inputs on the same element.

PR Close #55880
2025-08-21 09:38:37 -07:00
Matthieu Riegler 318718ce64 refactor(forms): extract shared logic from FormGroupDirective (#55880)
Ahead of the implementation of `FormArrayDirective`, extract the shared logic into an abstract class.

PR Close #55880
2025-08-21 09:38:37 -07:00
Kristiyan Kostadinov 1b0c84a5ec docs: release notes for the v20.2.1 release 2025-08-21 12:54:22 +02:00
Matthieu Riegler 827c3c15f4 fix(compiler): Keep paraenthesis in Nullish + Boolean expression. (#63292)
Ts 5.9 introduced a regression coming from 5.8 when parenthesis aren't generated for expressions like (`(a ?? b) && c`).
This fix works around this explicitly specifying that we want to keep those parenthesis that we're aware of in this specific case;

This change can be reverted if the root issue (https://github.com/microsoft/TypeScript/issues/61369) is fixed. (but let's keep the tests in any case for the coverage)

fixes #63287

PR Close #63292
2025-08-21 12:15:52 +02:00
Jan Martin 62c00ab254 release: bump Angular DevTools version to 1.0.43 (#63299)
PR Close #63299
2025-08-20 13:39:25 -07:00
Matthieu Riegler edbbbb1e44 refactor(core): remove NgProbeToken class (#63279)
This class served no purpose and was deprecated in by #51396

G3 also has no usage anymore.

PR Close #63279
2025-08-20 16:21:38 +00:00
Angular Robot 6d88ce1525 build: update @angular/ng-dev digest to c93dfc8 (#63289)
See associated pull request for more information.

PR Close #63289
2025-08-20 16:17:10 +00:00
Joey Perrott 009b068988 build: reenable firefox tests for devtools (#63288)
Reenable firefox tests for devtools as the spaces issues with path names is addressed post v7 of bazel

PR Close #63288
2025-08-20 16:08:21 +00:00
Alan Agius 1c5fb1e5c1 build: enforce frozen lockfile mode (#63260)
This commit adds `lockfile_mode=error` to the `.bazelrc` file. This change ensures that any future builds will fail if the lock file is not up-to-date with the `BUILD.bazel` file, preventing inconsistencies and encouraging developers to commit updated lock files.

PR Close #63260
2025-08-20 16:00:05 +00:00
Angular Robot 790143eb9b build: update cross-repo angular dependencies (#63284)
See associated pull request for more information.

PR Close #63284
2025-08-20 15:58:42 +00:00
Matthieu Riegler d8bdf56145 refactor(core): remove deprecated PACKAGE_ROOT_URL token (#63274)
The symbol was deprecated by #51222 and already has no usages in g3.

PR Close #63274
2025-08-20 15:45:12 +00:00
Matthieu Riegler 239fe6f83e refactor(core): remove public symbol for defineInjectable (#63270)
This public symbol was deprecated in v8.
The private symbol `ɵɵdefineInjectable` remains available.

PR Close #63270
2025-08-20 15:44:14 +00:00
Devin Chasanoff fd66f97885 docs: add ai design patterns to adev/ai (#63095)
PR Close #63095
2025-08-20 15:43:36 +00:00
Matthieu Riegler 25f593ce2a refactor(common): removengModuleFactory input of NgComponentOutlet (#62838)
This was deprecated by #44815

BREAKING CHANGE: NgModuleFactory has been removed, use NgModule instead.

PR Close #62838
2025-08-20 13:27:18 +00:00
Matthieu Riegler 4dfa6f1942 docs(docs-infra): auto-links to API entries (#63162)
This is a first step to create links to API entries automatically.
It adds support for
- code spans (`` `symbol` ``)
- code blocks (`` ```some code here``` ``)

Links are generated from on a K/V map of API entries (symbol => package name).
The map is generated from the API manifest that we're already generating for the API docs.

For the moment, entries with identical names are skipped.

PR Close #63162
2025-08-20 13:05:48 +00:00
Matthieu Riegler 2f34f9f272 docs: remove IsolatedShadowDom from the 20.2 release (#63281)
The change has been reverted by #63142

PR Close #63281
2025-08-20 13:05:12 +00:00
Jessica Janiuk a0ee6bdfe4 release: cut the v21.0.0-next.0 release 2025-08-20 14:45:26 +02:00
Jessica Janiuk d1df128725 docs: release notes for the v20.2.0 release 2025-08-20 14:31:15 +02:00
Jessica Janiuk e6fea458ed docs: release notes for the v20.1.8 release 2025-08-20 14:14:32 +02:00
Kristiyan Kostadinov 7bf4906f27 fix(compiler-cli): account for expression with type arguments during HMR extraction (#63261)
Fixes that the HMR extraction logic didn't accoubnt for expressions with type arguments (e.g. `viewChild('foo', {read: TemplateRef<unknown>})`).

Fixes #63240.

PR Close #63261
2025-08-20 11:31:43 +00:00
Angular Robot 3d7b31c113 build: update dependency playwright-core to v1.55.0 (#63272)
See associated pull request for more information.

PR Close #63272
2025-08-20 11:14:22 +00:00
Angular Robot 086ae5e1b5 build: update all non-major dependencies (#63264)
See associated pull request for more information.

PR Close #63264
2025-08-20 09:53:35 +00:00
ivanwonder eeeaadc7e9 fix(language-service): Support to resolve the re-export component. (#62585)
In the context of TypeScript (TS), a re-exported symbol is considered a distinct symbol.
This means that a developer can choose to import either the re-exported symbol or
the original symbol. However, in the context of Angular, the re-exported symbol
is treated as the same component because it uses the same selector.

This pull request will utilize the most recent re-export component file to
resolve the module specifier.

PR Close #62585
2025-08-20 09:39:56 +00:00
Matthieu Riegler 6a6cb01bb3 docs: update NG_VALIDATORS examples to use forwardRef (#63247)
PR Close #63247
2025-08-20 09:27:20 +00:00
Matthieu Riegler 2aa9775078 docs(docs-infra): remove temporary shiki dts (#63253)
The tooling now supports reading `d.mts` typing files

PR Close #63253
2025-08-20 09:26:17 +00:00
Matthieu Riegler c3c9a9eed3 refactor(devtools): fix renamed function. (#63268)
`getRoots` was renamed `getAppRoots` in a prior commit.

PR Close #63268
2025-08-20 09:24:43 +00:00
Matthieu Riegler 85468ef630 docs: rewording heading for define option (#63009)
This is an attemp to improve search results

PR Close #63009
2025-08-20 09:04:57 +00:00
hawkgs 863401b858 refactor(devtools): add property show graph button (#62853)
Add "Show graph" button to the signal properties in the side pane only for Angular apps. This required storing the signal graph in a separate service.

PR Close #62853
2025-08-20 09:04:24 +00:00
Angular Robot c5c28f9f52 build: update cross-repo angular dependencies (#63263)
See associated pull request for more information.

PR Close #63263
2025-08-20 09:00:56 +00:00
Jessica Janiuk 70afb41f8e fix(core): handle cases where classes added have no animations (#63242)
In the case that someone wants to disable animations via selector specificity, for example by adding an `.animate-disabled` class to a parent node, we need to make sure the animate instructions don't misbehave. Now we detect if animations exist in the provided classes and react accordingly.

fixes: #63161

PR Close #63242
2025-08-20 08:59:03 +00:00
tjshiu 1feadba215 docs: remove redundant Angular docs link in tailwind guide (#63205)
The Tailwind CSS guide already resides within the Angular documentation, making a link to the Angular documentation redundant. This commit removes the unnecessary link.

PR Close #63205
2025-08-20 08:30:33 +00:00
tjshiu cf0ae2ec45 docs: update tailwind guide and navigation (#63205)
PR Close #63205
2025-08-20 08:30:33 +00:00
tjshiu b0e2cdd470 docs: add guide for using Tailwind CSS (#63205)
Adds a new guide that explains how to set up and use Tailwind CSS in an Angular project. This guide covers installation, configuration, and provides a basic usage example.

PR Close #63205
2025-08-20 08:30:33 +00:00
Angular Robot c8f61d295a build: update pnpm to v10.15.0 (#63257)
See associated pull request for more information.

PR Close #63257
2025-08-20 08:28:54 +00:00
Joey Perrott 718bfd2fb7 build: move from using WORKSPACE to MODULE.bazel (#63246)
Update to use MODULE.bazel

PR Close #63246
2025-08-20 08:26:17 +00:00
cexbrayat bf9db2897e docs: animationsEnabled defaults to false (#63262)
PR Close #63262
2025-08-20 08:25:26 +00:00
Angular Robot 8a6cc39aec build: update all non-major dependencies (#63256)
See associated pull request for more information.

PR Close #63256
2025-08-20 08:21:30 +00:00
Angular Robot b7f2a8b180 build: update cross-repo angular dependencies (#63243)
See associated pull request for more information.

PR Close #63243
2025-08-19 15:57:06 +00:00
Julien Zapata Duque 72ae1064fe docs: use correct closing quote in input and model import usage notes (#63237)
PR Close #63237
2025-08-19 12:33:22 +00:00
Angular Robot 942517966b build: update dependency shiki to v3.10.0 (#63235)
See associated pull request for more information.

PR Close #63235
2025-08-19 11:15:29 +00:00
Shuaib Hasan Akib 6712456847 refactor(core): update NG0303 error message (#63222)
Ensure consistency in error message wording by aligning the NG0303
error with other Angular error strings. This improves clarity and
maintains a uniform developer experience

PR Close #63222
2025-08-19 08:25:49 +00:00
Angular Robot 101f072b74 build: update dependency mermaid to v11.10.0 (#63234)
See associated pull request for more information.

PR Close #63234
2025-08-19 08:21:55 +00:00
Angular Robot 44b94b1564 docs: update Angular CLI help (#63225)
Updated Angular CLI help contents.

PR Close #63225
2025-08-19 08:21:25 +00:00
Angular Robot d5a337dee1 build: update github/codeql-action action to v3.29.10 (#63230)
See associated pull request for more information.

PR Close #63230
2025-08-19 08:05:06 +00:00
Angular Robot f7de67ba75 build: update dependency preact to v10.27.1 (#63229)
See associated pull request for more information.

PR Close #63229
2025-08-19 08:03:39 +00:00
Avetik Harutyunyan f50fa15fa3 docs: fix typo in SSR section (#63224)
PR Close #63224
2025-08-19 08:01:27 +00:00
Matthieu Riegler 78f3d849ba docs: update version compatiblity. (#63223)
TS 5.9 support landed with #62939

PR Close #63223
2025-08-19 08:00:54 +00:00
Paweł Kawula c4faee4722 docs: fixed mismatch between supported node versions (#63218)
node versions listed here https://angular.dev/reference/versions
and minimal listed in installation.md are different

PR Close #63218
2025-08-19 07:59:21 +00:00
Matthieu Riegler 9b539a18ba docs(docs-infra): lift circular imports (#63186)
This commit also adds adev on the cyclic import check.

PR Close #63186
2025-08-19 07:58:45 +00:00
Jessica Janiuk cab3adfdd1 fix(compiler): fixes animation event host bindings not firing (#63217)
Host bindings for `(animate.enter)` and `(animate.leave)` were not firing properly. This fixes the compiler ingest to make sure they do fire.

fixes: #63199

PR Close #63217
2025-08-18 15:56:49 +00:00
AleksanderBodurri 5115050928 fix(devtools): DOM traversal bug (#62719)
Previously, Angular devtools would mistakenly traverse the same DOM elements multiple times while doing traversal for the component tree explorer. This error case would occur when more than 1 Angular application root component was present on the same page and in distinct DOM branches.

Some example cases that did work previously:

```html
<app-root>
...
</app-root>
```

```html
<app-root>
...
<app-root-2></app-root-2>
...
</app-root>
```

An example of where it would enter the irregular behaviour

```html
<app-root>
...
</app-root>
<app-root-2>
...
</app-root-2>
```

Now, we properly ignore duplicate DOM paths when looking for application and non-application root component to begin the Angular DevTools component discovery logic.

PR Close #62719
2025-08-18 15:43:09 +00:00
Angular Robot d0cf624305 build: update cross-repo angular dependencies (#63220)
See associated pull request for more information.

PR Close #63220
2025-08-18 15:21:24 +00:00
Joey Perrott 1aa0a8800c build: update the failure message with the correct command (#63219)
Update the failure message for compliance tests to use the correct command for updating the goldens

PR Close #63219
2025-08-18 15:08:56 +00:00
Jessica Janiuk a7cfb42c03 fix(core): ensure animate events do not have duplicate elements (#63216)
This applies the same fix that fixed the class version to the event binding version. It prevents duplicate elements from being on screen when animations have been toggled too fast.

fixes: #63127

PR Close #63216
2025-08-18 12:42:16 +00:00
Paul Gschwendtner 6c8d000016 ci: mark myself as unavailable during OOO (#63214)
Marks myself as unavailable during OOO to not block reviews :)

PR Close #63214
2025-08-18 12:53:19 +02:00
Alan Agius 494385cac0 fix(docs-infra): allow wrapping of types-and-default CLI options (#63211)
This change fixes an issue where long lists of enum values would display on a single line, running off the screen, especially on mobile devices.

PR Close #63211
2025-08-18 12:52:03 +02:00
Alan Agius 2c34e37df9 fix(docs-infra): add spacing between Alias and Value (#63211)
Prior to this change there was noi spacing between the Alias and Value

PR Close #63211
2025-08-18 12:52:03 +02:00
Alan Agius 1714e9ea0e fix(docs-infra): display value type in CLI pages (#63211)
The value type was not being displayed when a value had an enum, which was misleading. This change ensures the value type is always shown, so users know whether to expect a single value or an array of values.

PR Close #63211
2025-08-18 12:52:03 +02:00
Angular Robot 032017174e build: lock file maintenance (#63209)
See associated pull request for more information.

PR Close #63209
2025-08-18 12:50:49 +02:00
Walter Breakell ddee59f58c docs: fix grammatical mistake in installation guide (#63202)
PR Close #63202
2025-08-18 12:50:00 +02:00
cexbrayat e9b2fe7ce5 refactor(core): improve animation instruction robustness and maintainability (#63163)
This commit extracts helper functions to reduce code duplication across animation instructions and adds early return when animations are disabled.

PR Close #63163
2025-08-18 12:49:17 +02:00
Matthieu Riegler ab067a3d2e docs(docs-infra): remove @adev/constant path (#63213)
PR Close #63213
2025-08-18 10:06:23 +02:00
Alan Agius 856c5f02c5 build: remove extra comma in JSON (#63212)
This fixes CI which is currently broken.

PR Close #63212
2025-08-18 09:44:00 +02:00
Matthieu Riegler ff01e33d69 docs: revert remove of build-and-link (#63187)
This works again since angular/dev-infra#2922 landed

PR Close #63187
2025-08-18 09:14:36 +02:00
Angular Robot a4e27e9a03 build: update cross-repo angular dependencies (#63190)
See associated pull request for more information.

PR Close #63190
2025-08-18 09:13:52 +02:00
Angular Robot f54fdc5f76 docs: update Angular CLI help (#63194)
Updated Angular CLI help contents.

PR Close #63194
2025-08-18 09:10:25 +02:00
Gerome Grignon e6029bcf2c docs(): remove double parenthesis (#63196)
PR Close #63196
2025-08-18 09:09:50 +02:00
Shuaib Hasan Akib 4787eced1b docs(docs-infra): add paths for constants and missing link (#63197)
PR Close #63197
2025-08-18 09:08:59 +02:00
Angular Robot cdafe8b01e build: update all non-major dependencies (#63203)
See associated pull request for more information.

PR Close #63203
2025-08-18 09:08:22 +02:00
Alan Agius d0d6079f54 refactor: remove version 20 migrations (#63207)
This commit remove the non optional migrations for version 20 as these have already been executed.

PR Close #63207
2025-08-18 09:06:51 +02:00
Shuaib Hasan Akib 3f88fbdfa7 docs(docs-infra): replace deprecated router method (#63183)
PR Close #63183
2025-08-15 13:50:57 +02:00
Angular Robot abfd7783b0 build: update dependency @codemirror/language to v6.11.3 (#63184)
See associated pull request for more information.

PR Close #63184
2025-08-15 13:50:17 +02:00
Shuaib Hasan Akib 6f91972ae4 docs(docs-infra): replace Input by signal one (#63169)
PR Close #63169
2025-08-15 13:42:39 +02:00
Cheng-Hsuan Tsai 0f17623398 docs(docs-infra): add dark mode to example preview (#63171)
PR Close #63171
2025-08-15 13:41:08 +02:00
cexbrayat d3a0c2559a docs: add --yes option to mcp commands (#63173)
This makes it consistent with the message output by the CLI in v20.2 (see https://github.com/angular/angular-cli/commit/8b4de57af1)

PR Close #63173
2025-08-15 12:32:28 +02:00
Angular Robot 9a59f7613c build: update all non-major dependencies (#63181)
See associated pull request for more information.

PR Close #63181
2025-08-15 12:31:24 +02:00
Angular Robot 47b09f8f18 build: update cross-repo angular dependencies (#63178)
See associated pull request for more information.

PR Close #63178
2025-08-15 11:40:20 +02:00
Kristiyan Kostadinov 5b3933f1ae fix(compiler): error when ng-content fallback has translated children (#63156)
Fixes that the pipeline wasn't processing the fallback content of `ng-content` for i18n which resulted in a compiler error further down the line.

Fixes #63065.

PR Close #63156
2025-08-15 09:47:17 +02:00
Kristiyan Kostadinov 9ac638548f fix(compiler): incorrect source span for expression AST inside template attribute (#63175)
Similar fix as #63082, but for template attributes. The root cause is the same where we should be using `fullStart` instead of `start` in order to account for whitespaces being skipped.

Fixes #63157.

PR Close #63175
2025-08-15 09:44:35 +02:00
Alan Agius e7a3452852 build: bump @angular/ssr to 20.2.0-rc.1 (#63176)
This contains the fix for the router `lastSuccessfulNavigation` breaking change

https://github.com/angular/angular-cli/pull/30923

PR Close #63176
2025-08-15 09:44:00 +02:00
Alan Agius fa40feee1d Revert "ci: redirect adev to index.csr.html (#63168)" (#63177)
This reverts commit 5129daed1b.

PR Close #63177
2025-08-15 09:43:14 +02:00
Matthieu Riegler 5129daed1b ci: redirect adev to index.csr.html (#63168)
The build doesn't produce an `index.html`

PR Close #63168
2025-08-14 21:15:47 +00:00
Angular Robot d733c69ce9 build: update all non-major dependencies (#62935)
See associated pull request for more information.

PR Close #62935
2025-08-14 22:09:29 +02:00
Charles Lyding 9c0ad1b434 docs: update MCP server documentation for 20.2 (#63141)
This commit updates the MCP server documentation with the following changes:

- Updates the description of the `ng mcp` command behavior.
- Adds a configuration example for the Gemini CLI.
- Adds a new section for command options, including `--read-only` and `--local-only`.
- Alphabetizes the IDE configuration sections for better readability.
- Alphabetizes the "Available Tools" table.

PR Close #63141
2025-08-14 22:07:55 +02:00
Angular Robot fad3d8e3a5 build: update cross-repo angular dependencies (#63149)
See associated pull request for more information.

PR Close #63149
2025-08-14 22:05:48 +02:00
Cheng-Hsuan Tsai b9a134b8eb docs(docs-infra): fix codeblock styles (#63153)
PR Close #63153
2025-08-14 22:04:39 +02:00
Shuaib Hasan Akib 54485f7f4b docs(docs-infra): enhance method name following the guideline (#63164)
PR Close #63164
2025-08-14 22:03:16 +02:00
Joey Perrott bf2ba7a059 build: run integration tests using remote execution (#63118)
With the change to size tracking integration test can now be executed on our RBE platform

PR Close #63118
2025-08-14 22:02:32 +02:00
Ben Hong dc8f11b4fd docs: add rendering strategies guide for router (#62859)
PR Close #62859
2025-08-14 22:01:56 +02:00
Matthieu Riegler 4bed062bc9 feat(http): Provide http services in root (#56212)
The changes introduced in this commit allows to use the HttpClient without the provider function.

PR Close #56212
2025-08-14 13:04:35 +02:00
Jonathan Meier be7110342b fix(compiler-cli): disallow compiling with the emitDeclarationOnly TS compiler option enabled (#61609)
Running the Angular compiler with declaration-only emission is dangerous
because Angular does not yet support this mode as it relies on the Ivy
compilation which does not run in this mode

In the best case, everything works fine as incidentally there's no
difference in the emitted type declarations (e.g. this is the case for
TS files containing no Angular annotations or only `@Injectable`
annotations).

In the worst case, compilation silently fails in that the compilation
succeeds but the resulting type declarations are missing the Angular
type information and are therefore incomplete. This happens for all
components, directives and modules.

BREAKING CHANGE: The Angular compiler now produces an error when the
the `emitDeclarationOnly` TS compiler option is enabled as this mode is
not supported.

PR Close #61609
2025-08-14 13:03:54 +02:00
Matthieu Riegler 93c735cae7 docs: fix edit links for block/element api entries (#62766)
PR Close #62766
2025-08-14 13:03:00 +02:00
Matthieu Riegler c8349ef2f6 docs: update testing scenarios and remove imports. (#63076)
With standalone, `imports` are not necessary anymore when configuring the Testing module.

Also
fixes #58073

PR Close #63076
2025-08-14 13:02:17 +02:00
Joey Perrott c35c0c7f2f build: update to bazel 7.6.0 (#63096)
Update to later version of bazel

PR Close #63096
2025-08-14 13:01:30 +02:00
Matthieu Riegler a59c3fe74e build: remove patch-package dependency (#63126)
This dependency is no longer necessary as `pnpm` provides the same natively

PR Close #63126
2025-08-14 12:59:46 +02:00
Andrew Scott e7cc89e3b0 docs: release notes for the v20.2.0-rc.1 release 2025-08-13 13:28:46 -07:00
Andrew Scott 74e1796a1e docs: release notes for the v20.1.7 release 2025-08-13 13:18:56 -07:00
Matthieu Riegler 4e0fc81491 feat(router): convert lastSuccessfulNavigation to signal (#63057)
This commit also include an `ng update` migration to ensure `lastSuccessfulNavigation` is invoked.

BREAKING CHANGE: `lastSuccessfulNavigation` is now a signal and needs to be invoked

PR Close #63057
2025-08-13 11:29:01 -07:00
Jeremy Elbourn 55cd8c2d73 docs: add rxjs-interop section for rxResource (#63125)
This commit adds brief documentation for `rxResource` to the "Using
Angular with RxJS" guide. The only available documentation for
`rxResource` today is the API reference, which lacks any code examples.

PR Close #63125
2025-08-13 09:29:33 -07:00
hawkgs 7ecf13db06 refactor(devtools): improve router tree search UX (#63107)
Improve the search functionality of the router tree by making the results more distinguishable.

PR Close #63107
2025-08-13 09:27:26 -07:00
Angular Robot 071ab50c7c docs: update Angular CLI help (#63138)
Updated Angular CLI help contents.

PR Close #63138
2025-08-13 09:25:37 -07:00
Angular Robot 21b0fd3d13 build: update cross-repo angular dependencies (#62952)
See associated pull request for more information.

PR Close #62952
2025-08-13 09:21:28 -07:00
cexbrayat 1269d2e4f2 docs: update best-practices (#63132)
This removes the common pitfall for if blocks in the best practices, as this is no longer true in Angular v20.2, see angular/angular@a409534

PR Close #63132
2025-08-13 09:20:30 -07:00
Alan Agius 32ba8b5025 docs: add link to ai-config command (#63139)
This adds a link to the new command.

PR Close #63139
2025-08-13 09:14:18 -07:00
Angular Robot 91b3466e97 build: update actions/checkout action to v5 (#63114)
See associated pull request for more information.

PR Close #63114
2025-08-12 19:08:49 -07:00
Matthieu Riegler 657061e528 build: patch @angular/build to allow fw/cli mismatch (#63098)
This will allow us to build adev while the CLI and the FW major versions are mismatched.
we can remove this patch once the CLI has published a v21 pre-release (or a flag to disable that error).

PR Close #63098
2025-08-12 18:46:22 -07:00
Andrew Scott aaf053c288 build: update main branch to target 21 (#63098)
main branch should go to 21 not 20.3

PR Close #63098
2025-08-12 18:46:22 -07:00
Jeremy Elbourn 4d9385b5fd docs: add topic for takeUntilDestroyed (#63122)
This was missing from the RxJS interop guide. I came across it while
cleaning up some Google-internal docs and realized I had nothing on adev
to which I could link.

PR Close #63122
2025-08-12 18:41:18 -07:00
Angular Robot d7a5eadbfa build: update pnpm to v10 (#63087)
See associated pull request for more information.

PR Close #63087
2025-08-12 16:53:31 -07:00
Paul Gschwendtner ea78278635 refactor(compiler-cli): ensure JIT transforms with queries work with closure property renaming (#63123)
This map for the JIT transforms accidentally is property-renamed,
breaking the lookups below. This commit fixes this.

PR Close #63123
2025-08-12 13:24:09 -07:00
Jeremy Elbourn e64271df92 fix(docs-infra): put content in <main> element (#63121)
This fix updates the adev `DocViewer` component to support rendering with the `main[docsViewer` selector so that the primary content for the page is inside of a `<main>` element (without introducing an extra DOM element).

PR Close #63121
2025-08-12 11:05:13 -07:00
ivanwonder b695ff02cb feat(language-service): support auto-import for attribute completions (#62797)
Add logic to provide code actions for auto-importing directives that
are out of scope.

PR Close #62797
2025-08-12 10:57:08 -07:00
Angular Robot 6c51c29925 build: lock file maintenance (#62977)
See associated pull request for more information.

PR Close #62977
2025-08-12 10:05:28 -07:00
Angular Robot 11b527cecd build: update scorecard action dependencies (#63086)
See associated pull request for more information.

PR Close #63086
2025-08-12 09:58:11 -07:00
Angular Robot 01fb2b1b80 build: update actions/checkout action to v5 (#63102)
See associated pull request for more information.

PR Close #63102
2025-08-12 09:55:54 -07:00
Matthieu Riegler 09df37507f docs: add missing supported != operator (#63108)
fixes 63103

PR Close #63108
2025-08-12 09:39:05 -07:00
Alan Agius 54fe7ca055 build: use link: instead of file: (#63111)
When using `file:` renovate updates fails due to ` ERR_PNPM_LINKED_PKG_DIR_NOT_FOUND ` this is due to a different behaviour between `link:` amd `file:`. `link:` however will not fail when the directory does not exist.

PR Close #63111
2025-08-12 09:37:54 -07:00
Alan Agius 5d9f124876 build: migrate config renovate.json (#63110)
Closes #62955 as a pr takeover

PR Close #63110
2025-08-12 09:37:04 -07:00
Alan Agius 1846874f1f ci: correctly configure ignored filenames (#63105)
Previously, the path did not match a file.

PR Close #63105
2025-08-12 10:02:00 +02:00
Alan Agius 434ff7f1a0 build: resolve pnpm workspace dependency on compiler-cli (#63105)
The `pnpm install` command was failing for the `packages/core/test/bundling` project with the error:
`ERR_PNPM_NO_MATCHING_VERSION No matching version found for @angular/compiler-cli@0.0.0-PLACEHOLDER`

This happenes only in renovate updates.

PR Close #63105
2025-08-12 10:02:00 +02:00
Alan Agius 91f8963d86 build: fix ERR_PNPM_LINKED_PKG_DIR_NOT_FOUND for typings tests (#63105)
During `pnpm install` in a monorepo setup, the `packages/zone.js/test/typings` project would fail with the error: `ERR_PNPM_LINKED_PKG_DIR_NOT_FOUND: Could not install from "/.../node_modules/typescript" as it does not exist.`

PR Close #63105
2025-08-12 10:01:59 +02:00
Alan Agius a786bb6f4b build: remove redundant yarn.lock files (#63105)
These are now managed by pnpm.

PR Close #63105
2025-08-12 10:01:59 +02:00
Matthieu Riegler 9aef481172 refactor(zone.js): remove unused jasmine globalerror monkey patching. (#63077)
This is for testing purposes for now. See discussion on the related issue.

fixes #63072

PR Close #63077
2025-08-11 16:41:09 -07:00
Matthieu Riegler f9a38a4b73 refactor(core): remove temporary resource setter function. (#63097)
Now that G3 has been fully migrated to the new throwing behavior, we don't need that setter anymore.

PR Close #63097
2025-08-11 15:43:45 -07:00
hawkgs d47ea29b89 refactor(devtools): keep TreeVisualizer snapped node on focus (#62982)
Keep `TreeVisualizer` snapped node on focus when the container/split is being resized.

PR Close #62982
2025-08-11 12:26:31 -07:00
Matthieu Riegler baa31fb1a1 docs: remove router testing from the testing scenarios guide (#63078)
This commit also adds the router testing guide to the testing section

PR Close #63078
2025-08-11 12:15:39 -07:00
Kristiyan Kostadinov d17555a7c6 fix(compiler): incorrect spans for AST inside input value with leading space (#63082)
When parsing expressions inside a bound attribute, we offset all of its spans by an `absoluteOffset` in order to get the right spans in the source file. The offset was incorrect when parsing an attribute with leading spaces during the construction of the Ivy AST, because of the combination of:
1. We were setting the offset by looking at `valueSpan.start`.
2. The Ivy parser sets `leadingTriviaChars: [' ', '\n']` which means that spaces and new lines will be ignored in the `sourceSpan.start`.

These changes resolve the issue by using `valueSpan.fullStart` which includes the leading spaces.

Fixes #63069.

PR Close #63082
2025-08-11 11:57:05 -07:00
Alan Agius 06f5879e42 ci: several fixes for renovate (#63083)
This commit contains several fixes for renovate to work properly with `pnpm`

PR Close #63083
2025-08-11 11:03:28 -07:00
Joey Perrott c4dcfdf644 build: update to the latest version of devinfra and rename npm2 workspace (#63093)
Rename the npm2 workspace to npm and use the latest version of devinfra which drops rules_nodejs

PR Close #63093
2025-08-11 10:35:32 -07:00
Kristiyan Kostadinov 57184d0895 docs: release notes for the v20.2.0-rc.0 release 2025-08-11 10:42:32 +02:00
Kristiyan Kostadinov 2e4db98877 release: bump the next branch to v20.3.0-next.0 2025-08-11 10:42:32 +02:00
4156 changed files with 358125 additions and 330712 deletions
+12 -3
View File
@@ -4,7 +4,7 @@
# https://github.com/bazelbuild/bazel/issues/8106
.git
node_modules
dist
dist/
# All integration test node_modules folders
integration/animations/node_modules
@@ -35,9 +35,11 @@ integration/standalone-bootstrap/node_modules
integration/terser/node_modules
integration/trusted-types/node_modules
integration/typings_test_rxjs7/node_modules
integration/typings_test_ts58/node_modules
integration/legacy-animations/node_modules
integration/legacy-animations-async/node_modules
integration/typings_test_ts59/node_modules
modules/ssr-benchmarks/node_modules
vscode-ng-language-service/integration/project/dist/
# For rules_js
adev/node_modules
@@ -61,7 +63,14 @@ packages/platform-server/node_modules
packages/platform-browser-dynamic/node_modules
packages/router/node_modules
packages/zone.js/node_modules
packages/zone.js/test/typings/node_modules
packages/upgrade/node_modules
packages/benchpress/node_modules
packages/service-worker/node_modules
packages/zone.js/test/typings/node_modules
packages/zone.js/node_modules
tools/bazel/rules_angular_store/node_modules
vscode-ng-language-service/node_modules
vscode-ng-language-service/server/node_modules
vscode-ng-language-service/integration/pre_standalone_project/node_modules
vscode-ng-language-service/integration/project/node_modules
+7 -3
View File
@@ -12,6 +12,9 @@ common --@aspect_rules_ts//ts:default_to_tsc_transpiler
# Needed as otherwise `env` of TS actions would be ignored.
common --incompatible_merge_fixed_and_default_shell_env
# Frozen lockfile
common --lockfile_mode=error
###############################
# Filesystem interactions #
###############################
@@ -66,6 +69,9 @@ build:release --stamp
# Snapshots should also be stamped with version control information.
build:snapshot-build --workspace_status_command="pnpm --silent ng-dev release build-env-stamp --mode=snapshot"
build:snapshot-build --stamp
# @angular/language-server package depends directly on other Angular framework packages.
# This flag ensures that the language server uses the snapshot-built framework packages from the repository.
build:snapshot-build --//:enable_language_server_snapshot_repo_deps
# Angular DevTools for Firefox releases *cannot* be stamped and `--config snapshot-build-firefox` is a no-op.
# This is because Mozilla requires add-on source code to be uploaded and then they manually reproduce the build.
@@ -137,7 +143,7 @@ build:trusted-build --remote_upload_local_results=true
# Ensure that tags like "no-remote-exec" get propagated to actions created by rules,
# even if the rule implementation does not explicitly pass them to the execution requirements.
# https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation
common --experimental_allow_tags_propagation
common --incompatible_allow_tags_propagation
# Disable network access in the sandbox by default. To enable network access
# for a particular target, use:
@@ -166,8 +172,6 @@ test:saucelabs --flaky_test_attempts=1
# --ng_perf will ask the Ivy compiler to produce performance results for each build.
build --flag_alias=ng_perf=//packages/compiler-cli:ng_perf
# --full_build_adev will run adev build/serve in a full mode, performing prerendering and DCE.
build --flag_alias=full_build_adev=//adev:full_build_adev
####################################################
# User bazel configuration
+1 -1
View File
@@ -1 +1 @@
6.5.0
8.4.2
+2 -1
View File
@@ -1,4 +1,4 @@
load("//tools:defaults2.bzl", "esbuild_checked_in", "ts_config", "ts_project")
load("//tools:defaults.bzl", "esbuild_checked_in", "ts_config", "ts_project")
package(default_visibility = ["//.github/actions/deploy-docs-site:__subpackages__"])
@@ -12,6 +12,7 @@ esbuild_checked_in(
entry_point = ":lib/main.mts",
external = [
"undici",
"pnpapi",
],
metafile = False,
platform = "node",
+14 -14
View File
@@ -1,4 +1,4 @@
import {cp, mkdtemp, readFile, rm, writeFile} from 'node:fs/promises';
import {mkdtemp, readFile, rm, writeFile} from 'node:fs/promises';
import {Deployment} from './deployments.mjs';
import {join} from 'node:path';
@@ -9,7 +9,7 @@ import {getCredentialFilePath} from './credential.mjs';
export async function deployToFirebase(
deployment: Deployment,
configPath: string,
distDirPath: string,
stagingDir: string,
) {
if (deployment.destination == undefined) {
console.log(`No deployment necessary for docs created from: ${deployment.branch}`);
@@ -18,37 +18,33 @@ export async function deployToFirebase(
console.log('Preparing for deployment to firebase...');
const tmpDeployDir = await mkdtemp(join(tmpdir(), 'deploy-directory'));
const deployConfigPath = join(tmpDeployDir, 'firebase.json');
const deployConfigPath = join(stagingDir, 'firebase.json');
const config = JSON.parse(await readFile(configPath, {encoding: 'utf-8'})) as {
hosting: {public: string};
};
config['hosting']['public'] = './dist';
config['hosting']['public'] = './browser';
await writeFile(deployConfigPath, JSON.stringify(config, null, 2));
await cp(distDirPath, join(tmpDeployDir, 'dist'), {recursive: true});
spawnSync(`chmod 777 -R ${tmpDeployDir}`, {encoding: 'utf-8', shell: true});
firebase(
`target:clear --config ${deployConfigPath} --project angular-dev-site hosting angular-docs`,
tmpDeployDir,
stagingDir,
);
firebase(
`target:apply --config ${deployConfigPath} --project angular-dev-site hosting angular-docs ${deployment.destination}`,
tmpDeployDir,
stagingDir,
);
firebase(
`deploy --config ${deployConfigPath} --project angular-dev-site --only hosting --non-interactive`,
tmpDeployDir,
stagingDir,
);
firebase(
`target:clear --config ${deployConfigPath} --project angular-dev-site hosting angular-docs`,
tmpDeployDir,
stagingDir,
);
await rm(tmpDeployDir, {recursive: true});
await rm(stagingDir, {recursive: true});
}
export async function setupRedirect(deployment: Deployment) {
@@ -103,7 +99,7 @@ export async function setupRedirect(deployment: Deployment) {
}
function firebase(cmd: string, cwd?: string) {
spawnSync('npx', `-y firebase-tools@13.15.1 ${cmd}`.split(' '), {
const {status} = spawnSync('npx', `-y firebase-tools@13.15.1 ${cmd}`.split(' '), {
cwd,
encoding: 'utf-8',
shell: true,
@@ -113,4 +109,8 @@ function firebase(cmd: string, cwd?: string) {
GOOGLE_APPLICATION_CREDENTIALS: getCredentialFilePath(),
},
});
if (status !== 0) {
console.error('Firebase command failed, see log above for details.');
process.exit(status);
}
}
@@ -9,6 +9,7 @@ export interface Deployment {
to: string;
};
destination?: string;
servingUrl: string;
}
export type Deployments = Map<string, Deployment>;
@@ -31,6 +32,7 @@ export async function getDeployments(): Promise<Deployments> {
docSites.set(branch.name, {
branch: branch.name,
destination: `v${branch.version.major}-angular-dev`,
servingUrl: `https://v${branch.version.major}.angular.dev/`,
});
});
@@ -40,12 +42,14 @@ export async function getDeployments(): Promise<Deployments> {
from: `v${releaseTrains.latest.version.major}-angular-dev`,
to: 'https://angular.dev',
},
servingUrl: 'https://angular.dev/',
destination: 'angular-dev-site',
});
if (releaseTrains.releaseCandidate) {
docSites.set(releaseTrains.next.branchName, {
branch: releaseTrains.next.branchName,
servingUrl: 'https://next.angular.dev/',
});
docSites.set(releaseTrains.releaseCandidate.branchName, {
@@ -55,11 +59,13 @@ export async function getDeployments(): Promise<Deployments> {
from: `v${releaseTrains.releaseCandidate.version.major}-angular-dev`,
to: 'https://next.angular.dev',
},
servingUrl: 'https://next.angular.dev/',
});
} else {
docSites.set(releaseTrains.next.branchName, {
branch: releaseTrains.next.branchName,
destination: 'next-angular-dev',
servingUrl: 'https://next.angular.dev/',
});
}
+14 -10
View File
@@ -2,19 +2,18 @@ import {getInput, setFailed} from '@actions/core';
import {context} from '@actions/github';
import {deployToFirebase, setupRedirect} from './deploy.mjs';
import {getDeployments} from './deployments.mjs';
import {AuthenticatedGitClient, GithubConfig, setConfig} from '@angular/ng-dev';
import {generateSitemap} from './sitemap.mjs';
import {assertValidGithubConfig, AuthenticatedGitClient, getConfig} from '@angular/ng-dev';
import {githubReleaseTrainReadToken} from './credential.mjs';
import {spawnSync} from 'child_process';
import {cp, mkdtemp} from 'fs/promises';
import {tmpdir} from 'os';
import {join} from 'path';
const refMatcher = /refs\/heads\/(.*)/;
async function deployDocs() {
setConfig({
github: {
mainBranchName: 'main',
name: 'angular',
owner: 'angular',
} as GithubConfig,
});
getConfig([assertValidGithubConfig]);
AuthenticatedGitClient.configure(githubReleaseTrainReadToken);
@@ -28,7 +27,11 @@ async function deployDocs() {
const currentBranch = matchedRef[1];
const configPath = getInput('configPath');
const distDir = getInput('distDir');
const stagingDir = await mkdtemp(join(tmpdir(), 'deploy-directory'));
// Copy all files from the distDir into stagingDir and modify the permissions for editing
await cp(getInput('distDir'), stagingDir, {recursive: true});
spawnSync(`chmod 777 -R ${stagingDir}`, {encoding: 'utf-8', shell: true});
const deployment = (await getDeployments()).get(currentBranch);
if (deployment === undefined) {
@@ -57,7 +60,8 @@ async function deployDocs() {
console.log(` To: ${deployment.redirect.to}`);
}
await deployToFirebase(deployment, configPath, distDir);
await generateSitemap(deployment, stagingDir);
await deployToFirebase(deployment, configPath, stagingDir);
await setupRedirect(deployment);
}
@@ -0,0 +1,33 @@
import {Deployment} from './deployments.mjs';
import {join} from 'path';
import {readFileSync, writeFileSync} from 'fs';
export async function generateSitemap(deployment: Deployment, distDir: string) {
const servingUrlWithoutEndingSlash = deployment.servingUrl.endsWith('/')
? deployment.servingUrl.slice(0, -1)
: deployment.servingUrl;
/** Timestamp string used to of the last file update. */
const lastModifiedTimestamp = new Date().toISOString();
/** An object containing all of the routes available within the application. */
const routes = JSON.parse(readFileSync(join(distDir, 'prerendered-routes.json'), 'utf-8'));
/** The generated sitemap string. */
const sitemap = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
${Object.keys(routes.routes)
.map((route) => {
const routeWithoutLeadingSlash = route.startsWith('/') ? route.slice(1) : route;
return `
<url>
<loc>${servingUrlWithoutEndingSlash}/${routeWithoutLeadingSlash}</loc>
<lastmod>${lastModifiedTimestamp}</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
`;
})
.join('')}
</urlset>`;
writeFileSync(join(distDir, 'browser', 'sitemap.xml'), sitemap, 'utf-8');
console.log(`Generated sitemap with ${Object.keys(routes.routes).length} entries.`);
}
File diff suppressed because one or more lines are too long
@@ -2,6 +2,7 @@
"compilerOptions": {
"module": "NodeNext",
"target": "ES2021",
"types": ["node"],
"lib": ["es2021"],
"experimentalDecorators": true,
"strict": true,
@@ -11,6 +12,5 @@
"noImplicitReturns": true,
"declaration": true,
"sourceMap": true
}
}
+2 -2
View File
@@ -5,9 +5,9 @@ runs:
using: 'composite'
steps:
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Saucelabs Variables
uses: angular/dev-infra/github-actions/saucelabs@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/saucelabs@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Starting Saucelabs tunnel service
shell: bash
run: ./tools/saucelabs/sauce-service.sh run &
+7 -7
View File
@@ -15,22 +15,22 @@ permissions: read-all
jobs:
adev-build:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-8core
if: |
(github.event.action == 'labeled' && github.event.label.name == 'adev: preview') ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'adev: preview'))
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Build adev to ensure it continues to work
run: pnpm bazel build //adev:build --full_build_adev --config=release
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- name: Build adev
run: pnpm bazel build //adev:build.production --config=snapshot-build
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@90bba8b673b749ce67760b4d993b9b421adac30f
with:
workflow-artifact-name: 'adev-preview'
pull-number: '${{github.event.pull_request.number}}'
+2 -2
View File
@@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
token: '${{secrets.GITHUB_TOKEN}}'
@@ -40,7 +40,7 @@ jobs:
npx -y firebase-tools@latest target:clear --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs
npx -y firebase-tools@latest target:apply --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs ${{env.PREVIEW_SITE}}
- uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@90bba8b673b749ce67760b4d993b9b421adac30f
with:
github-token: '${{secrets.GITHUB_TOKEN}}'
workflow-artifact-name: 'adev-preview'
@@ -12,10 +12,11 @@ permissions:
jobs:
assistant_to_the_branch_manager:
runs-on: ubuntu-latest
if: github.event.repository.fork == false
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
persist-credentials: false
- uses: angular/dev-infra/github-actions/branch-manager@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- uses: angular/dev-infra/github-actions/branch-manager@90bba8b673b749ce67760b4d993b9b421adac30f
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+4 -4
View File
@@ -19,7 +19,7 @@ jobs:
exit: true
# Indicate that the benchmark command was received.
- uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
- uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5
with:
comment-id: ${{github.event.comment.id}}
token: '${{secrets.BENCHMARK_POST_RESULTS_GITHUB_TOKEN}}'
@@ -28,7 +28,7 @@ jobs:
- uses: alessbell/pull-request-comment-branch@aad01d65d6982b8eacabed5e9a684cd8ceb98da6 # v1.1
id: comment-branch
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
# Specify repository as the PR branch might be from a fork.
repository: ${{steps.comment-branch.outputs.head_owner}}/${{steps.comment-branch.outputs.head_repo}}
@@ -38,7 +38,7 @@ jobs:
- run: pnpm install --frozen-lockfile
- uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
with:
bazelrc: ./.bazelrc.user
@@ -53,7 +53,7 @@ jobs:
id: benchmark
name: Running benchmark
- uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
- uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5
with:
issue-number: ${{github.event.issue.number}}
token: '${{secrets.BENCHMARK_POST_RESULTS_GITHUB_TOKEN}}'
+58 -51
View File
@@ -21,9 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
with:
cache-node-modules: true
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Check code lint
@@ -41,13 +39,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
with:
cache-node-modules: true
disable-package-manager-cache: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
@@ -57,24 +55,23 @@ jobs:
- name: Test build
run: pnpm devtools:build:chrome
- name: Cypress run
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
uses: cypress-io/github-action@7ef72e250a9e564efb4ed4c2433971ada4cc38b4 # v6.10.4
with:
command: pnpm devtools:test:e2e
start: pnpm bazel run //devtools/src:devserver
wait-on: 'http://localhost:4200'
wait-on-timeout: 300
install: false
test:
runs-on: ubuntu-latest-4core
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
with:
cache-node-modules: true
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
@@ -83,16 +80,14 @@ jobs:
run: pnpm test:ci
integration-tests:
runs-on: ubuntu-latest-4core
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
with:
cache-node-modules: true
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
@@ -102,14 +97,14 @@ jobs:
adev:
runs-on:
labels: ubuntu-latest-4core
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
@@ -117,42 +112,51 @@ jobs:
- name: Run tests
run: pnpm bazel test //adev/...
- name: Build adev in fast mode to ensure it continues to work
run: pnpm bazel build //adev:build --config=release
run: pnpm bazel build //adev:build
vscode-ng-language-service:
runs-on:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm bazel test //vscode-ng-language-service/...
publish-snapshots:
runs-on:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
with:
cache-node-modules: true
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Install node modules
run: pnpm install --frozen-lockfile
- run: echo "https://${{secrets.SNAPSHOT_BUILDS_GITHUB_TOKEN}}:@github.com" > ${HOME}/.git_credentials
- run: pnpm build
- run: ./scripts/ci/publish-build-artifacts.sh
- run: ./scripts/ci/publish-snapshot-build-artifacts.sh
zone-js:
runs-on:
labels: ubuntu-latest-4core
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
with:
cache-node-modules: true
node-module-directories: |
./node_modules
./packages/zone.js/node_modules
./packages/zone.js/test/typings/node_modules
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
@@ -186,14 +190,12 @@ jobs:
- run: pnpm -C packages/zone.js/test/typings test
# saucelabs:
# runs-on: ubuntu-latest-4core
# runs-on: ubuntu-latest
# env:
# SAUCE_TUNNEL_IDENTIFIER: angular-framework-${{ github.run_number }}
# steps:
# - name: Initialize environment
# uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b5a3609f89c06eb4037dce22a93641213a5d1508
# with:
# cache-node-modules: true
# - name: Install node modules
# run: pnpm install --frozen-lockfile
# - uses: ./.github/actions/saucelabs-legacy
@@ -201,22 +203,27 @@ jobs:
adev-deploy:
needs: [adev]
if: needs.adev.result == 'success'
runs-on: ubuntu-latest
runs-on: ubuntu-latest-8core
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Build adev to ensure it continues to work
run: pnpm bazel build //adev:build --full_build_adev --config=release
- name: Build adev
# `snapshot-build` config is used to stamp the exact version with sha in the footer.
run: pnpm bazel build //adev:build.production --config=snapshot-build
- name: Deploy to firebase
uses: ./.github/actions/deploy-docs-site
with:
serviceKey: ${{ secrets.ANGULAR_DEV_SITE_DEPLOY }}
githubReleaseTrainReadToken: ${{ secrets.DOCS_DEPLOY_GITHUB_RELEASE_TRAIN_TOKEN }}
configPath: 'adev/firebase.json'
distDir: 'dist/bin/adev/dist/browser'
distDir: 'dist/bin/adev/dist'
- name: Update Algolia synonym record
run: pnpm tsx adev/scripts/synonyms/update-synonyms.mts
env:
ALGOLIA_KEY: ${{ secrets.ALGOLIA_SYNONYM_MANAGER }}
@@ -0,0 +1,59 @@
name: Update ADEV Cross Repo Docs
on:
workflow_dispatch:
inputs: {}
push:
branches:
- 'main'
- '[0-9]+.[0-9]+.x'
# Declare default permissions as read only.
permissions:
contents: read
jobs:
update_adev_cross_repo_docs:
name: Update Cross Repo ADEV Docs
if: github.repository == 'angular/angular'
runs-on: ubuntu-latest
# Prevents multiple concurrent runs of this workflow for the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout the repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
# Setting `persist-credentials: false` prevents the github-action account from being the
# account that is attempted to be used for authentication, instead the remote is set to
# an authenticated URL.
persist-credentials: false
- name: Generate Docs
run: node adev/scripts/update-cross-repo-docs/index.mjs
env:
ANGULAR_READONLY_GITHUB_TOKEN: ${{ secrets.READONLY_GITHUB_TOKEN }}
- name: Create a PR (if necessary)
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
with:
token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
push-to-fork: 'angular-robot/angular'
delete-branch: true
maintainer-can-modify: false
branch: docs-cross-repo-update-${{github.ref_name}}
committer: Angular Robot <angular-robot@google.com>
author: Angular Robot <angular-robot@google.com>
title: 'docs: update cross-repo adev docs [${{github.ref_name}}]'
body: |
Updated Angular adev cross repo docs files.
labels: |
action: merge
area: docs
target: automation
commit-message: |
docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
+4 -4
View File
@@ -12,14 +12,14 @@ jobs:
labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: angular/dev-infra/github-actions/pull-request-labeling@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: angular/dev-infra/github-actions/pull-request-labeling@90bba8b673b749ce67760b4d993b9b421adac30f
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
post_approval_changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: angular/dev-infra/github-actions/post-approval-changes@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: angular/dev-infra/github-actions/post-approval-changes@90bba8b673b749ce67760b4d993b9b421adac30f
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+2 -2
View File
@@ -13,8 +13,8 @@ jobs:
statuses: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: angular/dev-infra/github-actions/google-internal-tests@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: angular/dev-infra/github-actions/google-internal-tests@90bba8b673b749ce67760b4d993b9b421adac30f
with:
run-tests-guide-url: http://go/angular-g3sync-start
github-token: ${{ secrets.GITHUB_TOKEN }}
+5 -7
View File
@@ -8,22 +8,20 @@ jobs:
# Bazel saucelabs job resides in `manual.yml` because it's currently unstable, but
# kept as "runnable" for debugging/stabilization effort purposes.
bazel-saucelabs:
runs-on: ubuntu-latest-4core
runs-on: ubuntu-latest
env:
JOBS: 2
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
with:
cache-node-modules: true
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Saucelabs Variables
uses: angular/dev-infra/github-actions/saucelabs@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/saucelabs@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Set up Sauce Tunnel Daemon
run: pnpm bazel run //tools/saucelabs-daemon/background-service -- $JOBS &
env:
+1 -1
View File
@@ -9,6 +9,6 @@ jobs:
status:
runs-on: ubuntu-latest
steps:
- uses: angular/dev-infra/github-actions/unified-status-check@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
- uses: angular/dev-infra/github-actions/unified-status-check@90bba8b673b749ce67760b4d993b9b421adac30f
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+4 -4
View File
@@ -21,7 +21,7 @@ jobs:
workflows: ${{ steps.workflows.outputs.workflows }}
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Install node modules
run: pnpm install --frozen-lockfile
- id: workflows
@@ -36,16 +36,16 @@ jobs:
workflow: ${{ fromJSON(needs.list.outputs.workflows) }}
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Install node modules
run: pnpm install --frozen-lockfile
# We utilize the google-github-actions/auth action to allow us to get an active credential using workflow
# identity federation. This allows us to request short lived credentials on demand, rather than storing
# credentials in secrets long term. More information can be found at:
# https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform
- uses: 'google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f' # v2
- uses: 'google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093' # v3
with:
project_id: 'internal-200822'
workload_identity_provider: 'projects/823469418460/locations/global/workloadIdentityPools/measurables-tracking/providers/angular'
+41 -41
View File
@@ -19,9 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
with:
cache-node-modules: true
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Check code lint
@@ -39,7 +37,7 @@ jobs:
- name: Check code format
run: pnpm ng-dev format changed --check ${{ github.event.pull_request.base.sha }}
- name: Check Package Licenses
uses: angular/dev-infra/github-actions/linting/licenses@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/linting/licenses@90bba8b673b749ce67760b4d993b9b421adac30f
with:
allow-dependencies-licenses: 'pkg:npm/google-protobuf@'
@@ -47,13 +45,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
with:
cache-node-modules: true
disable-package-manager-cache: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run unit tests
@@ -61,24 +59,23 @@ jobs:
- name: Test build
run: pnpm devtools:build:chrome
- name: Cypress run
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
uses: cypress-io/github-action@7ef72e250a9e564efb4ed4c2433971ada4cc38b4 # v6.10.4
with:
command: pnpm devtools:test:e2e
start: pnpm bazel run //devtools/src:devserver
wait-on: 'http://localhost:4200'
wait-on-timeout: 300
install: false
test:
runs-on: ubuntu-latest-8core
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
with:
cache-node-modules: true
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run CI tests for framework
@@ -95,16 +92,14 @@ jobs:
retention-days: 1
integration-tests:
runs-on: ubuntu-latest-4core
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
with:
cache-node-modules: true
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run integration CI tests for framework
@@ -112,37 +107,46 @@ jobs:
adev:
runs-on:
labels: ubuntu-latest-8core
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm bazel test //adev/...
- name: Build adev in fast mode to ensure it continues to work
run: pnpm bazel build //adev:build --config=release
run: pnpm bazel build //adev:build
vscode-ng-language-service:
runs-on:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm bazel test //vscode-ng-language-service/...
zone-js:
runs-on:
labels: ubuntu-latest-4core
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
with:
cache-node-modules: true
node-module-directories: |
./node_modules
./packages/zone.js/node_modules
./packages/zone.js/test/typings/node_modules
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/setup@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
uses: angular/dev-infra/github-actions/bazel/configure-remote@90bba8b673b749ce67760b4d993b9b421adac30f
- name: Install node modules
run: pnpm install --frozen-lockfile
- run: |
@@ -163,8 +167,6 @@ jobs:
cp dist/bin/packages/zone.js/npm_package/bundles/zone-patch-electron.umd.js ./packages/zone.js/test/extra/
cp dist/bin/packages/zone.js/test/closure/zone.closure.js ./packages/zone.js/build/test/zone.closure.mjs
# Install
- run: pnpm -C packages/zone.js install --frozen-lockfile
# Run zone.js tools tests
- run: pnpm -C packages/zone.js promisefinallytest
- run: pnpm -C packages/zone.js jest:test
@@ -174,14 +176,12 @@ jobs:
- run: pnpm -C packages/zone.js/test/typings test
# saucelabs:
# runs-on: ubuntu-latest-4core
# runs-on: ubuntu-latest
# env:
# SAUCE_TUNNEL_IDENTIFIER: angular-framework-${{ github.run_number }}
# steps:
# - name: Initialize environment
# uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b5a3609f89c06eb4037dce22a93641213a5d1508
# with:
# cache-node-modules: true
# - name: Install node modules
# run: pnpm install --frozen-lockfile
# - uses: ./.github/actions/saucelabs-legacy
+3 -3
View File
@@ -25,12 +25,12 @@ jobs:
steps:
- name: 'Checkout code'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
persist-credentials: false
- name: 'Run analysis'
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
with:
results_file: results.sarif
results_format: sarif
@@ -47,6 +47,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
with:
sarif_file: results.sarif
@@ -1,87 +0,0 @@
name: Update ADEV Angular CDK APIs and CLI Help
on:
workflow_dispatch:
inputs: {}
push:
branches:
- 'main'
- '[0-9]+.[0-9]+.x'
# Declare default permissions as read only.
permissions:
contents: read
jobs:
update_adev_docs:
name: Update Angular CDK APIs and CLI Help (if necessary)
if: github.repository == 'angular/angular'
runs-on: ubuntu-latest
# Prevents multiple concurrent runs of this workflow for the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout the repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Setting `persist-credentials: false` prevents the github-action account from being the
# account that is attempted to be used for authentication, instead the remote is set to
# an authenticated URL.
persist-credentials: false
# Angular CDK
- name: Generate CDK apis
run: node adev/scripts/update-cdk-apis/index.mjs
env:
ANGULAR_CDK_BUILDS_READONLY_GITHUB_TOKEN: ${{ secrets.ANGULAR_CDK_BUILDS_READONLY_GITHUB_TOKEN }}
- name: Create a PR CDK apis (if necessary)
uses: peter-evans/create-pull-request@v7.0.8 # v7.0.8
with:
token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
push-to-fork: 'angular-robot/angular'
delete-branch: true
maintainer-can-modify: false
branch: docs-update-cdk-apis-${{github.ref_name}}
committer: Angular Robot <angular-robot@google.com>
author: Angular Robot <angular-robot@google.com>
title: 'docs: update Angular CDK apis [${{github.ref_name}}]'
body: |
Updated Angular CDK api files.
labels: |
action: merge
area: docs
commit-message: |
docs: update Angular CDK apis
Updated Angular CDK api files.
# Angular CLI
- name: Reset to current GitHub ref
run: |
git reset --hard ${{ github.ref }}
- name: Generate CLI help
run: node adev/scripts/update-cli-help/index.mjs
env:
ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN: ${{ secrets.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN }}
- name: Create a PR CLI help (if necessary)
uses: peter-evans/create-pull-request@v7.0.8 # v7.0.8
with:
token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
push-to-fork: 'angular-robot/angular'
delete-branch: true
maintainer-can-modify: false
branch: docs-update-cli-help-${{github.ref_name}}
committer: Angular Robot <angular-robot@google.com>
author: Angular Robot <angular-robot@google.com>
title: 'docs: update Angular CLI help [${{github.ref_name}}]'
body: |
Updated Angular CLI help contents.
labels: |
action: merge
area: docs
commit-message: |
docs: update Angular CLI help
Updated Angular CLI help contents.
-2
View File
@@ -16,9 +16,7 @@ pubspec.lock
!.devcontainer/recommended-devcontainer.json
!.devcontainer/recommended-Dockerfile
.settings/
.vscode/launch.json
.vscode/settings.json
.vscode/tasks.json
*.swo
*.swp
modules/.settings
+23
View File
@@ -0,0 +1,23 @@
/**
* The configuration for `ng-dev caretaker` commands.
*
* @type { import("@angular/ng-dev").CaretakerConfig }
*/
export const caretaker = {
g3SyncConfigPath: './.ng-dev/google-sync-config.json',
githubQueries: [
{
name: 'Merge Queue',
query: `is:pr is:open label:"action: merge"`,
},
{
name: 'Merge Assistance Queue',
query: `is:pr is:open label:"merge: caretaker note" label:"action: merge"`,
},
{
name: 'Initial Triage Queue',
query: `is:open no:milestone -draft:true`,
},
],
hasEmeaCaretaker: true,
};
-21
View File
@@ -1,21 +0,0 @@
import {CaretakerConfig} from '@angular/ng-dev';
/** The configuration for `ng-dev caretaker` commands. */
export const caretaker: CaretakerConfig = {
g3SyncConfigPath: './.ng-dev/google-sync-config.json',
githubQueries: [
{
name: 'Merge Queue',
query: `is:pr is:open label:"action: merge"`,
},
{
name: 'Merge Assistance Queue',
query: `is:pr is:open label:"merge: caretaker note" label:"action: merge"`,
},
{
name: 'Initial Triage Queue',
query: `is:open no:milestone -draft:true`,
},
],
caretakerGroup: 'angular-caretaker',
};
+38
View File
@@ -0,0 +1,38 @@
/**
* The configuration for `ng-dev commit-message` commands.
*
* @type { import("@angular/ng-dev").CommitMessageConfig }
*/
export const commitMessage = {
maxLineLength: Infinity,
minBodyLength: 20,
minBodyLengthTypeExcludes: ['docs'],
// If you update this, also update the docs.
// https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md#scope
scopes: [
'animations',
'benchpress',
'common',
'compiler',
'compiler-cli',
'core',
'dev-infra',
'devtools',
'docs-infra',
'elements',
'forms',
'http',
'language-service',
'language-server',
'localize',
'migrations',
'platform-browser',
'platform-browser-dynamic',
'platform-server',
'router',
'service-worker',
'upgrade',
'vscode-extension',
'zone.js',
],
};
-39
View File
@@ -1,39 +0,0 @@
import {CommitMessageConfig} from '@angular/ng-dev';
/**
* The configuration for `ng-dev commit-message` commands.
*/
export const commitMessage: CommitMessageConfig = {
maxLineLength: Infinity,
minBodyLength: 20,
minBodyLengthTypeExcludes: ['docs'],
// If you update this, also update the docs.
// https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md#scope
scopes: [
'animations',
'bazel',
'benchpress',
'changelog',
'common',
'compiler',
'compiler-cli',
'core',
'dev-infra',
'devtools',
'docs-infra',
'elements',
'forms',
'http',
'language-service',
'localize',
'migrations',
'packaging',
'platform-browser',
'platform-browser-dynamic',
'platform-server',
'router',
'service-worker',
'upgrade',
'zone.js',
],
};
+8
View File
@@ -0,0 +1,8 @@
import {caretaker} from './caretaker.mjs';
import {commitMessage} from './commit-message.mjs';
import {format} from './format.mjs';
import {github} from './github.mjs';
import {pullRequest} from './pull-request.mjs';
import {release} from './release.mjs';
export {commitMessage, format, github, pullRequest, caretaker, release};
-15
View File
@@ -1,15 +0,0 @@
import {caretaker} from './caretaker.mjs';
import {commitMessage} from './commit-message.mjs';
import {format} from './format.mjs';
import {github} from './github.mjs';
import {pullRequest} from './pull-request.mjs';
import {release} from './release.mjs';
export {
commitMessage,
format,
github,
pullRequest,
caretaker,
release,
};
+9
View File
@@ -0,0 +1,9 @@
/**
* Configuration for the `ng-dev format` command.
*
* @type { import("@angular/ng-dev").FormatConfig }
*/
export const format = {
'prettier': true,
'buildifier': true,
};
-32
View File
@@ -1,32 +0,0 @@
import {FormatConfig} from '@angular/ng-dev';
/**
* Configuration for the `ng-dev format` command.
*/
export const format: FormatConfig = {
'prettier': {
'matchers': [
'**/*.{yaml,yml}',
'**/*.{js,ts,mjs,mts,cjs,cts,tsx}',
'devtools/**/*.{js,ts,mjs,mts,cjs,cts,html,scss}',
'integration/**/size.json',
// Do not format d.ts files as they are generated
'!**/*.d.ts',
// Both third_party and .yarn are directories containing copied code which should
// not be modified.
'!third_party/**',
'!.yarn/**',
// Do not format the locale files which are checked-in for Google3, but generated using
// the `generate-locales-tool` from `packages/common/locales`.
'!packages/core/src/i18n/locale_en.ts',
'!packages/common/locales/closure-locale.ts',
'!packages/common/src/i18n/currencies.ts',
// Test cases contain non valid code.
'!packages/compiler-cli/test/compliance/test_cases/**/*.{js,ts,mjs,mts,cjs,cts}',
// Ignore generated javascript file(s)
'!.github/actions/deploy-docs-site/main.js',
],
},
'buildifier': true,
};
+12
View File
@@ -0,0 +1,12 @@
/**
* Github configuration for the `ng-dev` command. This repository is used as
* remote for the merge script and other utilities like `ng-dev pr rebase`.
*
* @type { import("@angular/ng-dev").GithubConfig }
*/
export const github = {
owner: 'angular',
name: 'angular',
mainBranchName: 'main',
mergeMode: 'caretaker-only',
};
-12
View File
@@ -1,12 +0,0 @@
import {GithubConfig} from '@angular/ng-dev';
/**
* Github configuration for the `ng-dev` command. This repository is used as
* remote for the merge script and other utilities like `ng-dev pr rebase`.
*/
export const github: GithubConfig = {
owner: 'angular',
name: 'angular',
mainBranchName: 'main',
useNgDevAuthService: true,
};
+34
View File
@@ -0,0 +1,34 @@
/**
* Configuration for the merge tool in `ng-dev`. This sets up the labels which
* are respected by the merge script (e.g. the target labels).
*
* @type { import("@angular/ng-dev").PullRequestConfig }
*/
export const pullRequest = {
githubApiMerge: {
default: 'auto',
labels: [{pattern: 'merge: squash commits', method: 'squash'}],
},
requiredBaseCommits: {
// PRs that target either `main` or the patch branch, need to be rebased
// on top of the latest commit message validation fix.
// These SHAs are the commits that update the required license text in the header.
'main': '5aeb9a4124922d8ac08eb73b8f322905a32b0b3a',
'10.0.x': '27b95ba64a5d99757f4042073fd1860e20e3ed24',
},
// `docs-infra` are not affecting the public NPM packages.
targetLabelExemptScopes: ['docs-infra'],
// enables specific validations during the pull request merge process
validators: {
assertEnforceTested: true,
assertIsolatedSeparateFiles: true,
},
requiredStatuses: [
{type: 'check', name: 'test'},
{type: 'check', name: 'lint'},
{type: 'check', name: 'adev'},
{type: 'check', name: 'zone-js'},
{type: 'status', name: 'google-internal-tests'},
],
};
-33
View File
@@ -1,33 +0,0 @@
import {PullRequestConfig} from '@angular/ng-dev';
/**
* Configuration for the merge tool in `ng-dev`. This sets up the labels which
* are respected by the merge script (e.g. the target labels).
*/
export const pullRequest: PullRequestConfig = {
githubApiMerge: false,
requiredBaseCommits: {
// PRs that target either `main` or the patch branch, need to be rebased
// on top of the latest commit message validation fix.
// These SHAs are the commits that update the required license text in the header.
'main': '5aeb9a4124922d8ac08eb73b8f322905a32b0b3a',
'10.0.x': '27b95ba64a5d99757f4042073fd1860e20e3ed24',
},
// `dev-infra` and `docs-infra` are not affecting the public NPM packages. Similarly,
// the `bazel` package is not considered part of the public API so that features
// can land in patch branches.
targetLabelExemptScopes: ['dev-infra', 'docs-infra', 'bazel'],
// enables specific validations during the pull request merge process
validators: {
assertEnforceTested: true,
assertIsolatedSeparateFiles: true,
},
requiredStatuses: [
{type: 'check', name: 'test'},
{type: 'check', name: 'lint'},
{type: 'check', name: 'adev'},
{type: 'check', name: 'zone-js'},
{type: 'status', name: 'google-internal-tests'},
],
};
+44
View File
@@ -0,0 +1,44 @@
/**
* Configuration for the `ng-dev release` command.
*
* @type { import("@angular/ng-dev").ReleaseConfig }
*/
export const release = {
publishRegistry: 'https://wombat-dressing-room.appspot.com',
representativeNpmPackage: '@angular/core',
npmPackages: [
{name: '@angular/animations'},
{name: '@angular/common'},
{name: '@angular/compiler-cli'},
{name: '@angular/compiler'},
{name: '@angular/core'},
{name: '@angular/elements'},
{name: '@angular/forms'},
{name: '@angular/language-server'},
{name: '@angular/language-service'},
{name: '@angular/localize'},
{name: '@angular/platform-browser-dynamic'},
{name: '@angular/platform-browser'},
{name: '@angular/platform-server'},
{name: '@angular/router'},
{name: '@angular/service-worker'},
{name: '@angular/upgrade'},
],
buildPackages: async () => {
// The buildTargetPackages function is loaded at runtime as the loading the script
// causes an invocation of Bazel.
const {performNpmReleaseBuild} = await import('../scripts/build/package-builder.mjs');
return performNpmReleaseBuild();
},
releaseNotes: {
hiddenScopes: [
'dev-infra',
'docs-infra',
'zone.js',
'devtools',
'vscode-extension',
'benchpress',
],
},
releasePrLabels: ['area: build & ci', 'action: merge', 'PullApprove: disable'],
};
-35
View File
@@ -1,35 +0,0 @@
import {ReleaseConfig} from '@angular/ng-dev';
/** Configuration for the `ng-dev release` command. */
export const release: ReleaseConfig = {
rulesJsInteropMode: true,
publishRegistry: 'https://wombat-dressing-room.appspot.com',
representativeNpmPackage: '@angular/core',
npmPackages: [
{name: '@angular/animations'},
{name: '@angular/common'},
{name: '@angular/compiler'},
{name: '@angular/compiler-cli'},
{name: '@angular/core'},
{name: '@angular/elements'},
{name: '@angular/forms'},
{name: '@angular/language-service'},
{name: '@angular/localize'},
{name: '@angular/platform-browser'},
{name: '@angular/platform-browser-dynamic'},
{name: '@angular/platform-server'},
{name: '@angular/router'},
{name: '@angular/service-worker'},
{name: '@angular/upgrade'},
],
buildPackages: async () => {
// The buildTargetPackages function is loaded at runtime as the loading the script
// causes an invocation of Bazel.
const {performNpmReleaseBuild} = await import('../scripts/build/package-builder.mjs');
return performNpmReleaseBuild();
},
releaseNotes: {
hiddenScopes: ['bazel', 'dev-infra', 'docs-infra', 'zone.js', 'devtools'],
},
releasePrLabels: ['area: build & ci', 'action: merge', 'PullApprove: disable'],
};
+1 -1
View File
@@ -5,6 +5,6 @@
"module": "Node16",
"noEmit": true,
"skipLibCheck": true,
"types": []
"types": ["node"]
}
}
+1 -1
View File
@@ -1 +1 @@
22.18.0
22.21.1
+2 -2
View File
@@ -25,7 +25,7 @@ function readPackage(pkg, context) {
pkg.dependencies = {
...pkg.dependencies,
'@angular/compiler': 'workspace:*',
'typescript': '5.9.0-beta',
'typescript': '5.9.3',
};
}
@@ -42,7 +42,7 @@ function readPackage(pkg, context) {
// Change all locally generated packages to directly depend on the other local packages, instead
// of expecting them as peerDependencies automatically as we do not auto install peer deps. The
// package is also removed from peerDependencies as it was moved over and will just cause errors.
if (localAngularPackages.includes(key)) {
if (localAngularPackages.includes(key) && pkg.version === '0.0.0-PLACEHOLDER') {
pkg.dependencies = {
...pkg.dependencies,
[key]: 'workspace: *',
+34 -2
View File
@@ -1,3 +1,35 @@
.prettierrc
pnpm-lock.yaml
pnpm-lock.yaml
# Do not format d.ts files as they are generated
**/*.d.ts
# Both third_party and .yarn are directories containing copied code which should
# not be modified.
third_party/**/*.js
third_party/**/*.css
third_party/**/*.md
third_party/**/*.json
# Do not format the locale files which are checked-in for Google3, but generated using
# the `generate-locales-tool` from `packages/common/locales`.
packages/core/src/i18n/locale_en.ts
packages/common/locales/closure-locale.ts
packages/common/src/i18n/currencies.ts
# Test cases contain non valid code.
packages/compiler-cli/test/compliance/test_cases/**/*.js
packages/compiler-cli/test/compliance/test_cases/**/*.ts
# Ignore generated javascript file(s)
.github/actions/deploy-docs-site/main.js
# Ignore testing data files for language service
vscode-ng-language-service/syntaxes/test/data/*.ts
# Ignore goldens MD files
goldens/**/*.api.md
# adev generated files
adev/src/content/aria/**/*.json
adev/src/content/cli/**/*.json
adev/src/content/cdk/**/*.json
+16 -1
View File
@@ -7,5 +7,20 @@
"semi": true,
"quoteProps": "preserve",
"bracketSpacing": false,
"trailingComma": "all"
"trailingComma": "all",
"overrides": [
{
"files": ["./.prettierrc"],
"options": {
"parser": "json"
}
},
{
"files": ["*.html"],
"excludeFiles": ["**/test/**"],
"options": {
"parser": "angular"
}
}
]
}
+33 -75
View File
@@ -15,9 +15,6 @@
# - We trust that people do the right thing and won't approve changes they don't feel confident reviewing
# - We enforce that only approved PRs are merged ensuring that unreviewed code isn't accidentally merged
# - We distribute approval rights as much as possible to help us scale better
# - Groups have one or two global approvers groups as fallbacks:
# - @angular/fw-global-approvers: for approving minor changes, large-scale refactorings, and emergency situations.
# - @angular/fw-global-approvers-for-docs-only-changes: for approving minor documentation-only changes that don't require engineering review
# - A small number of file groups have very limited number of reviewers because incorrect changes to the files they guard would have serious consequences (e.g. security, public api)
#
# Configuration nuances:
@@ -37,27 +34,10 @@
# See reviewer list under `required-minimum-review` group. Team member names and
# usernames are managed there.
####################################################################################
# Approval Groups
####################################################################################
# =========================================================
# @angular/framework-global-approvers
# =========================================================
# Used for approving minor changes, large-scale refactorings, and in emergency situations.
#
# alxhub
# jelbourn
# josephperrott
#
# =========================================================
# @angular/framework-global-approvers-for-docs-only-changes
# =========================================================
# Used for approving minor documentation-only changes that don't require engineering review.
version: 3
# availability:
# users_unavailable: ['atscott']
#availability:
# users_unavailable: []
# Meta field that goes unused by PullApprove to allow for defining aliases to be
# used throughout the config.
@@ -97,14 +77,6 @@ overrides:
- if: len(groups.active.exclude("required-minimum-review").exclude("global-*")) == 0 and len(groups.approved.include("global-*")) == 0
status: failure
explanation: 'At least one group must match this PR. Please update an existing review group, or create a new group.'
# If any global dev-infra approval is given the status should be passing.
- if: len(groups.approved.include("global-dev-infra-approvers")) == 1
status: success
explanation: 'Passing as globally approved by dev-infra'
# If any global docs approval is given the status should be passing.
- if: len(groups.approved.include("global-docs-approvers")) == 1
status: success
explanation: 'Passing as globally approved by docs'
# If any global approval is given the status should be passing.
- if: len(groups.approved.include("global-approvers")) == 1
status: success
@@ -135,6 +107,10 @@ groups:
- kirjs
- JoostK
- mmalerba
- ~amishne
- ~leonsenft
- ~mattrbeck
- ~JeanMeche
# =========================================================
# Framework: General (most code in our packages)
@@ -164,6 +140,7 @@ groups:
'packages/router/**/{*,.*}',
'packages/service-worker/**/{*,.*}',
'packages/upgrade/**/{*,.*}',
'vscode-ng-language-service/**/{*,.*}',
])
reviewers:
users:
@@ -177,6 +154,10 @@ groups:
- thePunderWoman
- ~pkozlowski-opensource
- mmalerba
- JeanMeche
- ~amishne
- ~leonsenft
- ~mattrbeck
# =========================================================
# Framework: Security-sensitive files which require extra review
@@ -230,6 +211,9 @@ groups:
- thePunderWoman
- ~pkozlowski-opensource
- mmalerba
- ~amishne
- ~leonsenft
- ~mattrbeck
# =========================================================
# Tooling: Compiler API shared with Angular CLI
@@ -273,16 +257,19 @@ groups:
- bencodezen
- crisbeto
- kirjs
- ~JeanMeche
- JeanMeche
- jelbourn
- thePunderWoman
- devversion
- josephperrott
- ~pkozlowski-opensource
- mgechev
- ~mgechev
- MarkTechson
- mmalerba
- ~hawkgs
- ~amishne
- ~leonsenft
- ~mattrbeck
# =========================================================
# Angular DevTools
@@ -300,7 +287,7 @@ groups:
- ~devversion
- dgp1130
- hawkgs
- jkrems
- hybrist
- ~josephperrott
- JeanMeche
- milomg
@@ -320,7 +307,6 @@ groups:
'.gemini/**/{*,.*}',
'.ng-dev/**/{*,.*}',
'.vscode/**/{*,.*}',
'.yarn/**/{*,.*}',
'contributing-docs/*.md',
'contributing-docs/images/**/{*,.*}',
'goldens/{*,.*}',
@@ -393,13 +379,16 @@ groups:
- crisbeto
- devversion
- JeanMeche
- ~jkrems
- ~hybrist
- ~iteriani
- ~tbondwilkinson
- ~rahatarmanahmed
- ~amishne
- ~leonsenft
- ~mattrbeck
reviews:
request: 3 # Request reviews from 3 people
required: 2 # Require that 2 people approve
request: 2
required: 1
reviewed_for: required
# ================================================
@@ -424,6 +413,9 @@ groups:
- thePunderWoman
- ~pkozlowski-opensource
- mmalerba
- ~amishne
- ~leonsenft
- ~mattrbeck
reviews:
request: 2 # Request reviews from 2 people
required: 1 # Require that 1 person approve
@@ -517,44 +509,10 @@ groups:
global-approvers:
type: optional
reviewers:
teams:
- framework-global-approvers
reviews:
request: 0
required: 1
reviewed_for: required
# =========================================================
# Global Approvers For Docs
#
# All reviews performed for global docs approvals require
# using the `Reviewed-for:` specifier to set the approval
# specificity as documented at:
# https://docs.pullapprove.com/reviewed-for/
# =========================================================
global-docs-approvers:
type: optional
reviewers:
teams:
- framework-global-approvers-for-docs-only-changes
reviews:
request: 0
required: 1
reviewed_for: required
# =========================================================
# Global Approvers For Dev-Infra changes
#
# All reviews performed for global dev-infra approvals
# require using the `Reviewed-for:` specifier to set the
# approval specificity as documented at:
# https://docs.pullapprove.com/reviewed-for/
# =========================================================
global-dev-infra-approvers:
type: optional
reviewers:
teams:
- dev-infra-framework
users:
- alxhub
- jelbourn
- josephperrott
reviews:
request: 0
required: 1
-2
View File
@@ -8,8 +8,6 @@ To use the recommended configurations follow the steps below:
- install the recommended extensions in `.vscode/extensions.json`
- copy (or link) `.vscode/recommended-settings.json` to `.vscode/settings.json`
- copy (or link) `.vscode/recommended-launch.json` to `.vscode/launch.json`
- copy (or link) `.vscode/recommended-tasks.json` to `.vscode/tasks.json`
- restart the editor
If you already have your custom workspace settings, you should instead manually merge the file contents.
+84
View File
@@ -0,0 +1,84 @@
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.2.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "VSCE: Launch Dev Client",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}/vscode-ng-language-service"
],
"preLaunchTask": "VSCE: watch bundles"
},
{
"type": "extensionHost",
"request": "launch",
"name": "VSCE: Launch Prod Client",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}/dist/bin/vscode-ng-language-service/development_package"
],
"preLaunchTask": "VSCE: package"
},
{
"name": "VSCE: Attach to Server",
"type": "node",
"request": "attach",
"port": 6009,
"restart": true,
"sourceMaps": true,
"skipFiles": ["<node_internals>/**"],
"sourceMapPathOverrides": {
"?:*/bin/*": "${workspaceFolder}/*"
},
"resolveSourceMapLocations": ["!**/node_modules/**"]
},
{
"name": "DEBUG: Attach to bazel test",
"type": "node",
"request": "attach",
"port": 9229,
"restart": true,
"timeout": 600000,
"sourceMaps": true,
"skipFiles": ["<node_internals>/**"],
"sourceMapPathOverrides": {
"?:*/bin/*": "${workspaceFolder}/*"
},
"resolveSourceMapLocations": ["!**/node_modules/**"]
},
{
"name": "DEBUG: Run bazel test (Custom Target)",
"type": "node",
"request": "launch",
"restart": true,
"timeout": 600000,
"runtimeExecutable": "pnpm",
"runtimeArgs": ["bazel", "test", "${input:bazelTarget}", "--config=debug"],
"console": "integratedTerminal",
"cwd": "${workspaceFolder}"
}
],
"compounds": [
{
"name": "VSCE: Dev Client + Attach to Server",
"configurations": ["VSCE: Launch Dev Client", "VSCE: Attach to Server"]
},
{
"name": "DEBUG: Run bazel test (Custom Target) + Attach",
"configurations": ["DEBUG: Attach to bazel test", "DEBUG: Run bazel test (Custom Target)"]
}
],
"inputs": [
{
"id": "bazelTarget",
"type": "promptString",
"description": "Enter the Bazel test target (e.g., //path/to/my:unit_test)",
"default": "//packages/..."
}
]
}
-75
View File
@@ -1,75 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach to bazel test ... --config=debug",
"type": "node",
"request": "attach",
"port": 9229,
"address": "localhost",
"restart": false,
"sourceMaps": true,
"localRoot": "${workspaceRoot}",
"remoteRoot": "${workspaceRoot}",
"stopOnEntry": false,
"timeout": 600000,
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
},
{
"name": "Attach to bazel test ... --config=debug (no source maps)",
"type": "node",
"request": "attach",
"port": 9229,
"address": "localhost",
"restart": false,
"sourceMaps": false,
"localRoot": "${workspaceRoot}",
"remoteRoot": "${workspaceRoot}",
"stopOnEntry": false,
"timeout": 600000,
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
},
{
"name": "IVY:packages/core/test/acceptance",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/bazelisk",
"args": ["test", "packages/core/test/acceptance", "--config=debug"],
"port": 9229,
"address": "localhost",
"restart": true,
"sourceMaps": true,
"timeout": 600000,
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
},
{
"name": "IVY:packages/core/test/render3",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/bazelisk",
"args": ["test", "packages/core/test/render3", "--config=debug"],
"port": 9229,
"address": "localhost",
"restart": true,
"sourceMaps": true,
"timeout": 600000,
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
},
{
"name": "IVY:packages/core/test",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/bazelisk",
"args": ["test", "packages/core/test", "--config=debug"],
"port": 9229,
"address": "localhost",
"restart": true,
"sourceMaps": true,
"timeout": 600000,
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
}
]
}
+1 -3
View File
@@ -21,7 +21,5 @@
".history": true
},
"git.ignoreLimitWarning": true,
"gitlens.advanced.blame.customArguments": [
"--ignore-revs-file .git-blame-ignore-revs"
]
"gitlens.advanced.blame.customArguments": ["--ignore-revs-file .git-blame-ignore-revs"]
}
-109
View File
@@ -1,109 +0,0 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "IVY:packages/core/test/...",
"type": "shell",
"command": "${workspaceFolder}/node_modules/.bin/bazelisk",
"args": [
"test",
"packages/core/test",
"packages/core/test/acceptance",
"packages/core/test/render3",
],
"group": "test",
"presentation": {
"reveal": "always",
"panel": "dedicated",
},
},
{
"label": "VE:packages/core/test/...",
"type": "shell",
"command": "${workspaceFolder}/node_modules/.bin/bazelisk",
"args": [
"test",
"packages/core/test",
"packages/core/test/acceptance",
"packages/core/test/render3",
],
"group": "test",
"presentation": {
"reveal": "always",
"panel": "dedicated",
},
},
{
"label": "IVY:packages/core/test/acceptance",
"type": "shell",
"command": "${workspaceFolder}/node_modules/.bin/bazelisk",
"args": [
"test",
"packages/core/test/acceptance",
],
"group": "test",
"presentation": {
"reveal": "always",
"panel": "dedicated",
},
},
{
"label": "VE:packages/core/test/acceptance",
"type": "shell",
"command": "${workspaceFolder}/node_modules/.bin/bazelisk",
"args": [
"test",
"packages/core/test/acceptance",
],
"group": "test",
"presentation": {
"reveal": "always",
"panel": "dedicated",
},
},
{
"label": "IVY:packages/core/test",
"type": "shell",
"command": "${workspaceFolder}/node_modules/.bin/bazelisk",
"args": [
"test",
"packages/core/test",
],
"group": "test",
"presentation": {
"reveal": "always",
"panel": "dedicated",
},
},
{
"label": "VE:packages/core/test",
"type": "shell",
"command": "${workspaceFolder}/node_modules/.bin/bazelisk",
"args": [
"test",
"packages/core/test",
],
"group": "test",
"presentation": {
"reveal": "always",
"panel": "dedicated",
},
},
{
"label": "IVY:packages/core/test/render3",
"type": "shell",
"command": "${workspaceFolder}/node_modules/.bin/bazelisk",
"args": [
"test",
"packages/core/test/render3",
],
"group": "test",
"presentation": {
"reveal": "always",
"panel": "dedicated",
},
},
],
}
+32
View File
@@ -0,0 +1,32 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "VSCE: watch bundles",
"command": "pnpm --filter=ng-template run watch",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": {
"base": "$tsc-watch",
"background": {
"activeOnStart": true,
"beginsPattern": "^iBazel \\[\\d{1,2}:\\d{1,2}(?:AM|PM)\\]: Querying for files to watch.*",
"endsPattern": "^INFO: Build completed successfully, \\d+ total action(s)?"
}
}
},
{
"type": "shell",
"label": "VSCE: package",
"command": "pnpm --filter=ng-template run package"
}
]
}
-13
View File
@@ -1,13 +0,0 @@
# Yarn Vendoring
We utilize Yarn's `yarn-path` configuration in a shared `.yarnrc` file to enforce
everyone using the same version of Yarn. Yarn checks the `.yarnrc` file to
determine if yarn should delegate the command to a vendored version at the
provided path.
## How to update
To update to the latest version of Yarn as our vendored version:
- Run this command
```sh
yarn policies set-version latest
```
- Remove the previous version
-148049
View File
File diff suppressed because one or more lines are too long
-5
View File
@@ -1,5 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
yarn-path ".yarn/releases/yarn-1.22.22.cjs"
+24 -15
View File
@@ -1,7 +1,8 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
load("@npm2//:defs.bzl", "npm_link_all_packages")
load("//:yarn.bzl", "YARN_PATH")
load("//tools:defaults2.bzl", "copy_to_bin", "js_binary")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@devinfra//bazel/validation:defs.bzl", "validate_ts_version_matching")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("//tools:defaults.bzl", "copy_to_bin")
package(default_visibility = ["//visibility:public"])
@@ -9,9 +10,7 @@ exports_files([
"LICENSE",
"karma-js.conf.js",
"browser-providers.conf.js",
YARN_PATH,
"package.json",
"angular.json",
])
npm_link_all_packages(
@@ -25,6 +24,11 @@ filegroup(
srcs = ["package.json"],
)
validate_ts_version_matching(
module_lock_file = "MODULE.bazel.lock",
package_json = "package.json",
)
alias(
name = "tsconfig.json",
actual = "//packages:tsconfig-build.json",
@@ -60,16 +64,6 @@ config_setting(
values = {"stamp": "true"},
)
js_binary(
name = "yarn_vendored",
data = [".yarn/releases/yarn-1.22.22.cjs"],
entry_point = ".yarn/releases/yarn-1.22.22.cjs",
visibility = [
"//integration:__subpackages__",
"//modules/ssr-benchmarks:__subpackages__",
],
)
alias(
name = "sauce_connect",
actual = select({
@@ -78,3 +72,18 @@ alias(
"@devinfra//bazel/constraints:macos_arm64": "@sauce_connect_mac//:bin/sc",
}),
)
# When enabled, this flag substitutes dependency versions with snapshot repositories
# for all packages in this repository. Note that this does not apply to peer
# dependencies, as they must be installed directly.
bool_flag(
name = "enable_language_server_snapshot_repo_deps",
build_setting_default = False,
)
config_setting(
name = "language_server_package_json_use_snapshot_repo_deps",
flag_values = {
":enable_language_server_snapshot_repo_deps": "true",
},
)
+5487 -3096
View File
File diff suppressed because it is too large Load Diff
+5519 -5035
View File
File diff suppressed because it is too large Load Diff
+13 -13
View File
@@ -14,20 +14,20 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:
* Use welcoming and inclusive language
* Respect each other
* Provide and gracefully accept constructive criticism
* Show empathy towards other community members
- Use welcoming and inclusive language
- Respect each other
- Provide and gracefully accept constructive criticism
- Show empathy towards other community members
Examples of unacceptable behavior by participants include:
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* The use of sexualized language or imagery
* Unwelcome sexual attention or advances
* Other conduct which could reasonably be considered inappropriate in a
- The use of sexualized language or imagery
- Unwelcome sexual attention or advances
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
@@ -69,9 +69,9 @@ members of the project's leadership.
If you are banned you may contest the decision. To do so email conduct@angular.io with the subject line "Repeal Ban for {{your name here}}" and body with the responses to the following:
* Why do you believe you did not violate the Code of Conduct?
* Were other factors involved in this situation the leadership team may have been unaware of?
* Why do you wish to be a part of the Angular community?
- Why do you believe you did not violate the Code of Conduct?
- Were other factors involved in this situation the leadership team may have been unaware of?
- Why do you wish to be a part of the Angular community?
## Attribution
+97 -90
View File
@@ -3,22 +3,20 @@
We would love for you to contribute to Angular and help make it even better than it is today!
As a contributor, here are the guidelines we would like you to follow:
- [Code of Conduct](#coc)
- [Question or Problem?](#question)
- [Issues and Bugs](#issue)
- [Feature Requests](#feature)
- [Submission Guidelines](#submit)
- [Coding Rules](#rules)
- [Commit Message Guidelines](#commit)
- [Signing the CLA](#cla)
- [Code of Conduct](#coc)
- [Question or Problem?](#question)
- [Issues and Bugs](#issue)
- [Feature Requests](#feature)
- [Submission Guidelines](#submit)
- [Coding Rules](#rules)
- [Commit Message Guidelines](#commit)
- [Signing the CLA](#cla)
## <a name="coc"></a> Code of Conduct
Help us keep Angular open and inclusive.
Please read and follow our [Code of Conduct][coc].
## <a name="question"></a> Got a Question or Problem?
Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests.
@@ -34,28 +32,25 @@ To save your and our time, we will systematically close all issues that are requ
If you would like to chat about the question in real-time, you can reach out via [the Angular community Discord server][discord].
## <a name="issue"></a> Found a Bug?
If you find a bug in the source code, you can help us by [submitting an issue](#submit-issue) to our [GitHub Repository][github].
Even better, you can [submit a Pull Request](#submit-pr) with a fix.
## <a name="feature"></a> Missing a Feature?
You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub Repository.
If you would like to *implement* a new feature, please consider the size of the change in order to determine the right steps to proceed:
* For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed.
You can _request_ a new feature by [submitting an issue](#submit-issue) to our GitHub Repository.
If you would like to _implement_ a new feature, please consider the size of the change in order to determine the right steps to proceed:
- For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed.
This process allows us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
**Note**: Adding a new topic to the documentation, or significantly re-writing a topic, counts as a major feature.
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
- **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
## <a name="submit"></a> Submission Guidelines
### <a name="submit-issue"></a> Submitting an Issue
Before you submit an issue, please search the issue tracker. An issue for your problem might already exist and the discussion might inform you of workarounds readily available.
@@ -74,50 +69,67 @@ Unfortunately, we are not able to investigate / fix bugs without a minimal repro
You can file new issues by selecting from our [new issue templates](https://github.com/angular/angular/issues/new/choose) and filling out the issue template.
### <a name="pr-quality"></a> Contribution Quality
We strongly value open source contribution and pull requests from community contributors. Please note that every pull request is reviewed and merged by an actual person on the team, which does take time and effort. That is time and effort that does take away from other valuable work. With that in mind we have an minimum set of expectations that are required of any community contribution pull request that is opened.
1. Search [GitHub](https://github.com/angular/angular/pulls) for an open or closed PR that relates to your submission.
- You don't want to duplicate existing efforts.
2. Be sure that an issue or pull request clearly describes the problem you're fixing, or documents the design for the feature you'd like to add. Issues require a _minimal_ reproduction.
3. Discussing the design in an issue upfront helps to ensure that we're ready to accept your work. Pull requests are not the right place to do design work.
- When in doubt, open an issue first before doing any sort of speculative implementation work
4. Ideally the PR should be tied to an issue, but this is not required
5. The change should improve code quality (i.e. addressing a TODO) or should impact / improve a feature
6. Micro optimizations will only be accepted if they are validated by an actual benchmark
7. Do not open pull requests that are addressing feature requests that are not labeled as "help wanted" as they usually need additional design work before we could accept pull requests
8. The change should be well tested
If your pull request does not meet these minimum expectations, we may close your PR. Also, if your PR introduces a breaking change, it's possible the level of churn this breaking change causes may block our ability to move forward with it. We may close your PR in that situation, as well. Otherwise, we're excited to see your contributions and enthusiasm for Angular!
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
Before you submit your Pull Request (PR) consider the following guidelines:
1. Search [GitHub](https://github.com/angular/angular/pulls) for an open or closed PR that relates to your submission.
You don't want to duplicate existing efforts.
2. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add.
Discussing the design upfront helps to ensure that we're ready to accept your work.
3. Please sign our [Contributor License Agreement (CLA)](#cla) before sending PRs.
1. Please sign our [Contributor License Agreement (CLA)](#cla) before sending PRs.
We cannot accept code without a signed CLA.
Make sure you author all contributed Git commits with email address associated with your CLA signature.
4. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the [angular/angular](https://github.com/angular/angular/fork) repo.
2. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the [angular/angular](https://github.com/angular/angular/fork) repo.
5. In your forked repository, make your changes in a new git branch:
3. In your forked repository, make your changes in a new git branch:
```shell
git checkout -b my-fix-branch main
```
```shell
git checkout -b my-fix-branch main
```
6. Create your patch, **including appropriate test cases**.
4. Create your patch, **including appropriate test cases**.
7. Follow our [Coding Rules](#rules).
5. Follow our [Coding Rules](#rules).
8. Run the full Angular test suite, as described in the [developer documentation][dev-doc], and ensure that all tests pass.
6. Run the full Angular test suite, as described in the [developer documentation][dev-doc], and ensure that all tests pass.
9. Commit your changes using a descriptive commit message that follows our [commit message conventions][commit-message-guidelines].
7. Commit your changes using a descriptive commit message that follows our [commit message conventions][commit-message-guidelines].
Adherence to these conventions is necessary because release notes are automatically generated from these messages.
```shell
git commit --all
```
Note: the optional commit `--all` command line option will automatically "add" and "rm" edited files.
```shell
git commit --all
```
10. Push your branch to GitHub:
Note: the optional commit `--all` command line option will automatically "add" and "rm" edited files.
```shell
git push origin my-fix-branch
```
8. Push your branch to GitHub:
11. In GitHub, send a pull request to `angular:main`.
```shell
git push origin my-fix-branch
```
9. In GitHub, send a pull request to `angular:main`.
### Reviewing a Pull Request
@@ -133,16 +145,15 @@ If we ask for changes via code reviews then:
3. Create a fixup commit and push to your GitHub repository (this will update your Pull Request):
```shell
git commit --all --fixup HEAD
git push
```
```shell
git commit --all --fixup HEAD
git push
```
For more info on working with fixup commits see [here](./contributing-docs/using-fixup-commits.md).
For more info on working with fixup commits see [here](./contributing-docs/using-fixup-commits.md).
That's it! Thank you for your contribution!
##### Updating the commit message
A reviewer might often suggest changes to a commit message (for example, to add more context for a change or adhere to our [commit message guidelines][commit-message-guidelines]).
@@ -150,69 +161,68 @@ In order to update the commit message of the last commit on your branch:
1. Check out your branch:
```shell
git checkout my-fix-branch
```
```shell
git checkout my-fix-branch
```
2. Amend the last commit and modify the commit message:
```shell
git commit --amend
```
```shell
git commit --amend
```
3. Push to your GitHub repository:
```shell
git push --force-with-lease
```
```shell
git push --force-with-lease
```
> NOTE:<br />
> If you need to update the commit message of an earlier commit, you can use `git rebase` in interactive mode.
> See the [git docs](https://git-scm.com/docs/git-rebase#_interactive_mode) for more details.
#### After your pull request is merged
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
- Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
```shell
git push origin --delete my-fix-branch
```
```shell
git push origin --delete my-fix-branch
```
* Check out the main branch:
- Check out the main branch:
```shell
git checkout main -f
```
```shell
git checkout main -f
```
* Delete the local branch:
- Delete the local branch:
```shell
git branch -D my-fix-branch
```
```shell
git branch -D my-fix-branch
```
* Update your local `main` with the latest upstream version:
```shell
git pull --ff upstream main
```
- Update your local `main` with the latest upstream version:
```shell
git pull --ff upstream main
```
## <a name="rules"></a> Coding Rules
To ensure consistency throughout the source code, keep these rules in mind as you are working:
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
* All public API methods **must be documented**.
* We follow [Google's TypeScript Style Guide][ts-style-guide], but wrap all code at **100 characters**.
An automated formatter is available, see [building-and-testing-angular.md](./contributing-docs/building-and-testing-angular.md#formatting-your-source-code).
- All features or bug fixes **must be tested** by one or more specs (unit-tests).
- All public API methods **must be documented**.
- We follow [Google's TypeScript Style Guide][ts-style-guide], but wrap all code at **100 characters**.
An automated formatter is available, see [building-and-testing-angular.md](./contributing-docs/building-and-testing-angular.md#formatting-your-source-code).
## <a name="commit"></a> Commit Message Guidelines
We have very precise rules over how our Git commit messages must be formatted:
```
<type>(<scope>): <short summary>
```
@@ -224,21 +234,18 @@ See [Commit Message Guidelines][commit-message-guidelines] for details.
Please sign our Contributor License Agreement (CLA) before sending pull requests. For any code
changes to be accepted, the CLA must be signed. It's a quick process, we promise!
* For individuals, we have a [simple click-through form][individual-cla].
* For corporations, we'll need you to
- For individuals, we have a [simple click-through form][individual-cla].
- For corporations, we'll need you to
[print, sign and one of scan+email, fax or mail the form][corporate-cla].
If you have more than one GitHub accounts, or multiple email addresses associated with a single GitHub account, you must sign the CLA using the primary email address of the GitHub account used to author Git commits and send pull requests.
The following documents can help you sort out issues with GitHub accounts and multiple email addresses:
* https://help.github.com/articles/setting-your-commit-email-address-in-git/
* https://stackoverflow.com/questions/37245303/what-does-usera-committed-with-userb-13-days-ago-on-github-mean
* https://help.github.com/articles/about-commit-email-addresses/
* https://help.github.com/articles/blocking-command-line-pushes-that-expose-your-personal-email-address/
- https://help.github.com/articles/setting-your-commit-email-address-in-git/
- https://stackoverflow.com/questions/37245303/what-does-usera-committed-with-userb-13-days-ago-on-github-mean
- https://help.github.com/articles/about-commit-email-addresses/
- https://help.github.com/articles/blocking-command-line-pushes-that-expose-your-personal-email-address/
[coc]: https://github.com/angular/code-of-conduct/blob/main/CODE_OF_CONDUCT.md
[corporate-cla]: https://cla.developers.google.com/about/google-corporate
+172
View File
@@ -0,0 +1,172 @@
"""Rules/toolchains for angular with Bazel."""
module(
name = "angular",
)
bazel_dep(name = "rules_pkg", version = "1.1.0")
bazel_dep(name = "rules_nodejs", version = "6.6.2")
bazel_dep(name = "aspect_rules_ts", version = "3.7.1")
bazel_dep(name = "aspect_rules_js", version = "2.8.3")
bazel_dep(name = "aspect_rules_esbuild", version = "0.24.0")
bazel_dep(name = "aspect_rules_jasmine", version = "2.0.0")
bazel_dep(name = "aspect_rules_rollup", version = "2.0.1")
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "aspect_bazel_lib", version = "2.22.0")
bazel_dep(name = "tar.bzl", version = "0.7.0")
bazel_dep(name = "yq.bzl", version = "0.3.2")
bazel_dep(name = "rules_angular")
git_override(
module_name = "rules_angular",
commit = "7133b97252508f8528e5c5818a9a73cacc2e2a0e",
remote = "https://github.com/devversion/rules_angular.git",
)
bazel_dep(name = "devinfra")
git_override(
module_name = "devinfra",
commit = "90bba8b673b749ce67760b4d993b9b421adac30f",
remote = "https://github.com/angular/dev-infra.git",
)
bazel_dep(name = "rules_sass")
git_override(
module_name = "rules_sass",
commit = "1184a80751a21af8348f308abc5b38a41f26850e",
remote = "https://github.com/devversion/rules_sass.git",
)
bazel_dep(name = "rules_browsers")
git_override(
module_name = "rules_browsers",
commit = "8ef3e996d5fc040a35770f860987d8b9cad8ef3d",
remote = "https://github.com/devversion/rules_browsers.git",
)
yq = use_extension("@yq.bzl//yq:extensions.bzl", "yq")
use_repo(yq, "yq_toolchains")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(node_version = "22.21.1")
use_repo(node, "nodejs_toolchains")
use_repo(node, "nodejs_darwin_amd64")
use_repo(node, "nodejs_darwin_arm64")
use_repo(node, "nodejs_linux_amd64")
use_repo(node, "nodejs_linux_arm64")
use_repo(node, "nodejs_linux_ppc64le")
use_repo(node, "nodejs_linux_s390x")
use_repo(node, "nodejs_windows_amd64")
pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")
pnpm.pnpm(
name = "pnpm",
pnpm_version = "10.16.1",
)
use_repo(pnpm, "pnpm")
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
data = [
"//:.pnpmfile.cjs",
"//:package.json",
"//:pnpm-workspace.yaml",
"//:tools/pnpm-patches/dagre-d3-es+7.0.11.patch",
"//adev:package.json",
"//adev/shared-docs:package.json",
"//adev/shared-docs/pipeline/api-gen:package.json",
"//integration:package.json",
"//modules:package.json",
"//packages/animations:package.json",
"//packages/benchpress:package.json",
"//packages/common:package.json",
"//packages/compiler:package.json",
"//packages/compiler-cli:package.json",
"//packages/compiler-cli/linker/babel/test:package.json",
"//packages/core:package.json",
"//packages/core/test/bundling:package.json",
"//packages/elements:package.json",
"//packages/forms:package.json",
"//packages/language-service:package.json",
"//packages/localize:package.json",
"//packages/platform-browser:package.json",
"//packages/platform-browser-dynamic:package.json",
"//packages/platform-server:package.json",
"//packages/router:package.json",
"//packages/service-worker:package.json",
"//packages/upgrade:package.json",
"//tools/bazel/rules_angular_store:package.json",
"//vscode-ng-language-service/integration/pre_standalone_project:package.json",
"//vscode-ng-language-service/integration/project:package.json",
],
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "npm")
rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext")
rules_ts_ext.deps(
name = "angular_npm_typescript",
# Obtained by: curl --silent https://registry.npmjs.org/typescript/5.9.3 | jq -r '.dist.integrity'
ts_integrity = "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
ts_version = "5.9.3",
)
use_repo(rules_ts_ext, **{"npm_typescript": "angular_npm_typescript"})
# TODO: Figure out how to make ng_project update whenever the packages/core::pkg target changes.
rules_angular = use_extension("@rules_angular//setup:extensions.bzl", "rules_angular")
use_repo_rule("@rules_angular//setup:repositories.bzl", "configurable_deps_repo")(
name = "rules_angular_configurable_deps",
angular_compiler_cli = "@angular//:node_modules/@angular/compiler-cli",
typescript = "@angular//:node_modules/typescript",
)
override_repo(rules_angular, "rules_angular_configurable_deps")
register_toolchains(
"@devinfra//bazel/git-toolchain:git_linux_toolchain",
"@devinfra//bazel/git-toolchain:git_macos_x86_toolchain",
"@devinfra//bazel/git-toolchain:git_macos_arm64_toolchain",
"@devinfra//bazel/git-toolchain:git_windows_toolchain",
)
CLDR_VERSION = "47"
cldr_json_data = use_repo_rule("//packages/common/locales/generate-locales-tool:cldr-data.bzl", "cldr_json_data_repository")
cldr_json_data(
name = "cldr_json_data",
urls = {
"https://github.com/unicode-org/cldr-json/releases/download/%s.0.0/cldr-%s.0.0-json-full.zip" % (CLDR_VERSION, CLDR_VERSION): "bbb9a9aac2dfc534bd18288678a5984023d11d22f712f3c33425f3214bd1def6",
},
)
cldr_xml_data = use_repo_rule("//packages/common/locales/generate-locales-tool:cldr-data.bzl", "cldr_xml_data_repository")
cldr_xml_data(
name = "cldr_xml_data",
urls = {
"https://github.com/unicode-org/cldr/releases/download/release-%s/core.zip" % CLDR_VERSION: "d5ee2abac64158c04884a722f8ef4830ea22b6c74aac20185be2838db8eda788",
},
)
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch sauce connect (tool to open Saucelabs tunnel for Saucelabs browser tests)
http_archive(
name = "sauce_connect_linux_amd64",
build_file_content = """exports_files(["bin/sc"], visibility = ["//visibility:public"])""",
sha256 = "26b9c3630f441b47854b6032f7eca6f1d88d3f62e50ee44c27015d71a5155c36",
strip_prefix = "sc-4.8.2-linux",
url = "https://saucelabs.com/downloads/sc-4.8.2-linux.tar.gz",
)
http_archive(
name = "sauce_connect_mac",
build_file_content = """exports_files(["bin/sc"], visibility = ["//visibility:public"])""",
sha256 = "28277ce81ef9ab84f5b87b526258920a8ead44789a5034346e872629bbf38089",
strip_prefix = "sc-4.8.2-osx",
url = "https://saucelabs.com/downloads/sc-4.8.2-osx.zip",
)
+4081
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -146,11 +146,11 @@ Join the conversation and help the community.
[angularelements]: https://angular.dev/guide/elements
[ssr]: https://angular.dev/guide/ssr
[schematics]: https://angular.dev/tools/cli/schematics
[lazyloading]: https://angular.dev/guide/ngmodules/lazy-loading
[lazyloading]: https://angular.dev/guide/routing/define-routes#lazily-loaded-components
[node.js]: https://nodejs.org/
[npm]: https://www.npmjs.com/get-npm
[codeofconduct]: CODE_OF_CONDUCT.md
[X (formerly Twitter)]: https://www.twitter.com/angular
[X (formerly Twitter)]: https://www.x.com/angular
[bluesky]: https://bsky.app/profile/angular.dev
[discord]: https://discord.gg/angular
[stackoverflow]: https://stackoverflow.com/questions/tagged/angular
-257
View File
@@ -1,257 +0,0 @@
workspace(
name = "angular",
)
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# The PKG rules are needed to build tar packages for integration tests. The builtin
# rule in `@bazel_tools` is not Windows compatible and outdated.
# NOTE: We cannot move past version 0.6.0 as pkg_tar no longer works on directories, which rules_nodejs
# relies on for node_modules setup.
http_archive(
name = "rules_pkg",
sha256 = "62eeb544ff1ef41d786e329e1536c1d541bb9bcad27ae984d57f18f314018e66",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.6.0/rules_pkg-0.6.0.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.6.0/rules_pkg-0.6.0.tar.gz",
],
)
http_archive(
name = "aspect_rules_js",
sha256 = "304c51726b727d53277dd28fcda1b8e43b7e46818530b8d6265e7be98d5e2b25",
strip_prefix = "rules_js-2.3.8",
url = "https://github.com/aspect-build/rules_js/releases/download/v2.3.8/rules_js-v2.3.8.tar.gz",
)
load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
rules_js_dependencies()
load("@aspect_rules_js//js:toolchains.bzl", "rules_js_register_toolchains")
rules_js_register_toolchains(
node_repositories = {
"20.19.0-darwin_arm64": ("node-v20.19.0-darwin-arm64.tar.gz", "node-v20.19.0-darwin-arm64", "c016cd1975a264a29dc1b07c6fbe60d5df0a0c2beb4113c0450e3d998d1a0d9c"),
"20.19.0-darwin_amd64": ("node-v20.19.0-darwin-x64.tar.gz", "node-v20.19.0-darwin-x64", "a8554af97d6491fdbdabe63d3a1cfb9571228d25a3ad9aed2df856facb131b20"),
"20.19.0-linux_arm64": ("node-v20.19.0-linux-arm64.tar.xz", "node-v20.19.0-linux-arm64", "dbe339e55eb393955a213e6b872066880bb9feceaa494f4d44c7aac205ec2ab9"),
"20.19.0-linux_ppc64le": ("node-v20.19.0-linux-ppc64le.tar.xz", "node-v20.19.0-linux-ppc64le", "84937108f005679e60b486ed8e801cebfe923f02b76d8e710463d32f82181f65"),
"20.19.0-linux_s390x": ("node-v20.19.0-linux-s390x.tar.xz", "node-v20.19.0-linux-s390x", "11f8ee99d792a83bba7b29911e0229dd6cd5e88987d7416346067db1cc76d89a"),
"20.19.0-linux_amd64": ("node-v20.19.0-linux-x64.tar.xz", "node-v20.19.0-linux-x64", "b4e336584d62abefad31baecff7af167268be9bb7dd11f1297112e6eed3ca0d5"),
"20.19.0-windows_amd64": ("node-v20.19.0-win-x64.zip", "node-v20.19.0-win-x64", "be72284c7bc62de07d5a9fd0ae196879842c085f11f7f2b60bf8864c0c9d6a4f"),
},
node_version = "20.19.0",
)
load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")
npm_translate_lock(
name = "npm2",
data = [
"//:.pnpmfile.cjs",
"//:package.json",
"//:pnpm-workspace.yaml",
"//:tools/pnpm-patches/dagre-d3-es+7.0.11.patch",
"//adev:package.json",
"//adev/shared-docs:package.json",
"//adev/shared-docs/pipeline/api-gen:package.json",
"//integration:package.json",
"//modules:package.json",
"//packages/animations:package.json",
"//packages/benchpress:package.json",
"//packages/common:package.json",
"//packages/compiler:package.json",
"//packages/compiler-cli:package.json",
"//packages/compiler-cli/linker/babel/test:package.json",
"//packages/core:package.json",
"//packages/core/test/bundling:package.json",
"//packages/elements:package.json",
"//packages/forms:package.json",
"//packages/language-service:package.json",
"//packages/localize:package.json",
"//packages/platform-browser:package.json",
"//packages/platform-browser-dynamic:package.json",
"//packages/platform-server:package.json",
"//packages/router:package.json",
"//packages/service-worker:package.json",
"//packages/upgrade:package.json",
"//tools/bazel/rules_angular_store:package.json",
],
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
pnpm_version = "9.15.9",
verify_node_modules_ignored = "//:.bazelignore",
)
load("@npm2//:repositories.bzl", "npm_repositories")
npm_repositories()
http_archive(
name = "aspect_rules_ts",
sha256 = "09af62a0d46918d815b5f48b5ed0f5349b62c15fc42fcc3fef5c246504ff8d99",
strip_prefix = "rules_ts-3.6.3",
url = "https://github.com/aspect-build/rules_ts/releases/download/v3.6.3/rules_ts-v3.6.3.tar.gz",
)
load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")
rules_ts_dependencies(
# Obtained by: curl --silent https://registry.npmjs.org/typescript/5.9.2 | jq -r '.dist.integrity'
ts_integrity = "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
ts_version_from = "//:package.json",
)
http_archive(
name = "aspect_rules_rollup",
sha256 = "0b8ac7d97cd660eb9a275600227e9c4268f5904cba962939d1a6ce9a0a059d2e",
strip_prefix = "rules_rollup-2.0.1",
url = "https://github.com/aspect-build/rules_rollup/releases/download/v2.0.1/rules_rollup-v2.0.1.tar.gz",
)
http_archive(
name = "aspect_rules_jasmine",
sha256 = "0d2f9c977842685895020cac721d8cc4f1b37aae15af46128cf619741dc61529",
strip_prefix = "rules_jasmine-2.0.0",
url = "https://github.com/aspect-build/rules_jasmine/releases/download/v2.0.0/rules_jasmine-v2.0.0.tar.gz",
)
load("@aspect_rules_jasmine//jasmine:dependencies.bzl", "rules_jasmine_dependencies")
rules_jasmine_dependencies()
load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies")
aspect_bazel_lib_dependencies()
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
load("//packages/common/locales/generate-locales-tool:cldr-data.bzl", "cldr_json_data_repository", "cldr_xml_data_repository")
cldr_major_version = "41"
cldr_json_data_repository(
name = "cldr_json_data",
urls = {
"https://github.com/unicode-org/cldr-json/releases/download/%s.0.0/cldr-%s.0.0-json-full.zip" % (cldr_major_version, cldr_major_version): "649b76647269e32b1b0a5f7b6eed52e9e63a1581f1afdcf4f6771e49c9713614",
},
)
cldr_xml_data_repository(
name = "cldr_xml_data",
urls = {
"https://github.com/unicode-org/cldr/releases/download/release-%s/cldr-common-%s.0.zip" % (cldr_major_version, cldr_major_version): "823c6170c41e2de2c229574e8a436332d25f1c9723409867fe721e00bc92d853",
},
)
# Fetch sauce connect (tool to open Saucelabs tunnel for Saucelabs browser tests)
http_archive(
name = "sauce_connect_linux_amd64",
build_file_content = """exports_files(["bin/sc"], visibility = ["//visibility:public"])""",
sha256 = "26b9c3630f441b47854b6032f7eca6f1d88d3f62e50ee44c27015d71a5155c36",
strip_prefix = "sc-4.8.2-linux",
url = "https://saucelabs.com/downloads/sc-4.8.2-linux.tar.gz",
)
http_archive(
name = "sauce_connect_mac",
build_file_content = """exports_files(["bin/sc"], visibility = ["//visibility:public"])""",
sha256 = "28277ce81ef9ab84f5b87b526258920a8ead44789a5034346e872629bbf38089",
strip_prefix = "sc-4.8.2-osx",
url = "https://saucelabs.com/downloads/sc-4.8.2-osx.zip",
)
git_repository(
name = "devinfra",
commit = "17282887a46c27e9f297a3292f1fde5b35dfafc1",
remote = "https://github.com/angular/dev-infra.git",
)
load("@devinfra//bazel:setup_dependencies_1.bzl", "setup_dependencies_1")
setup_dependencies_1()
load("@devinfra//bazel:setup_dependencies_2.bzl", "setup_dependencies_2")
setup_dependencies_2()
git_repository(
name = "rules_angular",
commit = "a1b4985620e2b66b45c590ed5ddda1b346b3f098",
remote = "https://github.com/devversion/rules_angular.git",
)
load("@rules_angular//setup:step_1.bzl", "rules_angular_step1")
rules_angular_step1()
load("@rules_angular//setup:step_2.bzl", "rules_angular_step2")
rules_angular_step2()
load("@rules_angular//setup:step_3.bzl", "rules_angular_step3")
rules_angular_step3(
angular_compiler_cli = "@angular//tools/bazel/rules_angular_store:node_modules/@angular/compiler-cli",
typescript = "@angular//:node_modules/typescript",
)
git_repository(
name = "rules_browsers",
commit = "56ef8007ea07cd1916429bca8bb523433b0e9cdc",
remote = "https://github.com/devversion/rules_browsers.git",
)
load("@rules_browsers//setup:step_1.bzl", "rules_browsers_setup_1")
rules_browsers_setup_1()
load("@rules_browsers//setup:step_2.bzl", "rules_browsers_setup_2")
rules_browsers_setup_2()
http_archive(
name = "aspect_rules_esbuild",
sha256 = "530adfeae30bbbd097e8af845a44a04b641b680c5703b3bf885cbd384ffec779",
strip_prefix = "rules_esbuild-0.22.1",
url = "https://github.com/aspect-build/rules_esbuild/releases/download/v0.22.1/rules_esbuild-v0.22.1.tar.gz",
)
load("@aspect_rules_esbuild//esbuild:dependencies.bzl", "rules_esbuild_dependencies")
rules_esbuild_dependencies()
load("@aspect_rules_esbuild//esbuild:repositories.bzl", "LATEST_ESBUILD_VERSION", "esbuild_register_toolchains")
esbuild_register_toolchains(
name = "esbuild",
esbuild_version = LATEST_ESBUILD_VERSION,
)
# Register git toolchains
register_toolchains(
"@devinfra//bazel/git-toolchain:git_linux_toolchain",
"@devinfra//bazel/git-toolchain:git_macos_x86_toolchain",
"@devinfra//bazel/git-toolchain:git_macos_arm64_toolchain",
"@devinfra//bazel/git-toolchain:git_windows_toolchain",
)
git_repository(
name = "rules_sass",
commit = "cc1e845339fc45d3c8390445014d5824b85a0948",
remote = "https://github.com/devversion/rules_sass.git",
)
load("@rules_sass//src/toolchain:repositories.bzl", "setup_rules_sass")
setup_rules_sass()
http_archive(
name = "jq.bzl",
sha256 = "7b63435aa19cc6a0cfd1a82fbdf2c7a2f0a94db1a79ff7a4469ffa94286261ab",
strip_prefix = "jq.bzl-0.1.0",
url = "https://github.com/bazel-contrib/jq.bzl/releases/download/v0.1.0/jq.bzl-v0.1.0.tar.gz",
)
+108 -103
View File
@@ -1,5 +1,4 @@
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@npm2//:defs.bzl", "npm_link_all_packages")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@rules_angular//src/architect:ng_application.bzl", "ng_application")
load("@rules_angular//src/architect:ng_config.bzl", "ng_config")
load("@rules_angular//src/architect:ng_test.bzl", "ng_test")
@@ -15,8 +14,8 @@ exports_files([
])
APPLICATION_FILES = [
"//adev/src/context:llms_full",
"//adev/src/assets/images",
"//adev/src/assets/images/v21-event:v21-event-images",
"//adev/src/assets/others",
"//adev/src/assets/previews",
"//adev/src/assets:tutorials",
@@ -25,122 +24,129 @@ APPLICATION_FILES = [
"//adev/src/assets:content",
"//adev/src/assets:context",
"//adev/src/content/examples:embeddable",
"tailwind.config.js",
] + glob(
["src/**/*"],
exclude = ["src/**/*.spec.ts"],
)
APPLICATION_DEPS = [
"//adev:node_modules/@angular-devkit/build-angular",
"//adev:node_modules/@codemirror/autocomplete",
"//adev:node_modules/@codemirror/commands",
"//adev:node_modules/@codemirror/lang-angular",
"//adev:node_modules/@codemirror/lang-css",
"//adev:node_modules/@codemirror/lang-html",
"//adev:node_modules/@codemirror/lang-javascript",
"//adev:node_modules/@codemirror/lang-sass",
"//adev:node_modules/@codemirror/language",
"//adev:node_modules/@codemirror/lint",
"//adev:node_modules/@codemirror/search",
"//adev:node_modules/@codemirror/state",
"//adev:node_modules/@codemirror/view",
"//adev:node_modules/@lezer/common",
"//adev:node_modules/@lezer/highlight",
"//adev:node_modules/@lezer/javascript",
"//adev:node_modules/@stackblitz/sdk",
"//adev:node_modules/@typescript/vfs",
"//adev:node_modules/@webcontainer/api",
"//adev:node_modules/@xterm/addon-fit",
"//adev:node_modules/@xterm/xterm",
"//adev:node_modules/algoliasearch",
"//adev:node_modules/angular-split",
"//adev:node_modules/fflate",
"//adev:node_modules/marked",
"//adev:node_modules/ngx-progressbar",
"//adev:node_modules/open-in-idx",
"//adev:node_modules/typescript",
"//adev:node_modules/xhr2",
"//adev:node_modules/@types/node",
"//adev:node_modules/@types/dom-navigation",
":node_modules/@codemirror/autocomplete",
":node_modules/@codemirror/commands",
":node_modules/@codemirror/lang-angular",
":node_modules/@codemirror/lang-css",
":node_modules/@codemirror/lang-html",
":node_modules/@codemirror/lang-javascript",
":node_modules/@codemirror/lang-sass",
":node_modules/@codemirror/language",
":node_modules/@codemirror/lint",
":node_modules/@codemirror/search",
":node_modules/@codemirror/state",
":node_modules/@codemirror/view",
":node_modules/@lezer/common",
":node_modules/@lezer/highlight",
":node_modules/@lezer/javascript",
":node_modules/@stackblitz/sdk",
":node_modules/@typescript/vfs",
":node_modules/@webcontainer/api",
":node_modules/@xterm/addon-fit",
":node_modules/@xterm/xterm",
":node_modules/algoliasearch",
":node_modules/angular-split",
":node_modules/fflate",
":node_modules/marked",
":node_modules/ngx-progressbar",
":node_modules/open-in-idx",
":node_modules/tailwindcss",
":node_modules/typescript",
":node_modules/@types/dom-navigation",
# Deep imports
"//adev:node_modules/@algolia/client-common",
"//adev:node_modules/@algolia/requester-browser-xhr",
"//adev:node_modules/@algolia/requester-node-http",
"//adev:node_modules/@lezer/css",
"//adev:node_modules/@lezer/html",
"//adev:node_modules/@lezer/lr",
"//adev:node_modules/@lezer/sass",
"//adev:node_modules/@marijn/find-cluster-break",
"//adev:node_modules/crelt",
"//adev:node_modules/style-mod",
"//adev:node_modules/w3c-keyname",
# The imports below are packages that our code does not directly import, but our upstream deps import from
# these locations directly. By design, rather than hoisting these packages into the "root" node_modules the
# dependency is found in (i.e. ./adev/node_modules), rules_js places all of each package's dependencies in
# a "hoisted" location within the `.aspect_rules_js/` directories in the node_modules directory. This prevents
# the bundler from being able to find it as expected. We instead specifically provide it as a dep within bazel
# as a mechanism of "hoisting" the package for our usage by this target.
":node_modules/@algolia/client-common",
":node_modules/@algolia/requester-browser-xhr",
":node_modules/@algolia/requester-node-http",
":node_modules/@lezer/css",
":node_modules/@lezer/html",
":node_modules/@lezer/lr",
":node_modules/@lezer/sass",
":node_modules/@marijn/find-cluster-break",
":node_modules/crelt",
":node_modules/style-mod",
":node_modules/w3c-keyname",
]
TEST_FILES = APPLICATION_FILES + [
"karma.conf.js",
"test-main.ts",
] + glob(["src/**/*.spec.ts"])
TEST_FILES = APPLICATION_FILES + glob(["src/app/**/*.spec.ts"])
TEST_DEPS = [
dep
for dep in APPLICATION_DEPS
if dep != "//adev:node_modules/@types/node"
] + [
"@rules_browsers//src/browsers/chromium",
"@rules_browsers//src/browsers/firefox",
"//adev/tools:windows-chromium-path",
TEST_DEPS = APPLICATION_DEPS + [
":node_modules/@types/jasmine",
":node_modules/karma",
":node_modules/karma-chrome-launcher",
":node_modules/karma-jasmine",
":node_modules/karma-coverage",
":node_modules/karma-jasmine-html-reporter",
":node_modules/jasmine-core",
"@rules_browsers//browsers/chromium",
]
ng_config(name = "ng_config")
bool_flag(
name = "full_build_adev",
build_setting_default = False,
)
config_setting(
name = "prod_build",
flag_values = {
":full_build_adev": "true",
},
)
config_setting(
name = "dev_build",
flag_values = {
":full_build_adev": "false",
},
)
config_based_architect_env = select({
":dev_build": {
"NG_BUILD_PARTIAL_SSR": "1",
},
":prod_build": {
"NG_BUILD_OPTIMIZE_CHUNKS": "1",
},
})
config_based_architect_flags = select({
":dev_build": [
"--configuration",
"development",
],
":prod_build": [
"--configuration",
"production",
],
})
ng_application(
name = "build",
srcs = APPLICATION_FILES + APPLICATION_DEPS,
args = config_based_architect_flags,
env = config_based_architect_env,
args = [
"--configuration",
"development",
],
env = {
"NG_BUILD_PARTIAL_SSR": "1",
"NG_FORCE_TTY": "0",
},
ng_config = ":ng_config",
node_modules = "//adev:node_modules",
node_modules = ":node_modules",
project_name = "angular-dev",
serve_args = [
"--port",
"4201",
],
tags = [
# Tagged as manual as both build and build.production use the same output directory.
"manual",
# RBE significantly slows down the build because the CLI executes multiple CPU-intensive instances of esbuild.
# Furthermore, the current RBE machine pool lacks high-spec machines.
"no-remote-exec",
],
)
ng_application(
name = "build.production",
srcs = APPLICATION_FILES + APPLICATION_DEPS,
args = [
"--configuration",
"production",
],
env = {
"NG_BUILD_OPTIMIZE_CHUNKS": "1",
"NG_FORCE_TTY": "0",
},
ng_config = ":ng_config",
node_modules = ":node_modules",
project_name = "angular-dev",
serve_args = [
"--port",
"4201",
],
tags = [
# Tagged as manual as both build and build.production use the same output directory.
"manual",
# RBE significantly slows down the build because the CLI executes multiple CPU-intensive instances of esbuild.
# Furthermore, the current RBE machine pool lacks high-spec machines.
"no-remote-exec",
],
)
ng_test(
@@ -152,10 +158,9 @@ ng_test(
"CHROMEDRIVER_BIN": "../" + "$(CHROMEDRIVER)",
},
ng_config = ":ng_config",
node_modules = "//adev:node_modules",
node_modules = ":node_modules",
project_name = "angular-dev",
toolchains = [
"@rules_browsers//src/browsers/chromium:toolchain_alias",
"@rules_browsers//src/browsers/firefox:toolchain_alias",
"@rules_browsers//browsers/chromium:toolchain_alias",
],
)
+11 -1
View File
@@ -17,7 +17,7 @@ git clone https://github.com/angular/angular.git
cd angular
# Install dependencies
pnpm
pnpm install
# Build and run local dev server
# NOTE: Initial build will take some time
@@ -51,3 +51,13 @@ pnpm bazel clean
# If that doesn't work, try it with the expunge flag
pnpm bazel clean --expunge
```
## High level architecture
The angular.dev website is a modern Angular application that utilizes Static Site Generation (SSG) to deliver pre-rendered, high-performance content to users.
The architecture is designed for efficiency and maintainability:
Content Sources: The documentation is sourced from two main places within the monorepo. The guides and tutorials are written in Markdown files, while the API reference pages are automatically generated by extracting documentation directly from the TypeScript source code of the Angular framework packages.
Build Process: During the build process, the Markdown files are converted into HTML. Simultaneously, the API documentation is extracted from the code comments. This content is then integrated into the Angular application.
+11 -21
View File
@@ -19,7 +19,7 @@
"build": {
"builder": "@angular/build:application",
"options": {
"externalDependencies": ["path"],
"externalDependencies": ["path", "xhr2"],
"outputMode": "static",
"outputPath": "dist",
"index": "src/index.html",
@@ -31,9 +31,9 @@
"assets": [
"src/favicon.ico",
"src/robots.txt",
"src/llms.txt",
"src/assets",
"src/context",
"src/llms.txt"
"src/assets/images/v21-event"
],
"styles": ["@angular/docs/styles/global-styles.scss", "./src/local-styles.scss"],
"scripts": [],
@@ -57,7 +57,7 @@
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"builder": "@angular/build:dev-server",
"configurations": {
"production": {
"buildTarget": "angular-dev:build:production"
@@ -75,24 +75,14 @@
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "angular-dev:build"
}
},
"test": {
"builder": "@angular/build:karma",
"options": {
"tsConfig": "tsconfig.spec.json",
"include": ["src/app"],
"karmaConfig": "karma.conf.js",
"main": "test-main.ts",
"inlineStyleLanguage": "scss",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["@angular/docs/styles/global-styles.scss"],
"scripts": [],
"webWorkerTsConfig": "tsconfig.worker.json"
"builder": "@angular/build:unit-test",
"options": {
"runner": "karma",
"browsers": ["ChromeHeadlessNoSandbox"],
"include": [
"src/app/**/*.spec.ts"
]
}
}
}
+14 -2
View File
@@ -19,7 +19,20 @@
]
},
{
"source": "/**/*-[0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z].*",
"source": "assets/others/versions.json",
"headers": [
{
"key": "Cross-Origin-Resource-Policy",
"value": "cross-origin"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
}
]
},
{
"source": "/**/*-[0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_].*",
"headers": [
{
"key": "Cache-Control",
@@ -56,7 +69,6 @@
"key": "Cross-Origin-Opener-Policy",
"value": "same-origin"
},
{
"key": "Cross-Origin-Embedder-Policy",
"value": "require-corp"
-85
View File
@@ -1,85 +0,0 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
const {getAdjustedChromeBinPathForWindows} = require('./tools/windows-chromium-path');
process.env.CHROME_BIN = getAdjustedChromeBinPathForWindows();
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
{'reporter:jasmine-seed': ['type', JasmineSeedReporter]},
],
proxies: {
'/dummy/image': 'src/assets/images/logos/angular/angular.png',
},
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
random: true,
seed: '',
},
},
jasmineHtmlReporter: {
suppressAll: true, // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/site'),
subdir: '.',
reporters: [{type: 'html'}, {type: 'text-summary'}],
},
reporters: ['progress', 'kjhtml', 'jasmine-seed'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
// See /integration/README.md#browser-tests for more info on these args
flags: [
'--no-sandbox',
'--headless',
'--disable-gpu',
'--disable-dev-shm-usage',
'--hide-scrollbars',
'--mute-audio',
],
},
},
browsers: ['ChromeHeadlessNoSandbox'],
browserNoActivityTimeout: 60000,
singleRun: false,
restartOnFileChange: true,
});
};
// Helpers
function JasmineSeedReporter(baseReporterDecorator) {
baseReporterDecorator(this);
this.onBrowserComplete = (browser, result) => {
const seed = result.order && result.order.random && result.order.seed;
if (seed) this.write(`${browser}: Randomized with seed ${seed}.\n`);
};
this.onRunComplete = () => undefined;
}
+61 -57
View File
@@ -1,82 +1,86 @@
{
"dependencies": {
"@angular-devkit/build-angular": "20.2.0-next.2",
"@algolia/client-common": "5.41.0",
"@algolia/client-search": "5.41.0",
"@algolia/requester-browser-xhr": "5.41.0",
"@algolia/requester-node-http": "5.41.0",
"@angular/animations": "workspace:*",
"@angular/build": "20.2.0-next.2",
"@angular/cdk": "20.2.0-next.2",
"@angular/cli": "20.2.0-next.2",
"@angular/aria": "21.0.3",
"@angular/build": "21.0.3",
"@angular/cdk": "21.0.3",
"@angular/cli": "21.0.3",
"@angular/common": "workspace:*",
"@angular/compiler-cli": "workspace:*",
"@angular/compiler": "workspace:*",
"@angular/compiler-cli": "workspace:*",
"@angular/core": "workspace:*",
"@angular/docs": "workspace:*",
"@angular/forms": "workspace:*",
"@angular/material": "20.2.0-next.2",
"@angular/material": "21.0.3",
"@angular/platform-browser": "workspace:*",
"@angular/platform-server": "workspace:*",
"@angular/router": "workspace:*",
"@angular/ssr": "20.2.0-next.2",
"@codemirror/autocomplete": "6.18.6",
"@codemirror/commands": "6.8.1",
"@angular/ssr": "21.0.3",
"@codemirror/autocomplete": "6.19.1",
"@codemirror/commands": "6.10.0",
"@codemirror/lang-angular": "0.1.4",
"@codemirror/lang-css": "6.3.1",
"@codemirror/lang-html": "6.4.9",
"@codemirror/lang-html": "6.4.11",
"@codemirror/lang-javascript": "6.2.4",
"@codemirror/lang-sass": "6.0.2",
"@codemirror/language": "6.11.2",
"@codemirror/lint": "6.8.5",
"@codemirror/language": "6.11.3",
"@codemirror/lint": "6.9.1",
"@codemirror/search": "6.5.11",
"@codemirror/state": "6.5.2",
"@codemirror/view": "6.38.1",
"@lezer/common": "1.2.3",
"@lezer/highlight": "1.2.1",
"@lezer/javascript": "1.5.1",
"@stackblitz/sdk": "1.11.0",
"@types/dom-navigation": "1.0.6",
"@types/jasmine": "5.1.8",
"@types/jsdom": "21.1.7",
"@types/node": "24.1.0",
"@typescript/vfs": "1.6.1",
"@webcontainer/api": "1.6.1",
"@xterm/addon-fit": "0.10.0",
"@xterm/xterm": "5.5.0",
"algoliasearch": "5.35.0",
"angular-split": "20.0.0",
"diff": "8.0.2",
"emoji-regex": "10.4.0",
"fflate": "0.8.2",
"html-entities": "2.6.0",
"jasmine-core": "5.9.0",
"jsdom": "26.1.0",
"karma-chrome-launcher": "3.2.0",
"karma-coverage": "2.2.1",
"karma-jasmine-html-reporter": "2.1.0",
"karma-jasmine": "5.1.0",
"marked": "16.1.1",
"mermaid": "11.9.0",
"ngx-progressbar": "14.0.0",
"open-in-idx": "0.1.1",
"playwright-core": "1.54.1",
"preact-render-to-string": "6.5.13",
"preact": "10.27.0",
"prettier": "3.6.2",
"rxjs": "7.8.2",
"shiki": "3.9.0",
"tinyglobby": "0.2.14",
"tslib": "2.8.1",
"typescript": "5.9.2",
"xhr2": "0.2.1",
"zone.js": "0.15.1",
"@algolia/client-common": "5.35.0",
"@algolia/requester-browser-xhr": "5.35.0",
"@algolia/requester-node-http": "5.35.0",
"@codemirror/view": "6.38.6",
"@lezer/common": "1.3.0",
"@lezer/css": "1.3.0",
"@lezer/html": "1.3.10",
"@lezer/highlight": "1.2.2",
"@lezer/html": "1.3.12",
"@lezer/javascript": "1.5.4",
"@lezer/lr": "1.4.2",
"@lezer/sass": "1.1.0",
"@marijn/find-cluster-break": "1.0.2",
"@stackblitz/sdk": "1.11.0",
"@types/dom-navigation": "1.0.6",
"@types/jasmine": "5.1.12",
"@types/jsdom": "27.0.0",
"@types/node": "24.9.1",
"@typescript/vfs": "1.6.2",
"@webcontainer/api": "1.6.1",
"@xterm/addon-fit": "0.10.0",
"@xterm/xterm": "5.5.0",
"algoliasearch": "5.41.0",
"angular-split": "20.0.0",
"crelt": "1.0.6",
"style-mod": "4.1.2",
"diff": "8.0.2",
"emoji-regex": "10.6.0",
"fflate": "0.8.2",
"jasmine-core": "5.12.0",
"jsdom": "27.0.1",
"karma-chrome-launcher": "3.2.0",
"karma-coverage": "2.2.1",
"karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.1.0",
"marked": "16.4.1",
"mermaid": "11.12.0",
"ngx-progressbar": "14.0.0",
"open-in-idx": "0.1.1",
"playwright-core": "1.56.1",
"preact": "10.27.2",
"preact-render-to-string": "6.6.3",
"prettier": "3.6.2",
"rxjs": "7.8.2",
"shiki": "3.14.0",
"style-mod": "4.1.3",
"tinyglobby": "0.2.15",
"tslib": "2.8.1",
"typescript": "5.9.3",
"w3c-keyname": "2.2.8"
},
"devDependencies": {
"autoprefixer": "10.4.21",
"karma": "~6.4.4",
"postcss": "8.5.6",
"tailwindcss": "3.4.18"
}
}
-90
View File
@@ -1,90 +0,0 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
//tslint:disable:no-console
import {execSync} from 'node:child_process';
import {existsSync, constants as fsConstants} from 'node:fs';
import {copyFile, mkdtemp, readdir, readFile, realpath, unlink, writeFile} from 'node:fs/promises';
import {tmpdir} from 'node:os';
import {join} from 'node:path';
export async function copyJsonAssets({repo, githubApi, assetsPath, destPath}) {
const buildInfoPath = join(destPath, '_build-info.json');
if (!existsSync(buildInfoPath)) {
throw new Error(`${buildInfoPath} does not exist.`);
}
const branch = process.env.GITHUB_REF;
const {sha: currentSha} = JSON.parse(await readFile(buildInfoPath, 'utf-8'));
const latestSha = await githubApi.getShaForBranch(branch);
console.log(`Comparing ${currentSha}...${latestSha}.`);
const affectedFiles = await githubApi.getAffectedFiles(currentSha, latestSha);
const changedFiles = affectedFiles.filter((file) => file.startsWith(`${assetsPath}/`));
if (changedFiles.length === 0) {
console.log(`No '${assetsPath}/**' files changed between ${currentSha} and ${latestSha}.`);
return;
}
console.log(
`The below files changed between ${currentSha} and ${latestSha}:\n` +
changedFiles.map((f) => '* ' + f).join('\n'),
);
const temporaryDir = await realpath(await mkdtemp(join(tmpdir(), 'copy-json-assets-')));
const execOptions = {cwd: temporaryDir, stdio: 'inherit'};
execSync('git init', execOptions);
execSync(`git remote add origin https://github.com/${repo}.git`, execOptions);
// fetch a commit
execSync(`git fetch origin ${latestSha}`, execOptions);
// reset this repository's main branch to the commit of interest
execSync('git reset --hard FETCH_HEAD', execOptions);
// get sha when files where changed
const shaWhenFilesChanged = execSync(`git rev-list -1 ${latestSha} "${assetsPath}/"`, {
encoding: 'utf8',
cwd: temporaryDir,
stdio: ['ignore', 'pipe', 'ignore'],
}).trim();
// Delete existing asset files.
const apiFilesUnlink = (await readdir(destPath))
.filter((f) => f.endsWith('.json'))
.map((f) => unlink(join(destPath, f)));
await Promise.allSettled(apiFilesUnlink);
// Copy new asset files
const tempAssetsDir = join(temporaryDir, assetsPath);
const assetFilesCopy = (await readdir(tempAssetsDir)).map((f) => {
const src = join(tempAssetsDir, f);
const dest = join(destPath, f);
return copyFile(src, dest, fsConstants.COPYFILE_FICLONE);
});
await Promise.allSettled(assetFilesCopy);
// Write SHA to file.
await writeFile(
buildInfoPath,
JSON.stringify(
{
branchName: branch,
sha: shaWhenFilesChanged,
},
undefined,
2,
),
);
console.log('\nChanges: ');
execSync(`git status --porcelain`, {stdio: 'inherit'});
console.log(`Successfully updated asset files in '${destPath}'.\n`);
}
@@ -0,0 +1,25 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {SynonymHit} from 'algoliasearch';
/**
* List of synonyms to upload to algolia.
*
* More information about synonyms can be found here:
* https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/
*/
const synonyms: SynonymHit[] = [
{
objectID: 'di-synonyms',
type: 'synonym',
synonyms: ['DI', 'dependency injection'],
},
];
export default synonyms;
+58
View File
@@ -0,0 +1,58 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {algoliasearch} from 'algoliasearch';
import synonyms from './algolia-synonyms.mjs';
/** The name of the index being updated. */
const INDEX_NAME = 'angular_v17';
/** The api key for making the change on the algolia index. */
const ALGOLIA_KEY = process.env['ALGOLIA_KEY'];
/** The algolia application id. */
const APP_NAME = 'L1XWT2UJ7F';
async function main() {
try {
if (ALGOLIA_KEY === undefined) {
throw new Error('Missing required environment variable: `ALGOLIA_KEY`');
}
const client = algoliasearch(APP_NAME, ALGOLIA_KEY);
// Obtain and list all of the previous synonyms for record keeping.
const {hits: oldHits, nbHits} = await client.searchSynonyms({indexName: INDEX_NAME});
// The list of previous synonyms cleaned to only include the information we store locally.
const oldSynonyms = oldHits.map(({objectID, type, synonyms}) => ({objectID, type, synonyms}));
// Delete all of the current synonyms
await client.clearSynonyms({indexName: INDEX_NAME, forwardToReplicas: true});
console.info(`Deleted ${nbHits} synonym(s)`);
// Upload our new synonyms
await client.saveSynonyms({
indexName: INDEX_NAME,
replaceExistingSynonyms: true,
forwardToReplicas: true,
synonymHit: synonyms,
});
console.info(`Uploaded ${synonyms.length} new synonym(s)`);
// List both the old and new synonyms for easier comparison in debugging.
console.info(`Previous Synonyms:`);
console.info(JSON.stringify(oldSynonyms, undefined, 2));
console.info(`New Synonyms:`);
console.info(JSON.stringify(synonyms, undefined, 2));
console.info('\nSuccessfully updated synonyms');
} catch (error) {
console.error('\nError updating synonyms:');
console.error(error);
process.exit(1);
}
}
main();
-3
View File
@@ -1,3 +0,0 @@
# Generating data for `angular.dev/api` CDK packages
This script updates the Angular CDK api JSON files stored in `adev/src/content/cdk`. This files are used to generate the [angular.dev api](https://angular.dev/api) pages for the CDK packages.
-35
View File
@@ -1,35 +0,0 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {dirname, resolve as resolvePath} from 'node:path';
import {fileURLToPath} from 'node:url';
import {copyJsonAssets} from '../shared/copy-json-assets.mjs';
import {GithubClient} from '../shared/github-client.mjs';
const scriptDir = dirname(fileURLToPath(import.meta.url));
const CDK_BUILDS_REPO = 'angular/cdk-builds';
const CDK_APIS_CONTENT_PATH = resolvePath(scriptDir, '../../src/content/cdk');
async function main() {
await copyJsonAssets({
repo: CDK_BUILDS_REPO,
assetsPath: '_adev_assets',
destPath: CDK_APIS_CONTENT_PATH,
githubApi: new GithubClient(
CDK_BUILDS_REPO,
process.env.ANGULAR_CDK_BUILDS_READONLY_GITHUB_TOKEN,
'ADEV_Angular_CDK_Sources_Update',
),
});
}
main().catch((err) => {
console.error(err);
process.exit(1);
});
-3
View File
@@ -1,3 +0,0 @@
# Generating data for `angular.dev/cli`
This script updates the Angular CLI help JSON files stored in `adev/src/content/cli/help`. This files are used to generate the [angular.dev CLI](https://angular.dev/cli) pages.
-35
View File
@@ -1,35 +0,0 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {dirname, resolve as resolvePath} from 'node:path';
import {fileURLToPath} from 'node:url';
import {copyJsonAssets} from '../shared/copy-json-assets.mjs';
import {GithubClient} from '../shared/github-client.mjs';
const scriptDir = dirname(fileURLToPath(import.meta.url));
const CLI_BUILDS_REPO = 'angular/cli-builds';
const CLI_HELP_CONTENT_PATH = resolvePath(scriptDir, '../../src/content/cli/help');
async function main() {
await copyJsonAssets({
repo: CLI_BUILDS_REPO,
assetsPath: 'help',
destPath: CLI_HELP_CONTENT_PATH,
githubApi: new GithubClient(
CLI_BUILDS_REPO,
process.env.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN,
'ADEV_Angular_CLI_Sources_Update',
),
});
}
main().catch((err) => {
console.error(err);
process.exit(1);
});
@@ -0,0 +1,15 @@
# Update cross-repository documentation assets
This script updates documentation assets from other repositories for `angular.dev`.
## Aria Packages
Updates the Angular Aria API JSON files in `adev/src/content/aria`, used for the [angular.dev API](https://angular.dev/api) pages.
## CDK Packages
Updates the Angular CDK API JSON files in `adev/src/content/cdk`, used for the [angular.dev API](https://angular.dev/api) pages.
## CLI Help Pages
Updates the Angular CLI help JSON files in `adev/src/content/cli`, used for the [angular.dev CLI](https://angular.dev/cli) pages.
@@ -0,0 +1,41 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
//tslint:disable:no-console
import {execSync} from 'node:child_process';
import {join} from 'node:path';
import {updateAssets} from './update-assets.mjs';
async function main() {
await updateAssets({
repo: 'angular/aria-builds',
assetsPath: '_adev_assets',
destPath: join(import.meta.dirname, '../../src/content/aria'),
});
await updateAssets({
repo: 'angular/cdk-builds',
assetsPath: '_adev_assets',
destPath: join(import.meta.dirname, '../../src/content/cdk'),
});
await updateAssets({
repo: 'angular/cli-builds',
assetsPath: 'help',
destPath: join(import.meta.dirname, '../../src/content/cli'),
});
console.log('\n-----------------------------------------------');
console.log('Change list');
console.log('-----------------------------------------------\n');
execSync(`git status --porcelain`, {stdio: 'inherit'});
}
main().catch((err) => {
console.error(err);
process.exit(1);
});
@@ -0,0 +1,132 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
//tslint:disable:no-console
import assert from 'node:assert';
import {execSync} from 'node:child_process';
import {existsSync, constants as fsConstants} from 'node:fs';
import {
copyFile,
mkdtemp,
readdir,
readFile,
realpath,
rm,
unlink,
writeFile,
} from 'node:fs/promises';
import {tmpdir} from 'node:os';
import {join} from 'node:path';
import {GithubClient} from './github-client.mjs';
export async function updateAssets({repo, assetsPath, destPath}) {
console.log('\n-----------------------------------------------');
console.log(`Processing: ${repo}`);
console.log('-----------------------------------------------\n');
const buildInfoPath = join(destPath, '_build-info.json');
if (!existsSync(buildInfoPath)) {
throw new Error(`${buildInfoPath} does not exist.`);
}
assert(process.env.GITHUB_REF);
const currentBranch = process.env.GITHUB_REF;
const {sha: storedSha, branchName: storedBranch} = JSON.parse(
await readFile(buildInfoPath, 'utf-8'),
);
assert(process.env.ANGULAR_READONLY_GITHUB_TOKEN);
const githubApi = new GithubClient(
repo,
process.env.ANGULAR_READONLY_GITHUB_TOKEN,
'ADEV_Cross_Repo_Docs_Update',
);
let downstreamBranch = currentBranch;
let latestSha = await githubApi.getShaForBranch(currentBranch);
if (
latestSha.includes('No commit') &&
currentBranch !== 'refs/heads/main' &&
currentBranch !== storedBranch
) {
// In some cases, such as when a new branch is created for a feature,
// the branch may not exist in the downstream repo. For example, during an
// exceptional minor release (e.g. FW 20.3.x and Components: 20.2.x).
// In such scenarios, we fallback to the last known branch.
latestSha = await githubApi.getShaForBranch(storedBranch);
downstreamBranch = storedBranch;
}
console.log(`Comparing ${storedSha}...${latestSha}.`);
const affectedFiles = await githubApi.getAffectedFiles(storedSha, latestSha);
const changedFiles = affectedFiles.filter((file) => file.startsWith(`${assetsPath}/`));
let shaWhenFilesChanged;
if (changedFiles.length > 0) {
console.log(
`The below files changed between ${storedSha} and ${latestSha}:\n` +
changedFiles.map((f) => '* ' + f).join('\n'),
);
const temporaryDir = await realpath(await mkdtemp(join(tmpdir(), 'update-assets-')));
try {
const execOptions = {cwd: temporaryDir, stdio: 'inherit'};
execSync('git init', execOptions);
execSync(`git remote add origin https://github.com/${repo}.git`, execOptions);
// fetch a commit
execSync(`git fetch origin ${latestSha}`, execOptions);
// reset this repository's main branch to the commit of interest
execSync('git reset --hard FETCH_HEAD', execOptions);
// get sha when files where changed
shaWhenFilesChanged = execSync(`git rev-list -1 ${latestSha} "${assetsPath}/"`, {
encoding: 'utf8',
cwd: temporaryDir,
stdio: ['ignore', 'pipe', 'ignore'],
}).trim();
// Delete existing asset files.
const apiFilesUnlink = (await readdir(destPath))
.filter((f) => f.endsWith('.json'))
.map((f) => unlink(join(destPath, f)));
await Promise.allSettled(apiFilesUnlink);
// Copy new asset files
const tempAssetsDir = join(temporaryDir, assetsPath);
const assetFilesCopy = (await readdir(tempAssetsDir)).map((f) => {
const src = join(tempAssetsDir, f);
const dest = join(destPath, f);
return copyFile(src, dest, fsConstants.COPYFILE_FICLONE);
});
await Promise.allSettled(assetFilesCopy);
} finally {
await rm(temporaryDir, {force: true, recursive: true});
}
console.log(`Successfully updated asset files in '${destPath}'.\n`);
} else {
console.log(`No '${assetsPath}/**' files changed between ${storedSha} and ${latestSha}.`);
}
// Write SHA to file.
await writeFile(
buildInfoPath,
JSON.stringify(
{
branchName: downstreamBranch,
sha: shaWhenFilesChanged ?? storedSha,
},
undefined,
2,
),
);
}
+1
View File
@@ -20,6 +20,7 @@ ts_project(
"//adev/shared-docs/components/search-dialog",
"//adev/shared-docs/components/select",
"//adev/shared-docs/components/slide-toggle",
"//adev/shared-docs/components/tab-group",
"//adev/shared-docs/components/table-of-contents",
"//adev/shared-docs/components/text-field",
"//adev/shared-docs/components/top-level-banner",
@@ -1,52 +1,52 @@
<!-- Algolia logo -->
<svg
id="Layer_1"
class="docs-algolia-logo"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 2196.2 500"
id="Layer_1"
class="docs-algolia-logo"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 2196.2 500"
>
<defs>
<style>
.cls-1,
.cls-2 {
fill: #003dff;
}
.cls-2 {
fill-rule: evenodd;
}
</style>
</defs>
<path
class="cls-2"
d="M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"
/>
<rect class="cls-1" x="1845.88" y="104.73" width="62.58" height="277.9" rx="5.9" ry="5.9" />
<path
class="cls-2"
d="M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"
/>
<path
class="cls-2"
d="M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"
/>
<path
class="cls-2"
d="M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"
/>
<path
class="cls-2"
d="M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"
/>
<path
class="cls-2"
d="M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"
/>
<path
class="cls-2"
d="M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"
/>
<path
class="cls-1"
d="M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"
/>
<defs>
<style>
.cls-1,
.cls-2 {
fill: #003dff;
}
.cls-2 {
fill-rule: evenodd;
}
</style>
</defs>
<path
class="cls-2"
d="M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"
/>
<rect class="cls-1" x="1845.88" y="104.73" width="62.58" height="277.9" rx="5.9" ry="5.9" />
<path
class="cls-2"
d="M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"
/>
<path
class="cls-2"
d="M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"
/>
<path
class="cls-2"
d="M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"
/>
<path
class="cls-2"
d="M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"
/>
<path
class="cls-2"
d="M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"
/>
<path
class="cls-2"
d="M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"
/>
<path
class="cls-1"
d="M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"
/>
</svg>

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

@@ -21,7 +21,7 @@ import {RouterLink} from '@angular/router';
export class Breadcrumb {
private readonly navigationState = inject(NavigationState);
breadcrumbItems = computed(() => {
readonly breadcrumbItems = computed(() => {
const breadcrumbs: NavigationItem[] = [];
let activeItem = this.navigationState.activeNavigationItem()?.parent;
@@ -1,22 +1,28 @@
@if (!hasAccepted()) {
<div class="docs-cookies-popup docs-invert-mode">
<p>This site uses cookies from Google to deliver its services and to analyze traffic.</p>
<div class="docs-cookies-popup docs-invert-mode">
<p>This site uses cookies from Google to deliver its services and to analyze traffic.</p>
<div>
<a href="https://policies.google.com/technologies/cookies" target="_blank" rel="noopener">
<button class="docs-primary-btn" [attr.text]="'Learn more'" aria-label="Learn More">
<div>
<a
href="https://policies.google.com/technologies/cookies"
target="_blank"
rel="noopener"
class="docs-primary-btn"
aria-label="Learn more about how Google uses cookies"
text="Learn more"
>
Learn more
</a>
<button
type="button"
(click)="accept()"
class="docs-primary-btn"
text="Ok, Got it"
aria-label="Ok, Got it"
>
Ok, Got it
</button>
</a>
<button
type="button"
(click)="accept()"
class="docs-primary-btn"
[attr.text]="'Ok, Got it'"
aria-label="Ok, Got it"
>
Ok, Got it
</button>
</div>
</div>
</div>
}
@@ -11,7 +11,7 @@ import {LOCAL_STORAGE} from '../../providers/index';
import {setCookieConsent} from '../../utils';
/**
* Decelare gtag as part of the window in this file as gtag is expected to already be loaded.
* Declare gtag as part of the window in this file as gtag is expected to already be loaded.
*/
declare const window: Window & typeof globalThis & {gtag?: Function};
@@ -27,7 +27,7 @@ export class CookiePopup {
private readonly localStorage = inject(LOCAL_STORAGE);
/** Whether the user has accepted the cookie disclaimer. */
hasAccepted = signal<boolean>(false);
readonly hasAccepted = signal(false);
constructor() {
// Needs to be in a try/catch, because some browsers will
@@ -0,0 +1,19 @@
load("//adev/shared-docs:defaults.bzl", "ng_project")
ng_project(
name = "copy-link-anchor",
srcs = [
"copy-link-anchor.component.ts",
],
visibility = [
"//adev/shared-docs/components:__pkg__",
"//adev/shared-docs/components/viewers:__pkg__",
],
deps = [
"//adev:node_modules/@angular/cdk",
"//adev:node_modules/@angular/common",
"//adev:node_modules/@angular/core",
"//adev:node_modules/@angular/material",
"//adev/shared-docs/components/icon",
],
)
@@ -0,0 +1,66 @@
/*!
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {ChangeDetectionStrategy, Component, inject, input, signal} from '@angular/core';
import {Clipboard} from '@angular/cdk/clipboard';
import {MatTooltip} from '@angular/material/tooltip';
import {IconComponent} from '../icon/icon.component';
export const CONFIRMATION_DISPLAY_TIME_MS = 1000;
@Component({
selector: 'docs-copy-link-button',
template: `<docs-icon>{{ showCopySuccess() ? 'check' : 'link' }}</docs-icon>`,
styles: `
:host {
cursor: pointer;
padding: 0;
margin-left: 8px;
display: inline-flex;
align-items: center;
opacity: 0;
transition: opacity 0.3s ease;
color: var(--quaternary-contrast);
vertical-align: middle;
}
:host(.docs-copy-link-success) {
color: var(--bright-blue);
}
`,
hostDirectives: [
{
directive: MatTooltip,
inputs: ['matTooltip'],
},
],
host: {
'[ariaLabel]': '"Copy link to " + label()',
'(click)': 'copyLink()',
'matTooltipPosition': 'above',
'[class.docs-copy-link-success]': 'showCopySuccess()',
},
imports: [IconComponent],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CopyLinkButton {
readonly href = input.required<string>();
readonly label = input.required<string>();
protected readonly showCopySuccess = signal(false);
private readonly clipboard = inject(Clipboard);
copyLink(): void {
const link = `${window.location.origin}${this.href()}`;
this.clipboard.copy(link);
this.showCopySuccess.set(true);
setTimeout(() => {
this.showCopySuccess.set(false);
}, CONFIRMATION_DISPLAY_TIME_MS);
}
}
@@ -56,24 +56,6 @@ describe('CopySourceCodeButton', () => {
expect(copySpy.calls.argsFor(0)[0].trim()).toBe(expectedCodeToBeCopied);
});
it('should not copy lines marked as deleted when code snippet contains diff', async () => {
const codeInHtmlFormat = `
<code>
<div class="line remove"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> *<span class="hljs-attr">ngFor</span>=<span class="hljs-string">"let product of products"</span>&gt;</span></div>
<div class="line add"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> *<span class="hljs-attr">ngFor</span>=<span class="hljs-string">"let product of products()"</span>&gt;</span></div>
</code>
`;
const expectedCodeToBeCopied = `<div *ngFor="let product of products()">`;
component.code.set(codeInHtmlFormat);
await fixture.whenStable();
const button = fixture.debugElement.query(By.directive(CopySourceCodeButton)).nativeElement;
button.click();
expect(copySpy.calls.argsFor(0)[0].trim()).toBe(expectedCodeToBeCopied);
});
it(`should set ${SUCCESSFULLY_COPY_CLASS_NAME} for ${CONFIRMATION_DISPLAY_TIME_MS} ms when copy was executed properly`, () => {
const clock = jasmine.clock().install();
component.code.set('example');
@@ -15,7 +15,6 @@ import {
inject,
signal,
} from '@angular/core';
import {CommonModule} from '@angular/common';
import {Clipboard} from '@angular/cdk/clipboard';
import {IconComponent} from '../icon/icon.component';
@@ -24,7 +23,7 @@ export const CONFIRMATION_DISPLAY_TIME_MS = 2000;
@Component({
selector: 'button[docs-copy-source-code]',
imports: [CommonModule, IconComponent],
imports: [IconComponent],
templateUrl: './copy-source-code-button.component.html',
host: {
'type': 'button',
@@ -12,6 +12,7 @@ ng_project(
],
visibility = [
"//adev/shared-docs/components:__pkg__",
"//adev/shared-docs/components/copy-link-anchor:__pkg__",
"//adev/shared-docs/components/copy-source-code-button:__pkg__",
"//adev/shared-docs/components/navigation-list:__pkg__",
"//adev/shared-docs/components/table-of-contents:__pkg__",
@@ -20,6 +20,7 @@ ng_project(
"//adev:node_modules/@angular/material",
"//adev:node_modules/@angular/router",
"//adev/shared-docs/components/icon",
"//adev/shared-docs/components/slide-toggle",
"//adev/shared-docs/interfaces",
"//adev/shared-docs/pipes",
"//adev/shared-docs/services",
@@ -3,106 +3,118 @@
class="docs-navigation-list docs-faceted-list"
[class.docs-navigation-list-dropdown]="isDropdownView()"
>
@for (item of navigationItems; track $index) {
<li class="docs-faceted-list-item">
@if (item.path) {
@if (item.isExternal) {
<a
[href]="item.path"
target="_blank"
[matTooltip]="item.label"
[matTooltipDisabled]="item.label.length < 27"
matTooltipPosition="after"
[attr.aria-label]="item.label"
[matTooltipClass]="'API-tooltip'"
>
<span
[class.docs-external-link]="item.isExternal"
class="docs-faceted-list-item-text"
@for (itemGroup of groupItems(navigationItems); track $index) {
@let groupLabel = itemGroup[0];
@let items = itemGroup[1];
@if (groupLabel) {
<li class="docs-navigation-group">{{groupLabel | titlecase}}</li>
}
@for (item of items; track $index) {
<li class="docs-faceted-list-item">
@let itemLabel = item.label!;
@if (item.path) {
@if (item.isExternal) {
<a
[href]="item.path"
target="_blank"
[matTooltip]="item.label"
[matTooltipDisabled]="itemLabel.length < 27"
matTooltipPosition="after"
[attr.aria-label]="item.label"
[matTooltipClass]="'API-tooltip'"
>
{{ item.label }}
<ng-container *ngTemplateOutlet="itemStatus; context: {$implicit: item}" />
</span>
<span
[class.docs-external-link]="item.isExternal"
class="docs-faceted-list-item-text"
>
{{ item.label }}
<ng-container *ngTemplateOutlet="itemStatus; context: {$implicit: item}" />
</span>
@if (item.children && item.level! > 1 && !item.isExpanded) {
<docs-icon>chevron_right</docs-icon>
}
</a>
@if (item.children && item.level! > 1 && !item.isExpanded) {
<docs-icon>chevron_right</docs-icon>
}
</a>
} @else {
<a
[routerLink]="'/' + item.path"
routerLinkActive="docs-faceted-list-item-active"
[routerLinkActiveOptions]="{ paths: 'exact', queryParams: 'ignored', matrixParams: 'ignored', fragment: 'ignored' }"
(click)="emitClickOnLink()"
[matTooltip]="item.label"
[matTooltipDisabled]="itemLabel.length < 27"
matTooltipPosition="after"
[attr.aria-label]="item.label"
[matTooltipClass]="'API-tooltip'"
>
<span class="docs-faceted-list-item-text">
{{item.label}}
<ng-container *ngTemplateOutlet="itemStatus; context: {$implicit: item}" />
</span>
@if (item.children && !item.isExpanded) {
<docs-icon>chevron_right</docs-icon>
}
</a>
}
} @else {
<a
[routerLink]="'/' + item.path"
routerLinkActive="docs-faceted-list-item-active"
[routerLinkActiveOptions]="{ exact: true }"
(click)="emitClickOnLink()"
[matTooltip]="item.label"
[matTooltipDisabled]="item.label.length < 27"
matTooltipPosition="after"
[attr.aria-label]="item.label"
[matTooltipClass]="'API-tooltip'"
>
<span class="docs-faceted-list-item-text">
{{item.label}}
<ng-container *ngTemplateOutlet="itemStatus; context: {$implicit: item}" />
</span>
<!-- Nav Section Header -->
@if (item.level !== collapsableLevel() && item.level !== expandableLevel()) {
<div
class="docs-secondary-nav-header"
[matTooltip]="item.label"
[matTooltipDisabled]="itemLabel.length < 27"
matTooltipPosition="after"
[attr.aria-label]="item.label"
[matTooltipClass]="'API-tooltip'"
>
<span class="docs-faceted-list-item-text">
{{item.label}}
<ng-container *ngTemplateOutlet="itemStatus; context: {$implicit: item}" />
</span>
</div>
}
@if (item.children && !item.isExpanded) {
<docs-icon>chevron_right</docs-icon>
}
</a>
}
} @else {
<!-- Nav Section Header -->
@if (item.level !== collapsableLevel() && item.level !== expandableLevel()) {
<div
class="docs-secondary-nav-header"
[matTooltip]="item.label"
[matTooltipDisabled]="item.label.length < 27"
matTooltipPosition="after"
[attr.aria-label]="item.label"
[matTooltipClass]="'API-tooltip'"
>
<span class="docs-faceted-list-item-text">
{{item.label}}
<ng-container *ngTemplateOutlet="itemStatus; context: {$implicit: item}" />
</span>
</div>
}
<!-- Nav Button Expand/Collapse -->
@if (
(item.children && item.level === expandableLevel()) || item.level === collapsableLevel()
) {
<button
type="button"
(click)="toggle(item)"
[attr.aria-label]="(item.isExpanded ? 'Collapse' : 'Expand') + ' ' + item.label"
[attr.aria-expanded]="item.isExpanded"
class="docs-secondary-nav-button"
[class.docs-faceted-list-item-active]="item | isActiveNavigationItem: activeItem()"
[class.docs-expanded-button]="item.children && item.level == collapsableLevel()"
[class.docs-not-expanded-button]="item.children && item.level === expandableLevel()"
[class.docs-nav-item-has-icon]="
<!-- Nav Button Expand/Collapse -->
@if (
(item.children && item.level === expandableLevel()) || item.level === collapsableLevel()
) {
<button
type="button"
(click)="toggle(item)"
[attr.aria-label]="(item.isExpanded ? 'Collapse' : 'Expand') + ' ' + item.label"
[attr.aria-expanded]="item.isExpanded"
class="docs-secondary-nav-button"
[class.docs-faceted-list-item-active]="item | isActiveNavigationItem: activeItem()"
[class.docs-expanded-button]="item.children && item.level == collapsableLevel()"
[class.docs-not-expanded-button]="item.children && item.level === expandableLevel()"
[class.docs-nav-item-has-icon]="
item.children && item.level === expandableLevel() && !item.isExpanded"
[matTooltip]="item.label"
[matTooltipDisabled]="item.label.length < 27"
matTooltipPosition="after"
[attr.aria-label]="item.label"
[matTooltipClass]="'API-tooltip'"
>
@if (item.children && item.level === collapsableLevel()) {
<docs-icon>arrow_back</docs-icon>
}
<span class="docs-faceted-list-item-text">
{{ item.label }}
<ng-container *ngTemplateOutlet="itemStatus; context: {$implicit: item}" />
</span>
</button>
[matTooltip]="item.label"
[matTooltipDisabled]="itemLabel.length < 27"
matTooltipPosition="after"
[attr.aria-label]="item.label"
[matTooltipClass]="'API-tooltip'"
>
@if (item.children && item.level === collapsableLevel()) {
<docs-icon>arrow_back</docs-icon>
}
<span class="docs-faceted-list-item-text">
{{ item.label }}
<ng-container *ngTemplateOutlet="itemStatus; context: {$implicit: item}" />
</span>
</button>
}
}
}
@if (displayItemsToLevel() > item.level && item.children?.length > 0) {
<ng-container *ngTemplateOutlet="navigationList; context: {$implicit: item.children}" />
}
</li>
@if (
item.level && displayItemsToLevel() > item.level && item.children && item.children.length > 0
) {
<ng-container
*ngTemplateOutlet="navigationList; context: {$implicit: item.children, level: item.level}"
/>
}
</li>
}
}
</ul>
</ng-template>
@@ -49,6 +49,7 @@
max-width: calc(100% - 1rem);
overflow: hidden;
text-overflow: ellipsis;
text-wrap: balance;
}
.docs-nav-item-has-icon {
@@ -185,3 +186,11 @@ a,
white-space: pre;
}
}
.docs-navigation-group {
padding: 0.5rem 0.5rem 0.5rem 1rem;
background: var(--septenary-contrast);
&:not(:first-child) {
margin-top: 2rem;
}
}
@@ -11,9 +11,10 @@ import {NavigationItem} from '../../interfaces/index';
import {NavigationState} from '../../services/index';
import {RouterLink, RouterLinkActive} from '@angular/router';
import {IconComponent} from '../icon/icon.component';
import {IsActiveNavigationItem} from '../../pipes/is-active-navigation-item.pipe';
import {NgTemplateOutlet} from '@angular/common';
import {IsActiveNavigationItem} from '../../pipes';
import {NgTemplateOutlet, TitleCasePipe} from '@angular/common';
import {MatTooltipModule} from '@angular/material/tooltip';
import {ReactiveFormsModule} from '@angular/forms';
@Component({
selector: 'docs-navigation-list',
@@ -24,6 +25,8 @@ import {MatTooltipModule} from '@angular/material/tooltip';
IsActiveNavigationItem,
NgTemplateOutlet,
MatTooltipModule,
ReactiveFormsModule,
TitleCasePipe,
],
templateUrl: './navigation-list.component.html',
styleUrls: ['./navigation-list.component.scss'],
@@ -31,10 +34,10 @@ import {MatTooltipModule} from '@angular/material/tooltip';
})
export class NavigationList {
readonly navigationItems = input.required<NavigationItem[]>();
readonly displayItemsToLevel = input<number>(2);
readonly displayItemsToLevel = input(2);
readonly collapsableLevel = input<number | undefined>();
readonly expandableLevel = input<number>(2);
readonly isDropdownView = input<boolean>(false);
readonly expandableLevel = input(2);
readonly isDropdownView = input(false);
readonly linkClicked = output<void>();
@@ -56,4 +59,33 @@ export class NavigationList {
emitClickOnLink(): void {
this.linkClicked.emit();
}
private hasCategories(items: NavigationItem[]): boolean {
return items.some((item) => !!item.category);
}
protected groupItems(items: NavigationItem[]): Map<string, NavigationItem[]> {
const hasCategories = this.hasCategories(items);
if (hasCategories) {
const others: NavigationItem[] = [];
const categorizedItems = new Map<string, NavigationItem[]>();
for (const item of items) {
const category = item.category || 'Other';
if (category === 'Other') {
others.push(item);
continue;
}
if (!categorizedItems.has(category)) {
categorizedItems.set(category, []);
}
categorizedItems.get(category)!.push(item);
}
if (others.length) {
categorizedItems.set('Other', others);
}
return categorizedItems;
} else {
return new Map([['', items]]);
}
}
}
@@ -27,6 +27,7 @@ ng_project(
"//adev/shared-docs/directives",
"//adev/shared-docs/interfaces",
"//adev/shared-docs/pipes",
"//adev/shared-docs/providers",
"//adev/shared-docs/services",
],
)
@@ -12,35 +12,49 @@
@if (searchResults().length) {
<ul class="docs-search-results docs-mini-scroll-track">
@for (result of searchResults(); track result.id) {
<li docsSearchItem [item]="result">
<li docsSearchItem [item]="result" class="docs-search-result">
<a
[routerLink]="'/' + result.url | relativeLink: 'pathname'"
[fragment]="result.url | relativeLink: 'hash'"
(click)="history.addItem(result)"
>
<div>
<div class="docs-result-icon-and-type">
<p class="docs-search-result__label">
<!-- Icon -->
<span class="docs-search-result-icon" aria-hidden="true">
<i role="presentation" class="material-symbols-outlined docs-icon-small">
{{ result.type === 'code' ? 'code' : 'description'}}
</i>
</span>
<!-- Results type -->
<span class="docs-search-results__type" [innerHtml]="result.labelHtml"></span>
</div>
<!-- Page title -->
<span [innerHtml]="result.labelHtml"></span>
@if (result.package) {
<span
[innerHTML]="result.package"
class="docs-search-result__label__package"
></span>
}
</p>
@if (result.subLabelHtml) {
<span
class="docs-search-results__type docs-search-results__lvl2"
[innerHtml]="result.subLabelHtml"
>
</span>
<p class="docs-search-result__sub-label">
<span class="docs-search-result-icon" aria-hidden="true">
<i role="presentation" class="material-symbols-outlined docs-icon-small">
grid_3x3
</i>
</span>
<span [innerHtml]="result.subLabelHtml"></span>
</p>
}
@if (result.contentHtml) {
<p class="docs-search-result__content" [innerHtml]="result.contentHtml"></p>
}
</div>
<!-- Page title -->
<span class="docs-result-page-title">{{ result.category }}</span>
<p class="docs-search-result__category">
{{ result.category }}
</p>
</a>
</li>
}
@@ -38,11 +38,21 @@ dialog {
margin: 0;
border-block-end: 1px solid var(--senary-contrast);
li {
.docs-search-result {
border-inline-start: 2px solid var(--senary-contrast);
margin-inline-start: 1rem;
padding-inline-end: 1rem;
padding-block: 0.25rem;
display: block;
font-size: 0.875rem;
.docs-search-result-icon {
display: inline-block;
i {
display: flex;
align-items: center;
font-size: 1.2rem;
}
}
/**
* This rule needs ng-deep to be applied to elements that are created via a [innerHTML] binding
@@ -61,17 +71,50 @@ dialog {
color: var(--secondary-contrast);
display: flex;
justify-content: space-between;
padding: 1rem;
gap: 0.5rem;
}
.docs-search-result-icon {
i {
display: flex;
align-items: center;
font-size: 1.2rem;
}
&__label,
&__sub-label,
&__content {
transition: color 0.3s ease;
}
&__label,
&__sub-label {
display: flex;
align-items: center;
gap: 0.75rem;
margin: 0;
}
&__label {
font-weight: 600;
flex-wrap: wrap;
&__package {
font-size: 0.75rem;
}
}
&__content,
&__category {
margin: 0;
}
&__sub-label,
&__content {
margin-block-start: 0.375rem;
margin-inline-start: 2rem;
color: var(--quaternary-contrast);
}
&__category {
font-weight: 400;
color: var(--quaternary-contrast);
}
&.active {
background-color: var(--septenary-contrast); // stylelint-disable-line
}
@@ -80,44 +123,14 @@ dialog {
&.active {
background-color: var(--octonary-contrast); // stylelint-disable-line
border-inline-start: 2px solid var(--primary-contrast);
a {
span:not(.docs-result-page-title),
.docs-search-results__type {
color: var(--primary-contrast);
i {
color: var(--primary-contrast);
}
}
.docs-search-result__label,
.docs-search-result__sub-label,
.docs-search-result__content {
color: var(--primary-contrast);
}
}
}
.docs-search-result-icon,
.docs-search-results__type,
.docs-result-page-title {
color: var(--quaternary-contrast);
display: inline-block;
font-size: 0.875rem;
transition: color 0.3s ease;
padding: 0.75rem;
padding-inline-end: 0;
}
.docs-search-results__lvl2 {
display: inline-block;
margin-inline-start: 2rem;
padding-block-start: 0;
}
.docs-search-results__lvl3 {
margin-inline-start: 2rem;
padding-block-start: 0;
}
}
.docs-result-page-title {
font-size: 0.875rem;
font-weight: 400;
}
}
@@ -127,14 +140,6 @@ dialog {
color: var(--gray-400);
}
.docs-result-icon-and-type {
display: flex;
.docs-search-results__type {
padding-inline-start: 0;
}
}
.docs-search-footer {
display: flex;
align-items: center;
@@ -20,19 +20,18 @@ import {
viewChildren,
} from '@angular/core';
import {WINDOW} from '../../providers/index';
import {ClickOutside} from '../../directives/index';
import {Search, SearchHistory} from '../../services/index';
import {WINDOW} from '../../providers';
import {ClickOutside, SearchItem} from '../../directives';
import {Search, SearchHistory} from '../../services';
import {TextField} from '../text-field/text-field.component';
import {FormControl, ReactiveFormsModule} from '@angular/forms';
import {ActiveDescendantKeyManager} from '@angular/cdk/a11y';
import {SearchItem} from '../../directives/search-item/search-item.directive';
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
import {Router, RouterLink} from '@angular/router';
import {fromEvent} from 'rxjs';
import {AlgoliaIcon} from '../algolia-icon/algolia-icon.component';
import {RelativeLink} from '../../pipes/relative-link.pipe';
import {RelativeLink} from '../../pipes';
import {SearchHistoryComponent} from '../search-history/search-history.component';
@Component({
@@ -52,10 +51,10 @@ import {SearchHistoryComponent} from '../search-history/search-history.component
styleUrls: ['./search-dialog.component.scss'],
})
export class SearchDialog {
onClose = output();
dialog = viewChild.required<ElementRef<HTMLDialogElement>>('searchDialog');
items = viewChildren(SearchItem);
textField = viewChild(TextField);
readonly onClose = output();
readonly dialog = viewChild.required<ElementRef<HTMLDialogElement>>('searchDialog');
readonly items = viewChildren(SearchItem);
readonly textField = viewChild(TextField);
readonly history = inject(SearchHistory);
private readonly search = inject(Search);
@@ -68,9 +67,9 @@ export class SearchDialog {
this.injector,
).withWrap();
searchQuery = this.search.searchQuery;
resultsResource = this.search.resultsResource;
searchResults = this.search.searchResults;
readonly searchQuery = this.search.searchQuery;
readonly resultsResource = this.search.resultsResource;
readonly searchResults = this.search.searchResults;
// We use a FormControl instead of relying on NgModel+signal to avoid
// the issue https://github.com/angular/angular/issues/13568
@@ -22,6 +22,7 @@ ng_project(
],
deps = [
"//adev:node_modules/@angular/cdk",
"//adev:node_modules/@angular/common",
"//adev:node_modules/@angular/core",
"//adev:node_modules/@angular/router",
"//adev/shared-docs/directives",
@@ -38,6 +39,8 @@ ts_project(
":search-history",
"//adev:node_modules/@angular/core",
"//adev:node_modules/@angular/platform-browser",
"//adev:node_modules/@angular/router",
"//adev/shared-docs/providers",
"//adev/shared-docs/services",
"//adev/shared-docs/testing",
],

Some files were not shown because too many files have changed in this diff Show More