vue3-yuanma/packages
Cédric Exbrayat 8457d8b980
fix(runtime-core): allow spying on proxy methods (#4216)
Since Jest v26.6.1, the mock method changed (see this commit 30e8020362)  to rely on `Object.defineProperty` in some cases.

This breaks spying on proxy's methods, because even if Jest is properly calling `Object.defineProperty`, the cached value in the `get` section of the proxy is never updated, and the spy is in fact never used.
This is easily reproducible as vue-next already uses a version of jest with these changes.

This is blocking projects (like vue-test-utils-next and vue-cli) to update to recent Jest versions.

This commit adds a `defineProperty` method to the proxy handler, that properly updates the defined value in the cache.
2022-02-12 03:35:05 -05:00
..
compiler-core release: v3.2.30 2022-02-07 14:14:53 +08:00
compiler-dom release: v3.2.30 2022-02-07 14:14:53 +08:00
compiler-sfc release: v3.2.30 2022-02-07 14:14:53 +08:00
compiler-ssr fix(compiler-ssr): no need to inject resolveDirective calls for setup custom directives 2022-02-12 16:29:24 +08:00
reactivity release: v3.2.30 2022-02-07 14:14:53 +08:00
reactivity-transform release: v3.2.30 2022-02-07 14:14:53 +08:00
runtime-core fix(runtime-core): allow spying on proxy methods (#4216) 2022-02-12 03:35:05 -05:00
runtime-dom release: v3.2.30 2022-02-07 14:14:53 +08:00
runtime-test release: v3.2.30 2022-02-07 14:14:53 +08:00
server-renderer release: v3.2.30 2022-02-07 14:14:53 +08:00
sfc-playground release: v3.2.30 2022-02-07 14:14:53 +08:00
shared release: v3.2.30 2022-02-07 14:14:53 +08:00
size-check release: v3.2.30 2022-02-07 14:14:53 +08:00
template-explorer release: v3.2.30 2022-02-07 14:14:53 +08:00
vue release: v3.2.30 2022-02-07 14:14:53 +08:00
vue-compat release: v3.2.30 2022-02-07 14:14:53 +08:00
global.d.ts chore: remove no longer needed shim for stream/web 2021-12-12 10:12:20 +08:00