Skip to content

cache-persist@2.0.0 & Others

Compare
Choose a tag to compare
@morrys morrys released this 06 Oct 19:26
· 248 commits to master since this release
  • Release

    • @wora/apollo-cache@1.0.0
    • @wora/apollo-offline@1.0.0
    • @wora/cache-persist@2.0.0
    • @wora/redux@1.0.0
    • @wora/relay-offline@1.0.2
    • @wora/relay-store@1.0.0
  • Improved

    • wora/redux: modified the redux library to natively manage persistence and reduce the size of the bundle
    • wora/cache-persist
      • possibility of using any storage synchronously with the read and write performance that you have with javascript objects (queue debounce merge and the invocations of multiSet and multiRemove)
      • use react-native-community/async-storage and eliminate the dependency from the AsyncStorage of react-native
      • compatibility with storage created for redux
      • fix typo
      • improved handling of the disablePersist
      • manage set, remove. delete through queue
      • test with jest
      • #11 (comment)
    • wora/relay-store
      • updated wora/cache-persist dependency
      • moved the creation of the recordsource out of the store
      • eslint
    • wora/apollo-cache
      • updated wora/ cache-persist dependency
      • eslint
  • wora/offline-first

    • updated wora/cache-persist dependency
    • eslint
  • wora/relay-offline

    • updated wora/cache-persist dependency
    • updated wora/offline-first dependency
    • updated wora/relay-store dependency
  • wora/apollo-offline

    • updated wora/cache-persist dependency
    • updated wora/offline-first dependency
    • updated wora/apollo-cache dependency
  • Breaking Change

    • wora/cache-persist

      • changed types
      • set, remove, delete, purge & replace methods are no longer of the promise, now they are all synchronous
    • modified the parameters of the subscribe and notify functions

    • wora/relay-store

before

import { Store } from '@wora/relay-store';
const defaultTTL: number = 10 * 60 * 1000, 
const persistOptions: CacheOptions = {}; 
const persistOptionsRecords: CacheOptions = {}; 
const store = new Store(defaultTTL, persistOptions, persistOptionsRecords);

after

import { RecordSource, Store } from '@wora/relay-store';
import { CacheOptions } from "@wora/cache-persist";
const persistOptions: CacheOptions = {
    defaultTTL
}; 
const persistOptionsRecords: CacheOptions = {}; 
const recordSource = new RecordSource(persistOptionsRecords);
const store = new Store(recordSource, persistOptions);
  • wora/relay-offline
    • modified EnvironmentIDB.create signature