diff --git a/client/store/index.js b/client/store/index.js index b9974fa4..e9e73ce9 100644 --- a/client/store/index.js +++ b/client/store/index.js @@ -1,5 +1,6 @@ import { createStore } from 'vuex'; -import createPersistedState from 'vuex-persistedstate'; +//import createPersistedState from 'vuex-persistedstate'; +import VuexPersistence from 'vuex-persist'; import root from './root.js'; import uistate from './modules/uistate'; @@ -8,6 +9,8 @@ import reader from './modules/reader'; const debug = process.env.NODE_ENV !== 'production'; +const vuexLocal = new VuexPersistence(); + export default createStore(Object.assign({}, root, { modules: { uistate, @@ -15,5 +18,5 @@ export default createStore(Object.assign({}, root, { reader, }, strict: debug, - plugins: [createPersistedState()] + plugins: [vuexLocal.plugin] })); diff --git a/package-lock.json b/package-lock.json index 1d671221..b21ee62d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "vue": "^3.2.37", "vue-router": "^4.1.2", "vuex": "^4.0.2", - "vuex-persistedstate": "^4.1.0", + "vuex-persist": "^3.1.3", "webdav": "^4.10.0", "ws": "^8.8.1", "zip-stream": "^4.1.0" @@ -4843,8 +4843,7 @@ "node_modules/flatted": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", - "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", - "dev": true + "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==" }, "node_modules/follow-redirects": { "version": "1.15.1", @@ -8527,12 +8526,6 @@ "node": ">=8" } }, - "node_modules/shvl": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/shvl/-/shvl-2.0.3.tgz", - "integrity": "sha512-V7C6S9Hlol6SzOJPnQ7qzOVEWUQImt3BNmmzh40wObhla3XOYMe4gGiYzLrJd5TFa+cI2f9LKIRJTTKZSTbWgw==", - "deprecated": "older versions vulnerable to prototype pollution" - }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -9562,17 +9555,16 @@ "vue": "^3.0.2" } }, - "node_modules/vuex-persistedstate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/vuex-persistedstate/-/vuex-persistedstate-4.1.0.tgz", - "integrity": "sha512-3SkEj4NqwM69ikJdFVw6gObeB0NHyspRYMYkR/EbhR0hbvAKyR5gksVhtAfY1UYuWUOCCA0QNGwv9pOwdj+XUQ==", - "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "node_modules/vuex-persist": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vuex-persist/-/vuex-persist-3.1.3.tgz", + "integrity": "sha512-QWOpP4SxmJDC5Y1+0+Yl/F4n7z27syd1St/oP+IYCGe0X0GFio0Zan6kngZFufdIhJm+5dFGDo3VG5kdkCGeRQ==", "dependencies": { "deepmerge": "^4.2.2", - "shvl": "^2.0.3" + "flatted": "^3.0.5" }, "peerDependencies": { - "vuex": "^3.0 || ^4.0.0-rc" + "vuex": ">=2.5" } }, "node_modules/watchpack": { @@ -14022,8 +14014,7 @@ "flatted": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", - "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", - "dev": true + "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==" }, "follow-redirects": { "version": "1.15.1", @@ -16672,11 +16663,6 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "shvl": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/shvl/-/shvl-2.0.3.tgz", - "integrity": "sha512-V7C6S9Hlol6SzOJPnQ7qzOVEWUQImt3BNmmzh40wObhla3XOYMe4gGiYzLrJd5TFa+cI2f9LKIRJTTKZSTbWgw==" - }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -17439,13 +17425,13 @@ "@vue/devtools-api": "^6.0.0-beta.11" } }, - "vuex-persistedstate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/vuex-persistedstate/-/vuex-persistedstate-4.1.0.tgz", - "integrity": "sha512-3SkEj4NqwM69ikJdFVw6gObeB0NHyspRYMYkR/EbhR0hbvAKyR5gksVhtAfY1UYuWUOCCA0QNGwv9pOwdj+XUQ==", + "vuex-persist": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vuex-persist/-/vuex-persist-3.1.3.tgz", + "integrity": "sha512-QWOpP4SxmJDC5Y1+0+Yl/F4n7z27syd1St/oP+IYCGe0X0GFio0Zan6kngZFufdIhJm+5dFGDo3VG5kdkCGeRQ==", "requires": { "deepmerge": "^4.2.2", - "shvl": "^2.0.3" + "flatted": "^3.0.5" } }, "watchpack": { diff --git a/package.json b/package.json index 13988a34..1bac6077 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "vue": "^3.2.37", "vue-router": "^4.1.2", "vuex": "^4.0.2", - "vuex-persistedstate": "^4.1.0", + "vuex-persist": "^3.1.3", "webdav": "^4.10.0", "ws": "^8.8.1", "zip-stream": "^4.1.0"