@tanstack/query-sync-storage-persister
Advanced tools
Comparing version 4.20.2 to 4.20.4
@@ -13,2 +13,3 @@ function createSyncStoragePersister({ | ||
storage.setItem(key, serialize(persistedClient)); | ||
return; | ||
} catch (error) { | ||
@@ -15,0 +16,0 @@ return error; |
@@ -17,2 +17,3 @@ 'use strict'; | ||
storage.setItem(key, serialize(persistedClient)); | ||
return; | ||
} catch (error) { | ||
@@ -19,0 +20,0 @@ return error; |
@@ -19,2 +19,3 @@ (function (global, factory) { | ||
storage.setItem(key, serialize(persistedClient)); | ||
return; | ||
} catch (error) { | ||
@@ -21,0 +22,0 @@ return error; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).QuerySyncStoragePersister={})}(this,(function(e){"use strict";function t(e,t=100){let r,n=null;return function(...i){r=i,null===n&&(n=setTimeout((()=>{e(...r),n=null}),t))}}function r(){}e.createSyncStoragePersister=function({storage:e,key:n="REACT_QUERY_OFFLINE_CACHE",throttleTime:i=1e3,serialize:o=JSON.stringify,deserialize:s=JSON.parse,retry:l}){if(void 0!==e){const r=t=>{try{e.setItem(n,o(t))}catch(e){return e}};return{persistClient:t((e=>{let t=e,n=r(t),i=0;for(;n&&t;)i++,t=null==l?void 0:l({persistedClient:t,error:n,errorCount:i}),t&&(n=r(t))}),i),restoreClient:()=>{const t=e.getItem(n);if(t)return s(t)},removeClient:()=>{e.removeItem(n)}}}return{persistClient:r,restoreClient:()=>{},removeClient:r}},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).QuerySyncStoragePersister={})}(this,(function(e){"use strict";function t(e,t=100){let r,n=null;return function(...i){r=i,null===n&&(n=setTimeout((()=>{e(...r),n=null}),t))}}function r(){}e.createSyncStoragePersister=function({storage:e,key:n="REACT_QUERY_OFFLINE_CACHE",throttleTime:i=1e3,serialize:o=JSON.stringify,deserialize:s=JSON.parse,retry:l}){if(void 0!==e){const r=t=>{try{return void e.setItem(n,o(t))}catch(e){return e}};return{persistClient:t((e=>{let t=e,n=r(t),i=0;for(;n&&t;)i++,t=null==l?void 0:l({persistedClient:t,error:n,errorCount:i}),t&&(n=r(t))}),i),restoreClient:()=>{const t=e.getItem(n);if(t)return s(t)},removeClient:()=>{e.removeItem(n)}}}return{persistClient:r,restoreClient:()=>{},removeClient:r}},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.production.js.map |
{ | ||
"name": "@tanstack/query-sync-storage-persister", | ||
"version": "4.20.2", | ||
"version": "4.20.4", | ||
"description": "A persister for synchronous storages, to be used with TanStack/Query", | ||
@@ -31,3 +31,3 @@ "author": "tannerlinsley", | ||
"dependencies": { | ||
"@tanstack/query-persist-client-core": "4.20.2" | ||
"@tanstack/query-persist-client-core": "4.20.4" | ||
}, | ||
@@ -34,0 +34,0 @@ "scripts": { |
@@ -49,2 +49,3 @@ import type { | ||
storage.setItem(key, serialize(persistedClient)) | ||
return | ||
} catch (error) { | ||
@@ -51,0 +52,0 @@ return error as Error |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
44443
567
+ Added@tanstack/query-core@4.20.4(transitive)
+ Added@tanstack/query-persist-client-core@4.20.4(transitive)
- Removed@tanstack/query-core@4.20.2(transitive)
- Removed@tanstack/query-persist-client-core@4.20.2(transitive)