AleksanderBodurri
33167d9989
refactor(core): implement experimental getSignalGraph debug API ( #57074 )
...
Creates a debug api that returns an arrays of nodes and edges that represents a signal graph in the context of a particular injector.
Starts by discovering the consumer nodes for each injector, and then traverses their dependencies to discover each producer.
PR Close #57074
2024-12-10 13:47:03 -08:00
Alan Agius
24e317cb15
refactor: replace ɵPendingTasks with ɵPendingTasksInternal ( #59138 )
...
This commits remove usage of the old export.
PR Close #59138
2024-12-10 13:45:07 -08:00
Angular Robot
2beb374524
build: lock file maintenance ( #59110 )
...
See associated pull request for more information.
PR Close #59110
2024-12-10 13:43:27 -08:00
Kristiyan Kostadinov
d010e11b73
feat(core): add event listener options to renderer ( #59092 )
...
Updates the `Renderer2.listen` signature to accept event options, as well as all adjacent types to it.
PR Close #59092
2024-12-10 13:39:47 -08:00
arielbackenroth
30e676098d
fix(core): Fix a bug where snapshotted functions are being run twice if they return a nullish/falsey value. ( #59073 )
...
Snapshots can return nullish values; don't run the snapshotted function if the snapshotted function returns a nullish/falsey value.
PR Close #59073
2024-12-05 16:16:49 -08:00
Kristiyan Kostadinov
0dee2681f7
fix(compiler-cli): consider pre-release versions when detecting feature support ( #59061 )
...
Fixes that the logic which checks whether a feature is supported didn't account for pre-releases.
Fixes https://github.com/angular/vscode-ng-language-service/issues/2123 .
PR Close #59061
2024-12-05 16:15:12 -08:00
Kristiyan Kostadinov
1b9492edf8
fix(compiler-cli): error in unused standalone imports diagnostic ( #59064 )
...
Fixes a null pointer error in the unused standalone imports diagnostic. It was caused by an inconsistency in TypeScript's built-in types.
Fixes #58872 .
PR Close #59064
2024-12-05 16:14:02 -08:00
Matthieu Riegler
0034ce5583
refactor(http): Don't log fetch warning in tests. ( #59049 )
...
Prior to this commit, we were logging the `NOT_USING_FETCH_BACKEND_IN_SSR` error when `provideHttpTestingClient` and `PLATFORM_ID` were provided.
fixes #59028
PR Close #59049
2024-12-05 16:12:55 -08:00
Charles Lyding
52be35118f
fix(platform-browser): collect external component styles from server rendering ( #59031 )
...
SSR generated component styles used in development environments will add
external styles via link elements to the HTML. However, the runtime would
previously not collect these link elements for reuse with rendered components.
This would result in two copies of the link elements present in the DOM. In
isolation this is not problematic as it is only present in development mode.
Unfortunately, the Vite-based CSS HMR functionality used by the Angular CLI
only updates the first stylesheet it finds and leaves other instances of the
stylesheet in place. This behavior causes the styles to be left in an
inconsistent state. This could be considered a defect within Vite as it should
update all relevant styles to maintain consistency but ideally there should
not be two instances in the Angular SSR case. To avoid the Vite issue, the
runtime will now collect SSR generated external styles and reuse them.
PR Close #59031
2024-12-05 16:12:22 -08:00
Kristiyan Kostadinov
6fd8a20978
refactor(compiler-cli): move two-way binding fix behind flag ( #59002 )
...
Moves the fix for type checking the event side of two-way bindings behind a compiler flag so that we can roll it out in v20.
PR Close #59002
2024-12-05 16:11:02 -08:00
Kristiyan Kostadinov
c5c20e9d86
fix(compiler-cli): check event side of two-way bindings ( #59002 )
...
In the past two-way bindings used to be interpreted as `foo = $event` at the parser level. In #54065 it was changed to preserve the actual expression, because it was problematic for supporting two-way binding to signals. This unintentionally ended up causing the TCB to two-way bindings to look something like `someOutput.subscribe($event => expr);` which does nothing. It largely hasn't been a problem, because the input side of two-way bindings was still being checked, except for the case where the input side of the two-way binding has a wider type than the output side.
These changes re-add type checking for the output side by generating the following TCB instead:
```
someOutput.subscribe($event => {
var _t1 = unwrapSignalValue(this.someField);
_t1 = $event;
});
```
PR Close #59002
2024-12-05 16:11:02 -08:00
Kristiyan Kostadinov
68c5e02548
refactor(compiler-cli): rename misleading function ( #59002 )
...
The `isSplitTwoWayBinding` function was a bit misleading, because it has side effects. Renames the function make it a bit more explicit.
PR Close #59002
2024-12-05 16:11:02 -08:00
Kristiyan Kostadinov
4559e125f0
refactor(compiler): generate debug location instruction ( #58982 )
...
Adds the logic that will generate the `ɵɵattachSourceLocations` instruction.
Fixes #42530 .
PR Close #58982
2024-12-05 16:09:55 -08:00
Kristiyan Kostadinov
90896b858b
refactor(core): add runtime logic for attaching source locations ( #58982 )
...
Adds the implementation of the `ɵɵattachSourceLocations` instruction that will add the `data-ng-source-location` attribute to nodes to indicate where they were defined.
PR Close #58982
2024-12-05 16:09:55 -08:00
Kristiyan Kostadinov
c9b3bd8409
refactor(compiler): capture template path ( #58982 )
...
Captures the template path in the component's metadata so it can be used later on.
PR Close #58982
2024-12-05 16:09:55 -08:00
Kristiyan Kostadinov
00d5b0dfd3
refactor(compiler-cli): rework path normalization function ( #58982 )
...
Tweaks the `getProjectRelativePath` function so it's not as dependent on the TypeScript AST.
PR Close #58982
2024-12-05 16:09:55 -08:00
Sheik Althaf
fe40143813
refactor(router): remove standalone true ( #58950 )
...
removed the standalone true from router package.
PR Close #58950
2024-12-05 16:02:37 -08:00
Alex Rickabaugh
4a0c6cd435
refactor(router): remove circular dep in router navigation code ( #59083 )
...
Use `import type` to break phantom circular imports for the router
navigation implementation.
PR Close #59083
2024-12-05 16:01:15 -08:00
Alex Rickabaugh
e61a19957f
refactor(router): remove circular dep in router model definitions ( #59083 )
...
Use `import type` to break phantom circular imports for router model
definitions.
PR Close #59083
2024-12-05 16:01:15 -08:00
Alex Rickabaugh
ee53dc07de
refactor(router): remove circular dep in RouterOutletContext ( #59083 )
...
Use `import type` to break phantom circular imports for
`RouterOutletContext`.
PR Close #59083
2024-12-05 16:01:15 -08:00
Alex Rickabaugh
9d3ced6636
refactor(core): remove circular dep in LView & LContainer definitions ( #59083 )
...
Use `import type` to break phantom circular imports in the runtime
definitions of `LView` and `LContainer`.
PR Close #59083
2024-12-05 16:01:14 -08:00
Alex Rickabaugh
8cea383cc1
refactor(core): remove circular dep in JIT decorator definitions ( #59083 )
...
Use `import type` to break phantom circular imports in the runtime
definitions of JIT decorators.
PR Close #59083
2024-12-05 16:01:14 -08:00
Alex Rickabaugh
e6503f8bea
refactor(core): remove circular dep in ComponentFactoryResolver ( #59083 )
...
Use `import type` to break a phantom circular import in the runtime
definition of `ComponentFactory` and `ComponentFactoryResolver`.
PR Close #59083
2024-12-05 16:01:14 -08:00
Alex Rickabaugh
587d4011a4
refactor(core): remove circular dep in DI code ( #59083 )
...
Use `import type` to break a phantom circular import in the DI code.
PR Close #59083
2024-12-05 16:01:14 -08:00
Alex Rickabaugh
039bcad76a
refactor(core): remove circular dep in iterable differs. ( #59083 )
...
Use `import type` to break a phantom circular import in iterable differs.
PR Close #59083
2024-12-05 16:01:14 -08:00
Alex Rickabaugh
5a4ac89376
refactor(core): remove circular dep in ViewRef definition ( #59083 )
...
Use `import type` to break a phantom circular import in the runtime
definition of `ViewRef`.
PR Close #59083
2024-12-05 16:01:14 -08:00
Alex Rickabaugh
8b02d11fbb
refactor(compiler): remove circular dep in the output ast ( #59083 )
...
Use `import type` to break a phantom circular import in the output AST in
the compiler.
PR Close #59083
2024-12-05 16:01:14 -08:00
Alex Rickabaugh
2e907eaa98
refactor(compiler-cli): remove circular dep in the partial evaluator ( #59083 )
...
Use `import type` to break a phantom import cycle.
PR Close #59083
2024-12-05 16:01:14 -08:00
Tom Wilkinson
8780399234
refactor(core): Remove event_contract_multi_container ( #59059 )
...
This code has been moved internally.
PR Close #59059
2024-12-05 15:24:43 -08:00
Matthieu Riegler
04e074bc04
Revert "fix(platform-server): remove peer dependency on animations ( #58997 )" ( #59051 )
...
This reverts commit 1cfbfc66d3 .
PR Close #59051
2024-12-04 19:11:12 +01:00
hawkgs
0a399e7f9c
refactor(docs-infra): update comments ( #59004 )
...
Add missing file header comments and update others.
PR Close #59004
2024-12-04 18:05:59 +01:00
hawkgs
b8b6c8c77a
refactor(docs-infra): convert code-example-s that have only region param to @example-s ( #59004 )
...
Replace all <code-example>-s within TS files that contain only a path and a region with JSDoc @example-s.
PR Close #59004
2024-12-04 18:05:59 +01:00
hawkgs
a4ee2d90e6
feat(docs-infra): include code examples files in the API gen ( #59004 )
...
The code examples in `package/examples` are now passed to the API JSON generator.
PR Close #59004
2024-12-04 18:05:58 +01:00
hawkgs
0513fbc9fc
docs: set syntax highlighting of code examples MD code blocks ( #59026 )
...
Set the syntax highlighting based on the code examples' language.
PR Close #59026
2024-12-04 17:30:28 +01:00
Sheik Althaf
9658dd1fe3
refactor(common): remove standalone: true ( #58949 )
...
Removed the standalone true flag from common packages.
PR Close #58949
2024-12-04 12:41:51 +01:00
AleksanderBodurri
e894a5daea
feat(core): set kind field on template and effect nodes ( #58865 )
...
Builds on #58333 by assigning the kind field to reactive nodes that are not in the `core/primitives` package.
PR Close #58865
2024-12-04 12:30:11 +01:00
hawkgs
8d6ea5bae3
docs: fix missing alert block styles in the API reference ( #59020 )
...
Substitute legacy alert classes with the new ones.
PR Close #59020
2024-12-04 11:02:42 +01:00
AleksanderBodurri
fa0a9a5dde
refactor(core): add "kind" to signal prototype nodes ( #58333 )
...
Enables debug APIs to determine the kind of a signal given a node.
PR Close #58333
2024-12-03 15:15:50 +01:00
Angular Robot
392c036e5e
build: update dependency mocha to v11 ( #59012 )
...
See associated pull request for more information.
PR Close #59012
2024-12-03 12:21:45 +01:00
Angular Robot
e305b45627
build: lock file maintenance ( #58998 )
...
See associated pull request for more information.
PR Close #58998
2024-12-02 16:29:03 +01:00
Timon
1b6204dd2a
docs(core): fix eventCoalescing comment ( #57097 )
...
PR Close #57097
2024-12-02 11:34:26 +01:00
Kristiyan Kostadinov
1cfbfc66d3
fix(platform-server): remove peer dependency on animations ( #58997 )
...
The `@angular/platform-server` package had a peer dependency on `@angular/animations` which wasn't being used anywhere.
PR Close #58997
2024-12-02 11:33:04 +01:00
Kristiyan Kostadinov
35165d152d
fix(migrations): inject migration dropping code if everything except super is removed ( #58959 )
...
Fixes that in some cases the internal version of the migration was dropping code when all the statements after the `super` call are deleted.
PR Close #58959
2024-12-02 08:56:21 +01:00
Kristiyan Kostadinov
7191aa6e09
fix(migrations): don't migrate classes with parameters that can't be injected ( #58959 )
...
Updates the inject migrations to skip over classes that have uninjectable class parameters.
PR Close #58959
2024-12-02 08:56:21 +01:00
Kristiyan Kostadinov
68e5ba7a3a
fix(migrations): preserve type literals and tuples in inject migrations ( #58959 )
...
Updates the inject migration to preserve type literals and tuple types, based on some internal feedback.
PR Close #58959
2024-12-02 08:56:21 +01:00
Kristiyan Kostadinov
a4924af6d5
fix(migrations): inject migration aggressively removing imports ( #58959 )
...
Fixes that the inject migration would remove imports even if they're still used by classes that aren't being migrated.
PR Close #58959
2024-12-02 08:56:21 +01:00
Kristiyan Kostadinov
508d3a1b3b
fix(migrations): correctly strip away parameters surrounded by comments in inject migration ( #58959 )
...
Fixes that the inject migration was sometimes producing invalid code if there are comments around the parameters.
PR Close #58959
2024-12-02 08:56:21 +01:00
Kristiyan Kostadinov
e31e52e177
fix(migrations): class content being deleted in some edge cases ( #58959 )
...
Fixes that the inject migration was deleting the class' content if a property exists after the constructor that is being rewritten.
PR Close #58959
2024-12-02 08:56:20 +01:00
Kristiyan Kostadinov
21b993c8df
refactor(compiler): remove allowInvalidAssignmentEvents flag ( #58988 )
...
Deletes the `allowInvalidAssignmentEvents` which was added to facilitate a migration away from invalid two-way bindings. Since the migration doesn't exist anymore, we don't need the flag either.
PR Close #58988
2024-12-02 08:55:42 +01:00
Gustav Blomqvist
d5f9d0284c
docs(core): grammatical fix ( #58204 )
...
PR Close #58204
2024-11-28 17:38:35 +01:00