Commit graph

36863 commits

Author SHA1 Message Date
Paul Gschwendtner
a25396d562 fix(bazel): support setting type: module in source package.json (#59406)
This is helpful as it allows us to set `type: module` in the checked-in
package files, useful for the hybrid mode of `rules_js` and
`rules_nodejs`, where the package.json files can control the execution
format.

PR Close #59406
2025-01-08 15:24:05 +00:00
arturovt
ce8c7c877c refactor(docs-infra): allow home editor to be cleaned up properly (#58164)
In this commit, we're replacing the `async-await` style in the `home-editor` component with the `from()`
observable, which allows us to invert a dependency and avoid memory leaks. Because an `async` function
has a closure, just like any other function in JavaScript, using `await` captures `this` until the
promise is resolved.

PR Close #58164
2025-01-08 15:23:16 +00:00
Matthieu Riegler
fd073004bb docs(docs-infra): fix entry labels. (#59384)
fixes #59382

PR Close #59384
2025-01-08 15:22:43 +00:00
RafaelJCamara
fabd642826 docs: update README to reflect correct Angular repository branch in rendering regions (#59421)
PR Close #59421
2025-01-08 15:22:07 +00:00
arturovt
d9707e1127 refactor(core): drop DEFER_BLOCK_DEPENDENCY_INTERCEPTOR in production (#59381)
`new` expressions are not dropped by default because they are considered side-effectful,
even if they are not referenced anywhere in production mode.

PR Close #59381
2025-01-07 20:14:57 +00:00
arturovt
52a6710f54 fix(router): complete router events on dispose (#59327)
In this commit, we manually complete the `events` subject to remove all active observers and enable
granular garbage collection, as users may forget to unsubscribe manually when subscribing to `router.events`.

PR Close #59327
2025-01-07 17:06:26 +00:00
arturovt
5685b4c6aa refactor(core): prevent duplicating LView destroyed checks (#59387)
The `type_checks` module already exposes a utility function that checks whether `LView` is marked
as destroyed. There is no need to check flags in other places, as we can reuse the helper function.

PR Close #59387
2025-01-07 17:05:48 +00:00
Matthieu Riegler
aaf1fbb152 refactor(core): remove outdated comment. (#59401)
Should have been done by #58238, but was probably missed in a rebase.

fixes #59397

PR Close #59401
2025-01-07 17:05:12 +00:00
Johnson Chu
9b8f699032 refactor: remove unnecessary // tslint:disable rule flags in devtools (#59365)
Files in the vendor directory have been excluded in tslint.json.

PR Close #59365
2025-01-07 16:06:21 +00:00
Johnson Chu
a6cdbec09f refactor: remove unnecessary TSLint rule flags (#59365)
There are many TSLint rule flags in the source code that have no effect, and they can be safely removed to keep the code clean.

PR Close #59365
2025-01-07 16:06:21 +00:00
Kristiyan Kostadinov
0e23f20c41 fix(platform-browser): styles not replaced during HMR when using animations renderer (#59393)
When we replace a component during HMR, we clear it from the cache of the renderer factory, however when using animations, there's an animation-specific renderer factory that wraps the base DOM one and was preventing the cache from being cleared.

These changes rework the logic that clear the cache to go through a method so we can forward the call to the delegated factory.

PR Close #59393
2025-01-07 15:55:38 +00:00
Angular Robot
d1f8834884 build: update dependency @types/selenium-webdriver4 to v4.1.28 (#59389)
See associated pull request for more information.

PR Close #59389
2025-01-07 15:51:51 +00:00
Pawel Kozlowski
e1ab001e54 refactor(docs-infra): code cleanups (#59395)
A handfull of different code cleanups in adev
components.

PR Close #59395
2025-01-07 15:51:11 +00:00
arturovt
dc07a43b86 refactor(docs-infra): cleanup after render sequence in ReferenceScrollHandler (#58640)
In this commit, we're replacing the provided injector in `afterNextRender` with a node injector
because it was previously mistakenly passing an `EnvironmentInjector` in the `ReferenceScrollHandler`.

PR Close #58640
2025-01-07 15:50:29 +00:00
Angular Robot
adc56b72c5 build: update dependency @types/diff to v7 (#59403)
See associated pull request for more information.

PR Close #59403
2025-01-07 15:45:28 +00:00
Paul Gschwendtner
97039e8ce8 ci: remove devversion from unavailable pullapprove list (#59391)
Removing myself as I'm available for reviews.

PR Close #59391
2025-01-07 15:31:49 +00:00
Hardik Patel
b22677d761 docs(changelog): removed repetitive point from CHANGELOG.md of 18.0.0 (#59374)
PR Close #59374
2025-01-06 22:30:45 +00:00
Angular Robot
8eb8af5217 build: lock file maintenance (#59291)
See associated pull request for more information.

PR Close #59291
2025-01-06 22:23:08 +00:00
Jessica Janiuk
2563f39f29 Revert "refactor(core): remove unused injection props (#59209)" (#59386)
This reverts commit 91b53881d1.

PR Close #59386
2025-01-06 21:35:58 +00:00
Matthieu Riegler
e0401ec1f0 refactor(compiler-cli): extract function overload separatly (#56489)
in order for the docs to process function entry, this commit refactor function extraction by keeping the implementation as a the default entry and adds all the overloads into a separate array of entries.

fixes #56144

PR Close #56489
2025-01-06 20:50:59 +00:00
Max Katz
6aeda99a3e docs: update copyright year (#59359)
PR Close #59359
2025-01-06 19:58:30 +00:00
Kristiyan Kostadinov
5ac6f065ab fix(router): avoid component ID collisions with user code (#59300)
Currently the `ɵEmptyOutletComponent` is very prone to generating ID collision warnings with user code, because it only has one child and no other metadata. This shows up some of our tests as well. While users can resolve it on their end, it can be confusing since they won't have any references to `ɵEmptyOutletComponent` in their own code.

These changes add an `exportAs` to it to make its component ID unique. This doesn't affect the public API of the component since users can't use it directly anyways.

PR Close #59300
2025-01-06 19:18:52 +00:00
arturovt
a088208690 refactor(router): replace mapTo since deprecated (#59333)
Replaces `mapTo` with `map` because, in RxJS, `mapTo` is deprecated and internally uses `map`.

PR Close #59333
2025-01-06 19:18:21 +00:00
Paul Gschwendtner
cc7634f498 fix(bazel): handle module names and ES output in hybrid ts_project mode (#59325)
`ts_project` interop does not emit `.mjs` files. We could achieve this
in the interop rule, but it's better to just fallback look for `.js`.

In addition, `ng_package` currently fails because there is no
`module_name` retrievable from the interop rule; hence causing in
incorrect packaging and safety errors being thrown.

PR Close #59325
2025-01-06 17:29:19 +00:00
Matthieu Riegler
91b53881d1 refactor(core): remove unused injection props (#59209)
Those were also properties that were kept to also support of old compiled targets.

PR Close #59209
2025-01-06 17:28:41 +00:00
arturovt
206229df10 refactor(core): tree-shake ApplicationRef.warnIfDestroyed (#59269)
In this commit, we replace `private warnIfDestroyed` with a `warnIfDestroyed` function that can
be completely removed in production. This change is necessary because, with `private warnIfDestroyed`,
the empty method is still retained in production, even though it has no body.

PR Close #59269
2025-01-06 17:28:10 +00:00
RafaelJCamara
c51acc3a3a docs: update contributing guidelines to reference TypeScript style guide (#59282)
PR Close #59282
2025-01-06 17:27:28 +00:00
Kristiyan Kostadinov
ee99879fdc fix(compiler-cli): preserve defer block dependencies during HMR when class metadata is disabled (#59313)
Fixes that the compiler wasn't capturing defer block dependencies correctly when `supportTestBed` is disabled. We had tests for this, but we didn't notice the issue because the dependencies ended up being captured because of the `setClassMetadata` calls. Once they're disabled, the dependencies stopped being recorded.

Fixes #59310.

PR Close #59313
2025-01-06 17:26:30 +00:00
Kristiyan Kostadinov
ce3b6641fb fix(compiler-cli): account for more expression types when determining HMR dependencies (#59323)
During the HMR dependency analysis we need to check if an identifier is top-level or not. We do this by looking at each identifier and its parent, however we didn't account for some cases. These changes expand our logic to cover more of the common node types.

Related to https://github.com/angular/angular/issues/59310#issuecomment-2563963501.

PR Close #59323
2025-01-06 17:25:57 +00:00
Kristiyan Kostadinov
ceadd28ea1 fix(compiler): allow $any in two-way bindings (#59362)
Some time ago we narrowed down the expressions we support in two-way bindings, because in most cases any apart from property reads doesn't make sense. This ended up preventing users from using `$any` in the binding since it's considered a function call.

These changes update the validation logic to allow `$any`.

Fixes #51165.

PR Close #59362
2025-01-06 17:25:25 +00:00
Andrew Kushnir
dc8280d950 Revert "refactor(platform-server): reduce timeout used in tests (#59275)" (#59380)
This reverts commit 19ec8266d1.

PR Close #59380
2025-01-06 17:24:26 +00:00
Sheik Althaf
0bf6f7602e refactor(devtools): add split to the demo devtools app (#58818)
added split area component to demo component so that we can resize the devtools and demo app.

PR Close #58818
2025-01-06 16:22:01 +00:00
Sheik Althaf
d0cd74ace7 refactor(devtools): use signals for template properties in frame manager (#58818)
convert the frames and selectedFrame properties to signal so that it can react to changes on OnPush

PR Close #58818
2025-01-06 16:22:01 +00:00
Kristiyan Kostadinov
d298d25426 feat(migrations): add schematic to clean up unused imports (#59353)
In v19 we added a warning about unused standalone imports, however we didn't do anything about existing code which means that users have to clean it up manually. These changes add the `ng g @angular/core:cleanup-unused-imports` schematic which will remove the unused dependencies automatically.

There isn't any new detection code since all the manipulations are based on the produced diagnostics, but there's a bit of code to remove the import declarations from the file as well.

Fixes #58849.

PR Close #59353
2025-01-06 16:21:26 +00:00
Kristiyan Kostadinov
d6ca669bc9 refactor(migrations): allow compiler options to be customized in tsurge (#59353)
Allows for user-defined options to be passed in when creating a program in tsurge.

PR Close #59353
2025-01-06 16:21:26 +00:00
Kristiyan Kostadinov
b2fcad8c1d refactor(compiler-cli): expose diagnostic error code (#59353)
Exports the error codes so that they can be reused.

PR Close #59353
2025-01-06 16:21:26 +00:00
Andrew Kushnir
19ec8266d1 refactor(platform-server): reduce timeout used in tests (#59275)
This commit updates the timeout used in the incremental hydration tests from `101` -> `10` ms, which allows to speed up tests by ~20% (12.5 -> 10 seconds locally).

PR Close #59275
2025-01-06 16:18:58 +00:00
Sandor Drieënhuizen
e5866eed2e refactor(compiler): incorrect spelling in for loop parse error message (#59289)
'parameter' was spelled as 'paramater'.

Fix spelling error in Update r3_control_flow.ts

'parameter' was spelled as 'paramater'.

Fix spelling error in r3_template_transform_spec.ts

'parameter' was spelled as 'paramater'.

PR Close #59289
2025-01-06 16:18:15 +00:00
arturovt
aa835da9a2 refactor(docs-infra): allow playground component to be cleaned up properly (#58040)
In this commit, we're replacing the `async-await` style in the playground component with the `from()`
observable, which allows us to invert a dependency and avoid memory leaks. Because an `async` function
has a closure, just like any other function in JavaScript, using `await` captures `this` until the
promise is resolved.

PR Close #58040
2025-01-06 16:16:59 +00:00
Angular Robot
895a90e116 build: update scorecard action dependencies (#59299)
See associated pull request for more information.

PR Close #59299
2025-01-06 16:15:58 +00:00
Angular Robot
a62905f04a build: update all non-major dependencies (#59298)
See associated pull request for more information.

PR Close #59298
2025-01-06 16:15:27 +00:00
Angular Robot
e30eae1365 build: update io_bazel_rules_sass digest to aff53ca (#59360)
See associated pull request for more information.

PR Close #59360
2025-01-06 16:14:57 +00:00
Angular Robot
863d161387 build: update dependency ngx-progressbar to v14 (#59361)
See associated pull request for more information.

PR Close #59361
2025-01-06 16:14:25 +00:00
Samuel Perez
d54deb2ba6 docs: Add NG0750 to errors list (#59265)
This PR adds error NG0750 to Error Encyclopedia.

Update adev/src/content/reference/errors/NG0750.md

Co-authored-by: Andrew Kushnir <43554145+AndrewKushnir@users.noreply.github.com>

Update adev/src/content/reference/errors/NG0750.md

Co-authored-by: Andrew Kushnir <43554145+AndrewKushnir@users.noreply.github.com>

PR Close #59265
2025-01-06 16:13:36 +00:00
Meehdi
ad65da6139 docs: fix mermaid polygon node text visibility in dark mode (#59285)
Fix visibility issue with text inside polygon nodes in mermaid diagrams when using dark mode theme to ensure proper contrast and readability

PR Close #59285
2025-01-06 16:12:51 +00:00
Matthieu Riegler
16d4ea3221 docs: fix link to API entry AngularAppEngine (#59367)
fixes #59342

PR Close #59367
2025-01-06 16:11:01 +00:00
Matthieu Riegler
1614cfdbb0 docs: add TS support for 19.1 (#59326)
PR Close #59326
2025-01-06 16:10:30 +00:00
Juan Urquiza
a29d855e9e docs: changed name class (#59322)
PR Close #59322
2025-01-06 16:07:55 +00:00
Andrew Kushnir
c197ee000f docs: add a note about Incremental Hydration to the @defer docs (#59320)
PR Close #59320
2025-01-06 16:06:36 +00:00
Shai Reznik
def5d4c81e docs: fix wrong link (#59277)
PR Close #59277
2025-01-06 16:04:21 +00:00