Skip to content

Releases: vuejs/vue

v2.5.0 Level E

13 Oct 03:08
Compare
Choose a tag to compare

Features & Improvements

Error Handling and Reporting

  • improve error handling with new errorCaptured hook b3cd9bc [Details]
  • improve template expression error message e38d006, closes #6771
  • improve option type checks b7105ae

TypeScript Declaration Improvements

Functional Components

  • compiled templates for functional component support ea0d227

  • scoped CSS support for functional components 050bb33

    These features require vue-loader>=13.3.0. Thanks to the work by @blake-newman. [Details]

Server Side Rendering

  • renderToString now returns a Promise if no callback is passed f881dd1, closes #6160
  • add shouldPrefetch option (same signature as shouldPreload) 7bc899c, closes #5964
  • auto-remove initial state embed script if in production (#6763) 2d32b5d, closes #6761
  • now ships an environment-agnostic build of the server renderer in vue-server-renderer/basic.js c5d0fa0 [Details]

v-model

v-on

Scoped Slots

Provide/Inject

<keep-alive>

  • add max prop for <keep-alive> for limiting max number of instances cached 2cba6d4

Other Improvements

  • config.ignoredElements can now contain RegExp in addition to strings (#6769) 795b908
  • data function is now called with the vm instance as the first argument (#6760) 3a5432a
  • vue-template-compiler now ships an environment-agnostic build which can be used directly in browsers in vue-template-compiler/browser.js a5e5b31

Bug Fixes

  • compiler: warn when inline-template component has no children (fix #6703) (#6715) baabd6d, closes #6703 #6715
  • core: avoid observing VNodes 4459b87, closes #6610
  • ref: preserve ref on components after removing root element (#6718) 6ad44e1, closes #6632 #6641
  • handle errors in errorHandler 2b5c83a, closes #6714
  • ssr: fix hydration mismatch with adjacent text node from slots b080a14, closes vuejs/vue-loader#974
  • add slot v-bind warning (#6736) 514b90b, closes #6677
  • allow an object's Symbols to be observed (#6704) 4fd2ce8
  • fix scoped CSS for nested nodes in functional components 4216588
  • ssr: handle inline template compilation error dff85b2, closes #6766
  • perperly handle v-if on scoped slot 68bdbf5, closes #6725
  • prevent memory leak due to circular reference in vnodes 405d8e9, closes #6759
  • properly render value on in IE/Edge c64f9ae, closes #6666
  • resolve async component default for native dynamic import 2876ed8, closes #6751
  • use correct namespace inside as root node cf1ff5b, closes #6642
  • use MessageChannel for nextTick 6e41679, closes #6566 #6690
  • work around old Chrome bug 0f2cb09, closes #6601
  • Internals

    We have changed the implementation of Vue.nextTick to fix a few bugs (related to #6566, #6690). The change involves using a macro task instead of a micro task to defer DOM updates when inside a DOM event handler attached via v-on. This means any Vue updates triggered by state changes inside v-on handlers will be now deferred using a macro task. This may lead to changes in behavior when dealing with native DOM events.

    For more details regarding micro/macro tasks, see this blog post.

    For the new implementation, see source code for nextTick.

v2.4.4

14 Sep 15:33
Compare
Choose a tag to compare

Bug Fixes

  • ssr: fix bundleRenderer Promise rejection regression 0c9534f
  • ssr: fix style injection regression a2f73f2, closes #6603 #6353

v2.4.3

13 Sep 08:00
Compare
Choose a tag to compare

Bug Fixes

  • directive: should invoke unbind & inserted on inner component root element change 538ad20, closes #6513
  • inject: exclude not enumerable keys of inject object (#6346) 3ee62fd, closes #6574
  • provide: provide should default to parentVal during merging (#6473) 3c21675, closes #6436
  • ssr: address possible xss vector 5091e2c
  • vdom: avoid diff de-opt when both head/tail are different 230c6ae, closes #6502
  • $off should ignore undefined handler argument fa6a729, closes #6591
  • ssr: better handle v-html hydration 0f00f8f, closes #6519
  • ssr: expose context.styles when no lifecycle styles are injected 1f52a2a, closes #6353
  • ssr: fix cachedEscape memory issue 02f8b80, closes #6332
  • ssr: handle v-text/v-html with non-string value 09106f0, closes #6572
  • ssr: should also escape static text content 172dbf9, closes #6345
  • transition: consider async placeholder as valid child to return (#6369) a43d667, closes #6256
  • types: add inject option in functional component options type (#6530) 1baa0a7
  • types: allow variadic plugin use (#6363) 38d5218, closes #6357
  • v-model: Allow using array value with array v-model in checkboxes (#6220) d6e6f1d, closes #6219
  • v-model: avoid unnecessary change event on select options change d4d553c, closes #6193
  • v-model: fix input listener with modifier blocking v-model update 6f312d6, closes #6552
  • vdom: Don't replace input for text-like type change (#6344) f76d16e, closes #6313
  • computed properties should not be cached during SSR 06741f3
  • deep clone slot vnodes on re-render 0529040, closes #6372
  • do not use MutationObserver in IE11 844a540, closes #6466
  • ensure $attrs and $listeners are always objects (#6441) 59dbd4a, closes #6263
  • ensure outer bindings on nested HOC are properly re-applied on inner root element change a744497
  • handle special case for allowfullscreen on d77b953, closes #6202
  • inherit SVG ns on component root node (#6511) 89f0d29, closes #6506
  • preserve slot attribute if not resolved by Vue 684cd7d, closes #6553
  • set value as domProp for 7116af4, closes #6561
  • support prop type checking for primitive wrapper objects (#6450) 679cd1f, closes #6447

v2.4.2

21 Jul 04:29
Compare
Choose a tag to compare

Bug Fixes

  • v-on: revert component root data.on/data.nativeOn behavior for 1713061, closes #6109
  • checkbox v-model="array" ignore false-value (#6180) 3d14e85, closes #6178
  • compile: properly generate comments with special character (#6156) d03fa26, closes #6150
  • parser: only ignore the first newline in <pre> 082fc39, closes #6146
  • provide/inject: merge provide properly from mixins 3036551, closes #6175
  • provide/inject: resolve inject properly from mixins (#6107) b0f00e3, closes #6093
  • transition: should trigger transition hooks for v-show in ie9 9b4dbba, closes #5525
  • v-bind: respect .prop modifier on components (#6159) 06b9b0b
  • v-model: use stricter check for <select> option update c70addf, closes #6112
  • ensure looseEqual is not dependant on key enumeration order a8ac129, closes #5908
  • include boolean in isPrimitive check (#6127) be3dc9c, closes #6126
  • work around IE/Edge bug when accessing document.activeElement from iframe fc3d7cd, closes #6157

Improvements

  • warn when assigning to computed property with no setter eb9168c, closes #6078

Reverts

  • perf: remove src directory from npm module (#6072) ec4b1be

v2.4.1

13 Jul 06:48
Compare
Choose a tag to compare
  • Fixed postinstall script error when installing Vue from npm.

v2.4.0 Kill la Kill

13 Jul 06:02
Compare
Choose a tag to compare

"Fear is freedom! Subjugation is liberation! Contradiction is truth!"

Features

  • Full SSR + async component support in core: SSR now supports rendering async components used anywhere and the client also supports async components during the hydration phase. This means async components / code-splitting now just works during SSR and is no longer limited at the route level. (9cf6646 & 7404091)

  • Easier creation of wrapper components: (6118759)

    • New component option: inheritAttrs. Turns off the default behavior where
      parent scope non-prop bindings are automatically inherited on component root
      as attributes.

    • New instance properties: $attrs & $listeners. $attrs contains the parent-scope attribute bindings that were not recognized as props, and $listeners contains the v-on listeners registered in the parent scope (without the .native modifier). These are essentially aliases of $vnode.data.attrs and $vnode.data.on, but are reactive.

    Combining these allows us to simplify a component like this down into this:

    <div>
      <input v-bind="$attrs" v-on="$listeners">
    </div>

    Based on discussion in #5983.

  • v-on: support v-on object syntax with no arguments. This pairs well with the new $listeners instance property when creating higher-order components. Note this syntax does not support modifiers. (11614d6)

  • Now auto-resolves ES module default export when resolving async components. This enables keeping using the simpler const Foo = () => import('./Foo.vue') syntax when declaring async components with the changes introduced in [email protected]. (0cd6ef3)

  • support .sync modifier for v-bind="object" (#5943) (3965e50), closes #5937

  • keep-alive: support Array for include and exclude (#5956) (51c595a)

  • weex: implement "weex.supports" api to support feature detection (#6053) (b1512d8)

  • vm.$watch now also supports using the same object format supported by the watch component option: { handler: () => {}, deep: true } (#5645) (5aac170)

  • types: add types for vue-server-renderer (#5775) (e6de9a5)

  • Vue.config.errorHandler now also captures errors thrown in custom event handlers (#5709) (11b7d5d)

  • add new config option Vue.config.warnHandler for defining a custom callback for runtime warnings. This only works in the development build. (#5883) (9881b40)

  • add comments option to allow preserving comments in template (#5951) (e4da249), closes #5392

Performance Improvements

  • ssr: vue-template-compiler now has two new SSR-specific compile methods that generates SSR-specific render function code by optimizing parts of the template into string concatenation. This improves raw SSR render performance by 2~8x depending on how much of the template can be optimized. Note this will have a much smaller impact on requests per second for a real app because raw render performance is only a small portion of the overall time spent in a request.

    This is enabled by default in vue-loader@>=12 and can be disabled using the optimizeSSR option.

  • remove src directory from npm module, which should reduce download size when installing from npm. (#6072) (e761573)

Bug Fixes

  • check enterToClass/leaveToClass existence before adding it (#5912) (34d8c79)
  • ensure cleanup in watcher.get (#5988) (f6cd44c), closes #5975
  • improve Vue.set/Vue.delete API to support multi type of array index (#5973) (eea0920)
  • multiple merged vnode hooks not invoked properly (91deb4f), closes #6076
  • v-model: should generate component-specific code for tags with "is" attribute (a1d1145), closes #6066
  • prefetch should not have as attribute (#5683) (ebca266)
  • core: add merge strategy for provide option (#6025) (306997e), closes #6008
  • support plugin with multi version vue (#5985) (049f317), closes #5970
  • core: should preserve reactivity-ness of injected objects (8d66691), closes #5913
  • parser: the first newline following pre and textarea tag should be ignored (#6022) (4d68079)
  • ref: refactor function registerRef (#6039) (254d85c), closes #5997
  • ssr: fix bundleRenderer mapped async chunks caching check (#5963) (de42186)
  • ssr: reference error when create $ssrContext for root component (#5981) (5581654), closes #5941
  • transition group should work with dynamic name (#6006) (#6019) (d8d4ca6)
  • v-model: fix input change check for type="number" (0a9aab5), closes #6069
  • v-model: use consistent behavior during IME composition for other text-like input types (fix #5902) (4acc8c8)
  • v-bind object should not override props on scopedSlots (#5995) (458030a)
  • fix out-in transition for async components (#5760) (c3cdfcf)
  • fix memory leak by preventing data.pendingInsert from keeping reference to removed nodes (#5839) (4733408)
  • reduce memory usage by avoiding keeping reference to old vdom tree after patch (#5851) (07a3726)
  • fix XHTML compatibility (#5852) (69f946b)
  • Merge inject option when extending a component (#5827) (080c387)
  • support string index when using Vue.set on Array (#5889) (8a2c514)
  • ignore reserved attributes (is, ref, ...) in v-bind object syntax (#5881) (d33c125)
  • fix slot resolved incorrect with abstract component (#5888) (213f136)

v2.3.4

08 Jun 04:55
Compare
Choose a tag to compare

Fixed

  • #5839 fix memory leak caused by reference to removed vnodes on data.pendingInsert

v2.3.3

09 May 17:01
Compare
Choose a tag to compare

Fixed

  • #5586 fix unecessary input trigger with v-model on change event (@posva via #5589)
  • #5591 ssr template interpolation should be whitespace-insensitive (@HerringtonDarkholme via ##5597)
  • #5592 fix regression where text nodes are merged into comment placeholder nodes (@maggiehe via #5593)
  • #5610 fix Vue.use not chainable when plugin has already been installed, also makes Vue.mixin chainable. (@lzxb via #5610)
  • #5615 fix scoped slots when used together with v-for
  • #5618 fix slot elements after v-for being unnecessarily recreated (@gebilaoxiong via #5627)
  • #5633 fix comment nodes not cloned properly (@pengchongfu via #5633)
  • #5635 fix async components timeout triggered when already resolved

v2.3.2

02 May 10:32
Compare
Choose a tag to compare
  • Components can now access the SSR context as this.$ssrContext
  • Internal improvements for handling functional *.vue components style SSR injections

v2.3.1

02 May 07:59
Compare
Choose a tag to compare

Fixed

  • #5536 fix regression when render function returns null (@gebilaoxiong via #5539)
  • #5540 vue-server-renderer/server-plugin: ensure assets are unique (@pi0 via #5540)
  • #5553 vue-server-renderer/server-plugin: avoid swallowing webpack error when entry is not found
  • #5559 vue-server-renderer: with runInNewContext: false, the bundle is now indeed executed in the same context. The 2.3.0 behavior is still available behind a new option value runInNewContext: 'once'. See docs for more details.