Commit Graph

3532 Commits

Author SHA1 Message Date
三咲智子
04fff05f00
fix(sfc-playground): default selected app (#5370) 2022-05-12 20:16:29 -04:00
Evan You
8758da4749 chore: bump @vue/repl dep
close #5825
2022-05-13 07:56:11 +08:00
小刘(liulinboyi)
71066b5afe
fix(v-model): fix case where .trim and .number modifiers are used together (#5842)
fix #5839
2022-05-12 19:52:16 -04:00
huangcheng
a3881299e9
fix(runtime-core): handle NaN identity check in v-memo (#5852)
fix #5853
2022-05-12 19:49:51 -04:00
Evan You
d36ca4d80e fix(runtime-core): clone root vnode before inheriting directives 2022-05-13 07:29:37 +08:00
Cédric Exbrayat
9ecee16f89
chore: add no-debugger eslint rule (#5906) 2022-05-12 19:10:00 -04:00
Evan You
8a123ac34f fix(compiler-sfc): fix treeshaking of namespace import when used in template
fix #5209
2022-05-12 18:56:54 +08:00
Evan You
8c51c6514f fix(v-model): exclude range from lazy guard logic
fix #5875
2022-05-12 18:39:17 +08:00
Evan You
ccf92564d3 fix(compiler-sfc): fix template usage check false positives on types
fix #5414
2022-05-12 18:23:10 +08:00
Evan You
ba17792b72 fix(runtime-core): fix missed updates when passing vnode to <component :is>
fix #4903
2022-05-12 17:52:17 +08:00
Evan You
0f00cf43cf fix(compiler-core): normalize v-bind:style with array literal value
fix #5106
2022-05-12 16:31:16 +08:00
Evan You
59cf2958e7 fix(transition): handle edge case of cancel leave before next frame
fix #4462
2022-05-12 15:39:34 +08:00
Evan You
9309b044bd fix(ssr): fix hydration error for slot outlet inside transition
fix #3989
2022-05-12 15:06:32 +08:00
Evan You
da49c863a2 fix(keep-alive): fix unmounting late-included components
fix #3648
based on #3650
2022-05-12 11:52:54 +08:00
Evan You
20ed16f68c fix(keep-alive): invoke initial activated hook for async components
revert #5459
fix #5095
fix #5651
2022-05-12 11:29:26 +08:00
Evan You
9d815d28ad chore: remove dbeugger [ci skip] 2022-05-12 10:38:40 +08:00
Dongcai Huang
109453f2ba
chore: add explaination about the utility type IfAny<T, Y, N> (#5862) [ci skip] 2022-05-11 21:39:06 -04:00
WangJing
9329feb7d3
chore(compiler): improve readability of compiler-core's test case (#4886) 2022-05-11 20:47:10 -04:00
Evan You
54753c3401 chore: update branch references 2022-05-12 08:45: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
edison
cd395559ce
chore(compiler-core): use aliasHelper (#3592) 2022-05-11 20:40:05 -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
Simon Legner
d4fcfddec6
fix(types): allow indeterminate for checkbox (#3473) 2022-05-11 07:38:13 -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
Evan You
51f3d386de fix(compiler-core): template v-if should never be treated as dev root fragment
close #5189
2022-05-11 17:43:20 +08:00
Evan You
b7025d24f1 fix(compiler-sfc): ensure consistent behavior of export default render with script setup
close #4980
2022-05-11 17:20:32 +08:00
Evan You
41d255ba5d fix(compiler-sfc): fix skipped srcset transform when using base option
Based on implementation from #4835 due to conflicts

fix #4819
close #4834, close #4835
2022-05-11 16:55:58 +08:00
Evan You
57bb37bd64 fix(ssr): should not hoist transformed asset urls in ssr compile
fix #3874
2022-05-11 12:43:54 +08:00
Kael
fec12d7dcc
fix(runtime-core): transition hooks can be arrays of functions (#5177) 2022-05-10 21:56:57 -04:00
Kael
da10dd7de9
fix(ssr): don't warn for missing teleport target if disabled (#5135) 2022-05-10 21:33:08 -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
Evan You
410144149f fix(compiler-sfc): defineProps return binding or rest binding should be considered reactive 2022-05-10 17:34:15 +08:00
Evan You
03b03eee44 chore: bump vite 2022-05-10 17:15:12 +08: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
8e31765fd3 chore: fix snapshot 2022-05-10 16:16:26 +08:00
descire
b87dc06193
fix(reactivity): ios10.x compatibility (#4900) 2022-05-10 04:10:40 -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
Khinenw
181872f744
types(runtime-dom): fix typo in jsx type autosave (#5638) 2022-05-09 22:50:49 -04:00
Leon Si
908ffb4fd4
chore: typo (#5732) [ci skip] 2022-05-09 22:49:14 -04:00
huangcheng
392ca5dd88
chore: fix eslint error (#5876) 2022-05-09 22:43:35 -04:00
netcon
0aeb4bc9bf
fix(shared): missed Symbol judge in looseEqual (#3553) 2022-05-09 22:15:26 -04:00
Evan You
c355c4b784 fix(ssr): implement empty read() on node stream
fix #3846
close #3867
2022-05-10 10:05:24 +08:00
Evan You
30c33af839 chore: use explicit type import to avoid Rollup warning 2022-05-10 10:05:24 +08:00
Julian Hundeloh
e58277f6ea
fix(runtime-dom): "el._assign is not a function" in compat mode (#4121) 2022-05-09 21:58:51 -04:00
Evan You
16a0b232d7 chore: remove unused import due to merge conflict resolve mistake 2022-05-10 09:58:28 +08:00
Evan You
29e454d4d1 chore: fix duplicate export 2022-05-10 09:50:12 +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
edison
decad9df57
types(compiler-sfc): export SFCParseResult type (#2923)
close #2921
2022-05-09 21:37:59 -04:00
tarunama
7540a3ff1d
chore(server renderer): readable warn message (#2890) 2022-05-09 21:37:00 -04:00
Damon Muma
0abcb2b80d
chore: update reference to transformExpressions (#2682) [ci skip] 2022-05-09 21:30:50 -04:00
小刘(liulinboyi)
7d7a2410e5
fix(compiler-sfc): remove the jsx from the babelParserPlugins when not match the case of adding jsx (#5846)
fix #5845
2022-05-09 21:20:18 -04:00
ygj6
16939241b0
fix(compiler-sfc): automatically infer component name from filename when using script setup (#4997)
close #4993
2022-05-09 21:16:28 -04:00
Evan You
7dfe146096 fix(compiler-sfc): fix object default values for reactive props destructure 2022-05-10 08:39:27 +08:00
Evan You
0683a022ec types(reactivity-transform): improve type readability for reactive variables 2022-05-07 10:37:07 +08: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
Carlos Rodrigues
32e53bfd47
fix(types): keep the original type when unwrapping markRaw (#3791) 2022-05-06 05:07:49 -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
4a3237ad93 refactor: use Event constructor
close #5723

Since we no longer support IE11, it is safe to use Event() constructor
2022-04-16 11:26:00 +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
82bdf86254 fix(reactivity): ensure computed is invalidated before other effects
fix #5720
2022-04-15 16:43:17 +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
木杉
8e29ef6019
fix(compiler-sfc): handle type modifier in import specifiers (#5498) 2022-04-13 22:10:26 -04:00
Anthony Catel
cc238cdb8e
fix(ssr): avoid rendering reserved internal keys in output (#5564)
fix #5563
2022-04-13 22:03:17 -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
1f14f19439
fix(reactivity-transform): should not rewrite catch param (#5711)
fix #5709
2022-04-13 20:06:58 -04:00
Cédric Exbrayat
86858a9582
test(vue-compat): remove test.only (#5715) 2022-04-13 20:06:07 -04:00
Thorsten Lünborg
85af139863
fix(runtime-dom): properly handle style properties with undefined values (#5348)
fix #5322
2022-04-13 06:20:39 -04: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
zhoulixiang
57ca32b096
chore: remove superfluous code (#5683) 2022-04-13 05:30:22 -04:00
zscumt123
fa1d14c2c8
fix(runtime-dom): catch more cases of DOM property setting error (#5552)
close #5545
2022-04-13 05:25:11 -04:00
Haoqun Jiang
74d239caf7
chore(@vue/shared): add "sideEffects": false (#5480) 2022-04-13 05:23:45 -04:00
Code_xxmyyds
711c826c68
chore(reactivity): use warn (#5548) 2022-04-13 05:21:38 -04:00
木杉
2c09969b13
fix(runtime-dom): patch translate as an attr (#5485)
close #5462
2022-04-13 05:16:33 -04: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
f4f5e80a19 release: v3.2.32 2022-04-12 16:07:43 +08:00
Evan You
ea6fc845f2 chore: trim non-public properties on EffectScope type 2022-04-12 15:57:07 +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
Wei
0a301d4dab
fix(reactivity): fix currentScope loss when running detached effect scope (#5575) 2022-04-12 03:51:05 -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
Evan You
245230e135 chore: remove no longer present V_FOR_REF compat entry
close vuejs/v3-migration-guide#10
2022-03-31 08:15:59 +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
Evan You
436c500d2c fix(compiler-ssr): no need to inject resolveDirective calls for setup custom directives 2022-02-12 16:29:24 +08: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
48de8a42b7 chore: remove next references [ci skip] 2022-02-07 12:16:22 +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
a51f935b72 refactor: remove isTracking() method 2022-01-30 18:53:43 +08:00
Evan You
bb43704b64 chore: check string first in toDisplayString 2022-01-30 18:50:28 +08:00
Evan You
81a6708739 chore: simplify effectScope 2022-01-28 21:02:09 +08:00
Evan You
2993a24618 perf(reactivity): optimize effect/effectScope active state tracking 2022-01-28 18:35:09 +08:00
Evan You
6b6889852f release: v3.2.29 2022-01-23 22:02:23 +08:00
Evan You
9aa5dfd4bb fix(runtime-dom): fix static content re-insertion
fix #5308

The regression was introduced in ed9eb62. In the cached code path,
we attempt re-insertion by cloning cached nodes. However if the static
fragment was removed as component root, it loses the nodes between
start and end because each node was removed individually. Therefore
the cached path can only be taken if the fragment has a single node, or
it was removed as part of a parent tree so the sibling information is
still available.
2022-01-23 21:44:32 +08: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
Evan You
059c63eab7 test: add missing edge case for css v-bind 2022-01-23 21:03:37 +08:00
Evan You
16fa18da6d fix(compiler-sfc): fix css v-bind inside other css functions
fix #5302, close #5306
2022-01-23 20:58:43 +08:00
Evan You
283df0ad68 release: v3.2.28 2022-01-21 16:15:13 +08:00
edison
95d49bf7e7 fix(compiler-sfc): support complex expression in CSS v-bind() (#5114)
fix #5109
2022-01-21 15:57:30 +08:00
btea
63210fe41a
refactor: includes instead of indexOf (#5117) 2022-01-21 02:36:48 -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
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
edison
9f55e6fbb1
fix(compiler-core): handle v-memo in template v-for (#5291)
fix #5288
2022-01-21 01:54:46 -05:00
Evan You
b2bac9fa17 chore: comment dom tag config usage [ci skip] 2022-01-21 14:31:00 +08: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
25bc6549eb perf(reactivity): optimize effect run condition 2022-01-21 09:41:58 +08:00
Evan You
4768f26f59 fix(compiler-sfc/reactivity-transform): fix edge case where normal script has ref macros but script setup does not 2022-01-21 08:47:48 +08:00
Evan You
a05b000948 fix(reactivity-transform): apply transform for labelled variable declarations
ref https://github.com/vuejs/core/issues/5298#issuecomment-1017970061
2022-01-21 07:48:41 +08:00
Evan You
a81a9922bb fix(reactivity-transform): apply transform on exported variable declarations
fix #5298
2022-01-21 07:40:35 +08:00
Evan You
ae4b0783d7 chore: update repo references 2022-01-18 16:43:59 +08:00
Evan You
9c304bfe79 fix(reactivity): differentiate shallow/deep proxies of same target when nested in reactive
fix #5271
2022-01-18 09:22:41 +08:00
Evan You
9fda9411ec feat(reactivity): add isShallow api 2022-01-18 09:22:41 +08:00
Evan You
0c06c748a5 chore: bump marked 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
78df8c78c4 fix(types/tsx): allow ref_for type on tsx elements 2022-01-16 15:54:58 +08:00
Evan You
5ac703055f fix(types): handle ToRef<any>
fix #5188
2022-01-16 15:47:00 +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
55cc4af25e fix(ssr): remove missing ssr directive transform error 2022-01-16 15:20:56 +08:00
Evan You
92fcb9db05 workflow: use esbuild for dev scripts 2022-01-14 16:21:50 +08:00