- build: fix build script (3d80b15)
- fix(compat): convertLegacyVModelProps should merge model option in mixins (#5251) (72130ac), closes #5251
- fix(compat): ensure fallthrough *Native events are not dropped during props update (#5228) (97f6bd9), closes #5228
- fix(compat): simulate Vue 2.6.14 version in compat build (#5293) (d0b9708), closes #5293
- fix(compiler-core): handle v-memo in template v-for (#5291) (9f55e6f), closes #5291 #5288
- fix(compiler-sfc): support complex expression in CSS v-bind() (#5114) (95d49bf), closes #5114 #5109
- fix(compiler-sfc/reactivity-transform): fix edge case where normal script has ref macros but script (4768f26)
- fix(reactivity-transform): apply transform for labelled variable declarations (a05b000), closes /github.com/vuejs/core/issues/5298#issuecomment-1017970061
- fix(reactivity-transform): apply transform on exported variable declarations (a81a992), closes #5298
- fix(reactivity): differentiate shallow/deep proxies of same target when nested in reactive (9c304bf), closes #5271
- fix(reactivity): mutating a readonly ref nested in a reactive object should fail. (#5048) (171f5e9), closes #5048 #5042
- fix(runtime-core): ensure mergeProps skips undefined event handlers (#5299) (c35ec47), closes #5299 #5296
- fix(ssr): only cache computed getters during render phase (2f91872), closes #5300
- fix(types): calling readonly() with ref() should return Readonly<Ref> (#5212) (c64907d), closes #5212
- refactor: includes instead of indexOf (#5117) (63210fe), closes #5117
- chore: bump marked (0c06c74)
- chore: comment dom tag config usage [ci skip] (b2bac9f)
- chore: fix typo (#5261) [ci skip] (e603fd2), closes #5261
- chore: fix typo (#5282) [ci skip] (e802275), closes #5282
- chore: type improvements (#5264) (92e04a6), closes #5264
- chore: update repo references (ae4b078)
- perf(reactivity): optimize effect run condition (25bc654)
- feat(reactivity): add isShallow api (9fda941)
- docs(contributing): missing structure info for compiler-sfc (#3559) [ci skip] (8cbfe09), closes #3559
3.2.27 (2022-01-16)
- KeepAlive: remove cached VNode properly (#5260) (2e3e183), closes #5258
- reactivity-transform: should not rewrite for...in / for...of scope variables (7007ffb)
- sfc-playground: hide title to avoid overlap (#5099) (44b9527)
- ssr: make computed inactive during ssr, fix memory leak (f4f0966), closes #5208
- ssr: remove missing ssr directive transform error (55cc4af)
- types/tsx: allow ref_for type on tsx elements (78df8c7)
- types: fix shallowReadonly type (92f11d6)
- types: handle ToRef (5ac7030), closes #5188
- types: KeepAlive match pattern should allow mixed array (3007d5b)
- improve memory usage for static vnodes (ed9eb62)
3.2.26 (2021-12-12)
3.2.25 (2021-12-12)
- compiler-sfc: generate valid TS in script and script setup co-usage with TS (7e4f0a8), closes #5094
- compiler: force block for custom dirs and inline beforeUpdate hooks (1c9a481)
- runtime-core: disallow recurse in vnode/directive beforeUpdate hooks (a1167c5)
- compiler-core: support aliasing vue: prefixed events to inline vnode hooks (4b0ca87)
- experimental: allow const for ref sugar declarations (9823bd9)
- reactivity-transform/types: restructure macro types + export types for all shorthand methods (db729ce)
- reactivity-transform: $$() escape for destructured prop bindings (198ca14)
- reactivity-transform: rename @vue/ref-transform to @vue/reactivity-transform (d70fd8d)
- reactivity-transform: support $-shorthands for all ref-creating APIs (179fc05)
- reactivity-transform: support optionally importing macros (fbd0fe9)
- reactivity-transform: use toRef() for $() destructure codegen (93ba6b9)
- reactivity: support default value in toRef() (2db9c90)
- sfc-playground: add github link (#5067) (9ac0dde)
- sfc-playground: prevent ctrl+s default behavior (#5066) (b027507)
- support ref in v-for, remove compat deprecation warnings (41c18ef)
3.2.24 (2021-12-06)
- compat: maintain compatConfig option in legacy functional comp (#4974) (ee97cf5)
- compiler-dom: avoid bailing stringification on setup const bindings (29beda7)
- compiler-sfc: make asset url imports stringifiable (87c73e9)
- package: ensure ref-macros export is recognized by vue-tsc (#5003) (f855269)
- runtime-core: handle initial undefined attrs (#5017) (6d887aa), closes #5016
- types/reactivity: export ShallowRef type (#5026) (523b4b7), closes #5205
3.2.23 (2021-11-26)
- reactivity: retain readonly proxies when setting as reactive property (d145128), closes #4986
- runtime-core: fix component public instance has check for accessed non-existent properties (aac0466), closes #4962
- runtime-core: handle error in async KeepAlive hooks (#4978) (820a143)
- runtime-dom: fix option element value patching edge case (#4959) (89b2f92), closes #4956
- runtime-dom: patchDOMProps should not set _value if element is custom element (#4839) (1701bf3)
- types: export ref-macros.d.ts (1245709)
- types: fix propType type inference (#4985) (3c449cd), closes #4983
- types: scrip-setup+ts: ensure proper handling of
null
as default prop value. (#4979) (f2d2d7b), closes #4868
- compiler-sfc: export resolveTemplateUsageCheckString for HMR plugin use (#4908) (c61baac)
- compiler-sfc: expose properties for more accurate HMR (68c45e7), closes #4358 #4908
3.2.22 (2021-11-15)
- compiler-sfc: add type for props include Function in prod mode (#4938) (9c42a1e)
- compiler-sfc: add type for props's properties in prod mode (#4790) (090df08), closes #4783
- compiler-sfc: externalRE support automatic http/https prefix url pattern (#4922) (574070f), closes #4920
- compiler-sfc: fix expose codegen edge case (#4919) (31fd590), closes #4917
- devtool: improve devtools late injection browser env detection (#4890) (fa2237f)
- runtime-core: improve dedupe listeners when attr fallthrough (#4912) (b4eb7e3), closes #4859
- types/sfc: fix withDefaults type inference when using union types (#4925) (04e5835)
3.2.21 (2021-11-02)
- custom-element: fix custom element props access on initial render (4b7f76e), closes #4792
- custom-element: fix initial attr type casting for programmtically created elements (3ca8317), closes #4772
- devtools: avoid open handle in non-browser env (6916d72), closes #4815
- devtools: fix memory leak when devtools is not installed (#4833) (6b32f0d), closes #4829
- runtime-core: add
v-memo
to built-in directives check (#4787) (5eb7263) - runtime-dom: fix behavior regression for v-show + style display binding (3f38d59), closes #4768
- types: fix ref unwrapping type inference for nested shallowReactive & shallowRef (20a3615), closes #4771
3.2.20 (2021-10-08)
- compiler-sfc: fix props codegen w/ leading import (d4c04e9), closes #4764
- compiler-sfc: support runtime Enum in normal script (#4698) (f66d456)
- devtools: clear devtools buffer after timeout (f4639e0), closes #4738
- hmr: fix hmr for components with no active instance yet (9e3d773), closes #4757
- types: ensure that DeepReadonly handles Ref type properly (#4714) (ed0071a)
- types: make
toRef
return correct type(fix #4732) (#4734) (925bc34)
3.2.19 (2021-09-25)
- compiler-core: should treat attribute key as expression (#4658) (7aa0ea0)
- server-renderer: respect compilerOptions during runtime template compilation (#4631) (50d9d34)
3.2.18 (2021-09-24)
3.2.17 (2021-09-24)
3.2.16 (2021-09-23)
- ssr: fix ssr runtime helper import in module mode (8e05b7f)
3.2.15 (2021-09-23)
- compiler-ssr: import ssr helpers from updated path (d74f21a)
3.2.14 (2021-09-22)
- compiler-core: generate TS-cast safe assignment code for v-model (686d014), closes #4655
- compiler-core: more robust member expression check in Node (6257ade)
- compiler-sfc: fix local var access check for bindings in normal script (6d6cc90), closes #4644
- devtools: fix prod devtools detection + handle late devtools hook injection (#4653) (2476eaa)
3.2.13 (2021-09-21)
- compiler-core: add check when v-else-if is behind v-else (#4603) (5addef8)
- compiler-core: dedupe renderSlot's default props (#4557) (0448125)
- compiler-core: ensure hoisted scopeId code can be treeshaken (cb2d7c0)
- compiler-core: more robust member expression check when running in node (d23fde3), closes #4640
- compiler-core: only merge true handlers (#4577) (d8a36d0)
- compiler-core: support ts syntax in expressions when isTS is true (0dc521b)
- compiler-dom: fix transition children check for whitespace nodes (ed6470c), closes #4637
- hydration: ensure hydrated event listeners have bound instance (#4529) (58b1fa5), closes #4479
- runtime-core: return the exposeProxy from mount (#4606) (5aa4255)
- types: incorrect type inference of array (#4578) (140f089)
- watch: remove redundant parameter default value (#4565) (11a2098)
- compiler-sfc: allow disabling sourcemap when not needed (585615b)
3.2.12 (2021-09-17)
- compile-sfc: add symbol judge in prop type checks. (#4594) (fcd5422), closes #4592
- compiler-core: v-on inline async function expression handler (#4569) (fc968d6), closes #4568
- compiler-sfc: fix TLA codegen semicolon insertion (39cebf5), closes #4596
- compiler-sfc: handle empty strings during template usage analysis of setup bindings (#4608) (bdb1a79), closes #4599
- compiler-sfc: properly analyze destructured bindings with dynamic keys (a6e5f82), closes #4540
- compiler-sfc: properly reuse hoisted asset imports (06c5bf5), closes #4581
- compiler-sfc: register exported bindings in normal script when using script setup (#4601) (8055445), closes #4600
- compiler-sfc: support nested await statements (#4458) (ae942cd), closes #4448
- compiler-ssr: handle v-memo in ssr compilation (dd9a276)
- compiler: fix template ref codegen for setup-maybe-ref binding types (#4549) (f29d061), closes #4546
- custom-elements: fix number prop casting (0cfa211), closes #4370 #4393
- runtime-core: avoid script setup bindings overwriting reserved ctx properties (#4570) (14fcced)
- suspense: fix suspense slot inside deoptimized slot call (141a5e1), closes #4556
3.2.11 (2021-09-08)
- hmr: handle possible duplicate component definitions with same id (aa8908a)
3.2.10 (2021-09-07)
- build: build vue-compat in default exports mode (#4460) (7575733)
- compiler-core: avoid runtime dependency on @babel/types (1045590), closes #4531
- compiler-core: pick last char when dynamic directive doesn't close (#4507) (5d262e0)
- compiler: condense whitespaces in static class attributes (#4432) (b8653d3), closes #4251
- runtime-dom: style patching shoud always preserve v-show display property (d534515), closes #4424
- type: fix prop type infer (#4530) (4178d5d), closes #4525
3.2.9 (2021-09-05)
- compile-sfc: generate setup prop type format error (#4506) (e6fe751), closes #4505
- compile-sfc: support
Date
prop type with defineProps (#4519) (fac9a29) - compiler-sfc: fix script setup ref assignment codegen edge case (#4520) (5594643), closes #4514
- compiler-sfc: support using declared interface in normal script with defineProps() (#4522) (14d6518), closes #4423
- ref-transform: not transform the prototype attributes. (#4503) (0178f4e), closes #4502
- types/ref-transform: fix $$() type (5852cc8)
- types: fix ref macro types (815bfcf), closes #4499
3.2.8 (2021-09-02)
- compiler-sfc: ensure script setup generates type-valid ts output (bacb201), closes #4455
- compiler-sfc: generate matching prop types when withDefaults is used (#4466) (8580796), closes #4455
- compiler: generate function ref for script setup if inline is ture. (#4492) (4cd282b)
- compiler: report invalid directive name error (#4494) (#4495) (c00925e)
- types: include ref-macros.d.ts in npm dist files (d7f1b77), closes #4433
3.2.7 (2021-09-01)
- compiler-core: remove no longer necessary withScopeId import in generated code (935b4e2)
- compiler-sfc: ensure script setup lang=ts output is tree-shakable (b89ff92)
- compiler: only generate non-static ref for script setup if the binding exists (3628991), closes #4431
- ref-transform: should transform $ref when used with generic arguments (#4446) (33cf6c8), closes #4442
- runtime-core: properly merge unmounted and beforeUnmount options (#4447) (741d3b3)
- suspense: misusing DOM Comment element constructor as a vnode type (#4451) (ef5b731)
3.2.6 (2021-08-24)
- build: avoid imports to @babel/types in client build of compiler-core (4c468eb)
3.2.5 (2021-08-24)
- compiler-core: fix duplicated component identifier for names with non-ascii chars (#4429) (3282750), closes #4422
- compiler-sfc: fix 'export default' rewrite with extra whitespaces (#4375) (4792ebd)
- compiler-sfc: fix
<script>
and<script setup>
co-usage ordering edge case (#4419) (9826382), closes #4395 #4376 - compiler-sfc: should also expose regular script block bindings when
<script setup>
is used (872b3f7), closes #4369 - types: improve the type of createElementBlock (#4406) (ebd0bac), closes #4391
- experimental: expose ref macro types using separate d.ts file (b408451)
- experimental: shouldTransform for ref-transform (e565831)
- experimental: standalone ref transform (db8dc75)
- experimental: support ref transform for sfc normal
<script>
(06051c4) - ref-transform: auto infer parser plugins (6453359)
3.2.4 (2021-08-17)
- compiler-sfc: fix import usage check for lowercase imported components (57f1081), closes #4358
- runtime-core: ensure consistent arguments for tempalte and render funtion slot usage (644971e), closes #4367
- runtime-core: fix child component double update on props change (c1f564e), closes #4365
3.2.3 (2021-08-16)
- compiler-core: fix hoisting logic for elements with cached handlers + other bindings (a6c1db2), closes #4327
- compiler-core: fix style binding edge case (#4319) (092bdcd), closes #4317
- compiler-sfc: bail on import usage check when template has custom lang (aae3725), closes #4312
- compiler-sfc: fix import usage check in template strings in expressions (f855ccb), closes #4340
- defineProps: defineProps generates unnecessary array of same types (#4353) (ad66295), closes #4352
- runtime-core: patchChildren first in patchElement (#4313) (5b3f1e8)
- runtime-core: vnode hooks should not be called on async wrapper (#4349) (cd2d984), closes #4346
- runtime-dom: consistently remove boolean attributes for falsy values (#4348) (620a69b)
- shared: fix toDisplayString on object with null prototype (#4335) (42a334e), closes #4334
- types: fix tsx ref component instance type (#2486) (84d4357)
3.2.2 (2021-08-11)
- runtime-dom: patch
textContent
on svg properly (#4301) (e7b0a9d), closes #4296 - server-renderer: pipeToWebWritable CF worker compat (2224610), closes #4287
- types: allow symbol in JSX ReservedProps.key (#4306) (6e5801f)
- types: fix forceUpdate type (#4302) (380608b)
- types: fix tsx emit-mapped handler return type (#4290) (1ce34e2), closes #4288
- sfc: support $shallowRef ref sugar (00b76d3)
3.2.1 (2021-08-09)
- compiler-sfc: fix import usage check for last expression (1e1682f)
3.2.0 (2021-08-09)
This release contains no public API breakage. However, there are a few compatibility related notes:
-
Due to usage of new runtime helpers, code generated by the template compiler in >= 3.2 will not be compatible with runtime < 3.2.
This only affects cases where there is a version mismatch between the compiler and the runtime. The most common case is libraries that ship pre-compiled Vue components. If you are a library author and ship code pre-compiled by Vue >= 3.2, your library will be only compatible Vue >= 3.2.
-
This release ships TypeScript typings that rely on Template Literal Types and requires TS >= 4.1.
- remove experimental status of
<script setup>
(27104ea) (Docs) (RFC) - remove experimental status for sfc
<style>
v-bind (3b38c9a) (Docs) (RFC) - support non-explicit type imports in
<script setup>
by avoiding exposing unused imports to template during dev (5a3ccfd), closes #3183 - support namespaced component tags when using
<script setup>
(e5a4412) - (experimental) new ref sugar (562bddb) (RFC)
- new
effectScope
API (#2195) (f5617fc) (RFC) - support
onTrack/onTrigger
debug options forcomputed
(5cea9a1)
- server-renderer: decouple esm build from Node + improve stream API (0867222), closes #3467 #3111 #3460 (Docs)
- New
v-memo
directive (3b64508) (Docs) - support
v-bind
.prop & .attr modifiers (1c7d737) (Docs) - add
watchPostEffect
API (42ace95) (Docs) - add
watchSyncEffect
API (d87d059) (Docs) - unwrap refs in toDisplayString (f994b97)
- allow
compilerOptions.comments
to affect comment inclusion in dev (#4115) (dd0f9d1), closes #3392 #3395
- reactivity: improve reactive effect memory usage (#4001) (87f69fd), closes #2345
- reactivity: ref-specific track/trigger and miscellaneous optimizations (#3995) (6431040)
- reactivity: use bitwise dep markers to optimize re-tracking (#4017) (6cf2377)
- compiler-core/runtime-core: improve VNode creation performance with compiler hints (#3334) (ceff899)
- compiler-core: also hoist all-static children array (b7ea7c1)
- compiler-core: hoist dynamic props lists (02339b6)
- compiler-sfc: ignore empty blocks (#3520) (b771fdb)
Please refer to changelogs of previous beta releases for bug fixes included in this release.
3.2.0-beta.8 (2021-08-07)
- compiler-core: detected forwarded slots in nested components (#4268) (abb3a81), closes #4244
- compiler-sfc: fix ref sugar rewrite for identifiers in ts casting expressions (865b84b), closes #4254
- core: typing of key in VNodeProps (#4242) (d045055), closes #4240
- runtime-core: component effect scopes should be detached (6aa871e)
- runtime-dom: fix shadowRoot instanceof check in unsupported browsers (#4238) (bc7dd93)
- types: remove explicit return type annotation requirement for
this
inference in computed options (#4221) (d3d5ad2) - v-memo: ensure track block when returning cached vnode (#4270) (a211e27), closes #4253
- v-memo: should work on v-for with constant expression (#4272) (3b60358), closes #4246
3.2.0-beta.7 (2021-07-29)
- reactivity: dereference nested effect scopes on manual stop (1867591)
- sfc/style-vars: improve ignore style variable bindings in comments (#4202) (771635b)
- shared: support custom .toString() in text interpolation again (#4210) (9d5fd33), closes #3944
- suspense: fix dynamicChildren tracking when suspense root is a block itself (51ee84f), closes #4183 #4198
- server-renderer: decouple esm build from Node + improve stream API (0867222), closes #3467 #3111 #3460
- sfc: remove experimental status for sfc style v-bind (3b38c9a)
3.2.0-beta.6 (2021-07-27)
- inject: should auto unwrap injected refs (561e210), closes #4196
- runtime-core: expose ssrUtils in esm-bundler build (ee4cbae), closes #4199
- sfc/style-vars: should ignore style variable bindings in comments (#4188) (3a75d5d), closes #4185
- unwrap refs in toDisplayString (f994b97)
3.2.0-beta.5 (2021-07-23)
- hmr: fix custom elements hmr edge cases (bff4ea7)
- hmr: fix hmr when global mixins are used (db3f57a), closes #4174
- types: fix types for readonly ref (2581cfb), closes #4180
- v-model: avoid resetting value of in-focus & lazy input (ac74e1d), closes #4182
- compiler-sfc: avoid exposing imports not used in template (5a3ccfd), closes #3183
- runtime-dom: hmr for custom elements (7a7e1d8)
- runtime-dom: support passing initial props to custom element constructor (5b76843)
- runtime-dom: support specifying shadow dom styles in defineCustomElement (a7fa4ac)
3.2.0-beta.4 (2021-07-21)
- runtime-core: ensure setupContext.attrs reactivity when used in child slots (8560005), closes #4161
- runtime-dom: defer setting value (ff0c810), closes #2325 #4024
- skip patch on same vnode (d13774b)
3.2.0-beta.3 (2021-07-20)
- reactivity: revert computed scheduler change (33c2fbf), closes #4157
- runtime-core: fix v-bind class/style merging regression (2bdee50), closes #4155
- sfc-playground: Transform named default exports without altering scope (#4154) (acb2a4d)
- watch: ensure watchers respect detached scope (bc7f976), closes #4158
3.2.0-beta.2 (2021-07-19)
- compiler-core: fix self-closing tags with v-pre (a21ca3d)
- compiler-sfc: defineProps infer TSParenthesizedType (#4147) (f7607d3)
- compiler-sfc: expose correct range for empty blocks (b274b08)
- compiler-sfc: fix whitespace preservation when block contains single self-closing tag (ec6abe8)
- compiler-sfc: support const enum (93a950d)
- reactivity: computed should not trigger scheduler if stopped (6eb47f0), closes #4149
- runtime-core: fix null type in required + multi-type prop declarations (bbf6ca9), closes #4146 #4147
- scheduler: fix insertion for id-less job (d810a1a), closes #4148
- shared: normalizeStyle should handle strings (a8c3a8a), closes #4138
- ssr: update initial old value to watch callback in ssr usage (#4103) (20b6619)
- v-model: properly detect input type=number (3056e9b), closes #3813
- compiler: allow 'comments' option to affect comment inclusion in dev (#4115) (dd0f9d1), closes #3392 #3395
- compiler-sfc: add ignoreEmpty option for sfc parse method (8dbecfc)
- types: map declared emits to onXXX props in inferred prop types (#3926) (69344ff)
3.2.0-beta.1 (2021-07-16)
- sfc/style-vars: properly re-apply style vars on component root elements change (49dc2dd), closes #3894
- ensure customElements API ssr compatibility (de32cfa), closes #4129
- runtime-core: fix default shapeFlag for fragments (2a310df)
- ignore .prop/.attr modifiers in ssr (29732c2)
- remove deprecated scopeId codegen (f596e00)
- sfc: (experimental) new ref sugar (562bddb)
- sfc: support namespaced component tags when using
<script setup>
(e5a4412) - custom element reflection, casting and edge cases (00f0b3c)
- remove experimental status of
<script setup>
(27104ea) - support v-bind .prop & .attr modifiers (1c7d737)
- runtime-dom: defineCustomElement (8610e1c)
- v-memo (3b64508)
- watchPostEffect (42ace95)
- reactivity: new effectScope API (#2195) (f5617fc)
- reactivity: support onTrack/onTrigger debug options for computed (5cea9a1)
- also hoist all-static children array (b7ea7c1)
- hoist dynamic props lists (02339b6)
- reactivity: avoid triggering re-render if computed value did not change (ebaac9a)
- reactivity: improve reactive effect memory usage (#4001) (87f69fd), closes #2345
- reactivity: ref-specific track/trigger and miscellaneous optimizations (#3995) (6431040)
- reactivity: use bitwise dep markers to optimize re-tracking (#4017) (6cf2377)
- improve VNode creation performance with compiler hints (#3334) (ceff899)
- Output of SFC using
<style scoped>
generated by 3.2+ will be incompatible w/ runtime <3.2.
3.1.5 (2021-07-16)
- compat: fix props check for v-model compat warning (#4056) (f3e15f6)
- compat: fix v3 compiled fn detection in production (8dbad83)
- compiler: Addressed infinite loop in compiler (#3992) (e00aa56), closes #3987
- compiler-core: fix forwarded slots detection on template slots (#4124) (c23153d), closes #4123
- compiler-sfc: duplicated injected css var with repeated vars in style (#2802) (2901050)
- compiler-sfc: should not rewrite ref sugar identifiers in types (6fad209), closes #4062
- reactivity: call array subclass methods (#3624) (1cfe290), closes #2314 #2315
- ref: should not trigger when setting value to same proxy (#3658) (08f504c)
- runtime-core: enter optimized mode for component as root (68365b9), closes #3943
- runtime-dom: capture errors when setting value for IDL (#3578) (3756270), closes #3576
- runtime-dom: remove class attribute on nullish values (7013e8f), closes #3173
- sfc: fix
<script setup>
async context preservation logic (03e2684), closes #4050 - sfc: fix style variables injection on static vnode (#3847) (6a0c7cd), closes #3841
- sfc: only enable jsx parser plugin when explicitly using tsx (5df7dfc), closes #4106
- type: infer parent as
this
onnextTick
function (#3608) (18911ab), closes #3599 - v-model: handle mutations of v-model bound array/sets (2937530), closes #4096
- v-model: support calling methods in v-model expression (5af718b), closes #3993
- v-on: proper member exp detection for bracket assignment (395572b), closes #4097
- v-on: properly detect member expressions with optional chaining (963085d), closes #4107
3.1.4 (2021-07-02)
- build: avoid using async/await syntax (438754a)
- build: fix generated code containing unprocessed class field syntax (2788154), closes #4052 vuejs/vue-cli#6562
- codegen: ensure valid types in genreated code when using global directives (a44d528), closes #4054
- compiler-sfc: fix parse-only mode when there is no script setup block (253ca27)
- runtime-core: add useAttrs and useSlots export (#4053) (735ada1)
- runtime-core: fix instance accessed via $parent chain when using expose() (#4048) (12cf9f4)
3.1.3 (2021-07-01)
- compiler-core: properly exit self-closing pre tag (d2df28d), closes #4030
- compiler-sfc: avoid script setup marker showing up in devtools (211793d)
- compiler-sfc: fix defineProps() call on imported identifier (691d354)
- compiler-sfc: fix defineProps/defineEmits usage in multi-variable declarations (62c1b2f), closes #3739
- compiler-sfc: fix script setup hidden flag codegen (a5a66c5)
- compiler-sfc: support method signature in defineProps (afdd2f2), closes #2983
- compiler-sfc: support TS runtime enum in
<script setup>
(1ffd48a) - runtime-core: add missing serverPrefetch hook error string (#4014) (d069796)
- runtime-core: fix mouting of detached static vnode (fded1e8), closes #4023
- runtime-dom: fix static node content caching edge cases (ba89ca9), closes #4023 #4031 #4037
- sfc: allow variables that start with _ or $ in
<script setup>
(0b8b576) - ssr: ensure behavior consistency between prod/dev when mounting SSR app to empty containers (33708e8), closes #4034
- ssr: properly hydrate non-string value bindings (34d4991), closes #4006
- types: improve type of unref() (127ed1b), closes #3954
- defineExpose type definition and runtime warning (1675b6d)
- prevent withAsyncContext currentInstance leak in edge cases (9ee41e1)
- compiler-sfc: compileScript parseOnly mode (601a290)
- expose: always expose $ instance properties on child refs (b0203a3)
- sfc: add
defineEmits
and deprecatedefineEmit
(#3725) (a137da8) - sfc: auto restore current instance after await statements in async setup() (0240e82)
- sfc: change
<script setup>
directive resolution to require v prefix (d35e0b1), closes #3543 - sfc: defineExpose (be2b1d3)
- sfc: make ref sugar disabled by default (96cc335)
- sfc: remove
<template inherit-attrs>
support (6f6f0cf) - sfc: support referenced types for defineEmits (2973b6c)
- sfc: support using declared interface or type alias with defineProps() (2f91db3)
- sfc: useAttrs + useSlots (63e9e2e)
- sfc: withDefaults helper (4c5844a)
- sfc-playground: support lang=ts (be0f614)
- sfc/types: make
<script setup>
helper types available globally (004bd18) - types: support IDE renaming for props (#3656) (81e69b2)
- types/ide: support find definition for jsx tags, events (#3570) (8ed3ed6)
3.1.2 (2021-06-22)
- compiler-core: improve member expression check (bc100c5), closes #3910
- compiler-core/compat: fix is prop usage on components (08e9322), closes #3934
- compiler-sfc: rewriteDefault support multiline (#3917) (b228abb)
- compiler-ssr: fix attr fallthrough for transition/keep-alive as template root (9f6f8b3), closes #3981
- devtools: expose root instance (2b52d5d)
- runtime-core: bind default function of inject to instance (#3925) (db1dc1c), closes #3923
- runtime-core: fix multiple .once event handlers on same component (#3904) (011dee8), closes #3902
- Suspense: emit initial fallback and pending events (#3965) (ab6e927), closes #3964
- Suspense: fallback should work with transition (#3968) (43e2a72), closes #3963
- watch: fix watch option merging from mixins (9b607fe), closes #3966
3.1.1 (2021-06-07)
3.1.0 (2021-06-07)
- Migration Build
- compiler-core: whitespace handling strategy (dee3d6a)
- support component-level
compilerOptions
when using runtime compiler (ce0bbe0) - config: support configuring runtime compiler via
app.config.compilerOptions
(091e6d6) - support casting plain element to component via is="vue:xxx" (af9e699)
- devtools: improved KeepAlive support (03ae300)
- devtools: performance events (f7c54ca)
- onServerPrefetch (#3070) (349eb0f)
- only trigger
$attrs
update when it has actually changed (5566d39) - compiler: skip unncessary checks when parsing end tag (048ac29)
- avoid deopt for props/emits normalization when global mixins are used (51d2be2)
app.config.isCustomElement
has been deprecated and should be now nested underapp.config.compilerOptions
. [Docs]delimiters
component option has been deprecated and should now be nested under thecompilerOptions
component option. [Docs]v-is
has been deprecated in favor ofis="vue:xxx"
[Docs]
-
this.$props
and theprops
object passed tosetup()
now always contain all the keys for declared props, even for props that are absent (4fe4de0). This has always been the behavior in Vue 2 and is therefore considered a fix (see reasoning in #3288). However, this could break Vue 3 code that relied on the keys for prop absence checks. The workaround is to use a Symbol default value for props that need absence checks:const isAbsent = Symbol() export default { props: { foo: { default: isAbsent } }, setup(props) { if (props.foo === isAbsent) { // foo is absent } } }
-
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.
- compat: revert private properties on $options in comapt mode (ad844cf), closes #3883
- runtime-core: fix fragment update inside de-opt slots (5bce2ae), closes #3881
- compat: fix deep data merge with extended constructor (c7efb96), closes #3852
- compiler-sfc: fix style injection when using normal script + setup (8b94464), closes #3688
- compiler-sfc: fix template expression assignment codegen for script setup let refs (#3626) (2c7bd42), closes #3625
- runtime-core: align option merge behavior with Vue 2 (e2ca67b), closes #3566 #2791
- runtime-dom/v-model: only set selectedIndex when the value changes (#3845) (ecd97ee)
- suspense: fix suspense regression for errored template component (44996d1), closes #3857
- watch: avoid traversing objects that are marked non-reactive (9acc9a1)
- compiler-core: improve the isMemberExpression function (#3675) (9b2e894)
- compiler-dom: fix in-browser attribute value decoding w/ html tags (6690372), closes #3001
- compiler-sfc: correctly remove parens used for wrapping (#3582) (6bfb50a), closes #3581
- reactivity: ensure computed always expose value (03a7a73), closes #3099 #910
- runtime-core: fix cases of reused children arrays in render functions (#3670) (a641eb2), closes #3666
- runtime-core: fix resolving inheritAttrs from mixins (#3742) (d6607c9), closes #3741
- runtime-core: should disable tracking inside directive lifecycle hooks (#3699) (ff50e8d)
- runtime-core: stricter compat root mount check (32e2133)
- runtime-dom: should remove attribute when binding
null
tovalue
(#3564) (e3f5dcb) - suspense: fix suspense patching in optimized mode (9f24195), closes #3828
- transition: fix higher order transition components with merged listeners (071986a), closes #3227
- keep-alive: include/exclude should work with async component (#3531) (9e3708c), closes #3529
- runtime-core: properly check forwarded slots type (#3781) (e8ddf86), closes #3779
- runtime-core: should not track dynamic children when the user calls a compiled slot inside template expression (#3554) (2010607), closes #3548 #3569
- runtime-core/teleport: ensure the nested teleport can be unmounted correctly (#3629) (4e3f82f), closes #3623
- scheduler: handle preFlush cb queued inside postFlush cb (b57e995), closes #3806
- ssr: handle hydrated async component unmounted before resolve (b46a4dc), closes #3787
- watch: should not leak this context to setup watch getters (1526f94), closes #3603
- compat: avoid accidentally delete the modelValue prop (#3772) (4f17be7)
- compat: enum coercion warning (#3755) (f01aadf)
- compiler-core: fix whitespace management for slots with whitespace: 'preserve' (#3767) (47da921), closes #3766
- compiler-dom: comments in the v-if branchs should be ignored when used in Transition (#3622) (7c74feb), closes #3619
- compiler-sfc: support tsx in setup script (#3825) (01e8ba8), closes #3808
- compiler-ssr: disable hoisting in compiler-ssr (3ef1fcc), closes #3536
- devtools: send update to component owning the slot (1355ee2)
- runtime-core: avoid double-setting props when casting (0255be2), closes #3371 #3384
- runtime-core: avoid the proxy object polluting the slots of the internal instance (#3698) (4ce0df6), closes #3695
- types: declared prop keys should always exist in
props
argument (#3726) (9b160b9) - types/reactivity: error TS4058 caused by
RefSymbol
(#2548) (90aa835) - compat: correctly merge lifecycle hooks when using Vue.extend (#3762) (2bfb8b5), closes #3761
- compiler-core: bail out to array children when the element has custom directives + only one text child node (#3757) (a56ab14)
- compat: handle and warn config.optionMergeStrategies (94e69fd)
- compiler-core: preserve comment content in production when comments option is enabled (e486254)
- hmr: don't remove __file key from component type (9db3cbb)
- hydration: fix update before async component is hydrated (#3563) (c8d9683), closes #3560
- reactivity: fix tracking for readonly + reactive Map (#3604) (5036c51), closes #3602
- runtime-core: ensure declare prop keys are always present (4fe4de0), closes #3288
- runtime-core: watching multiple sources: computed (#3066) (e7300eb), closes #3068
- Teleport: avoid changing the reference of vnode.dynamicChildren (#3642) (43f7815), closes #3641
- watch: avoid traversing non-plain objects (62b8f4a)
- watch: this.$watch should support watching keypath (870f2a7)
3.1.0-beta.7 (2021-06-02)
- compat: fix deep data merge with extended constructor (c7efb96), closes #3852
- compiler-sfc: fix style injection when using normal script + setup (8b94464), closes #3688
- compiler-sfc: fix template expression assignment codegen for script setup let refs (#3626) (2c7bd42), closes #3625
- runtime-core: align option merge behavior with Vue 2 (e2ca67b), closes #3566 #2791
- runtime-dom/v-model: only set selectedIndex when the value changes (#3845) (ecd97ee)
- suspense: fix suspense regression for errored template component (44996d1), closes #3857
- watch: avoid traversing objects that are marked non-reactive (9acc9a1)
- adjust component options merge cache strategy (1e35a86)
- avoid deopt for props/emits normalization when global mixins are used (51d2be2)
- 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.
3.1.0-beta.6 (2021-05-28)
- compiler-core: improve the isMemberExpression function (#3675) (9b2e894)
- compiler-dom: fix in-browser attribute value decoding w/ html tags (6690372), closes #3001
- compiler-sfc: correctly remove parens used for wrapping (#3582) (6bfb50a), closes #3581
- reactivity: ensure computed always expose value (03a7a73), closes #3099 #910
- runtime-core: fix cases of reused children arrays in render functions (#3670) (a641eb2), closes #3666
- runtime-core: fix resolving inheritAttrs from mixins (#3742) (d6607c9), closes #3741
- runtime-core: should disable tracking inside directive lifecycle hooks (#3699) (ff50e8d)
- runtime-core: stricter compat root mount check (32e2133)
- runtime-dom: should remove attribute when binding
null
tovalue
(#3564) (e3f5dcb) - suspense: fix suspense patching in optimized mode (9f24195), closes #3828
- transition: fix higher order transition components with merged listeners (071986a), closes #3227
3.1.0-beta.5 (2021-05-26)
- keep-alive: include/exclude should work with async component (#3531) (9e3708c), closes #3529
- runtime-core: properly check forwarded slots type (#3781) (e8ddf86), closes #3779
- runtime-core: should not track dynamic children when the user calls a compiled slot inside template expression (#3554) (2010607), closes #3548 #3569
- runtime-core/teleport: ensure the nested teleport can be unmounted correctly (#3629) (4e3f82f), closes #3623
- scheduler: handle preFlush cb queued inside postFlush cb (b57e995), closes #3806
- ssr: handle hydrated async component unmounted before resolve (b46a4dc), closes #3787
- watch: should not leak this context to setup watch getters (1526f94), closes #3603
3.1.0-beta.4 (2021-05-24)
- compat: avoid accidentally delete the modelValue prop (#3772) (4f17be7)
- compat: enum coercion warning (#3755) (f01aadf)
- compiler-core: fix whitespace management for slots with whitespace: 'preserve' (#3767) (47da921), closes #3766
- compiler-dom: comments in the v-if branchs should be ignored when used in Transition (#3622) (7c74feb), closes #3619
- compiler-sfc: support tsx in setup script (#3825) (01e8ba8), closes #3808
- compiler-ssr: disable hoisting in compiler-ssr (3ef1fcc), closes #3536
- devtools: send update to component owning the slot (1355ee2)
- runtime-core: avoid double-setting props when casting (0255be2), closes #3371 #3384
- runtime-core: avoid the proxy object polluting the slots of the internal instance (#3698) (4ce0df6), closes #3695
- types: declared prop keys should always exist in
props
argument (#3726) (9b160b9) - types/reactivity: error TS4058 caused by
RefSymbol
(#2548) (90aa835)
- devtools: performance events (f7c54ca)
3.1.0-beta.3 (2021-05-12)
- compat: correctly merge lifecycle hooks when using Vue.extend (#3762) (2bfb8b5), closes #3761
- compiler-core: bail out to array children when the element has custom directives + only one text child node (#3757) (a56ab14)
3.1.0-beta.2 (2021-05-08)
- compat: handle and warn config.optionMergeStrategies (94e69fd)
3.1.0-beta.1 (2021-05-08)
- compiler-core: preserve comment content in production when comments option is enabled (e486254)
- hmr: don't remove __file key from component type (9db3cbb)
- hydration: fix update before async component is hydrated (#3563) (c8d9683), closes #3560
- reactivity: fix tracking for readonly + reactive Map (#3604) (5036c51), closes #3602
- runtime-core: ensure declare prop keys are always present (4fe4de0), closes #3288
- runtime-core: watching multiple sources: computed (#3066) (e7300eb), closes #3068
- Teleport: avoid changing the reference of vnode.dynamicChildren (#3642) (43f7815), closes #3641
- watch: avoid traversing non-plain objects (62b8f4a)
- watch: this.$watch should support watching keypath (870f2a7)
- onServerPrefetch (#3070) (349eb0f)
- support component-level
compilerOptions
when using runtime compiler (ce0bbe0) - compiler-core: whitespace handling strategy (dee3d6a)
- config: support configuring runtime compiler via
app.config.compilerOptions
(091e6d6) - devtools: improved KeepAlive support (03ae300)
- support casting plain element to component via is="vue:xxx" (af9e699)
- only trigger $attrs update when it has actually changed (5566d39)
- compiler: skip unncessary checks when parsing end tag (048ac29)
3.0.11 (2021-04-01)
- compiler-sfc: fix wrong scopeId for nested
<script setup>
components (7f7dcc9) - runtime-core: fix render function + optimized slot edge case (#3523) (995d76b), closes #2893
- runtime-core: fix v-on object kebab-case event emit matching (c1cd42e), closes #3527
3.0.10 (2021-03-31)
- compiler-core: allow PascalCase dynamic component tag usage (#3508) (555b016), closes #3507
- compiler-core: properly transform replaced nodes (#2927) (0fe567a)
- compiler-sfc: do not resolve assets from setup bindings (f5827fd), closes #3270 #3275
- compiler-sfc: fix function scope variable declaration marking (69b4727)
- compiler-sfc: fix missing whitespace issue in srcsets (#3132) (42b68c7), closes #3069
- compiler-sfc: support proper type arguments for defineEmit helper (bb8cdca), closes #2874
- reactivity: should not trigger when setting value to same proxy (#2904) (c61e767)
- runtime-core: avoid unmount teleport's children multiple times (#3499) (3736496), closes #3497
- runtime-core: fix dev fragment root flag check (9cf7525)
- runtime-dom: fix event listeners call in firefox <= 53 (#3501) (33ba0e3), closes #3485
- ssr: fix scopeId inheritance across mixed parent chain (5e54081), closes #3513
- types: add a type-only differentiator to assist Mixin's type infer (#3481) (5db2b14), closes #3468
- types/tsx: make JSX.Element extend VNode (#3171) (4f26835)
- compiler-sfc: skip srcset transform if all candidates are external (b39208c)
- runtime-core: optimize the performance of getTypeIndex (#3206) (2e50acf)
3.0.9 (2021-03-27)
- compiler-core: fix slot source location (#3494) (e752bdd)
- runtime-core: fix kebab-case prop required warning (2121c32), closes #3495 #3363
- runtime-core: remove dev-only props property from setup context for consistency (#3492) (4549e65)
- ensure backwards compat for pre-compiled sfc components (37c1709), closes #3493
3.0.8 (2021-03-26)
- compiler: properly bail stringfication for nested slot elements (f74b16c)
- compiler-core: allow unicode to appear in identifiers (#3443) (ebedccc), closes #3440
- compiler-core: avoid generating useless createVNode helper (#2938) (7715c49), closes #2739
- compiler-core: detect v-if branch root with comment as dev fragment (#2785) (4bf7ba1), closes #2780
- compiler-core: fix the detection of forwarded slots with v-if or v-for (#3353) (602b58e), closes #3347
- compiler-core: should not condense whitespace in RCDATA text mode (#3482) (b4b8215), closes #3479
- compiler-dom: stringifyStatic should remove attribute bindings with
null
value (#3477) (ca6aa01), closes #3475 - compiler-sfc: scope Id should not be attached to @keyframe breakpoint rules (#3308) (6cb9475), closes #3304
- compiler-sfc: should not rewrite scope variable (#3449) (bbc5fe6), closes #3445
- compiler-ssr: keep the order of imports expression for the fallback branch of SSR (#3448) (49f4072), closes #3447
- component: prioritize registered component over implicit self-reference via filename (abd129d), closes #2827
- hydration: handle camel-case tag name when performing match assertion (#3247) (9036f88), closes #3243
- KeepAlive: adapt keepalive for ssr (#3259) (e8e9b00), closes #3255
- reactivity: ensure computed can be wrapped by readonly (41e02f0), closes #3376
- reactivity: ensure that shallow and normal proxies are tracked seperately (close #2843) (#2851) (22cc4a7)
- reactivity: fix shallow readonly behavior for collections (#3003) (68de9f4), closes #3007
- rumtime-core: custom dom props should be cloned when cloning a hoisted DOM (#3080) (5dbe834), closes #3072
- runtime-core: cache props default values to avoid unnecessary watcher trigger (#3474) (44166b4), closes #3471
- runtime-core: ensure only skip unflushed job (#3406) (bf34e33)
- runtime-core: fix async component ref handling (#3191) (7562e72), closes #3188
- runtime-core: fix erraneous emits warnings w/ mixins (60d777d), closes #2651
- runtime-core: fix warning for absent props (#3363) (86ceef4), closes #3362
- runtime-core: handle error in async setup (#2881) (d668d48)
- runtime-core: handle error in async watchEffect (#3129) (eb1fae6)
- runtime-core: should call chained mixins and extends (#3040) (b58bb16), closes #3038
- runtime-core: should not cache property access during data() invocation (#3299) (6e88156), closes #3297
- runtime-core: should not track deps in pre flush watcher callbacks (d5824b9), closes #2728
- runtime-core: the select tag's multiple prop should be set before the children mounting (#3202) (2451dd8), closes #3199
- runtime-dom: support mounting app to svg container (#2929) (8ffcde2), closes #2926
- ssr: ensure async setup error handling work with suspense during ssr (2e71f07)
- ssr: fix memory leak when vnode component render throws error (da944cb), closes #3100
- ssr: properly update currentRenderingInstance state during ssr (8c3c14a), closes #2863
- ssr: respect render function from extends/mixins in ssr (#3006) (0a583d5), closes #3004
- ssr: watchEffect onInvalidate runner initialization (#3323) (e4b5fcc), closes #3322
- ssr/hydration: handle ending empty text node (#3246) (420c8f4), closes #3245
- teleport: targetAnchor should also be removed when unmounted (#2870) (21d1288)
- Teleport: component with multi roots should be removed when unmounted (#3157) (7769513), closes #3156
- Teleport: fallback to non-optimized mode when HRM performing updates (#3311) (9cb21d0), closes #3302
- transition: toggling branches with in-out mode should be transitioned correctly (#3109) (67a0290), closes #3104
- types: allow style to be an array in JSX (#2947) (13c9d2c)
- types: union function prop (#3119) (3755e60), closes #3357
- types: unwrap refs on public instance data (#3319) (2b588cf), closes #3315
- types/jsx: llow tabindex to be a string (#3476) (e4a5712)
- add display name for suspense component (#3312) (3b3a9a1)
- support only attaching slot scope ids when necessary (02cbbb7)
3.0.7 (2021-03-01)
- compiler-sfc: handle more edge cases in default rewrite (1dedc19)
- deps: pin Rollup to 2.38 (34f354b), closes #3332
- runtime-core: properties in methods should be writable and enumerable in DEV (#3301) (e3568ba), closes #3300
- scheduler: ensure updates are always inserted in ascending id order (#3184) (45fae9d), closes #2768 #2829
- v-show: v-show takes higher priority than style attribute (#3230) (5ad4036), closes #2757
- init devtools after feature flag checks (d0ea745)
3.0.6 (2021-02-24)
- compiler-core: do not mark v-for as stable on const bindings (734c65b), closes vitejs/vite#1956
- compiler-dom: ensure global build filename matches the one defined in package.json (close #3181) (#3185) (96b6433)
- compiler-dom: fix cdn entries (fcb6c89), closes #3181 #3185
- compiler-sfc: compiler blank srcset (#3005) (9dc816d)
- compiler-sfc: removeSpecifier issue when removing initial imports (script-setup) (#2729) (6d762a8)
- compiler-sfc: the empty lang attribute should be treated as no lang specified (#3051) (6d5b623)
- compiler-sfc: transformAssetUrls.base should not affect known module requests (2ea9867)
- compiler-sfc: treat const reactive() bindings as mutable (03360ce)
- compiler-ssr: avoid duplicated asset imports merged from component slot client branch (c69f4ea), closes vitejs/vite#2034
- devtools: init devtools in production (#2906) (4d9bcb7)
- devtools: send instance to devtools when it's mounted instead of created (4fecb27)
- docs: change reference to passed deadline (#2930) (de7f9d1)
- hmr: deep clone reused hoisted trees during dev (5a7a1b8), closes vitejs/vite#2022
- runtime-core: align $parent/$root with the template ref when using expose (#3158) (f43a3b0)
- runtime-core: allow overriding properties other than props (#3105) (73117f6)
- runtime-core: check the DEV_ROOT_FRAGMENT flag correctly in the dev environment (#2750) (347a879)
- runtime-core: component methods should override global properties in DEV (#3074) (2587f36)
- runtime-core: ensure app instance can be garbage collected after unmount (close #2907) (#2909) (60e05ef)
- runtime-core: instanceWatch should pass
this.proxy
to source as the first argument (#2753) (ec8fd10) - runtime-dom: ensure readonly type prop on textarea is handled patched as attribute (#2888) (c5d147c), closes #2766
- kebab-case events are attached correctly on web components, see #2841 (#2847) (b302cbb)
- types: extract the correct props type for the DateConstructor (#2676) (48f0d29)
- ensure all published packages contan a LICENCE file (close #2650) (#2857) (6a48d23)
- remove superfluous spaces when normalizing class (#3083) (4b55142)
- runtime-dom: enable set form attr to null on form-elements (#2840) (#2849) (f262438)
- toRef: ref created from union typed prop can't be used in watch (#3048) (4ca4666)
- should prefix
ShadowRoot
withwindow.
(#2943) (97d6f1a)
- remove useless option in KeepAlive (#3170) (bd1240c)
- compiler-core: support
BigInt
in template (#2900) (c9f94fa) - compiler-sfc: upgrade to postcss 8 (#2710) (49bc2e4)
- runtime-core: improve render context warning (#2496) (288ae0a)
- runtime-core: props type support
BigInt
(#2891) (ffd5288)
3.0.5 (2020-12-30)
Note: this release contains a type-only change that requires TypeScript 4.0+, which may cause build issues in projects still using TS 3.x.
- compiler-core: fix missing createVNode import on nested v-for (ad4d391), closes #2718
- compiler-sfc: should keep template nodes with no content (#2468) (5b9b37f), closes #2463
- compiler-sfc: support transforming asset urls with full base url. (#2477) (db786b1)
- runtime-core: component mount anchor memory leak (#2459) (3867bb4), closes #2458
- runtime-core: skip patchBlockChildren if n1.dynamicChildren is null (#2717) (c59897c), closes #2715 #2485
- runtime-dom: support mounting app on ShadowRoot (#2447) (b2189ba), closes #2399
- ssr: properly handle ssr empty slot and fallback (88f6b33)
- transition: ensure manual style manipulation in transition leave hooks work (cbaa380), closes #2720
- transition: ensure styles from *-leave-active trigger transition (#2716) (3f8f9b6), closes #2712
- devtools: send instance (3626ff0)
3.0.4 (2020-12-02)
- async-component: forward refs on async component wrapper (64d4681), closes #2671
- attr-fallthrough: ensure consistent attr fallthrough for root fragments with comments (3bc2914), closes #2549
- build: enable safari10 option for terser (#2472) (20a704f), closes #2470
- compiler-core: fix scope var reference check for v-on expressions (9db7095), closes #2564
- compiler-core: fix unintended imports in esm-bundler builds (55d99d7), closes #2258 #2515
- compiler-core: transform kebab case props to camelcase on slots (#2490) (ef59a30), closes #2488
- compiler-core/v-on: handle falsy values when caching v-on handlers (e4f09c1), closes #2605
- compiler-sfc: fix parsing error when
lang=""
is used on plain element (#2569) (5f2a853), closes #2566 - compiler-sfc: named imports from .vue file should not be treated as constant (085bbd5), closes #2699
- compiler-sfc: should not remove import statements with no specifier when compiling script setup (43eab92)
- compiler-ssr: generate correct children for transition-group (a5d6f80), closes #2510
- compiler-ssr: handle v-model checkbox with true-value binding (fe5428d)
- compiler-ssr: should not render key/ref bindings in ssr (5b62662)
- provide: support symbols in applyOptions (#2616) (7a1a782), closes #2615
- reactivity: ensure readonly on plain arrays doesn't track array methods. (#2506) (3470308), closes #2493
- reactivity: ensure add/set on reactive collections return the proxy (#2534) (6e46a57), closes #2530
- runtime-core: ensure keep-alive deep-watches include/explude props (#2551) (421205d), closes #2550
- runtime-core: ensure watchers are always registered to correct instance owner (#2495) (735af1c), closes #2381
- runtime-core: fix emit listener check on kebab-case events (#2542) (3532b2b), closes #2540
- runtime-core: handle static node move in production (bf16a57)
- runtime-core: remove static node in production mode (#2556) (2a9ba0c), closes #2553
- runtime-core: should pause tracking when initializing legacy options (#2524) (0ff2a4f), closes #2521
- runtime-core: skip functional components in public $parent chain traversal (53f4885), closes #2437
- runtime-dom: attribute should be removed with nullish values (#2679) (fb6b9f8), closes #2677
- script-setup: ensure useContext() return valid context (73cdb9d)
- slots: dynamically named slots should be keyed by name (2ab8c41), closes #2535
- slots: should render fallback content when slot content contains no valid nodes (#2485) (ce4915d), closes #2347 #2461
- suspense: fix nested async child toggle inside already resovled suspense (cf7f1db), closes #2215
- teleport: Teleport into SVG elements (#2648) (cd92836), closes #2652
- transition: avoid invoking stale transition end callbacks (eaf8a67), closes #2482
- transition: respect rules in *-leave-from transition class (#2597) (e2618a6), closes #2593
- types: fix ToRefs type on union value types (e315d84), closes #2687
- v-model: avoid mutation when using Set models + fix multi select Set model update (f2b0a8e)
- v-model: respect checkbox true-value/false-value on initial render (48f00c0), closes #2694
- v-show: ensure v-show conflict with inline string style binding (3cd30c5), closes #2583
- allow hmr in all builds (46d80f4), closes #2571
- sfc: allow sfcs to recursively self-reference in template via name inferred from filename (67d1aac)
3.0.3 (2020-11-25)
- compiler-core/compiler-sfc: handle destructure assignment expressions (4c6078c)
- compiler-sfc: fix script setup ts helpers (6e3abc8)
- hmr: fix updates for imported but not yet rendered components (9c23ddf)
- runtime-core: components with static props and slots should not be force updated (51e43e0)
- runtime-core: ensure scheduler queue is always non-null (#2567) (af95604)
- runtime-dom: use correct import source (f28ca55)
- style-vars: apply css vars in post flush effect (3a6b120)
- handle case of ref declaration without initial value (8485cd4)
- types: ensure correct type for toRef and toRefs on existing refs (8e20375)
Note: support for experimental features in SFCs have been updated according to changes in ongoing RFCs. This release may break existing usage of such experimental features.
- compiler-sfc: compileScript inline render function mode (886ed76)
- compiler-sfc: new script setup implementation (556560f)
- compiler-sfc: new SFC css varaible injection implementation (41bb7fa)
- compiler-sfc: support kebab-case components in
<script setup>
sfc template (3f99e23) - runtime-core: explicit expose API (0e59770)
- Revert "wip: allow scriptCompiled to be cached on sfc descriptor" (9db4288)
3.0.2 (2020-10-20)
- compiler: stringify values on v-text (#2432) (314ab2c), closes #2430
- compiler-core: fix multiline member expression check (#2436) (6d2a1cb), closes #2426
- reactivity: track length on for in iteration on Array (0e5a3c4), closes #2427
- runtime-core: avoid mutating EMPTY_ARR when setting dev root (#2419) (edd49dc), closes #2413
- runtime-core: avoid object prototype keys in property access cache (#2416) (ba881f9)
- runtime-core: fix component .once listener logic (4bbb2b2)
- runtime-core: non-stable Fragment should always unmount its children (#2445) (fff62e2), closes #2444
- runtime-core: prevent self-injection (#2424) (111d04f), closes #2400
- suspense: fix suspense nested child updates in template mode (0227b4a), closes #2214
- types: h support for resolveComponent (#2402) (1f2a652), closes #2357
- v-model: built in modifiers support on component (#2348) (128ec46), closes #2326
3.0.1 (2020-10-15)
- compiler-core: allow spaces between if-else branches (#2305) (89c5909), closes #2299
- compiler-core: consistently remove comment nodes for pre tags in production (f411924), closes #2217
- compiler-core: fix v-if key injection with v-on object syntax (#2368) (692197b), closes #2366
- compiler-core: make v-once work with v-if/else-if/else (#2182) (9499871), closes #2035
- compiler-ssr: fix SSR issue when dynamic and static class co-exist (#2354) (8539c0b)
- hmr: full diff props for non-sfc component (#2359) (e78915a)
- reactivity: should add allowRecurse to the effect (#2213) (ea1f87e), closes #2200
- reactivity: should not trigger watch on computed ref when value is unchanged (390589e), closes #2231
- reactivity: use resetTracking instead of enableTracking (#2174) (7cc09ca)
- runtime-core: ensure this context for $nextTick callback (5c3e8e9), closes #2282
- runtime-core: error handling for created/beforeCreate hooks (b392fe4), closes #2268
- runtime-core: fix directive merging on component root (4d1ebb5), closes #2298
- runtime-core: fix duplicated unmount traversal in optimized mode (376883d), closes #2169
- runtime-core: fix provide function data access in extends/mixins (f06518a), closes #2300
- runtime-core: fix SSR memoery leak due to props normalization cache (a66e53a), closes #2225
- runtime-core: make errorCaptured return value handling consistent with Vue 2 (#2289) (4d20ac8), closes #2267
- runtime-core: use consistent camelCase event casing for render functions (#2278) (62f2617), closes #2249
- runtime-core: vnode.el is null in watcher after rerendering (#2295) (28d5fd7), closes #2170
- runtime-core/template-refs: do not reset refs object before updates (25d53f0), closes #2283
- runtime-dom: v-model should support number modifier with select tag (#2308) (d744b8a), closes #2252
- sfc/style-vars: should attach css vars while
subtree
changed (#2178) (408a8ca), closes #2177 - teleport: proper children traversal when teleport is block root (2ae3b26), closes #2324
- teleport: should only force remove teleport when not disabled (b0931dc), closes #2323
- types: avoid DefineComponent defaulting to any (6aa2256), closes #2192
- types: fix using tuple type as EmitsOptions (#2160) (5dbd6b3), closes #2159
- v-for: handle and warn when
v-for
receives non-integer range number (#2247) (02f355e), closes #2245 - v-model: avoid clearing IME compose state on updates (#2304) (fbd198f), closes #2302
- v-model: ensure initial value is set after other attributes (54ed759), closes #2325
- custom formatters (6ba7ba4)
- runtime-dom/vModel: remove looseHas if model is Set (#2236) (6a554fe)
- do not enable hmr in non-browser envs (cf2c9f6)
3.0.0 (2020-09-18)
3.0.0-rc.13 (2020-09-18)
- hmr: make hmr working with class components (#2144) (422f05e)
- reactivity: avoid length mutating array methods causing infinite updates (#2138) (f316a33), closes #2137
- suspense: should discard unmount effects of invalidated pending branch (5bfcad1)
- types: component instance inference without props (#2145) (57bdaa2)
- watch APIs default to trigger pre-flush (49bb447), closes /github.com/vuejs/core/issues/1706#issuecomment-666258948
- runtime-core: support using inject() inside props default functions (58c31e3)
- watch: support dot-delimited path in watch option (1c9a0b3)
- watch APIs now default to use
flush: 'pre'
instead offlush: 'post'
. This change affectswatch
,watchEffect
, thewatch
component option, andthis.$watch
. See (49bb447) for more details.
3.0.0-rc.12 (2020-09-16)
- reactivity: effect should only recursively self trigger with explicit options (3810de7), closes #2125
- runtime-core: ensure root stable fragments inherit elements for moving (bebd44f), closes #2134
- runtime-core: should still do full traverse of stable fragment children in dev + hmr (dd40ad8)
- runtime-core/async-component: fix error component when there are no error handlers (c7b4a37), closes #2129
- types/tsx: optional props from Mixin/Extends are treated as required (#2048) (89e9ab8)
3.0.0-rc.11 (2020-09-15)
- compiler-core: fix prefixing for
<template v-for>
key expressions (be946ea), closes #2085 - compiler-core: fix v-if block handling for components that fail to resolve (a096a58), closes #2058
- compiler-sfc: should extract comment for import or type declarations (#2107) (05df696), closes #2102
- compiler-ssr: correct the variable name generated by the generator (#2065) (aa8dc9a)
- compiler-ssr/teleport: correct the target prop of teleport (#2053) (7455dca)
- inject: fix support for inject option default function (d472461), closes #2050
- keep-alive: should use onMounted and onUpdated to invoke cacheSubtree (#1984) (890ca8a)
- KeepAlive: when exclude prop change, it should prune cache that not matched (#2111) (98cc1f9)
- reactivity:
toRef
should not wrap aref
(#2103) (d4bf9bc) - should be able to parse decorators in script lang="ts" & jsx (#2088) (273d19a)
- reactivity: add NaN prop on Array should not trigger length dependency. (#1998) (0d4910a)
- reactivity: revert ac81dcf (5f40539), closes #2043
- reactivity: should trigger collection's write-function correctly on non-reactive keys (#1992) (fcf9b2c)
- inherit
el
for static nodes inside keyedtemplate
fragment (#2089) (a32870a), closes #2080 - runtime-core: fix priority of option merging (#2041) (95c07d8)
- runtime-core: warn reserved prefix for setup return properties and ensure consistent dev/prod behavior (fa7ab0a), closes #2042
- runtime-core/inject: handle optional
from
option in inject object config (#2073) (313dd06) - runtime-core/refs: handle multiple merged refs for dynamic component with vnode (612eb67), closes #2078
- sfc: fix scoped style regression for child component with single root + comment (6dbc6c4), closes #2046
- types: properly infer return type from async setup (#2051) (24fcf6a), closes #2049
- update Suspense usage (#2099) (5ae7380)
- compiler-sfc: support
additionalData
option incompileStyle
when processing sass (#1952) (9377352) - runtime-dom: allow native Set as v-model checkbox source (#1957) (cf1b6c6)
- Revert "refactor(runtime-core): add @internal for instance.proxy (#1849)" (#2024) (09a939d), closes #1849 #2024
3.0.0-rc.10 (2020-09-02)
- devtools: make el extra properties non-enumerable (7fd3436)
- runtime-core: enable block tracking when normalizing plain element with slot children (#1987) (5b82c48), closes #1980
- runtime-core: ensure consistent $options merge behavior with 2.x (#1986) (706b52a), closes #1978 #1979
- runtime-core: fix props/emits resolving with global mixins (8ed0b34), closes #1975
- runtime-core: openBlock() should not be tracked when block tracking is disabled (ad93fa4)
- runtime-core: v-model listeners that already exists on the component should not be merged (#2011) (63f1f18), closes #1989
- sfc/scoped-style: inherit scopeId through nested HOCs with inheritAttrs: false (c0427b4), closes #1988
- types: fix
this
type ofthis.$watch
(#2022) (aa757e8) - v-once: fix v-once usage with v-if and v-for (52e45a9), closes #2035
- compiler-sfc: analyze script bindings (#1962) (4421c00)
- devtools: expose vnode and component on elements (38ca7e8)
- ssr: serverPrefetch (c73b4a0)
- reactivity: no need to proxy has/ownKeys for readonly objects (691a4b9)
3.0.0-rc.9 (2020-08-26)
- runtime-core: class and style should be properly normalized in cloneVNode (#1967) (9153fc2), closes #1964
- runtime-core: fix resolving assets from mixins and extends (0cb7f7f), closes #1963
- runtime-core: properly call lifecycle hooks in chained mixins & extends (#1974) (6df0e73), closes #1973
- reactivity: add existing index or non-integer prop on Array should not trigger length dependency (#1969) (d5c4f6e)
- reactivity: avoid triggering Map.has twice on non-reactive keys (#1972) (97bc30e)
3.0.0-rc.8 (2020-08-25)
- devtools: unmountApp not behind compile flag (6eb7fd8)
- hmr: properly force hmr full component props update (499bc0b), closes #1942
- keep-alive: should remove wrapped version of injected keep alive hooks (#1959) (1ea2400)
- reactivity: fix iOS 12 JSON.stringify error on reactive objects (016ba11), closes #1916
- runtime-core: fix data merge order for mixins/extends (c15311c), closes #1953
- runtime-core/scheduler: handle nested flushPostFlushCbs calls (36fa42a), closes #1947
- runtime-dom: avoid setting unchanged input value (#1937) (1d55454), closes #1935
- ssr: invoke directive created hook during hydration (57642fa)
- types: relax ComponentPublicInstanceConstructor type for class components (#1943) (67b6e0f)
- watch: traverse refs in deep watch (#1939) (10293c7), closes #1900
- devtools: catch events (23233dc)
- devtools: expose setupState target object (31b99a9)
- directives: introduce
created
custom directive hook and ensure (11804fe), closes #1931 - runtime-core: support variadic children in
h
for simple JSX compat (54d06ec), closes #1917
3.0.0-rc.7 (2020-08-21)
- compiler-core: should attach key to single element child of
<template v-for>
(#1910) (69cfed6) - reactivity: unwrap non-index accessed refs on reactive arrays (#1859) (3c05f8b), closes #1846
- runtime-core: correctly track dynamic nodes in renderSlot (#1911) (7ffb79c)
- runtime-core: disable block tracking when calling compiled slot function in tempalte expressions (f02e2f9), closes #1745 #1918
- teleport: only inherit el for non-patched nodes (d4cc7b2), closes #1903
3.0.0-rc.6 (2020-08-19)
- codeframe: Added Math.max to prevent RangeError (#1807) (b14f4a5), closes #1806
- compiler-core: generate NEED_PATCH flag for element with vnode hooks (24041b7)
- compiler-core: v-if key error should only be checking same key on different branches (de0c8a7)
- compiler-sfc: custom blocks sourcemap (#1812) (619efd9)
- keep-alive: fix activated hook invocation on nested components (#1743) (233d191), closes #1742
- reactivity: accept subtypes of collections (#1864) (d005b57)
- reactivity: effect should still check sync self-trigger (ac81dcf)
- reactivity: readonly+reactive collection should also expose readonly+reactive values (ed43810), closes #1772
- reactivity: use isExtensible instead of isFrozen (#1753) (2787c34), closes #1784
- runtime-core: avoid manual slot invocation in template expressions interfering with block tracking (791eff3), closes #1745
- runtime-core: check if the key is string on undefined property warning (#1731) (ce78eac)
- runtime-core: fix beforeUpdate call timing to allow state mutation (1eb6067), closes #1899
- runtime-core: fix Object props validation for objects with custom toStringTag (6ccd9ac), closes #1872
- runtime-core: separate null vs. non-null ref value updates (#1835) (3991ff0), closes #1789 #1834
- runtime-core: should correctly call
beforeEnter
insideSuspense
(#1805) (bc6f252), closes #1795 - runtime-core/scheduler: allow component render functions to trigger itself (611437a), closes #1801
- runtime-core/scheduler: only allow watch callbacks to be self-triggering (09702e9), closes #1740 #1727
- runtime-core/scheduler: prevent duplicate queue (#1767) (b2a9142)
- runtime-core/scheduler: sort postFlushCbs to ensure refs are set before lifecycle hooks (#1854) (caccec3), closes #1852
- runtime-dom: fix v-on same computed handler on multiple elements (1c967fc), closes #1747
- runtime-dom: patch
form
as an attribute (#1788) (00683fc), closes #1787 - runtime-dom: style binding multi value support (0cd98c3), closes #1759
- runtome-core: do not cache property access in beforeCreate hook (f6afe70), closes #1756
- teleport: always inherit root DOM nodes on patch (#1836) (517c2b8), closes #1813
- transition: transition should accept multiple handlers on same event (48576e5), closes #1746
- types: handling PropType with default value (#1896) (c2913d5), closes #1891
- types/jsx: update innerHTML property in jsx typing (#1814) (b984d47)
- watch: allow handler to be a string (#1775) (b5f91ff), closes #1774
- watch: exhaust pre-flush watchers + avoid duplicate render by pre-flush watchers (a0e34ce), closes #1777
- watch: pre-flush watcher watching props should trigger before component update (d4c17fb), closes #1763
- watch: should trigger watcher callback on triggerRef when watching ref source (fce2689), closes #1736
- compiler-core: add
comments
parser option (#1858) (62b9d02) - reactivity: return array when calling
toRefs
on array (#1768) (4172fdb), closes #1764 - runtime-core: pass current props to prop default value functions (0d508e9), closes #1886
3.0.0-rc.5 (2020-07-28)
- build: fix component resolution when disabling options API (a75b8a2), closes #1688
- compiler-core: always compile Teleport and Suspense as blocks (fbf865d)
- compiler-core: prevent generating invalid code for v-bind with empty expression (#1720) (d452723)
- compiler-core/v-on: only cache empty handler when the option is used (5fbd1f4), closes #1716
- compiler-sfc:
less
andstylus
output deps path is absolute p… (#1685) (578f25c) - compiler-sfc: fix rewrite named export default (#1675) (452edb7)
- hmr: should update el for
HYDRATE_EVENTS
patchFlags node (#1707) (de62cc0) - reactivity: avoid tracking internal symbols in has trap (7edfdf7), closes #1683
- reactivity: fix ref mutation debugger event values (b7ef38b)
- runtime-core: dev root resolution should differentiate user comments vs v-if comments (355c052), closes #1704
- runtime-core: fix scheduler dedupe when not flushing (4ef5c8d)
- runtime-core: respect render function from mixins (354d79c), closes #1630
- runtime-core: scheduler should allow intentional self triggering effects (c27dfe1), closes #1727
- runtime-core: use correct container for moving
Teleport
content (#1703) (04a4eba) - style-vars: fix css vars on component with suspense as root (#1718) (07ece2e)
- v-model: enable v-model type detection on custom elements (0b3b1cf)
- runtime compilation marker should be applied in exposed compile function (b3b65b4)
- transition: should call transition hooks inside already resolved suspense (#1698) (2a633c8), closes #1689
- v-model: allow v-model usage on declared custom elements (71c3c6e), closes #1699
- reactivity:
proxyRefs
method andShallowUnwrapRefs
type (#1682) (aa06b10) - sfc: support resolving template components from
<script setup>
exports (6f5d840) - support delimiters option for runtime compilation (ba17c87), closes #1679
- reactivity: template auto ref unwrapping are now applied shallowly, i.e. only at the root level. See vuejs#1682 for more details.
3.0.0-rc.4 (2020-07-21)
- deps: move @babel/types back to dependencies (11c2ad4)
3.0.0-rc.3 (2020-07-21)
- build: make transition tree-shakeable again (ad199e1)
- compiler-sfc:
<style vars scoped>
prefixing should only apply to pre-transform source (4951d43), closes #1623 - compiler-sfc: use correct importer with
useCssVars
(#1658) (6f148d0) - runtime-core: do not use bail patchFlag on cloned vnodes (6390ddf), closes #1665
- runtime-core: fix attr fallthrough on compiled framgent w/ single static element + comments (1af3531)
- v-model: v-model listeners should not fallthrough to plain element root (c852bf1), closes #1643
- watch: fix watching reactive array (#1656) (288b4ea), closes #1655
- compiler-core/internal: add
onContextCreated
option togenerate
(#1672) (615dccd) - runtime-core: respect function name when using
defineComponent
function shorthand (#1661) (304830a) - provide ability to overwrite feature flags in esm-bundler builds (54727f9)
- computed: add readonly flag if no setter is provided (#1654) (dabdc5e)
3.0.0-rc.2 (2020-07-19)
- compiler-core: fix v-if + v-for on
<template>
(af7e100), closes #1637 - compiler-core/v-on: fix codegen for event handler with newlines (#1640) (f9826fa)
- compiler-sfc: use
filename
from options when compile styl preprocessor (#1635) (0526e5d) - keep-alive: handle "0" as cache key (#1622) (2deb0c7), closes #1621
- runtime-core/hmr: only use cloneNode mount optimization in prod (4655d69), closes #1626
- watch: callback not called when using
flush:sync
(#1633) (8facaef)
3.0.0-rc.1 (2020-07-17)
- types: deny unknown attributes on component by default (#1614) (5d8a64d), closes #1519
- types: expose
DeepReadonly
type (#1606) (527c2c8) - Initial devtools support (#1125) (568b6db)
3.0.0-beta.24 (2020-07-16)
- compiler-sfc: fix preprocessor filename access (9cb29ee)
3.0.0-beta.23 (2020-07-16)
- compiler-sfc: fix
useCssVars
codegen (9b5ff2b) - compiler-sfc: prohibit src usage for
<script setup>
+ do not (af4b0c2) - runtime-dom: unref when setting
useCssVars
(44e6da1) - slots: properly force update on forwarded slots (aab99ab), closes #1594
3.0.0-beta.22 (2020-07-15)
- compiler-core: generate incremental keys for
v-if/else-if/else
chains (#1589) (64c7b2f), closes #1587 - compiler-sfc:
<script setup>
warning (9146cc4) - hmr: fix hmr updates for reused hoisted trees (5f61aa0)
- runtime-core: do not call transition enter hooks when mounting in suspense (#1588) (246ec5c), closes #1583
- v-model: handle more edge cases in
looseEqual()
(#379) (fe1b27b)
3.0.0-beta.21 (2020-07-14)
- compiler-dom: fix v-on
.left
.right
modifier handling (6b63ba2) - runtime-core: avoid
scopeId
as attr for slot nodes with samescopeId
(#1561) (583a1c7), closes vitejs/vite#536 - runtime-core/emits: merge emits options from mixins/extends (ba3b3cd), closes #1562
- runtime-dom: remove attrs with nullish values (cb6a091), closes #1576
- runtime-dom/v-on: only block event handlers based on attach timestamp (8b320cc), closes #1565
- slots: differentiate dynamic/static compiled slots (65beba9), closes #1557
- v-on: capitalize dynamic event names (9152a89)
- v-on: refactor DOM event options modifer handling (380c679), closes #1567
- ssr support for
<style vars>
(b9595e6) - compiler-sfc:
<script setup>
support (experimental) (4c43d4e) - compiler-sfc:
<style vars>
CSS variable injection (bd5c3b9) - compiler-sfc: allow using :deep, :global & :slotted for short in
<style scoped>
(f3cc41f) - runtime-dom: useCssVars (9f706a9)
3.0.0-beta.20 (2020-07-08)
- compiler-core/v-on: bail caching for member expression handlers on components (87c2a1e), closes #1541
- compiler-dom: should ignore and warn side effect tags like script and style (5e52f4e)
- runtime-core: should allow v-model listeners to fallthrough, but ignore for warning (903e8f6), closes #1543
3.0.0-beta.19 (2020-07-07)
- compiler-core: add
\r
to accepted chars after end tag name (#1515) (64e2f46), closes #1476 - keep-alive: fix keep-alive with scopeId/fallthrough attrs (d86b01b), closes #1511
- runtime-core/template-ref: template ref used in the same template should trigger update (36b6b4f), closes #1505
- runtime-dom: should set
<input list="...">
as attribute (441c236), closes #1526 - runtime-dom/style: fix
patchStyle
on falsy next value (#1504) (77538ec), closes #1506 - ssr: support dynamic components that resolve to element or vnode (41db49d), closes #1508
- types/tsx: add
JSX.IntrinsicAttributes
definition (#1517) (a5b4332), closes #1516 - v-model: consistent nullish value handling with 2.x (#1530) (425335c), closes #1528
- v-model: should ignore compiled v-model listeners in attr fallthrough (6dd59ee), closes #1510
- watch: stop instance-bound watchers in post render queue (58b0706), closes #1525
3.0.0-beta.18 (2020-07-02)
- runtime-core: avoid accidental access of
Object.prototype
properties (f3e9c1b) - ensure vnode hooks are called consistently regardless of keep-alive (4e8e689)
- runtime-core: pass unmount into initial mount patch prop (2bdb5c1)
- runtime-dom: allow force updating value bindings for controlled inputs (b3536d8), closes #1471
- slots: make compiled slot marker non-enumerable (062835d), closes #1470
- runtime-core: support creating vnode from existing vnode (c9629f2)
3.0.0-beta.17 (2020-06-30)
- runtime-dom: allow force updating value bindings for controlled inputs (b3536d8), closes #1471
- slots: make compiled slot marker non-enumerable (062835d), closes #1470
3.0.0-beta.16 (2020-06-29)
- BaseTransition: collect correct children with slot passthrough in
Transition
(#1456) (d4cd128), closes #1455 - BaseTransition: fix
BaseTransition
delayed leave with modein-out
(#1404) (2ff8dca), closes #1400 - compiler-core: ignore comment nodes in transition children (e52b7cd), closes #1352
- compiler-core: should not prefix object method (#1375) (35dbef2)
- compiler-core: skip empty expressions when validating expressions in browser mode (afb231e)
- compiler-core/v-on: pass noninitial arguments in cached event handlers (#1265) (7e28173)
- compiler-sfc:
transformAssetUrl
should ignore inline data url (#1431) (90c285c) - runtime-core: always check props presence in public instance proxy (e0d19a6), closes #1236
- runtime-core:
cloneVNode
should preserve correct ctx instance when normalizing ref (be69bee), closes #1311 - runtime-core: component root should inherit
scopeId
fromVNode
(f3f94e4), closes #1399 - runtime-core: fix component name inference in warnings (e765d81), closes #1418
- runtime-core: fix parent el update on nested HOC self-update (#1360) (6c8bfa1), closes #1357
- runtime-core: fix
scopeId
inheritance for component inside slots (978d952) - runtime-core: handle patch flag de-op from cloned vnode (0dd5cde), closes #1426
- runtime-core: properly capitalize v-on object keys (#1358) (250eb4a)
- runtime-core: should remove no longer present camelCase props (#1413) (1c4e1b6), closes #1412
- slots: filter out compiler marker from resolved slots (70ea76a), closes #1451
- ssr: fix ssr scopeId on component root (afe13e0)
- ssr: handle fallthrough attrs in ssr compile output (d5dbd27)
- transition: enter/leave hook timing consistency with v2 (bf84ac8), closes #1145
- transition: fix appear hooks handling (7ae70ea)
- transition: fix css:false with hooks with no explicit done callback (9edbc27), closes #1149
- transition: fix dom transition cancel hooks not being called (acd3156)
- transition-group: vue 2 compatible handling of transition-group w/ multiple v-for children (86d3972), closes #1126
- types: ensure correct public props interface for
defineComponent
instance type (2961e14), closes #1385 - types: export
ComponentOptionsMixin
(#1361) (68e2d6c) - types: should unwrap array -> object -> ref (82b28a5)
- v-show: fix v-show unmount with falsy value (#1403) (d7beea0), closes #1401
- runtime-core: expose version on app instance (056cac9), closes #1449
- ssr:
renderToStream
(#1197) (6bc0e0a)
- compiler-core: treat v-for with constant exp as a stable fragment (#1394) (8a2cf21)
- reactivity: should not track
__v_isRef
(#1392) (c43a6e6) - ssr: avoid unnecessary await ticks when unrolling sync buffers (30584bc)
3.0.0-beta.15 (2020-06-12)
- build: retain main vue package side effect for compiler registration (dc986ad), closes #1263
- compiler-core: allow multiline expression on v-model and v-on (#1234) (958b6c8)
- compiler-core: bail static stringfication even threshold is met (#1298) (64ec8bf), closes #1128
- compiler-core: fix parsing for directive with dynamic argument containing dots (0d26413)
- compiler-core: support static slot names containing dots for 2.x compat (825ec15), closes #1241
- hmr: force full update on nested child components (#1312) (8f2a748)
- reactivity: fix toRaw for objects prototype inherting reactive (10bb34b), closes #1246
- runtime-core: should pass instance to patchProp on mount for event error handling (#1337) (aac9b03), closes #1336
- runtime-core: track access to $attrs (6abac87), closes #1346
- always treat spellcheck and draggable as attributes (4492b88), closes #1350
- compiler-core: fix prod whitespace/comment removal (f3623e4), closes #1256
- compiler-dom: add tfoot,caption,col element on bail stringification (#1333) (fbaf52a)
- compiler-dom: bail stringification on table elements (a938b61), closes #1230 #1268
- compiler-sfc: asset url transform should ignore direct hash urls (5ddd9d2)
- compiler-ssr: should escape template string interpolation chars in generated code (5f15d9a)
- hmr: force full update in child component on slot update (2408a65)
- reactivity: replaced ref in reactive object should be tracked (#1058) (80e1693)
- reactivity: shallowReactive collection to not-readonly (#1212) (c97d1ba)
- runtime-core: default value for function type prop (#1349) (d437a01), closes #1348
- runtime-core: mount children before setting element props (8084156), closes #1318 #1320
- runtime-core: respect props from mixins and extends (2417a0c), closes #1236 #1250
- runtime-core: use array destructuring instead of object for edge compat (#1302) (4a5021e), closes #1294
- runtime-dom: compatibility for cases where event.timeStamp is 0 (#1328) (90c3532), closes #1325
- ssr: fix unintended error on
Teleport
hydration mismatch (#1271) (c463a71), closes #1235 - types: add RawSlots in h signature (#1293) (cab769f)
- bail stringification for slots (9b5d13e), closes #1281 #1286
- ssr: should set ref on hydration (0a7932c)
- run ci (6b889e7)
- compiler: better warning for invalid expressions in function/browser mode (e29f0b3), closes #1266
- runtime-core: add inheritRef option + make
<transition>
&<keep-alive>
inherit refs (38f2d23) - types: adjust type exports for manual render function and tooling usage (e4dc03a), closes #1329
- types: mixins/extends support in TypeScript (#626) (d3c436a)
- types: support typing directive value via generic argument (#1007) (419b86d), closes #998
- types: update to Typescript 3.9 (#1106) (97dedeb)
- only patch string style when value has changed (#1310) (d4e9b19), closes #1309
- optimize LRU access in keep-alive (#1316) (1f2926a)
3.0.0-beta.14 (2020-05-18)
- compiler-dom: should bail stringification on runtime constant regardless of position (dd2bfb5), closes vuejs/vite#157
- reactivity: shallowReactive for collections (#1204) (488e2bc), closes #1202
- runtime-dom: event handlers with modifiers should get all event arguments (#1193) (ab86b19)
- Transition: fix validate duration (#1188) (d73a508)
- v-model: should not trigger updates during input composition (#1183) (83b7158)
- watch: support directly watching reactive object in multiple sources with deep default (#1201) (ba62ccd)
3.0.0-beta.13 (2020-05-17)
- improve static content stringification (d965bb6)
3.0.0-beta.12 (2020-05-11)
- hmr: static child traversal should only affect elements (2bc6a8c)
3.0.0-beta.11 (2020-05-11)
- hmr: always force full child component props update in HMR mode (1b946c8)
- hmr: ensure static nodes inherit DOM element in hmr mode (66c5a55), closes #1156
- runtime-core: should not take unmount children fast path for v-for fragments (5b8883a), closes #1153
- transition: should reset enter class after appear (#1152) (697de07)
- runtime-core: expose isVNode (a165d82)
3.0.0-beta.10 (2020-05-07)
- compiler: warn against v-bind with empty attribute value (675330b), closes github.com/vuejs/core/issues/1128#issuecomment-624647434
- compiler-dom: bail static stringfication on non-attr bindings (304ab8c), closes #1128
- compiler-sfc: should not transform external asset url with (d662118)
- compiler-sfc: template with alt lang should be parsed as raw text (d10835a), closes #1120
- reactivity: fix
__proto__
access on proxy objects (#1133) (037fa07) - reactivity: use correct thisArg for collection method callbacks (#1132) (e08f6f0)
- runtime-dom/style: normalize string when merging styles (#1127) (2d9f136)
- compiler/types: convert compiler options documentation to jsdoc (e58beec)
- compiler-sfc: improve sfc source map generation (698c8d3)
- types: re-expose trasnformVNodeArgs (40166a8)
- compiler-sfc: improve asset url transform efficiency (c5dcfe1)
- compiler-sfc: only add character mapping if not whitespace (2f69167)
-
compiler/types:
getTextMode
compiler option signature has changed from;(tag: string, ns: string, parent: ElementNode | undefined) => TextModes
to
;(node: ElementNode, parent: ElementNode | undefined) => TextModes
3.0.0-beta.9 (2020-05-04)
- compiler: bail strigification on runtime constant expressions (f9a3766)
- transitionGroup: fix transition children resolving condition (f05aeea)
- compiler-sfc: support transforming absolute asset urls (6a0be88)
-
compiler-sfc:
@vue/compiler-sfc
'stransformAssetUrlsBase
option has been removed. It is merged intotrasnformAssetUrls
which now also accepts the format of{ base?: string includeAbsolute?: string tags?: { [name: string]: string[] } }
3.0.0-beta.8 (2020-05-04)
- hmr: handle cases where instances with same id having different definitions (01b7e90)
- reactivity: avoid polluting Object prototype (f40f3a0)
- reactivity: check own property for existing proxy of target (6be2b73), closes #1107
- transitionGroup: inner children should skip comment node (#1105) (26a50ce)
- types/reactivity: fix ref type inference on nested reactive properties with .value (bc1f097), closes #1111
- shared: support Map and Set in toDisplayString (3c60d40), closes #1067 #1100
- types: re-expose resolve asset utitlies and registerRuntimeCompiler in type definitions (64ef7c7), closes #1109
- watch: support directly watching reactive object with deep default (6b33cc4), closes #1110
3.0.0-beta.7 (2020-05-02)
- compiler-sfc: add transformAssetUrlsBase option (36972c2)
- types: re-expose
withDirectives
as public type (583ba0c)
3.0.0-beta.6 (2020-05-01)
- compiler-core: hoist pure annotations should apply to all nested calls (c5e7d8b)
- compiler-core: hoisted vnode calls and scoped id calls should be marked pure (cad25d9)
- compiler-ssr: handle comments codegen + refactor ssr codegen transform (6c60ce1)
- runtime-core: avoid infinite warning loop for isRef check on component public proxy (6233608), closes #1091
- runtime-core: cloned vnodes with extra props should de-opt (08bf7e3)
- runtime-core: fix slot fragment bail check (ac6a6f1)
- runtime-core: should call Suspense fallback unmount hook (#1061) (8b85aae), closes #1059
- runtime-core: should catch dom prop set TypeErrors (98bee59), closes #1051
- runtime-dom: should not coerce nullish values to empty strings for non-string dom props (20bc7ba), closes #1049 #1092 #1093 #1094
- ssr: fix escape and handling for raw Text, Comment and Static vnodes (5b09e74)
- teleport: teleport should always be tracked as dynamic child for unmount (7f23555), closes #1088
- types: augment ref unwrap bail types in appropriate packages (b40fcbc)
- types: mark internal API exports and exclude from d.ts (c9bf7de)
- runtime-core: warn against user properties with reserved prefixes (1bddeea)
- instance public proxy should never be observed (11f38d8)
- types: Internal APIs are now excluded from type declarations.
3.0.0-beta.5 (2020-04-30)
- compiler-ssr: avoid unnecessary withCtx import (08b4e88)
- hmr: support hmr for static nodes (386b093)
- hydration: fix text mismatch warning (e087b4e)
- keep-alive: do not invoke onVnodeBeforeUnmount if is KeepAlive component (#1079) (239270c)
- transition-group: should collect raw children with Fragment (#1046) (8ed3455), closes #1045
- warning: always check for component instance presence when formatting traces (a0e2c12)
- use more consistent naming for apiWatch type exports (892fb6d)
-
Some watch API types are renamed.
BaseWatchOptions
->WatchOptionsBase
StopHandle
->WatchStopHandle
3.0.0-beta.4 (2020-04-24)
- compiler-core: dynamic component should always be made blocks (7d0ab33), closes #1018
- runtime-core: dynamic component should support falsy values without warning (ded92f9)
- runtime-core: fix dynamic node tracking in dynamic component that resolves to plain elements (dcf2458), closes #1039
- runtime-core: fix key/ref resolution for cloneVNode (d7379c7), closes #1041
- runtime-core: mixin options that rely on this context should be deferred (ff4d1fc), closes #1016 #1029
- runtime-core: only infer component name for object components (e422b8b), closes #1023
- slots: compiled slot fallback should be functions (#1030) (2b19965), closes #1021
- types: fix ref(false) type to Ref (#1028) (0bdd889)
- types: make return type of
defineComponent
assignable toComponent
type (#1032) (f3a9b51), closes #993
- compiler-sfc: add preprocessCustomRequire option (20d425f)
- compiler-sfc: built-in support for css modules (fa216a0)
- reactivity: add triggerRef API (2acf3e8)
- types: expose
ToRefs
type (#1037) (28b4c31)
3.0.0-beta.3 (2020-04-20)
- runtime-core: should not cast prop value if prop did not change (171cfa4), closes #999
- warn: fix component name inference in warning trace (0278992)
- build: provide more specific warnings for runtime compilation (e954ba2), closes #1004
- runtime-core: improve warning for extraneous event listeners (#1005) (cebad64), closes #1001
- runtime-core: more specific warning for failed v-on fallthrough (ab844fd), closes #1001
- warn: infer anonymous component named based on resolve name (dece610)
3.0.0-beta.2 (2020-04-17)
- runtime-core: fix user attached public instance properties that start with "$" (d7ca1c5)
- watch: fix deep watchers on refs containing primitives (#984) (99fd158)
- types: expose
ComponentCustomOptions
for declaring custom options (c0adb67) - types: expose
ExtractPropTypes
(#983) (4cf5e07) - types add
ComponentCustomProperties
interface (#982) (be21cfb)
3.0.0-beta.1 (2020-04-16)
- reactivity: adjust APIs (09b4202)
- runtime-core: skip emit warn if has equivalent onXXX prop (0709380)
- runtime-core: use raw context on component options init (bfd6744)
- reactivity: Reactivity APIs adjustments:
-
readonly
is now non-tracking if called on plain objects.lock
andunlock
have been removed. Areadonly
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 byreactive
, or areadonly
proxy that wraps areactive
proxy. -
A new utility
isProxy
is introduced, which returns true for both reactive or readonly proxies. -
markNonReactive
has been renamed tomarkRaw
.
3.0.0-alpha.13 (2020-04-15)
- compiler-core: should not generate CLASS/STYLE patch flags on components (a6e2b10), closes #677
- runtime-core: fix kebab-case props update (7cbf684), closes #955
- runtime-core: should resolve value instead of delete for dynamic props with options (c80b857)
- runtime-dom: fix patching for attributes starting with
on
(6eb3399), closes #949 - runtime-dom: should patch svg innerHtml (#956) (27b5c71)
- runtime-dom/v-on: support event.stopImmediatePropagation on multiple listeners (d45e475), closes #916
- scheduler: sort jobs before flushing (78977c3), closes #910 /github.com/vuejs/core/issues/910#issuecomment-613097539
- types: UnwrapRef should bail on DOM element types (#952) (33ccfc0), closes #951
- reactivity: remove stale API
markReadonly
(e8a866e) - runtime-core: remove emit return value (55566e8)
- reactivity: add support for
customRef
API (b83c580) - reactivity: add support for
toRef
API (486dc18) - runtime-core: detect and warn against components made reactive (2e06f5b), closes #962
- runtime-core: warn async data() (3e7bb7d)
-
reactivity:
markReadonly
has been removed. -
runtime-dom: Only props starting with
on
followed by an uppercase letter or a non-letter character are considered event listeners. -
runtime-core: this.$emit() and setupContext.emit() no longer return values. For logic that relies on return value of listeners, the listener should be declared as an
onXXX
prop and be called directly. This still allows the parent component to pass in a handler usingv-on
, sincev-on:foo
internally compiles toonFoo
.ref: https://github.com/vuejs/rfcs/pull/16
3.0.0-alpha.12 (2020-04-08)
- compiler: should not condense
(8c17535), closes #945 - compiler: should only strip leading newline directly in pre tag (be666eb)
- compiler: support full range of entity decoding in browser builds (1f6e72b)
- compiler-core: elements with dynamic keys should be forced into blocks (d531686), closes #916
- reactivity: track reactive keys in raw collection types (5dcc645), closes #919
- runtime-core: fix globalProperties in check on instance render proxy (c28a919)
- runtime-core: set fragment root children should also update dynamicChildren (#944) (a27e9ee), closes #943
- runtime-dom: fix getModelAssigner order in vModelCheckbox (#926) (da1fb7a)
- runtime-dom: support native onxxx handlers (2302dea), closes #927
- slots: should update compiled dynamic slots (8444078)
- transition: fix dynamic transition update on nested HOCs (b8da8b2)
- transition: should ship props declarations in production (4227831)
- types: accept generic Component type in h() (c1d5928), closes #922
- v-model: handle dynamic assigners and array assigners (f42d11e), closes #923
- asyncComponent: add
onError
option for defineAsyncComponent (e804463) - runtime-core: improve component public instance proxy inspection (899287a)
- compiler: compiler options have been adjusted.
- new option
decodeEntities
is added. namedCharacterReferences
option has been removed.maxCRNameLength
option has been removed.
- new option
- asyncComponent:
retryWhen
andmaxRetries
options fordefineAsyncComponent
has been replaced by the more flexibleonError
option, per vuejs/rfcs#148
3.0.0-alpha.11 (2020-04-04)
- compiler: fix pre tag whitespace handling (7f30cb5), closes #908
- compiler-core/slots: should support on-component named slots (a022b63)
- compiler-sfc: always use offset for template block sourcemaps (#911) (db50009)
- inject: allow default value to be
undefined
(#894) (94562da), closes #892 - portal: portal should always remove its children when unmounted (16cd8ee)
- reactivity: scheduled effect should not execute if stopped (0764c33), closes #910
- runtime-core: support attr merging on child with root level comments (e42cb54), closes #904
- runtime-dom: v-cloak should be removed after compile on the root element (#893) (0ed147d), closes #890
- runtime-dom: properly support creating customized built-in element (b1d0b04)
- transition: warn only when there is more than one rendered child (#903) (37b1dc8)
- types: allow use PropType with Function (#915) (026eb72), closes #748
- types: export missing types from runtime-core (#889) (412ec86)
- types/reactivity: add generics constraint for markNonReactive (f3b6559), closes #917
- runtime-core: adjust attr fallthrough behavior (21bcdec)
- rename
<portal>
to<teleport>
(eee5095) - runtime-core: rename
createAsyncComponent
todefineAsyncComponent
(#888) (ebc5873)
- asyncComponent: retry support (c01930e)
- compiler-core: export
transformElement
from compiler-core (#907) (20f4965) - compiler-core: support v-is (b8ffbff)
- portal: hydration support for portal disabled mode (b74bab2)
- portal: SSR support for multi portal shared target (e866434)
- portal: SSR support for portal disabled prop (9ed9bf3)
- portal: support disabled prop (8ce3da0)
- portal: support multiple portal appending to same target (aafb880)
- reactivity: add effect to public api (#909) (6fba241)
- runtime-core: config.performance tracing support (e93e426)
- runtime-core: emits validation and warnings (c7c3a6a)
- runtime-core: failed component resolution should fallback to native element (cb31eb4)
- runtime-core: support app.config.globalProperties (27873db)
- runtime-core: type and attr fallthrough support for emits option (bf473a6)
- templateRef: should work with direct reactive property (449ab03), closes #901
- templateRef: support template ref for all vnode types (55b364d)
-
runtime-core: attribute fallthrough behavior has been adjusted according to vuejs/rfcs#154
-
<portal>
has been renamed to<teleport>
.target
prop is also renamed toto
, so the new usage will be:<Teleport to="#modal-layer" :disabled="isMobile"> <div class="modal">hello</div> </Teleport>
The primary reason for the renaming is to avoid potential naming conflict with native portals.
-
asyncComponent: async component
error
andloading
options have been renamed toerrorComponent
andloadingComponent
respectively. -
runtime-core:
createAsyncComponent
has been renamed todefineAsyncComponent
for consistency withdefineComponent
.
3.0.0-alpha.10 (2020-03-24)
- fix option merge global mixins presence check (10ad965)
- compiler-core: assign patchFlag for template v-if fragment (a1da9c2), closes #850
- compiler-core: support interpolation in RCDATA mode (e.g. textarea) (0831b98)
- keep-alive: should update re-activated component with latest props (1237387)
- reactivity: should not observe frozen objects (1b2149d), closes #867
- reactivity: should not trigger map keys iteration when keys did not change (45ba06a), closes #877
- runtime-core: fix boolean props validation (3b282e7)
- runtime-dom: invalid lineGradient svg tag (#863) (d425818), closes #862
- TransitionGroup: ignore comment node when warn (fix#869) (#875) (0dba5d4)
- do not drop SFC runtime behavior code in global builds (4c1a193), closes #873
- dynamic component fallback to native element (f529dbd), closes #870
- runtime-core: fix component proxy props presence check (b3890a9), closes #864
- suspense: clear effects on suspense resolve (ebc1ca8)
- transition: fix duration prop validation (0dc2478), closes #868
- asyncComponent: SSR/hydration support for async component (cba2f1a)
- runtime-core: async component support (c3bb316)
- runtime-core: support
config.optionMergeStrategies
(528621b) - add hook for transforming h's arguments (#851) (b7d1e0f)
3.0.0-alpha.9 (2020-03-16)
- build: remove RUNTIME_COMPILE flag (206640a), closes #817
- compiler-core: fix property shorthand detection (586e5bb), closes #845
- compiler-ssr: fix input w/ v-bind="obj" codegen (3b40fc5)
- compiler-ssr: should pass necessary tag names for dynamic v-bind (a46f3b3)
- runtime-core: always set invalid vnode type (#820) (28a9bee)
- runtime-core: empty boolean props (#844) (c7ae269), closes #843
- runtime-core: pass instance proxy as data() argument (#828) (d9dd1d8)
- runtime-dom: patch xlink attribute (#842) (d318576)
- simplify and use correct ctx in withCtx (4dc8ffc)
- runtime-core: pass prev value to hostPatchProp (#809) (cd34603), closes #808
- runtime-core: should allow empty string and 0 as valid vnode key (#807) (54a0e93)
- types: app.component should accept defineComponent return type (#822) (1e9d131), closes #730
- runtime-core: adjust patchProp value arguments order (ca5f39e)
- compiler-core: wrap slot functions with render context (ecd7ce6)
- compiler-sfc: add ssr option (3b2d236)
- runtime-core: add special property to get class component options (#821) (dd17fa1)
- runtime-core: implement RFC-0020 (bb7fa3d)
- runtime-core: set context for manual slot functions as well (8a58dce)
- server-renderer: render suspense in vnode mode (#727) (589aeb4)
- ssr: compiler-ssr support for Suspense (80c625d)
- ssr: hide comment anchors during hydration in dev mode (cad5bcc)
- ssr: improve fragment mismatch handling (60ed4e7)
- ssr: support getSSRProps for vnode directives (c450ede)
- ssr/suspense: suspense hydration (a3cc970)
- types: export
ErrorTypes
(#840) (760c3e0)
- Revert "refactor(directives): remove binding.instance" (2370166)
-
runtime-core: data no longer supports object format (per RFC-0020)
-
runtime-core:
RendererOptions.patchProp
arguments order has changedThe
prevValue
andnextValue
position has been swapped to keep it consistent with other functions in the renderer implementation. This only affects custom renderers using thecreateRenderer
API.
3.0.0-alpha.8 (2020-03-06)
- directives: ignore invalid directive hooks (7971b04), closes #795
- portal: fix portal placeholder text (4397528)
- reactivity: allow effect trigger inside no-track execution contexts (274f81c), closes #804
- reactivity: Map/Set identity methods should work even if raw value contains reactive entries (cc69fd7), closes #799
- reactivity: should not trigger length dependency on Array delete (a306658), closes #774
- runtime-core: ensure inherited attrs update on optimized child root (6810d14), closes #677 #784
- slots: fix conditional slot (3357ff4), closes #787
- ssr: fix ssr on-the-fly compilation + slot fallback branch helper injection (3be3785)
- runtime-core: adjust attr fallthrough behavior (e1660f4), closes #749
- runtime-core: revert setup() result reactive conversion (e67f655)
- compiler-core: switch to @babel/parser for expression parsing (8449a97)
- compiler-ssr: compile portal (#775) (d8ed0e7)
- ssr: hydration mismatch handling (91269da)
-
runtime-core: adjust attr fallthrough behavior
Updated per pending RFC vuejs/rfcs#137
-
Implicit fallthrough now by default only applies for a whitelist of attributes (class, style, event listeners, a11y attributes, and data attributes).
-
Fallthrough is now applied regardless of whether the component has
-
-
runtime-core: revert setup() result reactive conversion
Revert 6b10f0c & a840e7d. The motivation of the original change was avoiding unnecessary deep conversions, but that can be achieved by explicitly marking values non-reactive via
markNonReactive
.Removing the reactive conversion behavior leads to an usability issue in that plain objects containing refs (which is what most composition functions will return), when exposed as a nested property from
setup()
, will not unwrap the refs in templates. This goes against the "no .value in template" intuition and the only workaround requires users to manually wrap it again withreactive()
.So in this commit we are reverting to the previous behavior where objects returned from
setup()
are implicitly wrapped withreactive()
for deep ref unwrapping.
3.0.0-alpha.7 (2020-02-26)
- renderSlot: set slot render as a STABLE_FRAGMENT (#776) (8cb0b83), closes #766
- runtime-core: fix slot fallback + slots typing (4a5b91b), closes #773
- runtime-core: make watchEffect ignore deep option (#765) (19a799c)
- runtime-core: set appContext.provides to Object.create(null) (#781) (04f83fa)
- template-explorer: rename watch -> watchEffect (#780) (59393dd)
- template-ref: fix string template refs inside slots (3eab143)
- types: ref value type unwrapping should happen at creation time (d4c6957)
- types: shallowRef should not unwrap value type (3206e5d)
- directives: remove binding.instance (52cc7e8)
-
directives: custom directive bindings no longer expose instance
This is a rarely used property that creates extra complexity in ensuring it points to the correct instance. From a design perspective, a custom directive should be scoped to the element and data it is bound to and should not have access to the entire instance in the first place.
3.0.0-alpha.6 (2020-02-22)
- compiler-core: should alias name in helperString (#743) (7b987d9), closes #740
- compiler-dom: properly stringify class/style bindings when hoisting static strings (1b9b235)
- reactivity: should trigger all effects when array length is mutated (#754) (5fac655)
- sfc: inherit parent scopeId on child root (#756) (9547c2b)
- types: improve ref typing, close #759 (627b9df)
- types: update setup binding unwrap types for 6b10f0c (a840e7d), closes #738
- effect: optimize effect trigger for array length mutation (#761) (76c7f54)
- reactivity: only trigger all effects on Array length mutation if new length is shorter than old length (33622d6)
-
runtime-core: replace
watch(fn, options?)
withwatchEffect
The
watch(fn, options?)
signature has been replaced by the newwatchEffect
API, which has the same usage and behavior.watch
now only supports thewatch(source, cb, options?)
signature. -
reactivity: reactive arrays no longer unwraps contained refs
When reactive arrays contain refs, especially a mix of refs and plain values, Array prototype methods will fail to function properly - e.g. sort() or reverse() will overwrite the ref's value instead of moving it (see #737).
Ensuring correct behavior for all possible Array methods while retaining the ref unwrapping behavior is exceedingly complicated; In addition, even if Vue handles the built-in methods internally, it would still break when the user attempts to use a 3rd party utility function (e.g. lodash) on a reactive array containing refs.
After this commit, similar to other collection types like Map and Set, Arrays will no longer automatically unwrap contained refs.
The usage of mixed refs and plain values in Arrays should be rare in practice. In cases where this is necessary, the user can create a computed property that performs the unwrapping.
3.0.0-alpha.5 (2020-02-18)
- compiler: fix v-for fragment openBlock argument (12fcf9a)
- compiler-core: fix keep-alive when used in templates (ade07c6), closes #715
- compiler-core: only check is prop on
<component>
(78c4f32) - compiler-core: relax error on unknown entities (730d329), closes #663
- compiler-core: should apply text transform to if branches (e0f3c6b), closes #725
- compiler-core: should not hoist element with cached + merged event handlers (5455e8e)
- compiler-dom: fix duplicated transforms (9e51297)
- compiler-sfc: handle empty nodes with src attribute (#695) (2d56dfd)
- compiler-ssr: import helpers from correct packages (8f6b669)
- computed: support arrow function usage for computed option (2fb7a63), closes #733
- reactivity: avoid cross-component dependency leaks in setup() (d9d63f2)
- reactivity: effect should handle self dependency mutations (e8e6772)
- reactivity: trigger iteration effect on Map.set (e1c9153), closes #709
- runtime-core: ensure renderCache always exists (8383e54)
- runtime-core: fix keep-alive tree-shaking (5b43764)
- runtime-core: fix ShapeFlags tree shaking (0f67aa7)
- runtime-core: handle component updates with only class/style bindings (35d91f4)
- runtime-core: render context set should not unwrap reactive values (27fbfbd)
- runtime-core: rework vnode hooks handling (cfadb98), closes #684
- runtime-core: should not return early on text patchFlag (778f3a5)
- runtime-core/scheduler: avoid duplicate updates of child component (8a87074)
- runtime-core/scheduler: invalidate job (#717) (fe9da2d)
- runtime-core/watch: trigger watcher with undefined as initial value (#687) (5742a0b), closes #683
- runtime-dom/ssr: properly handle xlink and boolean attributes (e6e2c58)
- ssr: avoid hard-coded ssr checks in cjs builds (bc07e95)
- ssr: fix class/style rendering + ssrRenderComponent export name (688ad92)
- ssr: render components returning render function from setup (#720) (4669215)
- transition-group: handle multiple move-classes (#679) (5495c70), closes #678
- types: app.component should accept defineComponent return type (57ee5df), closes #730
- types: ensure correct oldValue typing based on lazy option (c6a9787), closes #719
- v-on: transform click.right and click.middle modifiers (028f748), closes #735
- remove effect from public API (4bc4cb9), closes #712
- v-model: should use dynamic directive on input with dynamic v-bind (1f2de9e)
- watch: adjust watch API behavior (9571ede)
- compiler: mark hoisted trees with patchFlag (175f8aa)
- compiler: warn invalid children for transition and keep-alive (4cc39e1)
- compiler-core: support mode: cjs in codegen (04da2a8)
- compiler-core/v-on: support @vnode-xxx usage for vnode hooks (571ed42)
- compiler-dom: handle constant expressions when stringifying static content (8b7c162)
- compiler-dom/runtime-dom: stringify eligible static trees (27913e6)
- reactivity: add shallowReactive function (#689) (7f38c1e)
- runtime-core/reactivity: expose shallowReactive (#711) (21944c4)
- server-renderer: support on-the-fly template compilation (#707) (6d10a6c)
- ssr: render portals (#714) (e495fa4)
- ssr: support portal hydration (70dc3e3)
- ssr: useSSRContext (fd03149)
- prevent renderer hot functions being inlined by minifiers (629ee75)
- reactivity: better computed tracking (#710) (8874b21)
-
watch:
watch
behavior has been adjusted.-
When using the
watch(source, callback, options?)
signature, the callback now fires lazily by default (consistent with 2.x behavior).Note that the
watch(effect, options?)
signature is still eager, since it must invoke theeffect
immediately to collect dependencies. -
The
lazy
option has been replaced by the oppositeimmediate
option, which defaults tofalse
. (It's ignored when using the effect signature) -
Due to the above changes, the
watch
option in Options API now behaves exactly the same as 2.x. -
When using the effect signature or
{ immediate: true }
, the initial execution is now performed synchronously instead of deferred until the component is mounted. This is necessary for certain use cases to work properly withasync setup()
and Suspense.The side effect of this is the immediate watcher invocation will no longer have access to the mounted DOM. However, the watcher can be initiated inside
onMounted
to retain previous behavior.
-
3.0.0-alpha.4 (2020-01-27)
- reactivity: Array methods relying on identity should work with raw values (aefb7d2)
- runtime-core: instance should not expose non-declared props (2884831)
- runtime-dom: should not access document in non-browser env (48152bc), closes #657
- v-model/emit: update:camelCase events should trigger kebab case equivalent (2837ce8), closes #656
- adjust
createApp
related API signatures (c07751f) - remove implicit reactive() call on renderContext (6b10f0c)
- ssr: avoid unnecessary async overhead (297282a)
-
object returned from
setup()
are no longer implicitly passed toreactive()
.The renderContext is the object returned by
setup()
(or a new object if no setup() is present). Before this change, it was implicitly passed toreactive()
for ref unwrapping. But this has the side effect of unnecessary deep reactive conversion on properties that should not be made reactive (e.g. computed return values and injected non-reactive objects), and can lead to performance issues.This change removes the
reactive()
call and instead performs a shallow ref unwrapping at the render proxy level. The breaking part is when the user returns an object with a plain property fromsetup()
, e.g.return { count: 0 }
, this property will no longer trigger updates when mutated by a in-template event handler. Instead, explicit refs are required.This also means that any objects not explicitly made reactive in
setup()
will remain non-reactive. This can be desirable when exposing heavy external stateful objects onthis
. -
createApp
API has been adjusted.createApp()
now accepts the root component, and optionally a props object to pass to the root component.app.mount()
now accepts a single argument (the root container)app.unmount()
no longer requires arguments.
New behavior looks like the following:
const app = createApp(RootComponent) app.mount('#app') app.unmount()
3.0.0-alpha.3 (2020-01-22)
- Suspense should include into dynamic children (#653) (ec63623), closes #649
- compiler-core: avoid override user keys when injecting branch key (#630) (aca2c2a)
- compiler-core: force
<svg>
into blocks for correct runtime isSVG (f2ac28b) - compiler-sfc: only transform relative asset URLs (#628) (c71ca35)
- dom: fix
<svg>
and<foreignObject>
mount and updates (4f06eeb) - runtime-core: condition for parent node check should be any different nodes (c35fea3), closes #622
- runtime-core: isSVG check should also apply for patch branch (035b656), closes #639
- runtime-core: should not warn unused attrs when accessed via setup context (751d838), closes #625
- transition: handle multiple transition classes (#638) (#645) (98d50d8)
- runtime-core: emit now returns array of return values from all triggered handlers (e81c8a3), closes #635
- runtime-core: support app.unmount(container) (#601) (04ac6c4), closes #593
3.0.0-alpha.2 (2020-01-13)
- compiler/v-on: handle multiple statements in v-on handler (close #572) (137893a)
- compiler/v-slot: handle implicit default slot mixed with named slots (2ac4b72)
- reactivity: should delete observe value (#598) (63a6563), closes #597
- runtime-core: allow classes to be passed as plugins (#588) (8f616a8)
- runtime-core: should preserve props casing when component has no declared props (bb6a346), closes #583
- runtime-core/renderer: fix v-if toggle inside blocks (2e9726e), closes #604 #607
- runtime-core/vnode: should not render boolean values in vnode children (close #574) (84dc5a6)
- types: components options should accept components defined with defineComponent (#602) (74baea1)
- watch: remove recorded effect on manual stop (#590) (453e688)
3.0.0-alpha.1 (2020-01-02)
- runtime-core: pass options to plugins (#561) (4d20981)
- sfc: treat custom block content as raw text (d6275a3)
- mounting new children (7d436ab)
- core: clone mounted hoisted vnodes on patch (47a6a84)
- fragment: perform direct remove when removing fragments (2fdb499)
- hmr: root instance reload (eda495e)
3.0.0-alpha.0 (2019-12-20)
For changes between 2.x and 3.0 up to this release, please refer to merged RFCs here.