angular/packages/core/test/linker
Alex Rickabaugh 38c9f08c8d refactor(core): decouple effects from change detection (#51049)
Previously effects were queued as they became dirty, and this queue was
flushed at various checkpoints during the change detection cycle. The result
was that change detection _was_ the effect runner, and without executing CD,
effects would not execute. This leads a particular tradeoff:

* effects are subject to unidirectional data flow (bad for dx)
* effects don't cause a new round of CD (good/bad depending on use case)
* effects can be used to implement control flow efficiently (desirable)

This commit changes the scheduling mechanism. Effects are now scheduled via
the microtask queue. This changes the tradeoffs:

* effects are no longer limited by unidirectional data flow (easy dx)
* effects registered in the Angular zone will trigger CD after they run
  (same as `Promise.resolve` really)
* the public `effect()` type of effect probably isn't a good building block
  for our built-in control flow, and we'll need a new internal abstraction.

As `effect()` is in developer preview, changing the execution timing is not
considered breaking even though it may impact current users.

PR Close #51049
2023-09-12 08:12:56 -07:00
..
change_detection_integration_spec.ts refactor(core): handle #24571 todos. (#49221) 2023-06-14 12:33:44 +02:00
inheritance_integration_spec.ts fix(core): better error message when directive extends a component (#45658) 2022-04-18 09:24:23 -07:00
integration_spec.ts refactor(core): handle #24571 todos. (#49221) 2023-06-14 12:33:44 +02:00
ng_container_integration_spec.ts refactor(core): handle #24571 todos. (#49221) 2023-06-14 12:33:44 +02:00
ng_module_integration_spec.ts refactor(core): decouple effects from change detection (#51049) 2023-09-12 08:12:56 -07:00
projection_integration_spec.ts refactor(platform-browser): Remove BrowserDetection (#50411) 2023-05-30 13:06:28 -07:00
query_integration_spec.ts refactor(core): handle #24571 todos. (#49221) 2023-06-14 12:33:44 +02:00
query_list_spec.ts refactor(core): remove #9100 todos. (#49408) 2023-04-04 15:01:48 -07:00
regression_integration_spec.ts refactor(core): handle #24571 todos. (#49221) 2023-06-14 12:33:44 +02:00
resource_loader_mock.ts refactor(core): handle #24571 todos. (#49221) 2023-06-14 12:33:44 +02:00
security_integration_spec.ts refactor(core): handle #24571 todos. (#49221) 2023-06-14 12:33:44 +02:00
source_map_integration_node_only_spec.ts test: convert source-map core tests to use async/await instead of fakeAsync (#46888) 2022-07-19 09:40:54 -07:00
source_map_util.ts test: update source-map tests to account for source-map breaking change (#46888) 2022-07-19 09:40:54 -07:00
view_injector_integration_spec.ts refactor(platform-browser): replace our own toBeAnInstanceOf with toBeInstanceOf (#50661) 2023-06-14 10:58:04 +02:00