Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 3.0.0 #33

Merged
merged 32 commits into from
Mar 10, 2019
Merged

Version 3.0.0 #33

merged 32 commits into from
Mar 10, 2019

Conversation

VitorLuizC
Copy link
Collaborator

@VitorLuizC VitorLuizC commented Feb 27, 2019

  • Breaking Change: Module exports a factory to create plugin instead of the plugin itself.

    import Vue from 'vue'
    import Vuex, { Store } from 'vuex'
    import createCache from 'vuex-cache'
    
    Vue.use(Vuex)
    
    const store = new Store({
      plugins: [createCache()],
      ...
    })
  • Breaking Change: store.cache.has() returns false for expired actions.

    const store = new Store({
      plugins: [createCache()],
      actions: {
        'ACTION': () => {}
      }
    })
    
    store.cache.has('ACTION')
    //=> false
    
    store.cache.dispatch('ACTION', undefined, {
      timeout: 100
    });
    
    store.cache.has('ACTION')
    //=> true
    
    setTimeout(() => {
      store.cache.has('ACTION')
      //=> false
    }, 100)

    This fixes issue #28.

  • Breaking Change: Cache is module scoped and don't support multiple instances anymore.

    This fixes an issue with cacheAction cache state different from plugin one.

  • Breaking Change: createCache need to be called before apply to Vuex's store plugins.

  • Breaking Change: Rename main source module and bundles.

    • Main module index.js is now vuex-cache.js
    • CommonJS bundle dist/vuex-cache.cjs.js is now dist/vuex-cache.js
    • ESM bundle dist/vuex-cache.es.js is now dist/vuex-cache.mjs
    • UMD bundle dist/vuex-cache.js is now dist/vuex-cache.umd.js
    • UMD minified bundle dist/vuex-cache.min.js is now dist/vuex-cache.umd.min.js
  • It now supports some of non JSON parseable values as arguments. Like functions, undefined and other values.

    This fixes issue #30.

  • It fallback dispatches to uncached if params have circular references.

    This fixes issue #29.

  • Add JSDoc comments to functions and values.

  • Rename main module, functions and variables.

  • Refactor unit tests and split them into multiple modules.

  • Upgrade dependencies and bundle settings.

  • Create type definitions for TS developers & Editor/IDE intellisense.

    This fixes issue #32.

  • Add MIT License.

  • Improve README.md docs.

    This fixes issue #21.

    • Move Map polyfill notice to Compatibility section.

      Maybe fix the cause of issue #31.

    • Improve Installation section on README.md.

    • Refactor Usage section and move it up.

    • Create API section with docs about cache methods, Payload and Timeout.

    • Remove old docs about cache methods, payload and timeout.

    • Change package.json description and keywords.

Fixes #21, #28, #29, #30, #31, #32, #35.

@VitorLuizC VitorLuizC requested a review from superwf February 27, 2019 18:49
@VitorLuizC
Copy link
Collaborator Author

@vjee can you check if this documentation changes is enough?

@VitorLuizC VitorLuizC merged commit 6ac8116 into superwf:master Mar 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation
1 participant