Commit graph

31913 commits

Author SHA1 Message Date
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
Jessica Janiuk
e689aaed30 docs: release notes for the v19.1.0-rc.0 release 2025-01-08 10:26:08 -08:00
Jessica Janiuk
f39425a489 release: bump the next branch to v19.2.0-next.0 2025-01-08 10:26:08 -08:00
Jessica Janiuk
c69f12ffd6 docs: release notes for the v19.0.6 release 2025-01-08 10:07:41 -08:00
Pawel Kozlowski
5e8ee7aae0 refactor(docs-infra): simplify Preview component (#59404)
The Preview component contains a work-around for the
IFrame flickering issue https://github.com/angular/angular/issues/16994
Attempting a different work-around here.

PR Close #59404
2025-01-08 17:19:08 +00:00
Matthieu Riegler
5c0d68804e fix(core): Ensure that a destroyed effect never run. (#59415)
Prior to this change, a scheduled root effect, even if destroyed instantly, would still run at least once.

This commit fixes this.

fixes #59410

PR Close #59415
2025-01-08 16:40:44 +00:00
arturovt
dd1d69b2e2 refactor(common): drop PRELOADED_IMAGES name in production (#59425)
In this commit, we drop the `PRELOADED_IMAGES` injection token name in production.

PR Close #59425
2025-01-08 16:12:02 +00:00
Dmytro Mezhenskyi
00cc923117 refactor(platform-browser): improve error message for UNEXPECTED_SYNTHETIC_PROPERTY (#58983)
Improve error message by adding instructions for enabling animations using standalone API.

PR Close #58983
2025-01-08 15:56:18 +00:00
Miles Malerba
a5fc962094 fix(core): Don't run effects in check no changes pass (#58250)
Fixes an issue where we accidentally ran effects in check no changes
passes.

PR Close #58250
2025-01-08 15:33:38 +00:00
Miles Malerba
9870b643bf fix(core): Defer afterRender until after first CD (#58250)
For `afterRender`/`afterNextRender` calls associated with a particular
view, ensure that they are not registered until after the first time the
view is rendered.

Co-authored-by: Alex Rickabaugh <alxhub@users.noreply.github.com>

PR Close #58250
2025-01-08 15:33:38 +00:00