Commit graph

31837 commits

Author SHA1 Message Date
arturovt
a1069a39da 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:25 -05:00
Doug Parker
3dc359eaf5 release: bump Angular DevTools version to 1.0.20 (#59454)
PR Close #59454
2025-01-09 15:41:54 -05:00
arturovt
068f4fb68a 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
8243c6eac4 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:52 -05:00
arturovt
a5ee32591d 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:57 -05:00
arturovt
57a98c38e4 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:07 -05:00
arturovt
8b3c9aaff3 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:05 -05:00
arturovt
9ab74540ab 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:18 -05:00
Kristiyan Kostadinov
2b4b7c3ebf 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
Ethan Cline
fb67b10388 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:30 -05:00
Angular Robot
42811e610d 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
71e6f5455a docs(router): update link to development guide in README.md (#59388)
PR Close #59388
2025-01-09 10:29:39 -05:00
Kristiyan Kostadinov
28a5a89dd8 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:07 -05:00
arturovt
21a9f539fa 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:01 -05:00
Jessica Janiuk
f0d52431c9 release: cut the v19.0.6 release 2025-01-08 10:04:46 -08:00
Pawel Kozlowski
41fab1b53c 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:09 +00:00
Matthieu Riegler
07afce81b8 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:45 +00:00
arturovt
6084a595ae 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
74ce629883 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:19 +00:00
Paul Gschwendtner
731dc3a006 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
ca1193d01f 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
29b665f7ad docs(docs-infra): fix entry labels. (#59384)
fixes #59382

PR Close #59384
2025-01-08 15:22:43 +00:00
RafaelJCamara
ede700731b 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
73530540f3 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
Matthieu Riegler
c82ad8778e 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
8b73fc2abc 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
f3bc92b8af 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
6d00efde95 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
a77bc0e25d 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
c94a1e5527 refactor(docs-infra): code cleanups (#59395)
A handfull of different code cleanups in adev
components.

PR Close #59395
2025-01-07 15:51:12 +00:00
arturovt
4ed4d32d03 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:30 +00:00
Angular Robot
096625a308 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
5c010a5bc3 ci: remove devversion from unavailable pullapprove list (#59391)
Removing myself as I'm available for reviews.

PR Close #59391
2025-01-07 15:31:50 +00:00
Angular Robot
d3eff34377 build: lock file maintenance (#59385)
See associated pull request for more information.

PR Close #59385
2025-01-06 22:24:05 +00:00
Matthieu Riegler
fdfaabb2a4 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
66f2aa3333 docs: update copyright year (#59359)
PR Close #59359
2025-01-06 19:58:30 +00:00
Kristiyan Kostadinov
144bccb687 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:53 +00:00
arturovt
c75daac5ba 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
d7a34dc663 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:20 +00:00
arturovt
5f0931bff8 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
3f0bdda957 docs: update contributing guidelines to reference TypeScript style guide (#59282)
PR Close #59282
2025-01-06 17:27:28 +00:00
Kristiyan Kostadinov
17fb20f85d 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
06a55e9817 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
Andrew Kushnir
4cb3f7a7db 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
b0ab674f5e 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
57c826ca9b 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
Andrew Kushnir
50fa8d96ec 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:59 +00:00
Sandor Drieënhuizen
5be56953a5 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
d16dbb9470 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:17:00 +00:00
Angular Robot
8348b8b3af build: update scorecard action dependencies (#59299)
See associated pull request for more information.

PR Close #59299
2025-01-06 16:15:59 +00:00