32548 Commits

Author SHA1 Message Date
kirjs 2c1f348478 release: cut the v19.2.7 release 19.2.7 2025-04-16 16:41:50 -04:00
Alan Agius c90eea2cd1 refactor(common): eliminate redundant iterator-to-array conversion (#60884)
Simplifies code by removing unnecessary `Array.from` usage.

PR Close #60884
2025-04-16 12:44:36 -04:00
Angular Robot d1731687e1 build: update io_bazel_rules_sass digest to cbe5261 (#60882)
See associated pull request for more information.

PR Close #60882
2025-04-16 12:43:46 -04:00
Alan Agius 37ab6814f5 fix(common): issue a warning instead of an error when NgOptimizedImage exceeds the preload limit (#60883)
This should not be treated as a hard error, as it doesn’t break the application but merely degrades performance.

Closes #60871

(cherry picked from commit 8f25d4a033)

PR Close #60883
2025-04-16 12:04:39 -04:00
ryncdr 2a65a12fce docs(docs-infra): first-app tutorial - step-14-http src-final correction (#60738)
Updated housing.service.ts > getHousingLocationById()
 - Added search parameter to fetch URL
 - Returns single object instead of array

PR Close #60738
2025-04-16 10:23:51 -04:00
Andrew Scott 5cd80525e7 refactor(core): Update Transition finished promise to not throw unhandled rejection (#60816)
As with `InternalNavigationResult`, this commit adds the `catch` to the
`finished` promise on `InternalNavigationTransition` to avoid unhandled
promise rejections.

PR Close #60816
2025-04-15 18:40:43 -04:00
Andrew Scott aaf07d8e4c docs: Add error handling documentation (#60848)
This adds a page to document the error handling practices, APIs, and features _in the framework_.
It does not contain any application-specific recommendations or
patterns as this information is subjective and domain-specific.

PR Close #60848
2025-04-15 17:35:02 -04:00
Jessica Janiuk 070c09f2b3 fix(docs-infra): prevent processing node_modules .md files (#60872)
If you happen to have node_modules installed for adev tutorials, there would be problems with trying to run adev tests. This excludes those node_modules folders.

PR Close #60872
2025-04-15 17:28:01 -04:00
Doug Parker 9171401b88 refactor(devtools): update release process to commit before publishing (#60646)
This moves the commit step to the start of the process and releases after merging it. This has two key benefits:
1. The commit history now reflects the actual release (ex. any DevTools commits before the release commit are actually included in that release). Previously the changes in a release were dictated by the release PR branch, which is an ephemeral target. Other PRs may be merged to `main` before the release PR, and those changes would not be included in that DevTools release.
2. We can now compute a changelog based on this more accurate history.

The downside to this change is that release PRs are now blocking releases in a way they weren't before (which is likely desirable in the grand scheme of things), meaning we need to be more diligent about merging them in a timely manner.

I added a short script for listing DevTools commits since the last release, taking advantage of the more accurate commit history. This should make changelog generation a lot easier, even if there's still a manual process of rewriting the commit message into a line item in release notes.

Also made a few minor cleanup changes such as escaping the markdown in the suggested reviewer note so it can be more easily copy-pasted from the rendered format of this doc.

PR Close #60646
2025-04-15 09:19:40 -04:00
Angular Robot 9ebe59fa1c build: update all non-major dependencies (#60869)
See associated pull request for more information.

PR Close #60869
2025-04-15 09:10:51 -04:00
Logan Dupont c80f24d658 docs: fix missing card-title tag in example of fallback-content section (#60855)
PR Close #60855
2025-04-14 11:01:07 -04:00
Matthieu Riegler c0e4ff140d refactor(compiler): add support for the new search element (#54945)
See #whatwg/html#5811
Spec: https://html.spec.whatwg.org/multipage/grouping-content.html#the-search-element

breaking change: You cannot have self-closing `search` component anymore as they are recognized as a native non-void element.

fixes #54944

PR Close #54945
2025-04-14 09:34:36 -04:00
JoostK 79ff75fcc3 test(core): type tests for linkedSignal (#60857)
This commit adds type inference tests for `linkedSignal` usages, to capture their behavior w.r.t.
type inference. Note that there's some situations where type inference doesn't work as you might
expect/hope; these have been included to capture their behavior but may be revisited in the future
if the inference capabilities are expanded for this scenario.

Closes #60423

PR Close #60857
2025-04-14 09:30:37 -04:00
JoostK f6e52f26c7 docs: document that linkedSignal with previous should include type arguments (#60857)
Due to the cyclic nature of `previous`'s type and the computation's return type,
TypeScript isn't able to infer generic type arguments.

Closes #60423

PR Close #60857
2025-04-14 09:30:36 -04:00
hawkgs b210d3ccd5 refactor(devtools): switch to components tab whenever the inspector is used (#60694)
Switch to the components tab, if not there, when a component is selected via the inspector.

PR Close #60694
2025-04-14 09:22:05 -04:00
hawkgs 0e8e867b85 refactor(devtools): create highlight overlay on node selection (#60744)
Currently, highlighting works only when a directive explorer node is hovered. The change enables this feature on node selection as well.

PR Close #60744
2025-04-14 09:20:25 -04:00
Jessica Janiuk 6545eff815 docs: remove unused imports in examples (#60867)
PR Close #60867
2025-04-14 09:16:29 -04:00
Miles Malerba 4fec563f7f docs: Restructure example build rules (#60778)
Restructures the examples build rules so that all examples are exposed
through a single file group in adev/src/content/examples.

Also adds a separate filegroup in the same location for just the
embeddable examples and adds it to the APPLICATION_FILES for the docs
app.

This uncovered the fact that some of our examples have broken
non-compiling code. I've excluded these ones from being embeddable for
now, until the breakages can be addressed

PR Close #60778
2025-04-11 17:19:35 -04:00
Miles Malerba 1c6a209c7a docs: Add back script to generate example previews map (#60778)
Restores the ability to have example components rendered alongside the
code. This functionality was broken a while back by #53511.

To enable the embedded preview for an example, add `preview` and
`path=adev/src/content/expamples/component/to/render.ts` attributes to
the `<docs-code>` or `<docs-code-multifile>` tag.

Tested with one of the accessibility examples and it seems to work now.

PR Close #60778
2025-04-11 17:19:34 -04:00
Ryan Russell b144126612 fix(core): inject migration: replace param with this. (#60713)
The inject tool inserts `const foo = this.foo` if code
in the constructor referenced the constructor parameter `foo`.
If `foo` is a readonly property, we can instead replace `foo` with
`this.foo`. This allows more properties to be moved out of the
constructor with combineMemberInitializers.
For now, it only touches initializers, not all of the code in the
constructor.

PR Close #60713
2025-04-10 13:31:31 -04:00
Alan Agius 77c60414a2 fix(docs-infra): update docs-alert and tests (#60829)
Before this commit, the docs-alert tests were failing. This also ensures that `NOTE:`, `TIP:` and others are always capitalized.

(cherry picked from commit ab5986dd5685d36e209972916cddb9dca8e0a557)

PR Close #60829
2025-04-10 11:19:53 -04:00
Vincent d39e09da41 fix(http): Include HTTP status code and headers when HTTP requests errored in httpResource (#60802)
Currently the HTTP status code and headers are only included if the request succeeded. Given status codes convey more information in case of a request error vs. success, this makes it more useful than inspecting what is contained in `.error()`.

PR Close #60802
2025-04-09 14:25:03 -07:00
Andrew Scott 54f9269fad release: cut the v19.2.6 release 19.2.6 2025-04-09 12:25:57 -07:00
Kristiyan Kostadinov fc946c5f72 fix(compiler-cli): ensure HMR works with different output module type (#60797)
Currently when we transpile the HMR update module, we use the project's compiler options verbatim. This appears to break down with some module types, whereas we have to use a native export.

These changes override the compiler options to ensure that the user's options don't end up breaking HMR.

Fixes #60795.

PR Close #60797
2025-04-09 11:42:56 -07:00
Jermaine Jatau d99935a7ac docs: update guide on referencing component children (#60787)
PR Close #60787
2025-04-09 11:08:32 -07:00
Matthieu Riegler 880ebf4a71 Revert "refactor(core): use stream in rxResource instead of loader (#59910)" (#60803)
This reverts commit 98a584c1e8.

PR Close #60803
2025-04-09 09:33:27 -07:00
Angular Robot ae8a4c4905 build: update github/codeql-action action to v3.28.15 (#60780)
See associated pull request for more information.

PR Close #60780
2025-04-08 16:26:15 -07:00
JoostK 9241615ad0 fix(core): reduce total memory usage of various migration schematics (#60776)
This commit changes Tsurge's operation within angular-devkit (i.e. the CLI) to
no longer retain all programs across all migrations. This isn't necessary for
so-called "funnel" migrations so not retaining the programs for those migrations
is a pure performance win. The "complex" migrations may see increased execution time
given that the program is now being recreated for the actual migration phase to run,
although reduced memory pressure may help alleviate this overhead. Since this new
approach should help prevent Node from running out of memory and failing entirely
this is preferred over a potentially increased execution time.

Fixes #59813

PR Close #60776
2025-04-08 16:12:57 -07:00
Kristiyan Kostadinov a382066165 refactor(migrations): simplify integration of tsurge migrations into the CLI (#60386) (#60776)
Currently when we reuse a Tsurge migration is reused externally, there's some glue code that needs to be executed in a specific order. The code gets copied between the different migrations which is error-prone and means that bugs may have to be fixed several times.

These changes move the common steps out into a separate function so that only the migration-specific logic (mostly instantiation and logging) is left in the schematic.

PR Close #60386

PR Close #60776
2025-04-08 16:12:56 -07:00
aparziale f2bfa3151e fix(core): fix ng generate @angular/core:output-migration. Fixes angular#58650 (#60763)
Fixes #58650 - Insert a TODO comment for empty emit (without parameter).

PR Close #60763
2025-04-08 16:10:04 -07:00
arturovt 6a55970373 refactor(router): replace APP_INITIALIZER (#60719)
The `APP_INITIALIZER` is deprecated. Replaced with `provideAppInitializer`.

PR Close #60719
2025-04-08 16:06:05 -07:00
Andrew Scott dc193a7e3a refactor(router): use performance API for router view transitions (#60790)
Adds feature tracking for view transitions.

PR Close #60790
2025-04-08 14:02:29 -07:00
cexbrayat 56db79a973 refactor(core): use stream in rxResource instead of loader (#59910)
With the changes in #59573, `resource` can now define a `stream` rather than a `loader`.
In the same PR, `rxResource` was updated to leverage this new functionality to handle multiple responses from the underlying observable,
rather than just the first one as it was previously.
This commit renames the `loader` option of `rxResource` into `stream` to be better aligned with its new behavior.

The previous version is temporarily kept and marked as deprecated to help migrating the current usage.

Before
```
usersResource = rxResource({
  request: () => ...,
  loader: ({ request }) => ...
});
```

After
```
usersResource = rxResource({
  request: () => ...,
  stream: ({ request }) => ...
});
```

PR Close #59910
2025-04-08 10:19:15 -07:00
Kristiyan Kostadinov 4c09fae588 refactor(platform-browser): remove GenericBrowserDomAdapter (#60760)
The `GenericBrowserDomAdapter` wasn't don't anything so we can drop it and have the `BrowserDomAdapter` extend `DomAdapter` directly.

PR Close #60760
2025-04-08 10:14:55 -07:00
Angular Robot cf12993383 build: update dependency @types/babel__generator to v7.27.0 (#60781)
See associated pull request for more information.

PR Close #60781
2025-04-08 10:13:58 -07:00
Kirill Cherkashin 8b9df449c7 docs: Update guide link in http package md file (#59955)
PR Close #59955
2025-04-08 09:20:20 -07:00
Angular Robot 35de6f68f3 build: update io_bazel_rules_sass digest to b4800f3 (#60737)
See associated pull request for more information.

PR Close #60737
2025-04-07 13:33:15 -07:00
Kristiyan Kostadinov 3441f7b914 fix(compiler): error if rawText isn't estimated correctly (#60529) (#60753)
The `TemplateLiteralElementExpr` has some logic where it tries to estimate the `rawText` if one isn't provided by looking at the node's source span. The problem with this approach is that we have some long-standing issues with our expression AST parser (see https://github.com/angular/angular/pull/60267#discussion_r1986402524) where it might not produce accurate spans if escape sequences are involved. This in turn can lead to unrecoverable errors, because TypeScript will throw an error if the raw string doesn't match the cooked one when constructing a TypeScript AST node.

These changes remove the logic that depends on the source span and relies purely on the secondary fallback that inserts escaped characters manually.

It's also worth noting that the `rawText` doesn't seem to matter much at this point, because the main usage of it is when downlevelling template literals to ES5 which we no longer support.

Fixes #60528.

PR Close #60529

PR Close #60753
2025-04-07 13:15:02 -07:00
Jamie Couperwhite ae2fc18855 docs: fix typo in documentation for pendingUntilEvent (#60756)
PR Close #60756
2025-04-07 10:29:36 -07:00
aparzi 00bbd9b382 fix(core): fix docs for output migration (#60764)
missing EventEmitter import

PR Close #60764
2025-04-07 09:23:35 -07:00
Alan Agius e9a719ef2b build: avoid export internal renames (#60739)
There is no need to minify internal names as these are minified by the consuming app

PR Close #60739
2025-04-04 09:49:15 -07:00
hawkgs de51b9a48d docs(docs-infra): fix home animation text width on small devices; fix snackbar colors (#60745)
The text used to exceed the viewport width.

PR Close #60745
2025-04-04 09:44:45 -07:00
Andrew Scott 1b36f6e1e0 refactor(common): Add hashchange event for traversals (#60682)
This commit adds the logic to emit the `hashchange` event for
traversals.

PR Close #60682
2025-04-03 16:54:57 -07:00
Andrew Scott 8880ed67f1 refactor(common): Update FakeNavigation deferred commit to use precommitHandler (#60652)
This commit updates the FakeNavigation implementation to match the
spec's new `precommitHandler` which replaces the old `commit: 'after-transition'`.

PR Close #60652
2025-04-03 16:53:07 -07:00
Angular Robot d7089d29ef build: update io_bazel_rules_sass digest to 3548d6b (#60721)
See associated pull request for more information.

PR Close #60721
2025-04-03 13:08:02 -07:00
Doug Parker 12320347cc refactor(core): add ApplicationRef.prototype.bootstrapImpl with an injector parameter (#60622)
This is a roll forward of commit d5a8a1c524. Nothing is meaningfully different, as we're trying again to see if the CI failure is reproducible.

PR Close #60622
2025-04-03 10:48:02 -07:00
Andrew Scott fcdef1019f fix(language-service): Ensure dollar signs are escaped in completions (#60597)
Dollar signs need to be escaped so they are not replaced during snippet
expansion: https://code.visualstudio.com/docs/editing/userdefinedsnippets#_how-do-i-have-a-snippet-place-a-variable-in-the-pasted-script

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

PR Close #60597
2025-04-03 10:45:57 -07:00
Andrew Scott 0e82d42774 fix(language-service): Do not provide element completions in end tag (#60616)
Element completions should not be provided when the position is in the
end tag or between the start and end tags.

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

PR Close #60616
2025-04-03 10:36:33 -07:00
LC 8d183aebbb docs: Fix Property Binding (#60725)
PR Close #60725
2025-04-03 10:09:37 -07:00
Jessica Janiuk 5b76da59c6 release: cut the v19.2.5 release 19.2.5 2025-04-02 14:53:11 -04:00