Commit Graph

44 Commits

Author SHA1 Message Date
Evan You 35c760f82f
fix: Revert "fix(reactivity): self-referencing computed should refresh"
This reverts commit e84c4a608e.
2024-09-06 08:47:12 +08:00
Evan You e84c4a608e
fix(reactivity): self-referencing computed should refresh
ref: https://github.com/vuejs/core/pull/11797#issuecomment-2330738633
2024-09-05 19:04:17 +08:00
Jürg Lehni 716275d1b1
fix(reactivity): prevent endless recursion in computed getters (#11797) 2024-09-05 18:54:30 +08:00
yangxiuxiu 98864a7ef5
fix(reactivity): pass oldValue to computed getter (#11813)
close #11812
2024-09-05 16:10:37 +08:00
Evan You f15ba2c2e2
chore: Merge branch 'main' into minor 2024-07-17 17:32:31 +08:00
Johnson Chu ad22879dd2
test(reactivity): add a failed test for computed (#11243)
to avoid regressions like in #11135
2024-06-28 09:45:34 +08:00
Evan You e0df985f03
fix: Revert "fix(reactivity): avoid infinite loop when render access a side effect computed (#11135)"
This reverts commit 8296e19855.
2024-06-28 09:31:14 +08:00
Evan You 6c303eacd1
Revert "fix(reactivity): fix side effect computed dirty level (#11183)"
This reverts commit 3bd79e3e5e.
2024-06-28 09:28:51 +08:00
Evan You 7d06ca3a83
chore: Merge branch 'main' into minor 2024-06-22 21:05:15 +08:00
Doctor Wu 3bd79e3e5e
fix(reactivity): fix side effect computed dirty level (#11183)
close #11181, #11169
2024-06-22 16:27:28 +08:00
Doctor Wu 8296e19855
fix(reactivity): avoid infinite loop when render access a side effect computed (#11135)
close #11121
2024-06-14 23:51:19 +08:00
Evan You 26356264d2
chore: Merge branch 'main' into minor 2024-06-14 12:32:28 +02:00
Fan Pei 3b0a56a9c4
fix(reactivity): pass oldValue in debug info when triggering refs (#8210)
fix vuejs/pinia#2061
2024-06-04 23:25:37 +08:00
Evan You 05eb4e0fef
Refactor reactivity system to use version counting and doubly-linked list tracking (#10397)
Bug fixes
close #10236
close #10069

PRs made stale by this one
close #10290
close #10354
close #10189
close #9480
2024-02-25 16:51:49 +08:00
Doctor Wu f7ba97f975
feat(dx): warn users when computed is self-triggering (#10299) 2024-02-13 17:38:26 +08:00
Johnson Chu 0bced13ee5
fix(reactivity): avoid infinite recursion from side effects in computed getter (#10232)
close #10214
2024-02-06 18:44:09 +08:00
Johnson Chu 6c7e0bd88f
fix(reactivity): handle `MaybeDirty` recurse (#10187)
close #10185
2024-02-06 18:23:56 +08:00
Evan You 492a720fd0 chore: remove unused import 2024-01-18 11:23:50 +08:00
Johnson Chu c2b274a887
fix(reactivity): re-fix #10114 (#10123) 2024-01-18 10:46:57 +08:00
Doctor Wu 20f62afaaf
fix(reactivity): fix regression for computed with mutation (#10119)
close #10114
2024-01-15 23:38:57 +08:00
Johnson Chu e45a8d24b4
fix(reactivity): fix dirtyLevel checks for recursive effects (#10101)
close #10082
2024-01-13 15:53:06 +08:00
三咲智子 Kevin Deng bfe6b459d3
style: update format & lint config (#9162)
Co-authored-by: 丶远方 <yangpanteng@gmail.com>
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
Co-authored-by: Guo Xingjun <99574369+Plumbiu@users.noreply.github.com>
2023-12-26 19:39:47 +08:00
Johnson Chu 16e06ca08f
feat(reactivity): more efficient reactivity system (#5912)
fix #311, fix #1811, fix #6018, fix #7160, fix #8714, fix #9149, fix #9419, fix #9464
2023-10-27 23:28:40 +09:00
b401243855
chore(types): remove unnecessary @ts-ignore or use @ts-expected-error (#7178) 2023-07-10 18:00:32 +08:00
丶远方 b01fc7ea84
chore: remove unnecessary imports (#8262) 2023-05-19 07:54:12 +08:00
Evan You 8867bb259a wip(vitest-migration): reactivity tests passing 2023-01-26 15:25:55 +08:00
Evan You 82bdf86254 fix(reactivity): ensure computed is invalidated before other effects
fix #5720
2022-04-15 16:43:17 +08:00
Evan You 33c2fbfdc8 fix(reactivity): revert computed scheduler change
fix #4157
2021-07-20 16:45:29 -04:00
Evan You 6eb47f000a fix(reactivity): computed should not trigger scheduler if stopped
fix #4149
2021-07-19 13:37:03 -04:00
Evan You 5cea9a1d4e feat(reactivity): support onTrack/onTrigger debug options for computed 2021-07-16 14:30:49 -04:00
Evan You 2dd4739089 test: more test cases for computed w/ scheduler 2021-07-16 14:30:49 -04:00
Evan You 1fe2239270 refactor: sync value access for chained computed w/ scheduler 2021-07-16 14:30:49 -04:00
Evan You bde855e017 test: test for computed optimization 2021-07-16 14:30:49 -04:00
Evan You 87f69fd0bb perf(reactivity): improve reactive effect memory usage (#4001)
Based on #2345 , but with smaller API change

- Use class implementation for `ReactiveEffect`
- Switch internal creation of effects to use the class constructor
- Avoid options object allocation
- Avoid creating bound effect runner function (used in schedulers) when not necessary.
- Consumes ~17% less memory compared to last commit
- Introduces a very minor breaking change: the `scheduler` option passed to `effect` no longer receives the runner function.
2021-07-16 14:30:49 -04:00
Evan You 03a7a73148 fix(reactivity): ensure computed always expose value
fix #3099

Also changes the original fix for #910 by moving the fix from
reactivity to the scheduler
2021-05-27 20:53:21 -04:00
Evan You 5c74243211 test: move mockWarn into setup files 2020-07-27 22:58:51 -04:00
Carlos Rodrigues dabdc5e115
feat(computed): add readonly flag if no setter is provided (#1654) 2020-07-20 17:35:31 -04:00
Evan You 2569890e31 refactor: move mockWarn utility to @vue/shared
close #652
2020-01-22 09:29:45 -05:00
Dmitry Sharshakov 530be302fc feat(computed): warn if trying to set a readonly computed (#161) 2019-10-09 12:20:53 -04:00
Carlos Rodrigues 600ec5de42 chore: improve typings in reactivity tests (#96) 2019-10-05 10:39:40 -04:00
Evan You 0aff144f93 wip: improve computed typing + test for setters 2019-08-21 12:01:05 -04:00
Evan You aacad85058 test: fix reactivity tests 2019-08-20 09:58:10 -04:00
Evan You caba6d5c9e wip: state -> reactive, value -> ref 2019-08-16 09:42:46 -04:00
Evan You 471899af8b refactor: rename reactivity package name and APIs 2019-06-11 23:50:28 +08:00