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
979a841946
chore: use consistent file naming
2021-07-16 14:30:49 -04:00
Evan You
eae7c247af
refactor: reduce bundle size
2021-07-16 14:30:49 -04:00
Bas van Meurs
6cf2377cd4
perf(reactivity): use bitwise dep markers to optimize re-tracking ( #4017 )
2021-07-16 14:30:49 -04:00
Evan You
cc09772d55
chore: remove unncessary property on ComputedRef interface
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
ebaac9a56d
perf(reactivity): avoid triggering re-render if computed value did not change
2021-07-16 14:30:49 -04:00
Anthony Fu
f5617fc3bb
feat(reactivity): new effectScope API ( #2195 )
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
b2554aefba
refactor: small bundle size / readability optimization
2021-07-16 14:30:49 -04:00
Bas van Meurs
64310405ac
perf(reactivity): ref-specific track/trigger and miscellaneous optimizations ( #3995 )
2021-07-16 14:30:49 -04:00
Evan You
31abdc8ada
release: v3.1.5
2021-07-16 12:38:01 -04:00
TheDro
1cfe290352
fix(reactivity): call array subclass methods ( #3624 )
...
fix #2314 , close #2315
2021-07-15 17:17:13 -04:00
Yang Mingshan
08f504c1b7
fix(ref): should not trigger when setting value to same proxy ( #3658 )
2021-07-15 16:28:01 -04:00
Carlos Rodrigues
f6a5f09a3a
types(defineComponent): fix unwrap when returning Ref<T>|undefined
from setup
( #4100 )
2021-07-15 15:58:20 -04:00
Evan You
348c3b01e5
release: v3.1.4
2021-07-02 08:37:50 -04:00
Evan You
fc7b640041
release: v3.1.3
2021-07-01 19:28:06 -04:00
Evan You
127ed1b969
fix(types): improve type of unref()
...
fix #3954
2021-07-01 15:20:49 -04:00
Evan You
f8a6b57ddd
refactor(reactivity): improve tree-shaking annotations
2021-06-30 11:39:31 -04:00
Evan You
6b6d566861
release: v3.1.2
2021-06-22 14:24:50 -04:00
zhangenming
960ef1691f
chore(reactivity): remove unnecessary RefImpl _shallow default value ( #3895 )
2021-06-08 09:58:02 -04:00
Evan You
ade9bd9daa
release: v3.1.1
2021-06-07 16:26:54 -04:00
Evan You
ac15df46c5
release: v3.1.0
2021-06-07 12:38:42 -04:00
Evan You
71f7c25fbe
release: v3.1.0-beta.7
2021-06-02 16:12:54 -04:00
Evan You
aa96a0e88a
release: v3.1.0-beta.6
2021-05-28 16:58:54 -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
f0eb1978b2
release: v3.1.0-beta.5
2021-05-26 16:06:51 -04:00
Evan You
f1f52300e6
release: v3.1.0-beta.4
2021-05-24 19:16:44 -04:00
Lo Leon
90aa835812
fix(types/reactivity): error TS4058 caused by RefSymbol
( #2548 )
2021-05-24 16:36:08 -04:00
Yunfei He
49fd1696c9
chore(types): remove unnecessary type assertion ( #3724 )
2021-05-12 17:47:52 -04:00
Evan You
b663aa8a81
release: v3.1.0-beta.3
2021-05-12 17:37:04 -04:00
Evan You
99a5ccf6b2
release: v3.1.0-beta.2
2021-05-08 16:59:12 -04:00
Evan You
ed6c5fe903
release: v3.1.0-beta.1
2021-05-08 16:24:34 -04:00
HcySunYang
5036c51cb7
fix(reactivity): fix tracking for readonly + reactive Map ( #3604 )
...
fix #3602
2021-05-07 18:49:11 -04:00
kiyon
7a8bac73e1
chore: fix typo in test case description
2021-04-16 10:43:56 +08:00
Evan You
f0cf14bcc5
release: v3.0.11
2021-04-01 19:52:45 -04:00
Evan You
ad6c124e6c
release: v3.0.10
2021-03-30 20:05:45 -04:00
liaoliao666
c61e767422
fix(reactivity): should not trigger when setting value to same proxy ( #2904 )
2021-03-29 17:52:57 -04:00
Evan You
67039b3434
release: v3.0.9
2021-03-27 11:30:12 -04:00
Evan You
9ff70be2b3
release: v3.0.8
2021-03-26 17:35:44 -04:00
Thorsten Lünborg
22cc4a7659
fix(reactivity): ensure that shallow and normal proxies are tracked seperately ( close #2843 ) ( #2851 )
...
fix #2843
2021-03-26 15:39:56 -04:00
HcySunYang
68de9f408a
fix(reactivity): fix shallow readonly behavior for collections ( #3003 )
...
fix #3007
2021-03-26 15:10:21 -04:00
HcySunYang
2b588cf1bc
fix(types): unwrap refs on public instance data ( #3319 )
...
fix #3315
2021-03-25 17:30:10 -04:00
Evan You
41e02f0fac
fix(reactivity): ensure computed can be wrapped by readonly
...
fix #3376
2021-03-25 11:23:34 -04:00
Cédric Exbrayat
57e1aa815b
chore: fix ownKeys signature ( #3313 )
2021-03-03 11:26:49 -05:00
Evan You
1a955e2278
release: v3.0.7
2021-03-01 10:59:29 -05:00
zhufengzhufeng
9cd988342c
perf(reactivity): only call Set.add if doesn't already have value ( #3307 )
2021-02-25 14:57:35 -05:00
Evan You
d9f91e26f9
release: v3.0.6
2021-02-24 15:19:31 -05:00
HcySunYang
dd02cf37d5
perf(reactivity): should not track __isVue
( #2940 )
2021-02-03 19:28:07 +01:00
07akioni
4ca4666d58
fix(toRef): ref created from union typed prop can't be used in watch ( #3048 )
2021-02-03 19:12:51 +01:00
Evan You
5a5d037dbb
release: v3.0.5
2020-12-30 15:50:28 -05:00
Evan You
d067fb2dbb
release: v3.0.4
2020-12-02 17:23:43 -05:00
Evan You
e315d84936
fix(types): fix ToRefs type on union value types
...
fix #2687
2020-12-02 14:58:03 -05:00
Thorsten Lünborg
6e46a574ed
fix(reactivity): ensure add/set on reactive collections return the proxy ( #2534 )
...
fix #2530
2020-11-27 14:16:00 -05:00
Thorsten Lünborg
34703082fd
fix(reactivity): ensure readonly on plain arrays doesn't track array methods. ( #2506 )
...
fix #2493
2020-11-27 10:24:31 -05:00
Evan You
bd6e211287
release: v3.0.3
2020-11-25 11:16:21 -05:00
Evan You
8e20375372
fix(types): ensure correct type for toRef and toRefs on existing refs
2020-10-27 18:50:34 -04:00
Evan You
118502a4b8
chore: comments [ci skip]
2020-10-23 14:37:09 -04:00
Evan You
f2d03a59c6
release: v3.0.2
2020-10-20 16:24:12 -04:00
Evan You
0e5a3c47a7
fix(reactivity): track length on for in iteration on Array
...
fix #2427
2020-10-19 17:37:35 -04:00
Evan You
f17f0ddf68
release: v3.0.1
2020-10-15 12:37:21 -04:00
Lory Lee
6b8cf998c4
chore: add missing space in warning message ( #2266 ) [ci skip]
2020-10-13 16:18:22 -04:00
edison
af1f5d33aa
refactor(reactivity): remove keyIsSymbol
( #2262 )
2020-10-13 16:17:52 -04:00
Yang Mingshan
7cc09ca8a5
fix(reactivity): use resetTracking instead of enableTracking ( #2174 )
2020-10-13 15:32:46 -04:00
Evan You
390589ec6d
fix(reactivity): should not trigger watch on computed ref when value is unchanged
...
fix #2231
2020-10-06 18:16:20 -04:00
HcySunYang
ea1f87eabf
fix(reactivity): should add allowRecurse to the effect ( #2213 )
...
So that the scheduler also respects effect's allowRecurse option.
fix #2200
2020-10-05 16:36:02 -04:00
Nathan Shively-Sanders
d52d139b85
types: fix Typescript 4.1 compile error ( #2219 )
...
close #2218
2020-09-28 12:39:14 -04:00
Evan You
d8c1536ead
release: v3.0.0
2020-09-18 11:28:05 -04:00
Evan You
876ecc8672
release: v3.0.0-rc.13
2020-09-18 01:39:30 -04:00
ᴜɴвʏтᴇ
f316a332b0
fix(reactivity): avoid length mutating array methods causing infinite updates ( #2138 )
...
fix #2137
Co-authored-by: Evan You <yyx990803@gmail.com>
2020-09-18 01:01:36 -04:00
Evan You
985bd2bcb5
release: v3.0.0-rc.12
2020-09-16 13:50:13 -04:00
Evan You
3810de7d6b
fix(reactivity): effect shoud only recursively self trigger with explicit options
...
fix #2125
2020-09-16 10:52:31 -04:00
Evan You
f2ef7d7c8e
release: v3.0.0-rc.11
2020-09-15 13:15:42 -04:00
Carlos Rodrigues
4fd468aced
types(runtime-core): refactor defineComponent ( #1883 )
2020-09-15 11:46:11 -04:00
izayl
848ccf56fb
test(reactive): add test case of mutation in original reflecting in observed value ( #2118 )
2020-09-15 10:49:59 -04:00
Carlos Rodrigues
d4bf9bcbb4
fix(reactivity): toRef
should not wrap a ref
( #2103 )
2020-09-15 10:29:38 -04:00
Pick
fcf9b2cf19
fix(reactivity): should trigger collection's write-function correctly on non-reactive keys ( #1992 )
2020-09-14 21:31:04 -04:00
Hefty
0d4910a211
fix(reactivity): add NaN prop on Array should not trigger length dependency. ( #1998 )
2020-09-14 20:40:09 -04:00
Evan You
0124eacc91
refactor(reactivity): refactor iteration key trigger logic + use more robust Map/Set check
2020-09-14 11:26:34 -04:00
Evan You
5f4053967c
fix(reactivity): revert ac81dcf
...
fix #2043
2020-09-04 11:10:26 -04:00
Evan You
4386653e76
release: v3.0.0-rc.10
2020-09-02 12:41:54 -04:00
Evan You
691a4b9530
perf(reactivity): no need to proxy has/ownKeys for readonly objects
2020-09-01 20:52:48 -04:00
Guillaume Chau
5df71b739d
chore: add repository directories
2020-08-30 15:06:06 +02:00
Evan You
94d94bafc5
release: v3.0.0-rc.9
2020-08-26 18:21:18 -04:00
Pick
97bc30edad
perf(reactivity): avoid triggering Map.has twice on non-reactive keys ( #1972 )
2020-08-26 11:41:18 -04:00
xxgjzftd
d5c4f6ed4d
perf(reactivity): add existing index or non-integer prop on Array should not trigger length dependency ( #1969 )
2020-08-26 11:28:58 -04:00
Evan You
ede2e0d1b5
release: v3.0.0-rc.8
2020-08-25 10:31:52 -04:00
Evan You
016ba116a8
fix(reactivity): fix iOS 12 JSON.stringify error on reactive objects
...
- Use WeakMap for raw -> reactive/readonly storage. This is slightly
more expensive than using a field on the taget object but avoids
polluting the original.
- also fix Collection.forEach callback value
fix #1916
2020-08-24 15:34:04 -04:00
Evan You
6602d6dbff
release: v3.0.0-rc.7
2020-08-21 14:13:05 -04:00
Robbin Baauw
07919e0065
perf(reactivity): improve ref performance by using class-based implementation ( #1900 )
2020-08-21 13:47:41 -04:00
ᴜɴвʏтᴇ
3c05f8bbd6
fix(reactivity): unwrap non-index accessed refs on reactive arrays ( #1859 )
...
close #1846
2020-08-21 13:36:41 -04:00
Evan You
7454e2a52b
build(deps): upgrade to TypeScript 4
2020-08-20 17:48:28 -04:00
Evan You
91c4735416
release: v3.0.0-rc.6
2020-08-19 18:17:42 -04:00
Pick
02dcc68c24
test(reactivity): improve built-in Collection subclass test cases ( #1885 )
2020-08-19 16:22:31 -04:00
Carlos Rodrigues
c86e7ad11b
types(reactivity): improve typings for shallowRef
( #1780 )
2020-08-18 23:34:29 -04:00
Jordan Pittman
4172fdb90c
feat(reactivity): return array when calling toRefs
on array ( #1768 )
...
close #1764
2020-08-18 12:11:13 -04:00
ᴜɴвʏтᴇ
d005b578b1
fix(reactivity): accept subtypes of collections ( #1864 )
2020-08-17 12:17:46 -04:00
Pick
44448fdd22
types(reactivity): add dts for proxyRefs & improve typings ( #1786 )
2020-08-14 17:37:36 -04:00
Evan You
ac81dcf0cc
fix(reactivity): effect should still check sync self-trigger
2020-08-13 17:45:21 -04:00
Evan You
50adc014f5
refactor(reactivity): readonly collections should not track
2020-08-06 12:10:03 -04:00
Evan You
ed4381020f
fix(reactivity): readonly+reactive collection should also expose readonly+reactive values
...
fix #1772
2020-08-06 11:18:16 -04:00
wujieZ
2787c34cd4
fix(reactivity): use isExtensible instead of isFrozen ( #1753 )
...
close #1784
2020-08-05 11:53:50 -04:00
Evan You
848d9ce2ea
release: v3.0.0-rc.5
2020-07-28 17:42:05 -04:00
Evan You
aa06b1034d
feat(reactivity): proxyRefs
method and ShallowUnwrapRefs
type ( #1682 )
...
* feat(reactivity): `proxyRefs` method and `ShallowUnwrapRefs` type
BREAKING CHANGE: template auto ref unwrapping are now applied shallowly,
i.e. only at the root level. See https://github.com/vuejs/vue-next/pull/1682 for
more details.
2020-07-28 16:30:56 -04:00
Evan You
730e39eb76
refactor: remove unnecessary conditions and test case
2020-07-28 12:26:14 -04:00
Evan You
b7ef38b773
fix(reactivity): fix ref mutation debugger event values
2020-07-28 12:01:34 -04:00
Evan You
5c74243211
test: move mockWarn into setup files
2020-07-27 22:58:51 -04:00
Evan You
7edfdf7e23
fix(reactivity): avoid tracking internal symbols in has trap
...
fix #1683
2020-07-22 21:23:32 -04:00
Evan You
d63daaf9b6
release: v3.0.0-rc.4
2020-07-21 15:40:46 -04:00
Evan You
7753485baa
release: v3.0.0-rc.3
2020-07-21 15:27:26 -04:00
Zardddddd60
3e412c10e0
refactor(reactive): reduce code size by assigning to a local variable ( #1634 )
2020-07-21 10:33:09 -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
1f4045a086
release: v3.0.0-rc.2
2020-07-19 14:52:42 -04:00
Evan You
0ea14cade9
release: v3.0.0-rc.1
2020-07-17 15:30:17 -04:00
Pick
527c2c8bbb
feat(types): expose DeepReadonly type ( #1606 )
2020-07-17 09:28:50 -04:00
Evan You
5ed73cd874
release: v3.0.0-beta.24
2020-07-16 13:51:52 -04:00
Evan You
8b5d153d7f
release: v3.0.0-beta.23
2020-07-16 12:48:56 -04:00
Zardddddd60
ecf872fc95
refactor(reactive): remove unnecessary args handling in reactiveEffect ( #1593 )
2020-07-15 23:19:15 -04:00
Evan You
4535b1bde8
chore: remove outdated options
2020-07-15 17:05:00 -04:00
Evan You
fcbefdb769
release: v3.0.0-beta.22
2020-07-15 12:43:41 -04:00
Pick
b772bba558
feat(types/reactivity): use DeepReadonly
type for readonly
return type ( #1462 )
...
close #1452
2020-07-15 09:27:21 -04:00
Evan You
9188e9ea74
release: v3.0.0-beta.21
2020-07-14 17:18:07 -04:00
Evan You
20df2f3817
release: v3.0.0-beta.20
2020-07-08 12:45:30 -04:00
Felix Rilling
829b35e426
chore: typo fixes ( #1546 )
...
* chore: fix typos in comments/JSDoc.
* chore: fix typo in internal function name.
* chore: fix typos in test comments/descriptions/variable names.
2020-07-08 12:32:42 +02:00
Evan You
d5ab70ba66
release: v3.0.0-beta.19
2020-07-07 10:04:31 -04:00
Pick
4f6460a71f
chore(reactivity): remove unused comment ( #1485 ) [ci skip]
2020-07-06 15:57:54 -04:00
Evan You
7f83856f34
release: v3.0.0-beta.18
2020-07-01 21:06:25 -04:00
Pick
5c490f1c45
refactor(computed): deprecated computedRunners ( #1458 )
2020-07-01 15:39:13 -04:00
Evan You
f6da6bf999
release: v3.0.0-beta.17
2020-06-30 12:10:15 -04:00
Pick
c69ca88c04
refactor(types): simplify UnwrapRefSimple ( #1466 )
2020-06-30 12:02:21 -04:00
Evan You
ec3c12ee10
release: v3.0.0-beta.16
2020-06-29 18:34:50 -04:00
Evan You
82b28a5ecb
fix(types): should unwrap array -> object -> ref
2020-06-29 12:26:28 -04:00
Pick
028a8c20df
test(reactivity): adjust ref unwrap test inside arrays ( #1457 )
2020-06-29 12:10:29 -04:00
edison
178e89305d
chore(reactivity): use consistent naming for ReactiveFlags enum ( #1428 )
2020-06-26 09:32:09 -04:00
Pick
f54be6a462
refactor(types): simplify UnwrapRef + specify iterable method return type ( #1444 )
2020-06-25 12:04:14 -04:00
underfin
c43a6e61a0
perf(reactivity): should not track __v_isRef
( #1392 )
2020-06-25 11:40:49 -04:00
Pick
8899a90fc4
refactor(types): simplified UnwrapRef ( #1390 )
2020-06-17 16:06:55 -04:00
Evan You
cf2f278f48
release: v3.0.0-beta.15
2020-06-12 18:09:05 -04:00
Evan You
d863ce721f
refactor: improve base getter readability
2020-06-12 09:25:40 -04:00
Yang Mingshan
80e1693e1f
fix(reactivity): replaced ref in reactive object should be tracked ( #1058 )
2020-06-12 09:20:43 -04:00
蜗牛老湿
f3eac11058
chore(reactivity): use ReactiveFlags instead of __v_ properties ( #1313 )
2020-06-11 17:32:44 -04:00
蜗牛老湿
426803046f
test(reactivity): 100% reactivity coverage ( #1299 )
2020-06-11 16:55:56 -04:00
Evan You
10bb34bb86
fix(reactivity): fix toRaw for objects prototype inherting reactive
...
fix #1246
2020-06-11 15:12:57 -04:00
Evan You
80c868aefe
workflow: setup eslint for prohibited syntax and globals
...
fix #1285
2020-06-10 16:54:23 -04:00
Carlos Rodrigues
c97d1bae56
fix(reactivity): shallowReactive collection to not-readonly ( #1212 )
2020-06-09 17:20:30 -04:00
doly mood
d3c436ae2e
feat(types): mixins/extends support in TypeScript ( #626 )
2020-06-09 10:37:00 -04:00
Evan You
32b3f78a36
release: v3.0.0-beta.14
2020-05-18 14:42:11 -04:00
Carlos Rodrigues
488e2bcfef
fix(reactivity): shallowReactive for collections ( #1204 )
...
close #1202
2020-05-18 11:17:37 -04:00