Commit Graph

1916 Commits

Author SHA1 Message Date
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
Zardddddd60 eed3973459
chore(runtime-code): delete outdated test case (#3036) 2022-05-11 20:25:06 -04:00
edison f1d1cdbb69
fix(runtime-core): fix activated hook when using async component with KeepAlive (#5459)
fix #5095
fix #5651
2022-05-11 20:19:11 -04:00
Johnson Chu c901dca5ad
feat(types): avoid props JSDocs loss by `default` option (#5871) 2022-05-11 07:37:49 -04:00
Evan You 425310e8b6 fix(transition/v-show): ensure transition is in persisted mode when used with v-show
fix #4845
close #4852
2022-05-11 19:22:55 +08:00
Evan You 2bab639683 fix(runtime-core): fix directive inheritance on dev root fragment
fix #5523
2022-05-11 18:02:31 +08:00
Kael fec12d7dcc
fix(runtime-core): transition hooks can be arrays of functions (#5177) 2022-05-10 21:56:57 -04:00
edison cd659fc86f
fix(ssr): should de-optimize on vnode with PatchFlags.BAIL (#4818)
fix #4679
fix #5771
2022-05-10 06:35:34 -04:00
Thorsten Lünborg e4dffe900a
fix(runtime-core): ensure raw slot function is only normalized once (#5358)
fix: #5343
2022-05-10 04:41:54 -04:00
Evan You d52907f4eb fix(runtime-core): ensure consistent identity of $forceUpdate and $nextTick instance methods
fix #5556
2022-05-10 14:17:04 +08:00
那里好脏不可以 6042ab0f2f
chore: type [ci skip] 2022-05-09 22:51:51 -04:00
huangcheng 392ca5dd88
chore: fix eslint error (#5876) 2022-05-09 22:43:35 -04:00
Evan You 16a0b232d7 chore: remove unused import due to merge conflict resolve mistake 2022-05-10 09:58:28 +08:00
edison 2a44225446
chore(runtime-core): Remove duplicate variable assignments (#3700) 2022-05-09 21:42:41 -04:00
edison 762a9e99ce
chore(runtime-core): use `getGlobalThis` when installing HMR API (#3217) 2022-05-09 21:40:19 -04:00
qinxiaosen_ccc 292ce69439
chore: remove outdated type comment (#5103) 2022-05-06 06:44:28 -04:00
zhangenming b9484543db
refactor(reactivity): make some expression simpler (#5131) 2022-05-06 06:42:22 -04:00
Zclhlmgqzc 98b821d94a
fix(types): preserve and expose original options on defineComponent return type (#5416)
fix #3796
2022-05-06 05:44:05 -04:00
Evan You 67099fe202 fix(runtime-core): ensure consistent behavior between dev/prod on invalid v-for range
close #5867
2022-05-06 16:49:15 +08:00
Evan You 74d2a76af6 fix(watch): fix flush: pre watchers triggered synchronously in setup
fix #5721
2022-04-15 18:08:44 +08:00
Evan You 56879e6b23 release: v3.2.33 2022-04-14 18:14:37 +08:00
Evan You 62eba63172 fix(transition): handle transition for v-if branches with comment
fix #5675
2022-04-14 18:06:52 +08:00
edison 767d212d20
fix(transition): fix broken leave transition on dev root fragment (#5268) 2022-04-14 05:10:41 -04:00
Thorsten Lünborg 71c9536625
fix(runtime-core): ensure custom events are not emitted anymore after unmount. (#5679)
close #5674
2022-04-13 23:47:24 -04:00
Evan You f641c4b228 fix(runtime-core): fix use of non-existent-in-prod internal property in defineProperty trap
fix #5710
2022-04-14 10:00:53 +08:00
edison f4d2c9fc6a
fix(custom-elements): work with async component + slots (#4657)
close #4639
2022-04-13 05:58:29 -04:00
Thorsten Lünborg 1612971471
fix(compat): copy additional properties for functions bound via globalProperties (#4873)
close #4403
2022-04-13 05:53:07 -04:00
宋铄运 (Alan Song) c6eb3cccce
build: improve treeshakeability (#5682) 2022-04-13 05:39:02 -04:00
Thorsten Lünborg 053c65bc5e
dx(suspense): warn when using async setup when not inside a Suspense boundary (#5565)
close #3649
2022-04-13 05:36:43 -04:00
Evan You f4f5e80a19 release: v3.2.32 2022-04-12 16:07:43 +08:00
Thorsten Lünborg f44087e171
fix(runtime-core): ensure custom directive instance properly exposes properties on closed instances. (#5022)
fix #5018
2022-04-12 03:54:03 -04:00
lidlanca cee1eafb4d
fix(runtime-core/template-ref): named ref in v-for regression fix (#5118)
close #5116
close #5447
close #5525
2022-04-12 03:28:40 -04: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
Yuchao d121a9bc7e
fix(runtime-core): Avoid mutating original options object in createApp (#4840)
fix #4398
2022-04-12 03:14:23 -04:00
Evan You 4311dddfa7 fix(transition): ensure flattened transition group children inherit parent keys
close #4718
close #5360
close #5392
2022-04-12 15:06:46 +08:00
Evan You 68bb8f2529 chore: remove debugger 2022-04-12 14:47:15 +08:00
iwusong 8eceabd14e
fix(runtime-core): fix event listener as dynamicProp is added erroneously to props (#5517)
fix #5520
2022-04-12 02:42:00 -04:00
Evan You b2b6b6ff62 chore: bump vite & esbuild 2022-04-12 14:29:49 +08:00
Guillaume Chau 1070f127a7 fix(devtools): perf: use high-resolution time 2022-03-09 14:30:24 +01:00
lidlanca 1574edd490
fix(runtime-core): allow spying on proxy methods regression (#5417)
fix #5415 (regression by #4216)
2022-02-13 20:40:12 -05:00
Evan You d56dec6b4a release: v3.2.31 2022-02-12 16:41:52 +08:00
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
Anthony Fu 0342fae8ad
fix(ssr): always hydrate children for HMR (#5406)
fix #5405
2022-02-12 03:24:19 -05:00
Evan You 15adf251ab release: v3.2.30 2022-02-07 14:14:53 +08:00
Evan You ce34d9114e chore: remove v3.vuejs.org references 2022-02-07 13:13:26 +08:00
Evan You 60cf175d88 feat(ssr): support custom directive getSSRProps in optimized compilation
close #5304
2022-02-04 08:58:31 +08:00
Evan You 6b6889852f release: v3.2.29 2022-01-23 22:02:23 +08:00
Evan You 283df0ad68 release: v3.2.28 2022-01-21 16:15:13 +08:00
btea 63210fe41a
refactor: includes instead of indexOf (#5117) 2022-01-21 02:36:48 -05:00
Soha Jin 72130ac7b5
fix(compat): convertLegacyVModelProps should merge model option in mixins (#5251) 2022-01-21 02:02:02 -05:00
Yugang Cao 92e04a651f
chore: type improvements (#5264) 2022-01-21 01:56:20 -05:00
Thorsten Lünborg 97f6bd942f
fix(compat): ensure fallthrough *Native events are not dropped during props update (#5228) 2022-01-21 01:21:42 -05:00
Yugang Cao e603fd258c
chore: fix typo (#5261) [ci skip] 2022-01-21 01:18:34 -05:00
Bruno Perel e8022755ae
chore: fix typo (#5282) [ci skip] 2022-01-21 01:16:19 -05:00
Stanislav Lashmanov d0b9708620
fix(compat): simulate Vue 2.6.14 version in compat build (#5293)
Some Vue plugins that are actually compatible with the `vue-compat` won't work because of the version check. Right now `vue-compat` returns 3x version for the legacy method of checking Vue version via `Vue.version`. This PR instends to simulate Vue 2 version in those instances and instead return a 2x-compatible version: `2.6.14-compat:3.x.x`.
2022-01-21 01:15:35 -05:00
Thorsten Lünborg c35ec47d73
fix(runtime-core): ensure mergeProps skips undefined event handlers (#5299)
fix #5296
2022-01-21 01:13:29 -05:00
Evan You 2f91872e7b fix(ssr): only cache computed getters during render phase
fix #5300
2022-01-21 12:31:54 +08:00
Evan You ae4b0783d7 chore: update repo references 2022-01-18 16:43:59 +08:00
Evan You 9fda9411ec feat(reactivity): add isShallow api 2022-01-18 09:22:41 +08:00
Evan You 3adfc0fe94 release: v3.2.27 2022-01-16 22:08:18 +08:00
Evan You ed9eb62e59 perf: improve memory usage for static vnodes
Use the already mounted nodes as cache instead of separate caching via
template. This reduces memory usage by 30%+ in VitePress.
2022-01-16 21:10:26 +08:00
Evan You f4f0966b33 fix(ssr): make computed inactive during ssr, fix memory leak
fix #5208
2022-01-16 18:22:18 +08:00
Evan You 6cfd72e760 refactor: move type utils to shared 2022-01-16 15:47:00 +08:00
edison 2e3e183b4f
fix(KeepAlive): remove cached VNode properly (#5260)
fix #5258
2022-01-16 02:37:14 -05:00
Evan You ce49fdf999 refactor: more readable type names for watch cleanup function 2022-01-12 22:07:47 +08:00
Evan You 3007d5b4ca fix(types): KeepAlive match pattern should allow mixed array 2022-01-12 22:07:19 +08:00
yfmei dd70003cc3
chore: typo in comment [skip ci] (#5173) 2021-12-27 12:57:39 +01:00
Johnson Chu a570b38741
feat(types): simplify `ExtractPropTypes` to avoid props JSDocs being removed (#5166) 2021-12-25 02:52:22 -05:00
Evan You ccb6651b12 release: v3.2.26 2021-12-12 15:03:29 +08:00
Evan You 756534bde0 release: v3.2.25 2021-12-12 12:21:13 +08:00
Forzen FIsh 57a09331b2
chore: fix some typos (#5050) [ci skip] 2021-12-11 20:58:46 -05:00
Evan You 50f13278f9 chore: avoid api-extractor warnings 2021-12-12 00:14:25 +08:00
Evan You f4dcbbc7b9 chore: fix build 2021-12-11 23:48:32 +08:00
Evan You db729ce99e feat(reactivity-transform/types): restructure macro types + export types for all shorthand methods 2021-12-11 18:15:44 +08:00
Evan You 1928c9b537 refactor: move template ref setter into dedicated file 2021-12-11 10:09:21 +08:00
Evan You 41c18effea feat: support ref in v-for, remove compat deprecation warnings 2021-12-10 23:49:01 +08:00
Evan You a1167c57e5 fix(runtime-core): disallow recurse in vnode/directive beforeUpdate hooks 2021-12-10 17:17:15 +08:00
Evan You d955cfacd6 release: v3.2.24 2021-12-06 17:03:10 +08:00
edison 6d887aaf59
fix(runtime-core): handle initial undefined attrs (#5017)
fix #5016
2021-12-06 00:58:45 -05:00
Noel De Martin 34985fee6b
feat(types/script-setup): add generic type to defineExpose (#5035) 2021-12-05 23:25:35 -05:00
Illya Klymov ee97cf5a4d
fix(compat): maintain compatConfig option in legacy functional comp (#4974) 2021-12-05 23:20:27 -05:00
Evan You b6a8a451b8 release: v3.2.23 2021-11-26 14:33:46 +08:00
Che Guevara 4e1131e251
chore: improve BaseTransition (#4811) 2021-11-25 05:42:24 -05:00
Evan You aac0466cb8 fix(runtime-core): fix component public instance has check for accessed non-existent properties
close #4962
2021-11-25 18:15:06 +08:00
fishDog 3c449cd408
fix(types): fix propType<any> type inference (#4985)
fix #4983
2021-11-25 04:52:13 -05:00
Thorsten Lünborg f2d2d7b2d2
fix(types): scrip-setup+ts: ensure proper handling of `null` as default prop value. (#4979)
fix #4868
2021-11-25 04:33:29 -05:00
ygj6 820a143457
fix(runtime-core): handle error in async KeepAlive hooks (#4978) 2021-11-22 02:50:19 -05:00
Evan You 635d88aa9e release: v3.2.22 2021-11-15 11:45:05 +08:00
edison b4eb7e3866
fix(runtime-core): improve dedupe listeners when attr fallthrough (#4912)
fix #4859
2021-11-14 22:20:38 -05:00
Cathrine Vaage 04e5835196
fix(types/sfc): fix withDefaults type inference when using union types (#4925) 2021-11-14 22:09:00 -05:00
yuuang fa2237f1d8
fix(devtool): improve devtools late injection browser env detection (#4890) 2021-11-14 22:04:46 -05:00
yuchao f454dd62ab
chore: comments grammar (#4913) [ci skip] 2021-11-14 19:41:45 -05:00
Evan You fe853a5a40 release: v3.2.21 2021-11-02 14:35:14 +08:00
Evan You 6916d725a0 fix(devtools): avoid open handle in non-browser env
fix #4815
2021-11-02 11:45:41 +08:00
Che Guevara 6b32f0d976
fix(devtools): fix memory leak when devtools is not installed (#4833)
fix #4829
2021-11-01 23:26:40 -04:00
Captain 2c221fcd49
chore: typo in comment [skip ci] (#4875) 2021-10-29 10:38:37 +02:00
C.Y.Kun 5eb72630a5
fix(runtime-core): add `v-memo` to built-in directives check (#4787) 2021-10-18 20:22:44 -04:00
Evan You 20a361541c fix(types): fix ref unwrapping type inference for nested shallowReactive & shallowRef
fix #4771
2021-10-09 17:51:15 -04:00
Evan You 3c500e422f release: v3.2.20 2021-10-08 13:01:51 -04:00
Evan You 9e3d7731c7 fix(hmr): fix hmr for components with no active instance yet
fix #4757
2021-10-08 12:39:24 -04:00
Evan You f4639e0a36 fix(devtools): clear devtools buffer after timeout
fix #4738
2021-10-07 19:36:32 -04:00
Evan You 467e113b95
feat(compiler-sfc): `<script setup>` defineProps destructure transform (#4690) 2021-09-27 14:24:21 -04:00
Evan You c5c53846ed release: v3.2.19 2021-09-25 14:58:20 -04:00
Evan You 13bfa2edfe release: v3.2.18 2021-09-24 16:05:16 -04:00
Evan You f5076eb4b7 release: v3.2.17 2021-09-24 12:43:11 -04:00
Evan You 87c86e4cc2 refactor: ensure ssr branches are included in esm-bundler build 2021-09-23 15:02:19 -04:00
Evan You c1cf26d207 chore: improve feature flag warning 2021-09-23 14:04:52 -04:00
Evan You 1e5a0db4d4 refactor: use getGlobalThis when attachting hmr runtime 2021-09-23 11:53:00 -04:00
Evan You 114b856fd1 release: v3.2.16 2021-09-23 10:17:02 -04:00
Evan You 74a84ff546 release: v3.2.15 2021-09-23 09:48:59 -04:00
Evan You df4fcd94d8 release: v3.2.14 2021-09-22 18:36:57 -04:00
Evan You 2476eaad6e
fix(devtools): fix prod devtools detection + handle late devtools hook injection (#4653) 2021-09-22 09:07:08 -04:00
Evan You b9deb6e50e release: v3.2.13 2021-09-21 14:22:53 -04:00
skirtle 5aa4255808
fix(runtime-core): return the exposeProxy from mount (#4606) 2021-09-21 12:55:08 -04:00
Amour1688 140f089917
fix(types): incorrect type inference of array (#4578) 2021-09-21 12:41:10 -04:00
ygj6 58b1fa5ed1
fix(hydration): ensure hydrated event listeners have bound instance (#4529)
fix #4479
2021-09-21 12:39:21 -04:00
tryag f31a6c105d
chore: fix type in compatConfig.ts (#4604) [ci skip] 2021-09-21 12:35:42 -04:00
Yang Mingshan 11a2098a69
fix(watch): remove redundant parameter default value (#4565) 2021-09-21 12:32:12 -04:00
Evan You ebe00f66dd release: v3.2.12 2021-09-17 10:55:26 -04:00
Evan You 71f22061a6 chore: improve component resolution failure message 2021-09-17 10:01:04 -04:00
Evan You 141a5e188c fix(suspense): fix suspense slot inside deoptimized slot call
fix #4556
2021-09-16 12:14:33 -04:00
ygj6 14fcced281
fix(runtime-core): avoid script setup bindings overwriting reserved ctx properties (#4570) 2021-09-16 11:16:07 -04:00
Evan You a31303f835 build: generate more treeshaking friendly code 2021-09-16 10:56:34 -04:00
Evan You 781d2d4d58 release: v3.2.11 2021-09-08 18:58:13 -04:00
Evan You aa8908a854 fix(hmr): handle possible duplicate component definitions with same id
fixes regression in vitepress
2021-09-08 18:36:21 -04:00
Evan You 96b531bfa3 release: v3.2.10 2021-09-07 16:20:07 -04:00
fishDog 4178d5d7d9
fix(type): fix prop type infer (#4530)
fix #4525
2021-09-06 15:24:15 -04:00
Evan You 642710eded release: v3.2.9 2021-09-05 18:24:01 -04:00
Husam Ibrahim 4645a42b79
types(runtime-core): fix for multiple possible prop types including Date (#4518)
fix #4517
2021-09-05 18:16:44 -04:00
edison 5594643d7b
fix(compiler-sfc): fix script setup ref assignment codegen edge case (#4520)
fix #4514
2021-09-05 18:02:50 -04:00
Evan You 3ad9dc4880 release: v3.2.8 2021-09-02 14:46:30 -04:00
dependabot[bot] 305883a12f
build(deps-dev): bump typescript from 4.3.5 to 4.4.2 (#4482)
* build(deps-dev): bump typescript from 4.3.5 to 4.4.2

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.5 to 4.4.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.5...v4.4.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump typescript from 4.3.5 to 4.4.2

* test: fix nodeOps types

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carlos Rodrigues <carlos@hypermob.co.uk>
Co-authored-by: Evan You <yyx990803@gmail.com>
2021-09-02 09:53:57 -04:00
Evan You b079996040 release: v3.2.7 2021-09-01 18:05:16 -04:00
X.L ef5b73159d
fix(suspense): misusing DOM Comment element constructor as a vnode type (#4451) 2021-09-01 16:57:56 -04:00
zhangenming a6e6253319
types(reactivity): adjust type exports (#4407) 2021-09-01 16:49:12 -04:00
laineus 741d3b36f2
fix(runtime-core): properly merge unmounted and beforeUnmount options (#4447) 2021-09-01 16:41:57 -04:00
ShroXd 6f555cf98c
refactor(runtime-core): improve the type of defineAsyncComponent (#4441) 2021-09-01 16:41:08 -04:00
Evan You 72d2b26e96 release: v3.2.6 2021-08-24 12:54:30 -04:00
Evan You a137d73e91 release: v3.2.5 2021-08-24 11:54:22 -04:00
Evan You b40845153c feat(experimental): expose ref macro types using separate d.ts file 2021-08-23 20:35:12 -04:00
Carlos Rodrigues afd49b3e88
types(PropType): Allow `undefined` function to be used on `PropType` (#4405) 2021-08-23 19:04:03 -04:00
HcySunYang ebd0baca98
fix(types): improve the type of createElementBlock (#4406)
fix #4391
2021-08-23 18:28:52 -04:00
Evan You 62f752552a refactor(compiler): extract shared ast transform utils
Also improve referenced identifier check using isReferenced from  @babel/types
2021-08-22 13:24:16 -04:00
Evan You 4adc5042f9 types: improve ref sugar $computed typing 2021-08-20 00:07:16 -04:00
Evan You ceace3a8cc release: v3.2.4 2021-08-17 12:26:50 -04:00
Evan You 644971ec06 fix(runtime-core): ensure consistent arguments for tempalte and render funtion slot usage
fix #4367
2021-08-17 11:15:53 -04:00
Evan You c1f564e1dc fix(runtime-core): fix child component double update on props change
fix #4365
2021-08-17 10:57:28 -04:00
Evan You 03abc2573c release: v3.2.3 2021-08-16 18:25:32 -04:00
webfansplz 0627765b36
chore(types): remove unnecessary type assertions (#4336) 2021-08-16 18:19:44 -04:00
5b3f1e8424
fix(runtime-core): patchChildren first in patchElement (#4313) 2021-08-16 15:46:27 -04:00
HcySunYang cd2d98499e
fix(runtime-core): vnode hooks should not be called on async wrapper (#4349)
fix #4346
2021-08-16 15:35:50 -04:00
Hazlank 6db15a27cf
refactor: merge bitwise flag checks (#4324) 2021-08-16 15:13:04 -04:00
Evan You 7ffa225aa3 release: v3.2.2 2021-08-11 11:40:25 -04:00
webfansplz 1ce34e25d5
fix(types): fix tsx emit-mapped handler return type (#4290)
fix #4288
2021-08-11 10:52:36 -04:00
edison 380608bd44
fix(types): fix forceUpdate type (#4302) 2021-08-11 10:46:18 -04:00
Evan You 00b76d3dc1 feat(sfc): support $shallowRef ref sugar 2021-08-11 10:19:58 -04:00
Evan You 2749c15170 release: v3.2.1 2021-08-09 16:29:53 -04:00
Evan You 5a7a43cc3d release: v3.2.0 2021-08-09 15:51:53 -04:00
lidlanca 6779bff537
feat(runtime-core): support dynamic / external array in v-memo (#4255) 2021-08-09 15:39:22 -04:00
WoodyJang f258f5d2c2
chore: delete useless props type (#4271) 2021-08-09 12:36:34 -04:00
Evan You 4781965cc2 release: v3.2.0-beta.8 2021-08-06 23:12:27 -04:00
edison a211e271ee
fix(v-memo): ensure track block when returning cached vnode (#4270)
fix #4253
2021-08-06 21:44:45 -04:00
edison 3b60358d0e
fix(v-memo): should work on v-for with constant expression (#4272)
fix #4246
2021-08-06 21:37:09 -04:00
Evan You c421fb91b2 feat(runtime-dom): support async component in defineCustomElement
close #4261
2021-08-06 19:15:55 -04:00
AlexandraCaragata d045055b47
fix(core): typing of key in VNodeProps (#4242)
close #4240
2021-08-06 11:11:26 -04:00
Evan You bf2589b1f0 refactor(compiler-sfc): use shallowRef for ref sugar destructure 2021-08-04 15:39:32 -04:00
Evan You 6aa871e565 fix(runtime-core): component effect scopes should be detached 2021-07-29 17:15:56 -04:00
Evan You b357009a82 release: v3.2.0-beta.7 2021-07-29 13:21:30 -04:00
Evan You 51ee84fc6a fix(suspense): fix dynamicChildren tracking when suspense root is a block itself
e.g. `<slot>` inside suspense

fix #4183, fix #4198
2021-07-28 16:49:34 -04:00
Evan You 204e194d2b release: v3.2.0-beta.6 2021-07-27 18:56:02 -04:00
Evan You ee4cbaeec9 fix(runtime-core): expose ssrUtils in esm-bundler build
this is necessary for worker environments where Vue needs to be
bundled (instead of using cjs build via Node.js require)

fix #4199
2021-07-27 17:59:13 -04:00
Evan You 561e210157 fix(inject): should auto unwrap injected refs
fix #4196
2021-07-27 17:52:37 -04:00
Evan You 8681c12c0c chore: rename method to make it more explicit it is dev only 2021-07-27 17:52:37 -04:00
Evan You 4b595a3ea1 release: v3.2.0-beta.5 2021-07-23 16:10:22 -04:00
Evan You 231dafd55a refactor: adjust custom element hmr, fix tests 2021-07-22 23:18:15 -04:00
Evan You bff4ea74c5 fix(hmr): fix custom elements hmr edge cases 2021-07-22 18:54:26 -04:00
Evan You db3f57a392 fix(hmr): fix hmr when global mixins are used
fix #4174
2021-07-22 10:53:59 -04:00
Evan You fe58bae412 release: v3.2.0-beta.4 2021-07-21 17:40:25 -04:00
Evan You 8560005601 fix(runtime-core): ensure setupContext.attrs reactivity when used in child slots
fix #4161
2021-07-21 17:31:00 -04:00
Evan You ff0c810300 fix(runtime-dom): defer setting value
fix #2325, fix #4024
2021-07-21 16:38:01 -04:00
王嘉欣 36ae23d27e
chore(types): remove unnecessary assertions (#4168) 2021-07-21 15:55:31 -04:00
Evan You d13774b881 perf: skip patch on same vnode 2021-07-21 14:04:02 -04:00
Evan You dd1439e711 build: reduce runtime build size 2021-07-21 11:11:40 -04:00
Evan You 9d5dd2da8c release: v3.2.0-beta.3 2021-07-20 17:47:03 -04:00
Evan You d87d059ac1 feat(runtime-core): watchSyncEffect 2021-07-20 16:49:54 -04:00
Evan You 33c2fbfdc8 fix(reactivity): revert computed scheduler change
fix #4157
2021-07-20 16:45:29 -04:00
Evan You bc7f9767f5 fix(watch): ensure watchers respect detached scope
fix #4158
2021-07-20 14:32:17 -04:00
Evan You 2bdee50a59 fix(runtime-core): fix v-bind class/style merging regression
fix #4155
2021-07-20 13:58:43 -04:00
Evan You 1034546a4c release: v3.2.0-beta.2 2021-07-19 19:36:55 -04:00
Evan You 47f488350c chore: run updated prettier 2021-07-19 18:24:18 -04:00
Amour1688 69344ff1ae
feat(types): map declared emits to onXXX props in inferred prop types (#3926) 2021-07-19 18:22:19 -04:00
ioslh 20b6619793
fix(ssr): update initial old value to watch callback in ssr usage (#4103) 2021-07-19 17:13:37 -04:00
Evan You d810a1a569 fix(scheduler): fix insertion for id-less job
fix #4148
2021-07-19 13:37:38 -04:00
Evan You bbf6ca9bca fix(runtime-core): fix null type in required + multi-type prop declarations
fix #4146 (in combination with #4147)
2021-07-19 11:20:28 -04:00
leno 84f6791e89
chore(runtime-core): use bit operations instead (#4142) 2021-07-19 10:32:14 -04:00
Evan You 327c8983fb types: typing for ref macros 2021-07-16 17:35:04 -04:00
Evan You 1bab53e717 chore: remove deprecated defineEmit & useContext APIs 2021-07-16 16:56:51 -04:00
Evan You d4c67dd253 release: v3.2.0-beta.1 2021-07-16 14:44:06 -04:00
Evan You fcc6a54ee7 chore: expose watchPostEffect 2021-07-16 14:30:49 -04:00
Evan You 2a310df753 fix(runtime-core): fix default shapeFlag for fragments 2021-07-16 14:30:49 -04:00
Evan You f596e008ef refactor: remove deprecated scopeId codegen
BREAKING CHANGE: Output of SFC using `<style scoped>` generated by 3.2+
will be incompatible w/ runtime <3.2.
2021-07-16 14:30:49 -04:00
Evan You bf4893c17c types: fix dts tests 2021-07-16 14:30:49 -04:00
Evan You 4e5897d2df test: fix renderSlot tests 2021-07-16 14:30:49 -04:00
Evan You 8610e1c9e2 feat(runtime-dom): defineCustomElement 2021-07-16 14:30:49 -04:00
Evan You 42ace9577d feat: watchPostEffect 2021-07-16 14:30:49 -04:00
Evan You 3b64508e3b feat: v-memo 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 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 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
HcySunYang ceff89905b perf: improve VNode creation performance with compiler hints (#3334) 2021-07-16 14:30:49 -04:00
Evan You 31abdc8ada release: v3.1.5 2021-07-16 12:38:01 -04:00
Evan You 8dbad83e7f fix(compat): fix v3 compiled fn detection in production 2021-07-16 10:17:38 -04:00
Evan You 68365b9b2b fix(runtime-core): enter optimized mode for component as root
fix #3943
2021-07-15 18:51:59 -04:00
b31712ecc5
test(teleport): fix meaningless test case (#2872) 2021-07-15 16:36:36 -04:00
Carlos Rodrigues 18911abb91
fix(type): infer parent as `this` on `nextTick` function (#3608)
fix #3599
2021-07-15 16:28:20 -04:00
Evan You c0db807844 refactor: simplify static content insertion 2021-07-15 13:16:19 -04:00
Evan You 2937530bef fix(v-model): handle mutations of v-model bound array/sets
fix #4096
2021-07-15 12:14:19 -04:00
Evan You 03e26845e2 fix(sfc): fix `<script setup>` async context preservation logic
fix #4050
2021-07-06 14:31:53 -04:00
Evan You d12206db8e test: add test case for proper effect teardown w/ withAsyncContext 2021-07-06 11:39:27 -04:00
Austin Keener f3e15f633e
fix(compat): fix props check for v-model compat warning (#4056) 2021-07-04 18:32:44 -04:00
Evan You 348c3b01e5 release: v3.1.4 2021-07-02 08:37:50 -04:00
Evan You 438754a0d1 fix(build): avoid using async/await syntax 2021-07-02 08:06:25 -04:00
Austin Keener 12cf9f4ea1
fix(runtime-core): fix instance accessed via $parent chain when using expose() (#4048) 2021-07-02 07:51:54 -04:00
wonderl17 735ada1507
fix(runtime-core): add useAttrs and useSlots export (#4053) 2021-07-02 07:51:09 -04:00
Evan You fc7b640041 release: v3.1.3 2021-07-01 19:28:06 -04:00
Evan You ba89ca9eca fix(runtime-dom): fix static node content caching edge cases
reverts fded1e8

fix #4023, #4031, #4037
2021-07-01 19:19:53 -04:00
Guillaume 347d90173b types: export CreateComponentPublicInstance 2021-07-02 00:10:07 +02:00
Evan You 33708e8bf4 fix(ssr): ensure behavior consistency between prod/dev when mounting SSR app to empty containers
close #4034
2021-07-01 17:22:03 -04:00
Evan You 34d4991dd5 fix(ssr): properly hydrate non-string value bindings
fix #4006
2021-07-01 17:11:23 -04:00
Evan You fded1e8dfa fix(runtime-core): fix mouting of detached static vnode
fix #4023
2021-07-01 16:11:50 -04:00
Johnson Chu 81e69b29ec
feat(types): support IDE renaming for props (#3656) 2021-07-01 13:48:23 -04:00
Evan You 9ee41e14d2 fix: prevent withAsyncContext currentInstance leak in edge cases 2021-06-29 14:22:18 -04:00
Evan You 0240e82a38 feat(sfc): auto restore current instance after await statements in async setup() 2021-06-29 09:24:12 -04:00
LordTerabyte d069796b8f
fix(runtime-core): add missing serverPrefetch hook error string (#4014) 2021-06-28 15:30:20 -04:00
Evan You ef5c41523f types: fix global helpers dts generation 2021-06-26 21:47:18 -04:00
Evan You fddef8bb74 chore: remove unnecessary casting 2021-06-26 21:35:25 -04:00
Evan You 004bd18cf7 feat(sfc/types): make `<script setup>` helper types available globally 2021-06-26 21:12:26 -04:00
Evan You 4c5844a9ca feat(sfc): withDefaults helper 2021-06-26 21:11:57 -04:00
Evan You 3ffc7be864 chore(sfc-playground): ignore duplicate logs 2021-06-25 19:31:47 -04:00
Evan You 1675b6d723 fix: defineExpose type definition and runtime warning 2021-06-25 16:18:21 -04:00
Evan You b0203a3092 feat(expose): always expose $ instance properties on child refs 2021-06-24 21:28:09 -04:00
Evan You ac853ff4ab test: fix script setup helpers tests 2021-06-23 10:31:32 -04:00
Evan You 0b8b576428 fix(sfc): allow variables that start with _ or $ in `<script setup>` 2021-06-23 10:13:23 -04:00
Evan You 63e9e2e9aa feat(sfc): useAttrs + useSlots
Deprecate useContext
2021-06-22 21:07:42 -04:00
Eduardo San Martin Morote a137da8a9f
feat(sfc): add `defineEmits` and deprecate `defineEmit` (#3725) 2021-06-22 15:02:56 -04:00
Evan You 6b6d566861 release: v3.1.2 2021-06-22 14:24:50 -04:00
Evan You 9b607fe409 fix(watch): fix watch option merging from mixins
fix #3966
2021-06-22 13:54:43 -04:00
Eduardo San Martin Morote ab6e927041
fix(Suspense): emit initial fallback and pending events (#3965)
Fix #3964
2021-06-21 17:03:07 -04:00
edison 43e2a72900
fix(Suspense): fallback should work with transition (#3968)
fix #3963
2021-06-21 16:58:43 -04:00
Evan You 4de5d24aa7 perf: improve static content insertion perf
Especially on multiple insertions of the same static node.

fix #3090
2021-06-21 14:38:29 -04:00
Evan You 056ef2a7d2 refactor: use markRaw instead of internal flag check 2021-06-11 18:46:31 -04:00
Eunjae Lee db1dc1c630
fix(runtime-core): bind default function of inject to instance (#3925)
fix #3923
2021-06-09 12:02:05 -04:00
LYlanfeng 011dee8644
fix(runtime-core): fix multiple .once event handlers on same component (#3904)
fix #3902
2021-06-08 09:52:45 -04:00
Guillaume 2b52d5d7c5 fix(devtools): expose root instance
related to https://github.com/vuejs/vue-devtools/issues/1376
2021-06-07 23:23:45 +02: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 ad844cf1e7 fix(compat): revert private properties on $options in comapt mode
fix #3883
2021-06-07 11:04:41 -04:00
Evan You 5bce2ae723 fix(runtime-core): fix fragment update inside de-opt slots
fix #3881
2021-06-04 18:03:40 -04:00
Evan You 71f7c25fbe release: v3.1.0-beta.7 2021-06-02 16:12:54 -04:00
Evan You 2b5a559055 chore: avoid compat disabled error for built-in components 2021-06-02 16:06:09 -04:00
Evan You 9acc9a1fa8 fix(watch): avoid traversing objects that are marked non-reactive
e.g. Vue public instances
2021-06-02 15:51:27 -04:00
Evan You 51d2be2038 perf: avoid deopt for props/emits normalization when global mixins are used 2021-06-02 15:22:52 -04:00
Evan You e2ca67b59a fix(runtime-core): align option merge behavior with Vue 2
fix #3566, #2791
2021-06-02 15:19:56 -04:00
Evan You 1e35a860b9 refactor: adjust component options merge cache strategy
BREAKING CHANGE: optionMergeStrategies functions no longer receive
the component instance as the 3rd argument. The argument was technically
internal in Vue 2 and only used for generating warnings, and should not
be needed in userland code. This removal enables much more efficient
caching of option merging.
2021-06-02 10:42:52 -04:00
Evan You 44996d1a0a fix(suspense): fix suspense regression for errored template component
fix #3857
2021-05-31 17:19:03 -04:00
Evan You c7efb967ca fix(compat): fix deep data merge with extended constructor
fix #3852
2021-05-31 16:48:18 -04:00
Evan You aa96a0e88a release: v3.1.0-beta.6 2021-05-28 16:58:54 -04:00
Evan You 071986a2c6 fix(transition): fix higher order transition components with merged listeners
fix #3227
2021-05-28 15:42:08 -04:00
edison d6607c9864
fix(runtime-core): fix resolving inheritAttrs from mixins (#3742)
fix #3741
2021-05-27 21:53:41 -04:00
Evan You 1ff06376ff chore: type fix 2021-05-27 20:58:27 -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 32e21333dd fix(runtime-core): stricter compat root mount check 2021-05-27 20:47:46 -04:00
HcySunYang a641eb201f
fix(runtime-core): fix cases of reused children arrays in render functions (#3670)
fix #3666
2021-05-27 17:06:55 -04:00
HcySunYang ff50e8d78c
fix(runtime-core): should disable tracking inside directive lifecycle hooks (#3699) 2021-05-27 16:53:19 -04:00
Evan You 9f24195d2c fix(suspense): fix suspense patching in optimized mode
fix #3828
2021-05-27 16:32:31 -04:00
Evan You f0eb1978b2 release: v3.1.0-beta.5 2021-05-26 16:06:51 -04:00
Evan You b46a4dccf6 fix(ssr): handle hydrated async component unmounted before resolve
fix #3787
2021-05-26 15:26:18 -04:00
Evan You b57e995edd fix(scheduler): handle preFlush cb queued inside postFlush cb
fix #3806
2021-05-26 14:21:49 -04:00
HcySunYang e8ddf86080
fix(runtime-core): properly check forwarded slots type (#3781)
fix #3779
2021-05-26 11:52:03 -04:00
edison 4e3f82f683
fix(runtime-core/teleport): ensure the nested teleport can be unmounted correctly (#3629)
fix #3623
2021-05-26 10:51:55 -04:00
HcySunYang 201060717d
fix(runtime-core): should not track dynamic children when the user calls a compiled slot inside template expression (#3554)
fix #3548, partial fix for #3569
2021-05-25 13:33:41 -04:00
Evan You 1526f94edf fix(watch): should not leak this context to setup watch getters
ref #3603
2021-05-25 11:10:11 -04:00
HcySunYang 9e3708ca75
fix(keep-alive): include/exclude should work with async component (#3531)
fix #3529
2021-05-25 10:50:00 -04:00
Evan You f1f52300e6 release: v3.1.0-beta.4 2021-05-24 19:16:44 -04:00
Evan You b76c453507 refactor: adjust absent prop casting logic 2021-05-24 19:09:18 -04:00
Evan You 0255be2f4b fix(runtime-core): avoid double-setting props when casting
fix #3371, close #3384
2021-05-24 18:48:33 -04:00
HcySunYang 4ce0df6ef1
fix(runtime-core): avoid the proxy object polluting the slots of the internal instance (#3698)
fix #3695
2021-05-24 18:17:37 -04:00
Guillaume Chau f7c54caeb1 feat(devtools): performance events 2021-05-19 20:48:35 +02:00
Guillaume Chau 1355ee27a6 fix(devtools): send update to component owning the slot
https://github.com/vuejs/vue-devtools/issues/1404
2021-05-19 18:19:28 +02:00
HcySunYang 4f17be7b1c
fix(compat): avoid accidentally delete the modelValue prop (#3772) 2021-05-17 14:07:53 -04:00
Carlos Rodrigues 92e7330385
types(props): Support `undefined` as default (#3783) 2021-05-17 14:04:31 -04:00
GU Yiling 9b160b9405
fix(types): declared prop keys should always exist in `props` argument (#3726) 2021-05-12 17:47:31 -04:00
Cédric Exbrayat f01aadf2a1
fix(compat): enum coercion warning (#3755) 2021-05-12 17:47:00 -04:00
Evan You b663aa8a81 release: v3.1.0-beta.3 2021-05-12 17:37:04 -04:00
Stanislav Lashmanov 2bfb8b574d
fix(compat): correctly merge lifecycle hooks when using Vue.extend (#3762)
fix #3761
2021-05-12 17:13:44 -04:00
Cédric Exbrayat 808ccf0963
chore: fix typo in compat warning 2021-05-11 10:41:51 +08:00