19 KiB
3.0.0-alpha.5 (2020-02-18)
Bug Fixes
- 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)
Code Refactoring
- watch: adjsut watch API behavior (9571ede)
Features
- 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)
Performance Improvements
- prevent renderer hot functions being inlined by minifiers (629ee75)
- reactivity: better computed tracking (#710) (8874b21)
BREAKING CHANGES
-
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 intital 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)
Bug Fixes
- 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
Code Refactoring
- adjust
createApp
related API signatures (c07751f) - remove implicit reactive() call on renderContext (6b10f0c)
Performance Improvements
- ssr: avoid unnecessary async overhead (297282a)
BREAKING CHANGES
-
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)
Bug Fixes
- 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)
Features
- 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)
Bug Fixes
- 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)
Bug Fixes
- 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)
Features
- hmr: root instance reload (eda495e)
Performance Improvements
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.