angular/packages/core/test/signals
Pawel Kozlowski 42f4f70e97 fix(core): remove signal equality check short-circuit (#53446)
The PR https://github.com/angular/angular/pull/52465 introduced short-circuit for
the signal equality invocation - with the reasoning that the equality function
should never return false for arguments with the same references. In practice it
turned out that it is rather surprising and the subsequent PR
https://github.com/angular/angular/pull/52532 added a warning when the short-circuit
was taking priority over the equality function.

Still, the presence of the short-circuit prevents people from mutating objects in
place and based on https://github.com/angular/angular/issues/52735 this is a common
and desired scenario. This change removes the short-circuit altogether and thus
fixes the mentioned issue.

We do recognize that removing short-circuit exposes developers to the potentially
surprising logic where mutated in-place change won't be propagated throug the
reactivity graph (due to the deault equality function). But we assume that this might
be less surprising / more desirable as compared to the short-circuit logic.

Fixes #52735

PR Close #53446
2023-12-08 07:05:34 -08:00
..
BUILD.bazel refactor: move signals code into primitives package (#51986) 2023-10-06 15:12:00 -07:00
computed_spec.ts refactor: move signals code into primitives package (#51986) 2023-10-06 15:12:00 -07:00
effect_util.ts refactor: move signals code into primitives package (#51986) 2023-10-06 15:12:00 -07:00
glitch_free_spec.ts refactor(core): extract signals API away from the 'signals' package (#51986) 2023-10-06 15:11:59 -07:00
is_signal_spec.ts refactor(core): extract signals API away from the 'signals' package (#51986) 2023-10-06 15:11:59 -07:00
non_reactive_spec.ts refactor(core): extract signals API away from the 'signals' package (#51986) 2023-10-06 15:11:59 -07:00
signal_spec.ts fix(core): remove signal equality check short-circuit (#53446) 2023-12-08 07:05:34 -08:00
watch_spec.ts refactor: move signals code into primitives package (#51986) 2023-10-06 15:12:00 -07:00