Commit graph

31922 commits

Author SHA1 Message Date
arturovt
47e48b44dc 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:26 -05:00
AleksanderBodurri
065e1187fc 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:01 -05:00
Angular Robot
368d69e115 build: update cross-repo angular dependencies (#59474)
See associated pull request for more information.

PR Close #59474
2025-01-13 12:52:11 -05:00
arturovt
5d6358168a 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:46 -05:00
arturovt
4491704fba 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:27 -05:00
arturovt
783c5bb586 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
9931030b0e 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
915593ad25 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:51 -05:00
Pawel Kozlowski
435d31ed5f refactor(core): add profiler calls for tne newly introduced events (#59233)
The set of profiler events was recently extended. This commit plugs
newly created events dispatch into the approriate places
of the Angular core.

PR Close #59233
2025-01-13 10:52:19 -05:00
Pawel Kozlowski
c4ad8fb2e7 refactor(core): profiler takes null as a default instance (#59233)
Several profiler calls don't have any meaningful instance when
producing a profiling event. This commit changes the default
instance value to null to sreamline profiler invocations.

PR Close #59233
2025-01-13 10:52:19 -05:00
Amy Sorto
790221b1d2 docs: add component harnesses guides (#59078)
PR Close #59078
2025-01-13 10:46:43 -05:00
arturovt
fdbb57f798 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:43 -05:00
Bobokhuja
cb30fecdd4 docs: fix typo example code in pipes documentation (#59312)
PR Close #59312
2025-01-13 10:38:06 -05:00
RafaelJCamara
dd8b651794 docs: add $default to path (#59383)
Closes: #59378

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

PR Close #59427
2025-01-13 10:33:37 -05:00
PhilippMDoerner
4c12f07970 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:15 -05:00
Matthieu Riegler
40e7904bd8 docs(docs-infra): prevent the host class from being replaced (#59460)
When removing the binding, the class defined on the host element is being replaced

fixes #59442

PR Close #59460
2025-01-10 14:03:38 -05:00
Angular Robot
f978cdef63 build: update cross-repo angular dependencies (#59473)
See associated pull request for more information.

PR Close #59473
2025-01-10 13:36:51 -05:00
Jessica Janiuk
7d5d693eda fix(dev-infra): remove no longer necessary scope (#59472)
We no longer have need for the view engine scope.

PR Close #59472
2025-01-10 13:28:28 -05:00
Angular Robot
49dbf093eb build: update cross-repo angular dependencies (#59470)
See associated pull request for more information.

PR Close #59470
2025-01-10 12:27:22 -05:00
Paul Gschwendtner
8496fb16bc fix(migrations): incorrect stats when migrating queries with best effort mode (#59463)
We previously did count forcibly ignored queries as incompatible. This
resulted in incorrect migration stats that are printed upon migration
completion.

See: #58657

PR Close #59463
2025-01-10 11:52:13 -05:00
Paul Gschwendtner
86cbaaa2a2 test: add test to verify extending tsconfig works in signal input migration (#59463)
Related to https://github.com/angular/angular/issues/59348

PR Close #59463
2025-01-10 11:52:13 -05:00
Paul Gschwendtner
24f383ab4f test: improve typescript version coverage for signal input migration (#59463)
This ensures the migration works for these TypeScript versions. The
migration is very sensitive to the TS version and its internals; so it
makes sense to test all of these.

PR Close #59463
2025-01-10 11:52:12 -05:00
arturovt
17510becb0 refactor(platform-browser): drop BROWSER_MODULE_PROVIDERS_MARKER in production (#59412)
In this commit, we switch from decorators (which also produce redundant metadata, such as in the
`declareFactory` instruction) to the `inject` function to drop the `BROWSER_MODULE_PROVIDERS_MARKER`
token in production. This token is actually provided only in development mode but is still
referenced in the constructor due to the `@Inject(BROWSER_MODULE_PROVIDERS_MARKER)` decorator.

PR Close #59412
2025-01-10 11:47:32 -05:00
Aristeidis Bampakos
e8df770141 docs: update component scenarios guide (#59461)
PR Close #59461
2025-01-10 10:55:40 -05:00
Kristiyan Kostadinov
966a370390 fix(migrations): resolve text replacement issue (#59452)
Based on https://github.com/angular/angular/pull/59353#issuecomment-2580320424, fixes a text replacement issue that seems to cause code to be duplicated in some setups.

PR Close #59452
2025-01-10 10:47:54 -05:00
Matthieu Riegler
676357dbe0 docs: update linkedSignal. (#59221)
The commit adds the mention that it is intentionnal that the computation is reactive even if there is an explicit `source`.

fixes #59094

PR Close #59221
2025-01-10 10:41:18 -05:00
Angular Robot
e178cbb8b7 build: update cross-repo angular dependencies (#59464)
See associated pull request for more information.

PR Close #59464
2025-01-10 10:38:10 -05:00
Charles Lyding
a4164141a3 fix(compiler): use chunk origin in template HMR request URL (#59459)
The URL that is dynamically imported to fetch a potential component update
for HMR is now based on the value of `import.meta.url`. This ensures that
the request is sent to the same location that was used to retrieve the
application code. For some development server setups the HTML base HREF
may not be the location of the Angular development server. By using the
application code location which was generated by the development server,
HMR requests can continue to work as expected in these scenarios. In
most common cases, this change will not have any effect as the HTML base
HREF aligns with the location of the application code files.

PR Close #59459
2025-01-09 18:21:48 -05:00
arturovt
d51d67b725 refactor(common): prevent duplicating X-Request-URL (#59420)
The `X-Request-URL` string is duplicated in multiple places. It is worth moving it to a shared constant that would be minified to something like `const a = "X-Request-URL"` and referenced in all the used places.

PR Close #59420
2025-01-09 18:18:24 -05:00
Doug Parker
c1bc06c337 release: bump Angular DevTools version to 1.0.20 (#59454)
PR Close #59454
2025-01-09 15:41:54 -05:00
Andrew Kushnir
ac2dbe3eb1 Revert "fix(core): Defer afterRender until after first CD (#58250)" (#59455)
This reverts commit 9870b643bf.

PR Close #59455
2025-01-09 14:30:01 -05:00
Andrew Kushnir
21f1ba22a6 Revert "fix(core): Don't run effects in check no changes pass (#58250)" (#59455)
This reverts commit a5fc962094.

PR Close #59455
2025-01-09 14:30:01 -05:00
arturovt
5884153e12 refactor(animations): drop warning functions in production (#59408)
Prior to this commit, functions that issued warnings were not wrapped with `ngDevMode` at the point
of invocation but had the `ngDevMode` check inside. This meant they acted as no-ops in production.
In this commit, we wrap them externally with `ngDevMode`, so they are entirely removed.

PR Close #59408
2025-01-09 13:15:06 -05:00
arturovt
17234213f6 refactor(platform-browser): remove Console from Hammer gestures (#59409)
Injecting the `Console` is redundant because it directly calls the global `console` object.
There is no reason to reference this class in Hammer gestures, as it is only used in development
mode. We can safely call the `console` object directly.

PR Close #59409
2025-01-09 13:09:51 -05:00
arturovt
e194573d0d refactor(common): tree-shake fetch backend (#59418)
This commit updates the code of the HTTP code to make the `FetchBackend` class tree-shakable. The class is only needed with `withFetch()` is called and it should not be included into bundles that do not use that feature.

PR Close #59418
2025-01-09 13:05:56 -05:00
arturovt
f2e293db4e refactor(platform-browser): drop Hammer token names in production (#59438)
In this commit, we drop `HAMMER_GESTURE_CONFIG` and `HAMMER_LOADER` injection token names in production.

PR Close #59438
2025-01-09 12:38:06 -05:00
arturovt
83bd63fa7c refactor(common): drop NullViewportScroller for client bundles (#59440)
In this commit, we replace the `isPlatformBrowser` runtime call with the `ngServerMode` in order to drop the `NullViewportScroller` for client bundles.

PR Close #59440
2025-01-09 12:33:04 -05:00
arturovt
205330d46a refactor(core): drop platform injection token names in production (#59400)
In this commit, we tree-shake the injection token names in production.

PR Close #59400
2025-01-09 12:28:17 -05:00
Kristiyan Kostadinov
3638f93acc fix(compiler-cli): handle more node types when extracting dependencies (#59445)
Fixes that the HMR dependency extraction logic wasn't handling some node types. Most of these are a bit edge-case-ey in component definitions, but variable initializers and arrow functions can realistically happen in factories.

PR Close #59445
2025-01-09 12:22:46 -05:00
Angular Robot
9abc79bb23 build: update cross-repo angular dependencies (#59249)
See associated pull request for more information.

PR Close #59249
2025-01-09 12:18:45 -05:00
arturovt
06214821ca refactor(core): change LContainerFlags to const enum (#59416)
Prior to this commit, the compiler produced:

```js
No = (function (e) {
  return (
    (e[(e.None = 0)] = "None"),
    (e[(e.HasTransplantedViews = 2)] = "HasTransplantedViews"),
    e
  );
})(No || {});
```

Changing to `const enum` allows it to be entirely dropped and inline values.

PR Close #59416
2025-01-09 10:38:28 -05:00
Sumit Arora
a55575d4d6 fix(devtools): fixing dark mode colors for devtools and router tree (#59329)
added dark mode colors for devtools and router tree  and fixed the router tree legend rerendering issue

PR Close #59329
2025-01-09 10:32:41 -05:00
Ethan Cline
a648fa14dd ci: Add self (Ethan Cline) as primitives-shared reviewer. (#59437)
Add self (Ethan Cline) as primitives-shared reviewer.

PR Close #59437
2025-01-09 10:31:29 -05:00
Angular Robot
092557ef98 build: update dependency @bazel/buildifier to v8 (#59446)
See associated pull request for more information.

PR Close #59446
2025-01-09 10:30:41 -05:00
zhangenming
a201d455e6 docs(router): update link to development guide in README.md (#59388)
PR Close #59388
2025-01-09 10:29:38 -05:00
Kristiyan Kostadinov
d564506164 docs: add doc page about unused imports schematic (#59449)
Adds a docs for the new `ng generate @angular/core:cleanup-unused-imports` schematic.

PR Close #59449
2025-01-09 10:28:39 -05:00
RafaelJCamara
5c9e84acd6 docs: update license URL from angular.io to angular.dev and year of license to 2025 (#59407)
PR Close #59407
2025-01-09 10:27:54 -05:00
Kristiyan Kostadinov
adc6c094f4 build: clean up pipeline-specific tests (#59450)
Now that we only have the template pipeline, we can remove the `.pipeline` extension from the files.

PR Close #59450
2025-01-09 09:56:06 -05:00
arturovt
854a5616bf refactor(forms): drop CALL_SET_DISABLED_STATE name in production (#59430)
In this commit, we drop the `CALL_SET_DISABLED_STATE` injection token name in production.

PR Close #59430
2025-01-09 09:21:00 -05:00