@tanstack/query-async-storage-persister 5.103.2 → 5.104.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,6 @@ interface AsyncThrottleOptions {
3
3
  interval?: number;
4
4
  onError?: (error: unknown) => void;
5
5
  }
6
- declare function asyncThrottle<TArgs extends ReadonlyArray<unknown>>(func: (...args: TArgs) => Promise<void>, { interval, onError }?: AsyncThrottleOptions): (...args: TArgs) => Promise<void>;
6
+ export declare function asyncThrottle<TArgs extends ReadonlyArray<unknown>>(func: (...args: TArgs) => Promise<void>, { interval, onError }?: AsyncThrottleOptions): (...args: TArgs) => Promise<void>;
7
7
  //#endregion
8
- export { asyncThrottle };
9
8
  //# sourceMappingURL=asyncThrottle.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"asyncThrottle.d.cts","names":[],"sources":["../../src/asyncThrottle.ts"],"mappings":";UAGU;EACR;EACA,WAAW;;iBAGG,cAAc,cAAc,wBAC1C,UAAU,MAAM,UAAU,iBACxB,UAAiB,YAAkB,2BASpB,MAAM,UAAK"}
1
+ {"version":3,"file":"asyncThrottle.d.cts","names":[],"sources":["../../src/asyncThrottle.ts"],"mappings":";UAGU;EACR;EACA,WAAW;;wBAGG,cAAc,cAAc,wBAC1C,UAAU,MAAM,UAAU,iBACxB,UAAiB,YAAkB,2BASpB,MAAM,UAAK"}
@@ -3,7 +3,6 @@ interface AsyncThrottleOptions {
3
3
  interval?: number;
4
4
  onError?: (error: unknown) => void;
5
5
  }
6
- declare function asyncThrottle<TArgs extends ReadonlyArray<unknown>>(func: (...args: TArgs) => Promise<void>, { interval, onError }?: AsyncThrottleOptions): (...args: TArgs) => Promise<void>;
6
+ export declare function asyncThrottle<TArgs extends ReadonlyArray<unknown>>(func: (...args: TArgs) => Promise<void>, { interval, onError }?: AsyncThrottleOptions): (...args: TArgs) => Promise<void>;
7
7
  //#endregion
8
- export { asyncThrottle };
9
8
  //# sourceMappingURL=asyncThrottle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"asyncThrottle.d.ts","names":[],"sources":["../../src/asyncThrottle.ts"],"mappings":";UAGU;EACR;EACA,WAAW;;iBAGG,cAAc,cAAc,wBAC1C,UAAU,MAAM,UAAU,iBACxB,UAAiB,YAAkB,2BASpB,MAAM,UAAK"}
1
+ {"version":3,"file":"asyncThrottle.d.ts","names":[],"sources":["../../src/asyncThrottle.ts"],"mappings":";UAGU;EACR;EACA,WAAW;;wBAGG,cAAc,cAAc,wBAC1C,UAAU,MAAM,UAAU,iBACxB,UAAiB,YAAkB,2BASpB,MAAM,UAAK"}
@@ -1,6 +1,6 @@
1
1
  import { AsyncStorage, MaybePromise, PersistedClient, Persister, Promisable } from "@tanstack/query-persist-client-core";
2
2
  //#region src/index.d.ts
