31955 Commits

Author SHA1 Message Date
Pawel Kozlowski 5c9d739a05 release: cut the v19.1.1 release 19.1.1 2025-01-16 13:16:48 +01:00
Kristiyan Kostadinov 357795cb96 fix(core): run HMR replacement in the zone (#59562)
Fixes that in some cases the HMR replacement function was being run outside the zone which meant that change detection would break down after a replacement.

Fixes #59559.

PR Close #59562
2025-01-16 12:36:58 +01:00
Kristiyan Kostadinov eb0b1851f4 fix(platform-browser): roll back HMR fix (#59557)
Rolls back the changes from #59514 because they ended up being breaking in 1P. We can revisit the internal fix in a different way.

Fixes #59558.

PR Close #59557
2025-01-16 12:27:51 +01:00
Pawel Kozlowski 326248ce85 test(devtools): disable flaky highlighter test (#59561)
The test in question was very flaky on CI, example run:
https://github.com/angular/angular/actions/runs/12805645683/job/35702462974?pr=59557

Disabling as it is causing productivity loose for the team.

PR Close #59561
2025-01-16 12:19:39 +01:00
Pawel Kozlowski 74daef1ca2 refactor(core): move logic out of shared instructions code (#59453)
This is first of a series of refactorings that moves code
around such that logic from the shared instruction file
is dispatched to the relevant functional parts.

PR Close #59453
2025-01-16 11:12:05 +01:00
Doug Parker 0d019e9e2b release: bump Angular DevTools version to 1.0.21 (#59548)
PR Close #59548
2025-01-15 16:48:00 -08:00
arturovt 810ed6aad5 refactor(common): prevent duplicating Content-Type header (#59518)
Drops some bytes by moving `Content-Type` into a variable, which is then minified to something like `var b="Content-Type"` and reused in all the places.

PR Close #59518
2025-01-15 12:22:29 -08:00
kirjs e36e812fd0 release: cut the v19.1.0 release 19.1.0 2025-01-15 14:57:40 -05:00
arturovt e2b7359498 refactor(common): drop error message in production (#59471)
Switches to using `RuntimeError` and drops the error message in production by replacing it with an error code.

PR Close #59471
2025-01-15 12:28:30 -05:00
Matthieu Riegler 95c0e51b6e docs: update class & style binding recommendation (#59240)
This commit introduces an update to the official recommendations when it comes to class & styles bindings.

`[class]` & `[style]` bindings are now recommended for basic uses cases.

`[ngClass]` and `[ngStyle]` allow more advanced bindings (like space separated keys) or keys with units (for `ngStyle`) which are not supported by the native bindings. They still require the dedicated directives.

PR Close #59240
2025-01-15 12:27:13 -05:00
Angular Robot f8e1f8508c docs: update Angular CLI help [19.1.x] (#59536)
Updated Angular CLI help contents.

PR Close #59536
2025-01-15 12:17:49 -05:00
Jeremy Elbourn cfdf5ee0f5 docs: clarify that @for doesn't support break/continue (#59533)
We recently saw some confusion around this, so it's worth adding a
sentence to clarify

PR Close #59533
2025-01-15 12:00:22 -05:00
carimatics d0fc0d2da1 docs(forms): escape inequality signs of input tags in flowchart (#59517)
The input tags written within the flowcharts in the document were not being escaped, so we did that.
This change will ensure that the flowcharts in the document are properly displayed.

PR Close #59517
2025-01-15 10:17:23 -05:00
Sandeep Salwan 1fba8d1e51 docs: fix typos in let.md (#59526)
PR Close #59526
2025-01-15 09:44:26 -05:00
Andrew Kushnir 6a0dd9639a Revert "refactor: initialize headers map directly in HttpHeaders class (#59268)" (#59523)
This reverts commit e15226a444.

PR Close #59523
2025-01-14 17:48:36 -05:00
Abdul Wahab b44c0203c5 docs: fix property wrong usage inside afterNextRender in lifecycle.md (#59521)
PR Close #59521
2025-01-14 16:27:40 -05:00
Angular Robot 0130298328 build: update cross-repo angular dependencies (#59520)
See associated pull request for more information.

PR Close #59520
2025-01-14 16:05:15 -05:00
hawkgs 3e7ba3d014 docs: set syntax highlighting to the remaining Markdown code examples blocks (#59088)
There are some code blocks that slipped through the initial Regex-es.

Related to #59026

PR Close #59088
2025-01-14 15:14:03 -05:00
hawkgs 99c542a19b docs(docs-infra): fix scrolling issues in the API reference (#59207)
Fix issues related to scrolling in the API reference:
- Scroll to the top of the page when navigating to the API details page
- Preserve scroll position when navigating back from the API details page

PR Close #59207
2025-01-14 14:56:43 -05:00
arturovt 51a4839e86 refactor(common): tree-shake lcpObserver in NgOptimizedImage (#59481)
Prior to this commit, the `this.lcpObserver?.updateImage` expression was still preserved in the production code because it wasn't wrapped with `ngDevMode`. The observer is injected only in development mode. Additionally, we moved the logic from `ngOnDestroy` to avoid having an empty method in production.

PR Close #59481
2025-01-14 14:54:17 -05:00
Angular Robot 3913893ef4 build: lock file maintenance (#59519)
See associated pull request for more information.

Closes #59494 as a takeover pull request

PR Close #59519
2025-01-14 14:44:30 -05:00
arturovt f6e7516747 refactor(common): tree-shake transfer cache interceptor stuff (#59439)
In this commit, we replace `isPlatformServer` runtime call with the `ngServerMode` in the `transferCacheInterceptorFn` in order to make the functionality tree-shakable between client and server bundles.

PR Close #59439
2025-01-14 14:40:07 -05:00
Kristiyan Kostadinov a7f824a7ec fix(core): destroy renderer when replacing styles during HMR (#59514)
Currently when we swap out the component during HMR, we remove the renderer from the cache, but we never destroy it which means that its styles are still in the DOM. This can cause the old styles to leak into the component after they're replaced. These changes add a `destroy` call to ensure that they're removed.

PR Close #59514
2025-01-14 11:22:07 -05:00
hawkgs 2b85ddc916 docs(docs-infra): change API reference list items order to top-down (#58655)
Change the order from left-right to top-down (columns) and additionally make columns equal width.

PR Close #58655
2025-01-14 11:10:53 -05:00
hawkgs a0756e45c0 docs(docs-infra): fix SCSS build-time warnings (#59115)
Fix SCSS "declarations after nested rules" and `@import` warnings.

PR Close #59115
2025-01-14 11:09:25 -05:00
Matthieu Riegler 4efb1918ee refactor(compiler): remove unused AstVisitors (#59297)
Those 2 clases weren't imported anywhere.

PR Close #59297
2025-01-14 11:08:26 -05:00
Andrew Kushnir e33e673ff9 refactor(core): do not serialize parent block id for top level blocks (#59190)
This commit updates incremental hydration-related annotation logic to avoid serializing parent block id when it's `null` (for top-level blocks).

PR Close #59190
2025-01-14 11:06:59 -05:00
Angular Robot 69cd6f0884 build: update io_bazel_rules_sass digest to adeaf81 (#59508)
See associated pull request for more information.

PR Close #59508
2025-01-14 11:03:22 -05:00
hawkgs 53c3f8538c docs(docs-infra): generate errors and extended-diagnostics route NavigationItem-s (#59355)
Generate the `NavigationItem`-s as part of adev/shared-docs pipeline and use the output JSON files instead of the hardcoded objects in the `sub-navigation-data.ts`.

PR Close #59355
2025-01-14 11:00:08 -05:00
Angular Robot 2a8a8f02f2 build: update all non-major dependencies (#59510)
See associated pull request for more information.

PR Close #59510
2025-01-14 10:57:24 -05:00
Angular Robot d78de38f4c build: update dependency @babel/generator to v7.26.5 (#59511)
See associated pull request for more information.

PR Close #59511
2025-01-14 10:55:25 -05:00
Angular Robot 983b21bcd2 build: update scorecard action dependencies (#59513)
See associated pull request for more information.

PR Close #59513
2025-01-14 10:53:22 -05:00
Pawel Kozlowski 3a9d084b3d ci: update Ethan Cline GitHub user name (#59516)
Use case-sensitive user name.

PR Close #59516
2025-01-14 10:52:05 -05:00
RafaelJCamara f73f39cb96 refactor: initialize headers map directly in HttpHeaders class (#59268)
Improved the initialization of the headers map to enhance performance
and code readability.

No breaking changes.

PR Close #59268
2025-01-14 10:50:16 -05:00
arturovt c67af8b66d refactor(docs-infra): lazy-load EmbeddedTutorialManager in editor UI state (#59509)
In this commit, we lazy-load the `EmbeddedTutorialManager` in the editor UI state as done in other parts of the code.

PR Close #59509
2025-01-14 10:15:13 -05:00
Charles Lyding f68e9cd2e8 docs: update component HMR to fully stable (#59503)
As of 19.1, component HMR for both styles and templates is considered
stable and enabled by default. This includes support for both inline
and file-based component styles/templates.

PR Close #59503
2025-01-14 09:49:15 -05:00
arturovt f1aba5320f refactor(docs-infra): lazy-load EmbeddedTutorialManager in code editor (#59505)
In this commit, we lazy-load the `EmbeddedTutorialManager` in the code editor component as done in other parts of the code.

PR Close #59505
2025-01-13 15:00:27 -05:00
AleksanderBodurri f5e8693701 fix(devtools): remove property tab css that is hiding directive metadata (#59493)
It looks like this height property was redundant prior to upgrading to angular/material 19.1.0-rc.0. An interaction between this property and that update caused elements inside of material expansion panels to be hidden.

This PR removes this unnecessary height assignment entirely.

PR Close #59493
2025-01-13 14:48:02 -05:00
Angular Robot a1cbfa377a build: update cross-repo angular dependencies (#59474)
See associated pull request for more information.

PR Close #59474
2025-01-13 12:52:12 -05:00
arturovt 411b4f54bb refactor(common): prevent duplicating Accept header (#59467)
In this commit, we extract content types into a variable to eliminate extra bytes, as these values are duplicated in multiple places.

PR Close #59467
2025-01-13 12:38:47 -05:00
arturovt de12b524e9 refactor(common): drop enums by changing to const enum (#59468)
Note: this enums are not a part of the public API.

Prior to this commit, the compiler produced:

```js
var DateType;
(function (DateType) {
    DateType[DateType["FullYear"] = 0] = "FullYear";
    DateType[DateType["Month"] = 1] = "Month";
    DateType[DateType["Date"] = 2] = "Date";
    DateType[DateType["Hours"] = 3] = "Hours";
    DateType[DateType["Minutes"] = 4] = "Minutes";
    DateType[DateType["Seconds"] = 5] = "Seconds";
    DateType[DateType["FractionalSeconds"] = 6] = "FractionalSeconds";
    DateType[DateType["Day"] = 7] = "Day";
})(DateType || (DateType = {}));
```

With these changes, we allow objects to be dropped entirely and inlined.

PR Close #59468
2025-01-13 11:14:28 -05:00
arturovt 03339d5f94 refactor(core): change node navigation step to plain const (#59469)
We change the `enum` to a plain `const` to eliminate extra bytes, as `enum` is not really required. We might not be able to switch to `const enum` due to single-file compilation restrictions.

PR Close #59469
2025-01-13 11:12:47 -05:00
Kristiyan Kostadinov 6fc5f182cd test(migrations): add test for earlier fix (#59497)
Adds a test for the fix from #59452 now that we know what caused the issue.

PR Close #59497
2025-01-13 11:10:18 -05:00
Kristiyan Kostadinov ff386718f7 refactor(compiler): fix typo in method name (#59479)
Fixes a typo in the `AstVisitor.visitTypeofExpresion` method's name.

PR Close #59479
2025-01-13 10:57:53 -05:00
Amy Sorto 8091a4afe0 docs: add component harnesses guides (#59078)
PR Close #59078
2025-01-13 10:46:44 -05:00
arturovt c0ffd81efa refactor(docs-infra): lazy-load EmbeddedTutorialManager in home editor (#59491)
In this commit, we lazy-load `EmbeddedTutorialManager` in the home editor component via `injectAsync` as done in other parts of the code.

PR Close #59491
2025-01-13 10:45:44 -05:00
Bobokhuja b745d8ddf9 docs: fix typo example code in pipes documentation (#59312)
PR Close #59312
2025-01-13 10:38:08 -05:00
RafaelJCamara 9146c68733 docs: add $default to path (#59383)
Closes: #59378

PR Close #59383
2025-01-13 10:36:19 -05:00
Matthieu Riegler ee63b0bafa docs(docs-infra): remove sorting from API manager (#59427)
fixes #59423

PR Close #59427
2025-01-13 10:33:39 -05:00
PhilippMDoerner e4efc67222 docs: Adjust lines of server.ts example in server-side-rendering docs (#59490)
docs: Adjust lines of server.ts example in ssr docs

The server.ts excerpt used in the server-side-rendering docs
(https://angular.dev/guide/ssr#configure-server-side-rendering)
does not fully encapsulate the commonEngine code-block.

It begins too early in line 31, leading to the inclusions of lines
from another codeblock that is not intended to be shown here:
```
 );  

// All regular routes use the Angular engine
```
It should be beginning with the line
`// All regular routes use the Angular engine`.

It also ends too soon, cutting off these parts of the code-block:
```
      .catch((err) => next(err));
  });
```
PR Close #59490
2025-01-13 10:32:16 -05:00