Skip to content

Releases: tuax/tua-storage

v1.8.2

18 Jan 02:32
Compare
Choose a tag to compare

fix(async-storage): stringify data

v1.8.1

25 Jul 12:00
Compare
Choose a tag to compare

fix(wx): close #30, fix load with syncFn in wx(#31)

v1.8.0

03 Jul 08:40
b3f6635
Compare
Choose a tag to compare

Now you can use ESM in browser, see this demo

<!-- unpkg -->
<script type="module">
    import TuaStorage from 'https://unpkg.com/tua-storage/dist/tua-storage.esm.browser.js'

    const tuaStorage = new TuaStorage({
        storageEngine: localStorage,
    })

    tuaStorage
        .load({
            key: 'test',
            syncFn: () => Promise.resolve('test data'),
        })
        .then(console.log)
        .catch(console.error)
</script>

<!-- jsdelivr -->
<script type="module">
    import TuaStorage from 'https://cdn.jsdelivr.net/npm/tua-storage/dist/tua-storage.esm.browser.js'

    const tuaStorage = new TuaStorage({
        storageEngine: localStorage,
    })

    tuaStorage
        .load({
            key: 'test',
            syncFn: () => Promise.resolve('test data'),
        })
        .then(console.log)
        .catch(console.error)
</script>

Bug Fixes

  • fix: avoid sending request twice, avoid using key as cacheData

Enhancements

  • feat: esm in browser (#29)

v1.7.3

19 Jun 11:57
3c27bbe
Compare
Choose a tag to compare

fix: close #27, use try/catch to prevent throwing error (#28)

v1.7.2

05 May 03:58
b8e4edf
Compare
Choose a tag to compare

feat: #17 addindex.d.ts and refactor code by @ts-check (#26)

v1.7.1

23 Apr 06:20
c8d79d7
Compare
Choose a tag to compare

fix: close #24, save every responce data from api (#25)

v1.7.0

05 Mar 08:18
02cfd36
Compare
Choose a tag to compare
  • feat: close #22, add syncOptions

  • refactor(test): use async/await, map -> forEach

  • fix: replace process.env.NODE_ENV, so we can use it in the browser

https://tuateam.github.io/tua-storage/config-methods/methods.html#syncoptions-%E5%90%8C%E6%AD%A5%E5%87%BD%E6%95%B0%E9%85%8D%E7%BD%AE

v1.6.0

21 Feb 04:40
Compare
Choose a tag to compare

feat: close #19, support vue plugin (#21)

  • refactor: rename ERROR_MSG -> ERROR_MSGS, add tsconfig.json
  • style: quick-start -> guide, fix some eslint error, add some emoji

https://tuateam.github.io/tua-storage/guide/vue-plugin.html

v1.5.2

12 Feb 13:28
Compare
Choose a tag to compare
  • styles: rename dist files
    • umd.js -> TuaStorage.umd.js
    • es.js -> TuaStorage.es.js
  • chore: upgrade deps

v1.5.1

13 Nov 02:27
be260ba
Compare
Choose a tag to compare

fix: close #10, fix log in _getSEMethods (#11)