Commit graph

32529 commits

Author SHA1 Message Date
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 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 2025-04-02 14:53:11 -04:00
hawkgs
8ce68289e6 docs(docs-infra): fix algolia icon in the search dialog on safari (#60702)
The icon used to have zero height due to its display property.

PR Close #60702
2025-04-02 16:19:47 +00:00
aparziale
006ac7f22f fix(core): fixes #592882 ng generate @angular/core:signal-queries-migration (#60688)
fixes #592882 - retain accessibility modifier if it's already present for signal migrations

PR Close #60688
2025-04-02 15:14:43 +00:00
arturovt
635fb00969 refactor(service-worker): pull less RxJS symbols (#60657)
In this commit, we reduce the number of imported RxJS symbols since they are redundant.

- We replace `merge` with a manual observable because `merge` internally pulls in `from()`.
- We remove `defer` and `throwError`, replacing them with `new Observable(s => s.error(..))`.
- We replace `toPromise()` with `new Promise`, as `toPromise()` is deprecated.
- We convert `readyToRegister` to a promise to avoid using RxJS operators like `delay`.

PR Close #60657
2025-04-02 15:00:34 +00:00
aparziale
8f68d1bec3 fix(core): fix ng generate @angular/core:output-migration (#60626)
output-migration command not keep type if @output declaring without initializer

PR Close #60626
2025-04-02 14:26:05 +00:00
Tomasz Domański
7cd89ad2c6 fix(service-worker): assign initializing client's app version, when a request is for worker script (#58131)
When a new version of app is available in a service worker, and a client with old version exists, web workers initialized from a client with old version will now be properly assigned with the same version.

Before this change, a web worker was assigned with the newest version.

Fixes #57971

PR Close #58131
2025-04-02 14:23:52 +00:00
Ahmed Hakeem
0c5b697afe docs: add a note about styles collision resolution (#59266)
PR Close #59266
2025-04-02 13:57:28 +00:00
Dany Marques
792954ba2c docs(core): give types to signal API (#58965)
PR Close #58965
2025-04-02 13:56:55 +00:00
Dany Marques
27a678a093 docs(core): improve computation example (#58965)
PR Close #58965
2025-04-02 13:56:55 +00:00
Matthieu Riegler
f90dc69548 docs: Use inject for DI (#59835)
PR Close #59835
2025-04-02 13:37:31 +00:00
Matthieu Riegler
670dc2af89 docs(docs-infra): fix adev (#60695)
PR Close #60695
2025-04-02 12:37:04 +00:00
Matthieu Riegler
9604ec6e16 refactor(compiler): prevent object methods being recognised as entities (#58100)
With this commit object methods (like `valueOf`, `toString` are not considered as valid entities anymore.

PR Close #58100
2025-04-02 11:35:54 +00:00
Jake Spievak
88a2c92f87 docs: update the first app tutorial to include a note about importing NgFor directive (#60627)
PR Close #60627
2025-04-02 11:34:25 +00:00
Matthieu Riegler
2d8943122b docs: add targets for the bundling debug (#60693)
PR Close #60693
2025-04-02 11:33:52 +00:00
Matthieu Riegler
440b1ada9b docs(docs-infra): Search results as HTML (#60394)
fixes #60384

PR Close #60394
2025-04-02 11:32:58 +00:00
Andrew Kushnir
da9f509adf build: exclude relative imports commits via .git-blame-ignore-revs (#60685)
This commit adds a list of commits that refactored the code to use relative imports to the .git-blame-ignore-revs.

PR Close #60685
2025-04-01 22:23:16 +00:00
Andrew Kushnir
d0c979e0f0 test(bazel): update common package contents test to skip chunks (#60676)
This commit updates the `common` package contents test to skip JS chunks, while still making sure that the main entrypoint files are present.

PR Close #60676
2025-04-01 18:16:49 +00:00
Andrew Kushnir
f8ca1d57af build(common): updating golden files for the @angular/common package (#60676)
This commit updates golden files that got changed after swtiching to relative paths. There are no actual change to the APIs, the golden file updates capture the change in imports.

PR Close #60676
2025-04-01 18:16:49 +00:00
Andrew Kushnir
d725c6ed0f refactor(common): convert scripts within packages/common to relative imports (#60676)
This commit updates scripts within `packages/common` to relative imports as a prep work to the upcoming infra updates.

PR Close #60676
2025-04-01 18:16:49 +00:00
Andrew Kushnir
7edca03989 refactor(router): re-export the RouterTestingModule symbols (#60674)
This commit re-exports the symbols that are exposed by the `RouterTestingModule` (which re-exports
the symbols from the `RouterModule`. These re-exports are needed for the Angular compiler
to overcome its limitation (on the consumer side) of not knowing where to import import
symbols when relative imports are used within the package.

PR Close #60674
2025-04-01 18:16:05 +00:00