Commit Graph

111 Commits

Author SHA1 Message Date
skirtle ec917cfdb9
perf(reactivity): avoid unnecessary recursion in removeSub (#12135) 2024-10-11 10:48:54 +08:00
Tycho d3f5e6e531
fix(reactivity): prevent overwriting `next` property during batch processing (#12075)
close #12072
2024-10-03 23:16:52 +08:00
Evan You 93c95dd4cd
fix(reactivity): fix nested batch edge case 2024-09-27 23:10:20 +08:00
Evan You aa9ef2386a
fix(reactivity): only clear notified flags for computed in first batch iteration
close #12045
2024-09-27 11:25:58 +08:00
Evan You 10ff159240
fix(reactivity): fix recursive sync watcher on computed edge case
close #12033
close #12037
2024-09-26 18:38:13 +08:00
Evan You 6001e5c81a
fix(reactivity): fix property dep removal regression
close #12020
close #12021
2024-09-26 16:58:38 +08:00
Jürg Lehni 0267a58801
fix(reactivity): do not remove dep from depsMap when cleaning up deps of computed (#11995) 2024-09-22 11:49:35 +08:00
Evan You 960706eebf
fix(reactivity): do not remove dep from depsMap when unsubbed by computed
follow up of 235ea4772 after discovering regression in vant ecosystem-ci tests
2024-09-20 23:39:59 +08:00
Evan You 235ea4772e
fix(reactivity): fix memory leak from dep instances of garbage collected objects
close #11979
close #11971
2024-09-20 20:32:40 +08:00
Evan You 5c8b76ed6c
fix(reactivity): fix dev-only memory leak by updating dep.subsHead on sub removal
ref #11956
2024-09-20 20:06:39 +08:00
Evan You c74bb8c2dd
fix(reactivity): avoid exponential perf cost and reduce call stack depth for deeply chained computeds (#11944)
close #11928
2024-09-16 16:00:31 +08:00
Tycho aa5dafd2b5
fix(reactivity): rely on dirty check only when computed has deps (#11931)
close #11929
2024-09-16 10:28:46 +08:00
Tycho 346bfaf760
refactor(reactivity): simplify isDirty condition (#11933) 2024-09-16 09:59:13 +08:00
Evan You 8ea5d6d698
fix(reactivity): properly clean up deps, fix memory leak
close #11901
2024-09-13 18:35:16 +08:00
Evan You 11eebcb4df
refactor(reactivity): use class for Link 2024-09-13 18:35:16 +08:00
Evan You e596378e0b
fix: Revert "fix: Revert "fix(reactivity): self-referencing computed should refresh""
This reverts commit 35c760f82f.
2024-09-10 16:01:20 +08:00
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
yangxiuxiu 98864a7ef5
fix(reactivity): pass oldValue to computed getter (#11813)
close #11812
2024-09-05 16:10:37 +08:00
Cédric Exbrayat d427bcd71c
chore: document parameters of onWatcherCleanup (#11768) 2024-09-02 17:06:30 +08:00
HEGGRIA 64e1ca2657
chore(reactivity): effectScope.ts variable declarations optimized and remove useless code in effect.ts (#11721)
* chore(reactivity): effectScope.ts variable declarations optimized and remove useless code in effect.ts

* fix(reactivity): batchDepth count error fixed

* fix(reactivity): batchDepth count error fixed

* chore(reactivity): modify the batchDepth increase type
2024-08-28 18:16:59 +08:00
linzhe 3bda3e83fd
fix(reactivity): sync watch should be executed correctly (#11589)
close #11577
2024-08-13 22:54:08 +08:00
Kevin Deng 三咲智子 928af5fe2f
refactor(types): enable `isolatedDeclarations` (#11178) 2024-08-08 23:05:21 +08:00
远方os 267093c314
feat(reactivity/watch): add pause/resume for ReactiveEffect, EffectScope, and WatchHandle (#9651) 2024-08-02 14:41:27 +08:00
Evan You 85f3592725
refactor: should throw errors in computed getters 2024-04-24 17:27:51 +08:00
Evan You ef2eaef3aa refactor: inline recordEffectScope 2024-03-07 17:53:10 +08:00
Evan You 2cc5615590 feat(reactivity): `onEffectCleanup` API
ref #10173

Instead of exposing `getCurrentEffect`, this version accepts a second
argument to suppress the no-active-effect warning.
2024-03-05 22:53:20 +08:00
Evan You 55660b0cfc
refactor(scheduler): use bitwise flags for scheduler jobs + optimize queueJob (#10407)
related: https://github.com/vuejs/core-vapor/pull/138
2024-02-26 10:22:12 +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
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
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
Evan You 8b1848173b revert: fix(reactivity): correct dirty assign in render function (#10091)
This reverts commit 8d04205041.

close #10098
close #10100
2024-01-13 10:38:25 +08:00
Doctorwu 8d04205041
fix(reactivity): correct dirty assign in render function (#10091)
close #10082
2024-01-12 21:13:17 +08:00
LiuSeen 03b54962dc
chore(types): use EffectScheduler type for its queue (#10023) 2024-01-09 15:27:17 +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
skirtle e9e2778e9e
fix(reactivity): assigning array.length while observing a symbol property (#7568) 2023-10-21 09:48:59 +08:00
chenfan e33d554cae
refactor(reactivity): add instance check for effect (#9055) 2023-09-05 03:27:54 -05:00
Roland Hummel c346af2b6a
docs: comments on reactivity functions (fixes #4832) (#4836)
close #4832
2023-03-31 17:06:10 +08:00
Evan You 6213b73cd2 build: custom const enum processing 2023-02-03 09:54:15 +08:00
Anthony Fu e64c9ae957
fix(reactivity): `triggerRef` working with `toRef` from reactive (#7507)
* fix(reactivity): `triggerRef` working with `toRef` from reactive

* chore: refactor
2023-02-01 03:20:47 -05:00
Evan You efa2ac54d9 refactor: use Number constructor when coercing array length 2022-11-14 16:10:05 +08:00
Evan You d9de6caecd refactor: move toNumber call out of loop 2022-10-26 15:17:25 +08:00
bcq028 e6224f4256
fix(reactivity): enable trigger when use str to set length of arr (#6810)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-10-21 09:25:06 +02: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 154233abdb fix(reactivity): fix ref tracking of self-stopping effects
close #5707
2022-04-13 17:00:31 +08:00
Evan You 7efb9dba30 refactor: remove use of Object.assign
TS already transpiles spread to Object.assign with target:es2016
2022-04-12 15:22:11 +08:00