三咲智子 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
魏
657476dcdb
fix(reactivity): clear method on readonly collections should return undefined ( #7316 )
2023-11-09 17:32:21 +08:00
Evan You
a95554d35c
fix(reactivity): fix shallow/readonly edge cases
2022-07-22 11:16:06 +08:00
HeYunfei
b5b103a736
chore(types): delete @ts-ignore or use @ts-expected-error instead ( #3669 )
...
Co-authored-by: heyunfei.i <heyunfei.i@bytedance.com>
2022-05-11 20:40:59 -04:00
那里好脏不可以
6042ab0f2f
chore: type [ci skip]
2022-05-09 22:51:51 -04:00
Thorsten Lünborg
4be1037f31
fix(reactivity): ensure readonly refs can be replaced with new refs in reactive objects ( #5310 )
...
fix #5307
2022-01-23 08:08:27 -05:00
HcySunYang
c64907d261
fix(types): calling readonly() with ref() should return Readonly<Ref<T>> ( #5212 )
2022-01-21 02:33:30 -05:00
Thorsten Lünborg
171f5e9c60
fix(reactivity): mutating a readonly ref nested in a reactive object should fail. ( #5048 )
...
fix : #5042
2022-01-21 02:33:18 -05:00
Evan You
ae4b0783d7
chore: update repo references
2022-01-18 16:43:59 +08:00
Evan You
d145128ab4
fix(reactivity): retain readonly proxies when setting as reactive property
...
fix #4986
2021-11-25 12:14:39 +08:00
Evan You
47f488350c
chore: run updated prettier
2021-07-19 18:24:18 -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
HcySunYang
68de9f408a
fix(reactivity): fix shallow readonly behavior for collections ( #3003 )
...
fix #3007
2021-03-26 15:10:21 -04:00
Evan You
41e02f0fac
fix(reactivity): ensure computed can be wrapped by readonly
...
fix #3376
2021-03-25 11:23:34 -04: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
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
7454e2a52b
build(deps): upgrade to TypeScript 4
2020-08-20 17:48:28 -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
Evan You
5c74243211
test: move mockWarn into setup files
2020-07-27 22:58:51 -04:00
蜗牛老湿
426803046f
test(reactivity): 100% reactivity coverage ( #1299 )
2020-06-11 16:55:56 -04:00
Evan You
09b4202a22
refactor(reactivity): adjust APIs
...
BREAKING CHANGE: Reactivity APIs adjustments:
- `readonly` is now non-tracking if called on plain objects.
`lock` and `unlock` have been removed. A `readonly` proxy can no
longer be directly mutated. However, it can still wrap an already
reactive object and track changes to the source reactive object.
- `isReactive` now only returns true for proxies created by `reactive`,
or a `readonly` proxy that wraps a `reactive` proxy.
- A new utility `isProxy` is introduced, which returns true for both
reactive or readonly proxies.
- `markNonReactive` has been renamed to `markRaw`.
2020-04-15 16:45:20 -04:00
Evan You
3178504273
refactor(reactivity): make readonly non-tracking
2020-04-14 23:49:46 -04:00
Evan You
e8a866ec99
refactor(reactivity): remove stale API `markReadonly`
...
BREAKING CHANGE: `markReadonly` has been removed.
2020-04-13 17:39:48 -04:00
Evan You
2569890e31
refactor: move mockWarn utility to @vue/shared
...
close #652
2020-01-22 09:29:45 -05:00
Evan You
0a4f306492
fix: shallowReadonly should keep reactive properties reactive
...
ref #552
2019-12-20 11:14:07 -05:00
Evan You
57bbbb227c
fix(core): propsProxy should not convert non-reactive nested values
2019-12-02 14:11:12 -05:00
Evan You
d9c6ff372c
feat(core): allow passing explicit refs via props
2019-11-06 12:51:26 -05:00
月迷津渡
5eacfaf210
fix(reactivity): explicitly do type conversions in warning strings ( #129 )
2019-10-06 11:26:33 -04:00
Vladimir
f48a2ffc76
chore: fix typos ( #103 )
2019-10-05 10:48:54 -04:00
Carlos Rodrigues
600ec5de42
chore: improve typings in reactivity tests ( #96 )
2019-10-05 10:39:40 -04:00
Evan You
98d1406214
test: test for app-level APIs
2019-09-03 18:11:04 -04:00
Evan You
3efe0ba3cd
test: jest warning assert utils
2019-08-26 16:08:23 -04:00
Evan You
589d3c2feb
refactor: immutable -> readonly
2019-08-23 09:38:32 -04:00