v3.0.1

@yyx990803 yyx990803 released this Nov 3, 2017 · 116 commits to dev since this release

Fixed

  • Type compatibility with TypeScript 2.6

v3.0.0

@yyx990803 yyx990803 released this Oct 11, 2017 · 135 commits to dev since this release

Breaking Changes

This major release only breaks backwards compatibility if you use TypeScript.

  • TypeScript type declarations have been updated to be compatible with Vue core 2.5+ and no longer work with 2.4 and below.

  • All type declarations are now exported using ES-style exports, and must be imported using ES modules syntax:

    import { Store } from 'vuex'

v2.5.0

@yyx990803 yyx990803 released this Oct 11, 2017 · 138 commits to dev since this release

New

  • store.registerModule can now be called while preserving current state if the module is already registered, by passing a 3rd argument as { preserveState: true }. Useful in server-side rendering.

  • New method: store.subscribeAction() - similar to store.subscribe, but for actions instead.

  • Namespaced modules can now also register global actions using the following syntax:

    const module = {
      actions: {
        rootAction: {
          root: true,
          handler: () => {}
        } 
      }
    }
  • The createLogger function now also accepts a logger option, allowing the user to provide a custom implementation of the console object to be used when logging.

v2.4.1

@yyx990803 yyx990803 released this Sep 27, 2017 · 154 commits to dev since this release

Fixed

  • Allow installation on different copies of Vue for testing purposes
  • Fix #731 by moving auto installation code into the store constructor (#914)

v2.4.0

@yyx990803 yyx990803 released this Aug 29, 2017 · 182 commits to dev since this release

New

  • New helper method createNamespacedHelpers: a helper-generator that generates namespaced mapXXX helpers for you:

    const { mapState, mapActions } = createNamespacedHelpers('some/nested/module')
    // everything generated by mapState and mapActions are bound to the module.

    See docs for more info.

    (@riophae via #800)

Misc

  • Various typing and assertion improvements.

v2.3.0

@yyx990803 yyx990803 released this Apr 13, 2017 · 264 commits to dev since this release

  • Modules can now declare state using a function - this allows the same module definition to be reused (e.g. multiple times in the same store, or in multiple stores)

v2.2.0

@yyx990803 yyx990803 released this Feb 26, 2017 · 290 commits to dev since this release

  • Now exposes ES module build by default for webpack 2 and rollup.

v2.1.2

@yyx990803 yyx990803 released this Feb 6, 2017 · 306 commits to dev since this release

Fixed

  • #524 avoid firing unrelated watchers when calling registerModule (@ktsn)
  • #528 ensure module local state always refers to actual state (@ktsn)