3
- type AsyncPersistRetryer = (props: {
3
+ export type AsyncPersistRetryer = (props: {
4
4
  persistedClient: PersistedClient;
5
5
  error: Error;
6
6
  errorCount: number;
@@ -28,7 +28,6 @@ interface CreateAsyncStoragePersisterOptions {
28
28
  deserialize?: (cachedString: string) => MaybePromise<PersistedClient>;
29
29
  retry?: AsyncPersistRetryer;
30
30
  }
31
- declare const createAsyncStoragePersister: ({ storage, key, throttleTime, serialize, deserialize, retry }: CreateAsyncStoragePersisterOptions) => Persister;
31
+ export declare const createAsyncStoragePersister: ({ storage, key, throttleTime, serialize, deserialize, retry }: CreateAsyncStoragePersisterOptions) => Persister;
32
32
  //#endregion
33
- export { AsyncPersistRetryer, createAsyncStoragePersister };
34
33
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/index.ts"],"mappings":";;KAUY,uBAAuB;EACjC,iBAAiB;EACjB,OAAO;EACP;MACI,WAAW;UAEP;;;;;EAKR,SAAS;;EAET;;;EAGA;;;;;EAKA,aAAa,QAAQ,oBAAoB;;;;;EAKzC,eAAe,yBAAyB,aAAa;EAErD,QAAQ;;cAGG,gCAA+B,SAAA,KAAA,cAAA,WAAA,aAAA,SAOzC,uCAAqC"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/index.ts"],"mappings":";;YAUY,uBAAuB;EACjC,iBAAiB;EACjB,OAAO;EACP;MACI,WAAW;UAEP;;;;;EAKR,SAAS;;EAET;;;EAGA;;;;;EAKA,aAAa,QAAQ,oBAAoB;;;;;EAKzC,eAAe,yBAAyB,aAAa;EAErD,QAAQ;;qBAGG,gCAA+B,SAAA,KAAA,cAAA,WAAA,aAAA,SAOzC,uCAAqC"}
@@ -1,6 +1,6 @@
1
1
  import { AsyncStorage, MaybePromise, PersistedClient, Persister, Promisable } from "@tanstack/query-persist-client-core";
2
2
  //#region src/index.d.ts
3
- type AsyncPersistRetryer = (props: {
3
+ export type AsyncPersistRetryer = (props: {
4
4
  persistedClient: PersistedClient;
5
5
  error: Error;
6
6
  errorCount: number;
@@ -28,7 +28,6 @@ interface CreateAsyncStoragePersisterOptions {
28
28
  deserialize?: (cachedString: string) => MaybePromise<PersistedClient>;
29
29
  retry?: AsyncPersistRetryer;
30
30
  }
31
- declare const createAsyncStoragePersister: ({ storage, key, throttleTime, serialize, deserialize, retry }: CreateAsyncStoragePersisterOptions) => Persister;
31
+ export declare const createAsyncStoragePersister: ({ storage, key, throttleTime, serialize, deserialize, retry }: CreateAsyncStoragePersisterOptions) => Persister;
32
32
  //#endregion
33
- export { AsyncPersistRetryer, createAsyncStoragePersister };
34
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;KAUY,uBAAuB;EACjC,iBAAiB;EACjB,OAAO;EACP;MACI,WAAW;UAEP;;;;;EAKR,SAAS;;EAET;;;EAGA;;;;;EAKA,aAAa,QAAQ,oBAAoB;;;;;EAKzC,eAAe,yBAAyB,aAAa;EAErD,QAAQ;;cAGG,gCAA+B,SAAA,KAAA,cAAA,WAAA,aAAA,SAOzC,uCAAqC"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;YAUY,uBAAuB;EACjC,iBAAiB;EACjB,OAAO;EACP;MACI,WAAW;UAEP;;;;;EAKR,SAAS;;EAET;;;EAGA;;;;;EAKA,aAAa,QAAQ,oBAAoB;;;;;EAKzC,eAAe,yBAAyB,aAAa;EAErD,QAAQ;;qBAGG,gCAA+B,SAAA,KAAA,cAAA,WAAA,aAAA,SAOzC,uCAAqC"}
@@ -1,6 +1,5 @@
1
1
  //#region src/utils.d.ts
2
- declare function noop(): void;
3
- declare function noop(): undefined;
2
+ export declare function noop(): void;
3
+ export declare function noop(): undefined;
4
4
  //#endregion
5
- export { noop };
6
5
  //# sourceMappingURL=utils.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.cts","names":[],"sources":["../../src/utils.ts"],"mappings":";iBAAgB;iBACA"}
1
+ {"version":3,"file":"utils.d.cts","names":[],"sources":["../../src/utils.ts"],"mappings":";wBAAgB;wBACA"}
@@ -1,6 +1,5 @@
1
1
  //#region src/utils.d.ts
2
- declare function noop(): void;
3
- declare function noop(): undefined;
2
+ export declare function noop(): void;
3
+ export declare function noop(): undefined;
4
4
  //#endregion
5
- export { noop };
6
5
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/utils.ts"],"mappings":";iBAAgB;iBACA"}
1
+ {"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/utils.ts"],"mappings":";wBAAgB;wBACA"}
@@ -3,7 +3,6 @@ interface AsyncThrottleOptions {
3
3
  interval?: number;
4
4
  onError?: (error: unknown) => void;
5
5
  }
6
- declare function asyncThrottle<TArgs extends ReadonlyArray<unknown>>(func: (...args: TArgs) => Promise<void>, { interval, onError }?: AsyncThrottleOptions): (...args: TArgs) => Promise<void>;
6
+ export declare function asyncThrottle<TArgs extends ReadonlyArray<unknown>>(func: (...args: TArgs) => Promise<void>, { interval, onError }?: AsyncThrottleOptions): (...args: TArgs) => Promise<void>;
7
7
  //#endregion
8
- export { asyncThrottle };
9
8
  //# sourceMappingURL=asyncThrottle.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"asyncThrottle.d.cts","names":[],"sources":["../../src/asyncThrottle.ts"],"mappings":";UAGU;EACR;EACA,WAAW;;iBAGG,cAAc,cAAc,wBAC1C,UAAU,MAAM,UAAU,iBACxB,UAAiB,YAAkB,2BASpB,MAAM,UAAK"}
1
+ {"version":3,"file":"asyncThrottle.d.cts","names":[],"sources":["../../src/asyncThrottle.ts"],"mappings":";UAGU;EACR;EACA,WAAW;;wBAGG,cAAc,cAAc,wBAC1C,UAAU,MAAM,UAAU,iBACxB,UAAiB,YAAkB,2BASpB,MAAM,UAAK"}
@@ -3,7 +3,6 @@ interface AsyncThrottleOptions {
3
3
  interval?: number;
4
4
  onError?: (error: unknown) => void;
5
5
  }
6
- declare function asyncThrottle<TArgs extends ReadonlyArray<unknown>>(func: (...args: TArgs) => Promise<void>, { interval, onError }?: AsyncThrottleOptions): (...args: TArgs) => Promise<void>;
6
+ export declare function asyncThrottle<TArgs extends ReadonlyArray<unknown>>(func: (...args: TArgs) => Promise<void>, { interval, onError }?: AsyncThrottleOptions): (...args: TArgs) => Promise<void>;
7
7
  //#endregion
8
- export { asyncThrottle };
9
8
  //# sourceMappingURL=asyncThrottle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"asyncThrottle.d.ts","names":[],"sources":["../../src/asyncThrottle.ts"],"mappings":";UAGU;EACR;EACA,WAAW;;iBAGG,cAAc,cAAc,wBAC1C,UAAU,MAAM,UAAU,iBACxB,UAAiB,YAAkB,2BASpB,MAAM,UAAK"}
1
+ {"version":3,"file":"asyncThrottle.d.ts","names":[],"sources":["../../src/asyncThrottle.ts"],"mappings":";UAGU;EACR;EACA,WAAW;;wBAGG,cAAc,cAAc,wBAC1C,UAAU,MAAM,UAAU,iBACxB,UAAiB,YAAkB,2BASpB,MAAM,UAAK"}
@@ -1,6 +1,6 @@
1
1
  import { AsyncStorage, MaybePromise, PersistedClient, Persister, Promisable } from "@tanstack/query-persist-client-core";
2
2
  //#region src/index.d.ts
3
- type AsyncPersistRetryer = (props: {
3
+ export type AsyncPersistRetryer = (props: {
4
4
  persistedClient: PersistedClient;
5
5
  error: Error;
6
6
  errorCount: number;
@@ -28,7 +28,6 @@ interface CreateAsyncStoragePersisterOptions {
28
28
  deserialize?: (cachedString: string) => MaybePromise<PersistedClient>;
29
29
  retry?: AsyncPersistRetryer;
30
30
  }
31
- declare const createAsyncStoragePersister: ({ storage, key, throttleTime, serialize, deserialize, retry }: CreateAsyncStoragePersisterOptions) => Persister;
31
+ export declare const createAsyncStoragePersister: ({ storage, key, throttleTime, serialize, deserialize, retry }: CreateAsyncStoragePersisterOptions) => Persister;
32
32
  //#endregion
33
- export { AsyncPersistRetryer, createAsyncStoragePersister };
34
33
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/index.ts"],"mappings":";;KAUY,uBAAuB;EACjC,iBAAiB;EACjB,OAAO;EACP;MACI,WAAW;UAEP;;;;;EAKR,SAAS;;EAET;;;EAGA;;;;;EAKA,aAAa,QAAQ,oBAAoB;;;;;EAKzC,eAAe,yBAAyB,aAAa;EAErD,QAAQ;;cAGG,gCAA+B,SAAA,KAAA,cAAA,WAAA,aAAA,SAOzC,uCAAqC"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/index.ts"],"mappings":";;YAUY,uBAAuB;EACjC,iBAAiB;EACjB,OAAO;EACP;MACI,WAAW;UAEP;;;;;EAKR,SAAS;;EAET;;;EAGA;;;;;EAKA,aAAa,QAAQ,oBAAoB;;;;;EAKzC,eAAe,yBAAyB,aAAa;EAErD,QAAQ;;qBAGG,gCAA+B,SAAA,KAAA,cAAA,WAAA,aAAA,SAOzC,uCAAqC"}
@@ -1,6 +1,6 @@
1
1
  import { AsyncStorage, MaybePromise, PersistedClient, Persister, Promisable } from "@tanstack/query-persist-client-core";
2
2
  //#region src/index.d.ts
3
- type AsyncPersistRetryer = (props: {
3
+ export type AsyncPersistRetryer = (props: {
4
4
  persistedClient: PersistedClient;
5
5
  error: Error;
6
6
  errorCount: number;
@@ -28,7 +28,6 @@ interface CreateAsyncStoragePersisterOptions {
28
28
  deserialize?: (cachedString: string) => MaybePromise<PersistedClient>;
29
29
  retry?: AsyncPersistRetryer;
30
30
  }
31
- declare const createAsyncStoragePersister: ({ storage, key, throttleTime, serialize, deserialize, retry }: CreateAsyncStoragePersisterOptions) => Persister;
31
+ export declare const createAsyncStoragePersister: ({ storage, key, throttleTime, serialize, deserialize, retry }: CreateAsyncStoragePersisterOptions) => Persister;
32
32
  //#endregion
33
- export { AsyncPersistRetryer, createAsyncStoragePersister };
34
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;KAUY,uBAAuB;EACjC,iBAAiB;EACjB,OAAO;EACP;MACI,WAAW;UAEP;;;;;EAKR,SAAS;;EAET;;;EAGA;;;;;EAKA,aAAa,QAAQ,oBAAoB;;;;;EAKzC,eAAe,yBAAyB,aAAa;EAErD,QAAQ;;cAGG,gCAA+B,SAAA,KAAA,cAAA,WAAA,aAAA,SAOzC,uCAAqC"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;YAUY,uBAAuB;EACjC,iBAAiB;EACjB,OAAO;EACP;MACI,WAAW;UAEP;;;;;EAKR,SAAS;;EAET;;;EAGA;;;;;EAKA,aAAa,QAAQ,oBAAoB;;;;;EAKzC,eAAe,yBAAyB,aAAa;EAErD,QAAQ;;qBAGG,gCAA+B,SAAA,KAAA,cAAA,WAAA,aAAA,SAOzC,uCAAqC"}
@@ -1,6 +1,5 @@
1
1
  //#region src/utils.d.ts
2
- declare function noop(): void;
3
- declare function noop(): undefined;
2
+ export declare function noop(): void;
3
+ export declare function noop(): undefined;
4
4
  //#endregion
5
- export { noop };
6
5
  //# sourceMappingURL=utils.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.cts","names":[],"sources":["../../src/utils.ts"],"mappings":";iBAAgB;iBACA"}
1
+ {"version":3,"file":"utils.d.cts","names":[],"sources":["../../src/utils.ts"],"mappings":";wBAAgB;wBACA"}
@@ -1,6 +1,5 @@
1
1
  //#region src/utils.d.ts
2
- declare function noop(): void;
3
- declare function noop(): undefined;
2
+ export declare function noop(): void;
3
+ export declare function noop(): undefined;
4
4
  //#endregion
5
- export { noop };
6
5
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/utils.ts"],"mappings":";iBAAgB;iBACA"}
1
+ {"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/utils.ts"],"mappings":";wBAAgB;wBACA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/query-async-storage-persister",
3
- "version": "5.103.2",
3
+ "version": "5.104.0",
4
4
  "description": "A persister for asynchronous storages, to be used with TanStack/Query",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -40,12 +40,12 @@
40
40
  "!src/__tests__"
41
41
  ],
42
42
  "dependencies": {
43
- "@tanstack/query-core": "5.103.2",
44
- "@tanstack/query-persist-client-core": "5.103.2"
43
+ "@tanstack/query-core": "5.104.0",
44
+ "@tanstack/query-persist-client-core": "5.104.0"
45
45
  },
46
46
  "devDependencies": {
47
- "npm-run-all2": "^5.0.0",
48
- "@tanstack/query-test-utils": "0.0.0"
47
+ "@tanstack/query-test-utils": "0.0.0",
48
+ "npm-run-all2": "^9.0.3"
49
49
  },
50
50
  "scripts": {
51
51
  "clean": "premove ./build ./coverage ./dist-ts ./.cache/test-types",