Commit graph

32644 commits

Author SHA1 Message Date
Andrew Kushnir
be7c8d4fc6 refactor(forms): convert scripts within packages/forms to relative imports (#60624)
This commit updates scripts within `packages/forms` to relative imports as a prep work to the upcoming infra updates.

PR Close #60624
2025-03-31 19:22:09 +00:00
Angular Robot
3767429e9f build: update cross-repo angular dependencies (#60644)
See associated pull request for more information.

PR Close #60644
2025-03-31 18:26:23 +00:00
arturovt
1e697f3860 refactor(platform-browser): remove empty deps lists (#60312)
Removes empty `deps` lists in Platform-Browser providers.

PR Close #60312
2025-03-31 18:09:07 +00:00
arturovt
5317979738 refactor(common): drop error messages in production (#60415)
Drops more error messages in production.

PR Close #60415
2025-03-31 18:08:37 +00:00
Alex Rickabaugh
43cbc58254 fix(core): remove forceRoot flag for effects (#60535)
This flag is effectively unused in Angular code that we've seen, and is only
serving to complicate the mental model of effects. It could be reintroduced
if needed.

PR Close #60535
2025-03-31 18:08:07 +00:00
Doug Parker
8b5ba62f63 release: bump Angular DevTools version to 1.0.27 (#60642)
PR Close #60642
2025-03-31 17:50:20 +00:00
Angular Robot
e5876c5ff6 build: update angular/dev-infra digest to a9c1c54 (#60639)
See associated pull request for more information.

PR Close #60639
2025-03-31 17:32:35 +00:00
AleksanderBodurri
c5d841a7a5 fix(devtools): catch firefox non-top level frame error case when using utilities APIs (#60430)
Previously the `frameUrl` option in `chrome.devtools.inspectedWindow.eval` would throw errors when used in Firefox, preventing inspect source functionality for firefox users even if they don't need to target a particular frame on the page (they are on the top level frame with Angular DevTools).

Now this behaviour is as follows:

Firefox user that has the top level frame selected -> DevTools inspect functionality works as expected.

Firefox user that has a non-top level frame selected -> DevTools now renders a snackbar message informing the user of the limitation.

PR Close #60430
2025-03-31 17:09:56 +00:00
EriksonBahr
a7d1293f75 fix: step 6 tutorial docs (#60630)
PR Close #60630
2025-03-31 17:04:35 +00:00
hawkgs
8b529debf9 refactor(devtools): fix firefox breadcrumbs (#60552)
Expand the breadcrumbs container to fit the directive explorer width and remove the scrollbar.

PR Close #60552
2025-03-31 16:56:55 +00:00
Andrew Kushnir
599c45c380 build: update lock files for integration test apps (#60594)
This commit updates yarn.lock files for integration test apps.

PR Close #60594
2025-03-31 16:39:14 +00:00
Andrew Kushnir
8e3c40a0a4 refactor(core): drop unused deps for integration apps (#60594)
This commit drops unused deps from the `packages.json` files of various integration test apps.

PR Close #60594
2025-03-31 16:39:14 +00:00
Andrew Kushnir
d034d52ac6 ci: moving integration tests into a separate GH action (#60594)
This commit extracts integration tests from the `test` CI job into a separate GH job (to run in parallel).

PR Close #60594
2025-03-31 16:39:14 +00:00
Andrew Kushnir
13c819bad2 test(core): remove obsolete integration tests (#60594)
This commit removes a number of obsolete integration tests and also removes some e2e tests for a few remianing apps, since they are not adding value, but cause extra time to spend on CI.

PR Close #60594
2025-03-31 16:39:14 +00:00
Angular Robot
e50a56b11f build: update cross-repo angular dependencies (#60638)
See associated pull request for more information.

PR Close #60638
2025-03-31 16:35:45 +00:00
Angular Robot
52dfce6839 build: lock file maintenance (#60632)
See associated pull request for more information.

PR Close #60632
2025-03-31 14:42:27 +00:00
Kristiyan Kostadinov
9c106f4401 refactor(core): introduce domProperty instruction (#60608)
Renames the `hostProperty` instruction to `domProperty` since it's not really host-specific and we can use it for other DOM-specific operations in the future.

PR Close #60608
2025-03-31 13:15:19 +00:00
Kristiyan Kostadinov
8562667b0e refactor(core): separate out DOM logic from property (#60608)
Includes the following moves.
* Moves the DOM-specific logic from `elementPropertyInternal` into a separate function so we can reuse it.
* Uses the DOM-specific code for the `hostProperty` instruction.
* Removes the `nativeOnly` parameter from `elementPropertyInternal`.
* Renames `elementPropertyInternal` to `setPropertyAndInputs` so it's a bit more clear what the function is doing.

PR Close #60608
2025-03-31 13:15:19 +00:00
Elderov, Ali
8144769ad8 docs: fix private modifier for the injected service (#60619)
PR Close #60619
2025-03-31 13:13:37 +00:00
Colum Ferry
a082a3ecf2 docs: update links for angular rspack to correct locations (#60634)
PR Close #60634
2025-03-31 13:12:13 +00:00
Jessica Janiuk
005ad65b1f fix(core): prevent omission of deferred pipes in full compilation (#60571)
This prevents a bug where pipes would be excluded from defer dependency generation.

PR Close #60571
2025-03-31 13:11:12 +00:00
Andrew Kushnir
cbd6ec8c6a build: remove obsolete bundling test apps (#60591)
This commit removes a few bundling test apps that do not provide any value, but require time on CI and during local development to update golden files.

The functionality that was tested in those apps is covered by various other tests that we have in a repository (either in the same `packages/core/test/bundling` folder or in other unit/integration tests).

PR Close #60591
2025-03-28 18:45:31 +00:00
Jessica Janiuk
d15fda3e03 Revert "refactor(core): allow multiple DI profilers (#60562)" (#60611)
This reverts commit b21c6e5ac5.

PR Close #60611
2025-03-28 17:25:43 +00:00
Matthieu Riegler
e40b5c9ebd refactor(core): run the control flow migration during ng update (#60492)
The migration had to be run manually before this change. It is now part of the update process when migrating to v20.

PR Close #60492
2025-03-28 15:46:41 +00:00
Matthieu Riegler
b407157ee8 refactor(core): Deprecate the structural directives ngIf/ngFor/ngSwitch. (#60492)
Note: This is not a deprecation of structural directives, this only about  `ngIf`/`ngFor`/`ngSwitch`.

DEPRECATED: `ngIf`/`ngFor`/`ngSwitch` are deprecated. Use the control flow blocks instead (`@for`/`@if`/`@switch`).

PR Close #60492
2025-03-28 15:46:41 +00:00
Andrew Kushnir
152261cd34 refactor(core): produce a message about @defer behavior when HMR is enabled (#60533)
When the HMR is enabled in Angular, all `@defer` block dependencies are loaded
eagerly, instead of waiting for configured trigger conditions. From the DX perspective,
it might be seen as an issue when all dependencies are being loaded eagerly. This commit
adds a logic to produce a message into the console to provide more info for developers.

PR Close #60533
2025-03-28 15:00:32 +00:00
Pawel Kozlowski
b21c6e5ac5 refactor(core): allow multiple DI profilers (#60562)
This commit changes the DI profiler infrastructure to
allow multiple profilers running at the same time.

PR Close #60562
2025-03-28 13:36:10 +00:00
Matthieu Riegler
bae7b75ff5 refactor(core): retrieve the jsActionMap only once. (#60587)
Before the change, the map was pull on every loop execution.

PR Close #60587
2025-03-28 13:35:28 +00:00
Kristiyan Kostadinov
0c53970aeb fix(migrations): handle shorthand assignments in super call (#60602)
Fixes that the logic which checks whether a parameter is used inside a `super` call wasn't accounting for shorthand assignments.

PR Close #60602
2025-03-28 13:34:36 +00:00
Kristiyan Kostadinov
3ff48b6467 fix(migrations): inject migration not handling super parameter referenced via this (#60602)
The inject migration has some logic that treats parameters referenced directly inside of `super` differently. This logic didn't account for the fact that the parameters could be inside of inline functions which have less strict access requirements.

PR Close #60602
2025-03-28 13:34:36 +00:00
arturovt
7c971566ad refactor(core): calculate hasHttpTransferCacheOptions later (#60605)
Prior to this commit, `hasHttpTransferCacheOptions` was calculated immediately after the `featuresKind` set was declared, which was always defaulted to `false`.

PR Close #60605
2025-03-28 13:33:57 +00:00
Lukas Spirig
ff98ccb193 feat(router): support custom elements for RouterLink (#60290)
PR Close #60290
2025-03-28 12:16:09 +00:00
Andrew Scott
1226eaad51 fix(router): Add missing types to transition (#60307)
The 'types' property was added recently and is available in all browsers that support view transitions

fixes #60285

PR Close #60307
2025-03-28 11:51:06 +00:00
Andrew Scott
0142ae1c8e refactor(router): Update tests to not use deprecated string tokens (#60378)
This replaces string tokens in the router tests with functional guads.

PR Close #60378
2025-03-28 11:50:11 +00:00
Andrew Scott
c57951d58f fix(router): Remove 'any' type from route guards (#60378)
This commit removes `'any'` from the type union for router guards and
replaces it with 'string', which will eventually also be removed. This
change allows TypeScript to infer the parameter types of functions when
using functional guards and enables stricter type-checking to ensure the
guard array contains valid values.

BREAKING CHANGE: The guards arrays on `Route` no longer include `any` in
the type union. The union includes functions for the functional guards
as well as a type matching `Injector.get`: `ProviderToken<T>|string`.
Note that string is still deprecated on both the route guards and
`Injector.get`.

PR Close #60378
2025-03-28 11:50:11 +00:00
Angular Robot
0fedf2cf80 build: update cross-repo angular dependencies (#60553)
See associated pull request for more information.

PR Close #60553
2025-03-28 02:19:16 +00:00
Angular Robot
0b34c58f5a build: lock file maintenance (#60526)
See associated pull request for more information.

PR Close #60526
2025-03-27 23:12:33 +00:00
Andrew Scott
5948cd03c5 fix(compiler-cli): Produce fatal diagnostic on duplicate decorated properties (#60376)
This prevents the compilation and language service from crashing.

fixes https://github.com/angular/vscode-ng-language-service/issues/2091

PR Close #60376
2025-03-27 20:26:42 +00:00
Doug Parker
de5c891404 refactor(devtools): display Wiz non-prop data as "State" (#60475)
This is the more common term for Wiz developers to reduce confusion between Wiz "props" and standard JS "properties".

PR Close #60475
2025-03-27 20:26:12 +00:00
Doug Parker
96f36d62c8 refactor(devtools): use ng.getDirectiveMetadata for component name (#60475)
This reads the component name from `ng.getDirectiveMetadata`.

PR Close #60475
2025-03-27 20:26:12 +00:00
Doug Parker
d639a8d1f9 refactor(devtools): display directive metadata from Wiz and ACX (#60475)
This updates the DevTools protocol to send Wiz/ACX metadata in addition to Angular metadata. Fortunately we don't need to worry about backwards compatibility here (`framework` is required for example), but the design roughly mirrors `DirectiveDebugMetadata` in `@angular/core`.

Beyond that, this is mostly plumbing through an extra data slice in the form of `props` provided by Wiz. An earlier version implemented `events` as their own slice as well, but was removed as there is currently no generic way to disambiguate events from any other form of callback passed in as a prop. Instead, event callbacks are visualized as functions under the "Props" category.

Working with `DirectiveMetadata` as a union is unfortunately a bit annoying since it requires casting to more specific `{Angular,Acx,Wiz}DirectiveMetadata` types for TS to allow property access, even when the properties are optional anyways.

This commit is mostly for adding Wiz, but does add a bit of ACX functionality which is not fully tested.

PR Close #60475
2025-03-27 20:26:12 +00:00
Doug Parker
ebf6516190 refactor(devtools): make component-only properties on DirectiveMetadata optional (#60475)
This type was incorrect, as only components have `encapsulation` and `onPush` values. `ng.getDirectiveMetadata` does not return these properties for directive inputs.

Unfortunately the `| Partial<AngularComponentDebugMetadata>` is necessary to reference these properties or else TypeScript will reject their usage.

PR Close #60475
2025-03-27 20:26:12 +00:00
Doug Parker
ab9dd73a92 refactor(devtools): removes unused classes (#60475)
These `cy-*` classes are not referenced in any styles and appear to be unused.

PR Close #60475
2025-03-27 20:26:12 +00:00
Doug Parker
61ff42a263 refactor(devtools): remove Props suffix from DirectivePropertyResolver names (#60475)
This suffix will be confusing as we introduce new variants for Wiz in particular.

PR Close #60475
2025-03-27 20:26:12 +00:00
Doug Parker
d47cf58f10 refactor(core): update ng.getDirectiveMetadata to support Wiz and ACX (#60475)
This allows `ng.getDirectiveMetadata` to be implemented by Wiz and ACX with subtly different shapes to match the nuances of those frameworks.

Existing usage of `{Component,Directive}DebugMetadata` was moved over to `Angular{Component,Directive}DebugMetadata` as appropriate, since the implementation of `ng` in `@angular/core` is specific to Angular. Only the types support Wiz and ACX.

I opted to merge `ComponentDebugMetadata` and `DirectiveDebugMetadata` into a single type of all the frameworks including both components and directives (recall that components extend directives). The reasoning for this is because Wiz does not support directives (you can kind of think of "Wiz Directive" as an abstract class extended by "Wiz Components"). I felt that a `DirectiveDebugMetadata` containing only Angular and ACX types would be a bit of a trap and lead to bugs when used. It's safer to just have the single type containing all the possible results from `ng.getDirectiveMetadata`.

I also chose to leave the `ng` type as is internally, since `@angular/core` implements a specific concrete version of it narrowed to Angular types. Separately I defined an expanded `FrameworkAgnosticGlobalUtils` which redefines `ng.getDirectiveMetadata` to include Wiz and ACX. We want this type to exist in the Angular GitHub repo so it can be referenced as a common primitive across all three frameworks. This is sufficient for now, however longer term we will likely want to actually manually define the function types in this framework-agnostic interface and make Angular's version properly implement it rather than extend and overwrite Angular's type.

PR Close #60475
2025-03-27 20:26:12 +00:00
Benjamin Pabst
765ba1e181 fix(core): check ngDevMode for undefined (#60565)
This adds a check to "toSignal" whether ngDevMode is not undefined as this can happen for some MFE applications.

PR Close #60565
2025-03-27 20:25:40 +00:00
Kristiyan Kostadinov
e6d2afbfb9 fix(compiler): throw for invalid "as" expression in if block (#60580)
Adds some validation that the "as" expression in an `@if` block is valid.

Fixes #59939.

PR Close #60580
2025-03-27 20:24:58 +00:00
Ryan Russell
0cd7d3bdf0 fix(core): preserve comments in internal inject migration (#60588)
The internal-only combineMemberInitializers option
for the inject migration sometimes dropped the
doc comments from the members.

PR Close #60588
2025-03-27 20:24:22 +00:00
Pawel Kozlowski
76c60a609f refactor(core): move signal toString to primitives (#60365)
This change pushes the toString implementation of signal getters
down to the primitives package so it can be shared with other
frameworks.

Closes #59990

PR Close #60365
2025-03-27 19:43:19 +00:00
iteriani
4a107ed7af refactor(core): Return NOT_FOUND for retrieve instead of null (#60358)
This fits within the spec of the retrieve.

PR Close #60358
2025-03-27 19:39:59 +00:00