snapshot of https://github.com/TanStack/query.git (main, 2026-09-16; blobs > 131072B omitted)
This commit is contained in:
539
packages/query-async-storage-persister/CHANGELOG.md
Normal file
539
packages/query-async-storage-persister/CHANGELOG.md
Normal file
@@ -0,0 +1,539 @@
|
||||
# @tanstack/query-async-storage-persister
|
||||
|
||||
## 5.102.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.102.8
|
||||
- @tanstack/query-persist-client-core@5.102.8
|
||||
|
||||
## 5.102.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.102.7
|
||||
- @tanstack/query-persist-client-core@5.102.7
|
||||
|
||||
## 5.102.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.102.6
|
||||
- @tanstack/query-persist-client-core@5.102.6
|
||||
|
||||
## 5.102.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`578e5c2`](https://github.com/TanStack/query/commit/578e5c26e8ebd0d7351b4b8e2bafba695e672b8d)]:
|
||||
- @tanstack/query-core@5.102.5
|
||||
- @tanstack/query-persist-client-core@5.102.5
|
||||
|
||||
## 5.102.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`a05df6a`](https://github.com/TanStack/query/commit/a05df6aefb0e2489ec2c879ae16e2ee7cb3123ec)]:
|
||||
- @tanstack/query-core@5.102.4
|
||||
- @tanstack/query-persist-client-core@5.102.4
|
||||
|
||||
## 5.102.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.102.3
|
||||
- @tanstack/query-persist-client-core@5.102.3
|
||||
|
||||
## 5.102.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`80fbf73`](https://github.com/TanStack/query/commit/80fbf73e77892d702c107e14a84c219a8ed825dc)]:
|
||||
- @tanstack/query-core@5.102.2
|
||||
- @tanstack/query-persist-client-core@5.102.2
|
||||
|
||||
## 5.102.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`134890d`](https://github.com/TanStack/query/commit/134890dbdc60e4fb0313e44b512d29284ca82f96)]:
|
||||
- @tanstack/query-core@5.102.1
|
||||
- @tanstack/query-persist-client-core@5.102.1
|
||||
|
||||
## 5.102.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`34f7cee`](https://github.com/TanStack/query/commit/34f7ceed09c10e4a3aa2df31a106ddf02ec4e787), [`b4368c4`](https://github.com/TanStack/query/commit/b4368c43792349f6c29d1fb41f7ee1ef3a8bdd2c), [`5bb089d`](https://github.com/TanStack/query/commit/5bb089d153d33933983b7ea80f8d69b51d423698), [`ba4650c`](https://github.com/TanStack/query/commit/ba4650c05e61e33c609e051b948c9f7d31ce70d1), [`294d4e6`](https://github.com/TanStack/query/commit/294d4e62c4f7d674574a4903eef2a1bc3dd1413b), [`1f631b3`](https://github.com/TanStack/query/commit/1f631b3604aab6567fb3f6c90646a5a304641546), [`01a02bf`](https://github.com/TanStack/query/commit/01a02bfad32f9efbc17796be31d6399f1197a655), [`18c1c1e`](https://github.com/TanStack/query/commit/18c1c1ef94883e781ad36d36f9ea4a043ce4260b), [`5448063`](https://github.com/TanStack/query/commit/5448063f828d2270dccd41ae375e1afde35e91f2), [`2215bb0`](https://github.com/TanStack/query/commit/2215bb031139cdc8a84751b37a485c38ca9d2b6e), [`1ef4208`](https://github.com/TanStack/query/commit/1ef42087c9a266c2137d2ef645cbcc662f60ac93), [`5981771`](https://github.com/TanStack/query/commit/5981771abec9330b344a2617543eb05ba7c99e24), [`4a9bef6`](https://github.com/TanStack/query/commit/4a9bef6cf19b1cd6b014032d696129f12a848185), [`bef4bc7`](https://github.com/TanStack/query/commit/bef4bc780ce7cca32b7e3dea85f77d92f82a62a2), [`9656dc4`](https://github.com/TanStack/query/commit/9656dc4e5fef5f8c502579b52459f9e8c72e787c), [`326aaf1`](https://github.com/TanStack/query/commit/326aaf1333e5d9cbc46569c53f218d31684162d2), [`3e83601`](https://github.com/TanStack/query/commit/3e836010032c2586e9f1c66a271fa9114a6401f9), [`c6fc17c`](https://github.com/TanStack/query/commit/c6fc17cfad6e452261c585fabfb8c210e60531ed)]:
|
||||
- @tanstack/query-core@5.102.0
|
||||
- @tanstack/query-persist-client-core@5.102.0
|
||||
|
||||
## 5.101.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.101.4
|
||||
- @tanstack/query-persist-client-core@5.101.4
|
||||
|
||||
## 5.101.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`7e3c822`](https://github.com/TanStack/query/commit/7e3c822a10896f41a8f1031c16b85096277af677)]:
|
||||
- @tanstack/query-core@5.101.3
|
||||
- @tanstack/query-persist-client-core@5.101.3
|
||||
|
||||
## 5.101.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.101.2
|
||||
- @tanstack/query-persist-client-core@5.101.2
|
||||
|
||||
## 5.101.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`9eff92e`](https://github.com/TanStack/query/commit/9eff92ed86e284ec0125b3a3539d028688235bd1)]:
|
||||
- @tanstack/query-core@5.101.1
|
||||
- @tanstack/query-persist-client-core@5.101.1
|
||||
|
||||
## 5.101.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.101.0
|
||||
- @tanstack/query-persist-client-core@5.101.0
|
||||
|
||||
## 5.100.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.100.14
|
||||
- @tanstack/query-persist-client-core@5.100.14
|
||||
|
||||
## 5.100.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`d423168`](https://github.com/TanStack/query/commit/d423168f6261a5cb3d353e53b27c8150cc271151)]:
|
||||
- @tanstack/query-core@5.100.13
|
||||
- @tanstack/query-persist-client-core@5.100.13
|
||||
|
||||
## 5.100.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.100.12
|
||||
- @tanstack/query-persist-client-core@5.100.12
|
||||
|
||||
## 5.100.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.100.11
|
||||
- @tanstack/query-persist-client-core@5.100.11
|
||||
|
||||
## 5.100.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.100.10
|
||||
- @tanstack/query-persist-client-core@5.100.10
|
||||
|
||||
## 5.100.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`fcee7bd`](https://github.com/TanStack/query/commit/fcee7bdc429385ae8ffa224fa8a7a9ec7b8ee380)]:
|
||||
- @tanstack/query-core@5.100.9
|
||||
- @tanstack/query-persist-client-core@5.100.9
|
||||
|
||||
## 5.100.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.100.8
|
||||
- @tanstack/query-persist-client-core@5.100.8
|
||||
|
||||
## 5.100.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.100.7
|
||||
- @tanstack/query-persist-client-core@5.100.7
|
||||
|
||||
## 5.100.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.100.6
|
||||
- @tanstack/query-persist-client-core@5.100.6
|
||||
|
||||
## 5.100.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`a53ef97`](https://github.com/TanStack/query/commit/a53ef97f87decb8ea2431710f5199431d3c94c8d)]:
|
||||
- @tanstack/query-core@5.100.5
|
||||
- @tanstack/query-persist-client-core@5.100.5
|
||||
|
||||
## 5.100.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.100.4
|
||||
- @tanstack/query-persist-client-core@5.100.4
|
||||
|
||||
## 5.100.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`f85d825`](https://github.com/TanStack/query/commit/f85d825e02efbbff02e2081528ed28f5e5382f7a)]:
|
||||
- @tanstack/query-core@5.100.3
|
||||
- @tanstack/query-persist-client-core@5.100.3
|
||||
|
||||
## 5.100.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`ea4497e`](https://github.com/TanStack/query/commit/ea4497e8aa00d8c1c3a36fb1e17563a889d6ab31), [`d6a7bf3`](https://github.com/TanStack/query/commit/d6a7bf3e3e024c1a77d0536813238cc8007a5fa7), [`645d5d1`](https://github.com/TanStack/query/commit/645d5d130f5e8017cb1bf1a37987f7b980aed705)]:
|
||||
- @tanstack/query-core@5.100.2
|
||||
- @tanstack/query-persist-client-core@5.100.2
|
||||
|
||||
## 5.100.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`1bb0d23`](https://github.com/TanStack/query/commit/1bb0d234280fd4ae1725c439088426a20593a8df)]:
|
||||
- @tanstack/query-core@5.100.1
|
||||
- @tanstack/query-persist-client-core@5.100.1
|
||||
|
||||
## 5.100.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`6540a41`](https://github.com/TanStack/query/commit/6540a4126b1c087d86d64525e78f32d9920dcd31)]:
|
||||
- @tanstack/query-core@5.100.0
|
||||
- @tanstack/query-persist-client-core@5.100.0
|
||||
|
||||
## 5.99.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.99.2
|
||||
- @tanstack/query-persist-client-core@5.99.2
|
||||
|
||||
## 5.99.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.99.1
|
||||
- @tanstack/query-persist-client-core@5.99.1
|
||||
|
||||
## 5.99.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.99.0
|
||||
- @tanstack/query-persist-client-core@5.99.0
|
||||
|
||||
## 5.98.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.98.0
|
||||
- @tanstack/query-persist-client-core@5.98.0
|
||||
|
||||
## 5.97.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2bfb12c`](https://github.com/TanStack/query/commit/2bfb12cc44f1d8495106136e4ddacb817135f8f9)]:
|
||||
- @tanstack/query-core@5.97.0
|
||||
- @tanstack/query-persist-client-core@5.97.0
|
||||
|
||||
## 5.96.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.96.2
|
||||
- @tanstack/query-persist-client-core@5.96.2
|
||||
|
||||
## 5.96.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.96.1
|
||||
- @tanstack/query-persist-client-core@5.96.1
|
||||
|
||||
## 5.96.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.96.0
|
||||
- @tanstack/query-persist-client-core@5.96.0
|
||||
|
||||
## 5.95.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`cd5a35b`](https://github.com/TanStack/query/commit/cd5a35b328837781aa4f9305bb2bd7877ca934e9)]:
|
||||
- @tanstack/query-core@5.95.2
|
||||
- @tanstack/query-persist-client-core@5.95.2
|
||||
|
||||
## 5.95.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`1f1775c`](https://github.com/TanStack/query/commit/1f1775ca92f2b6c035682947ff3b3424804ff31a)]:
|
||||
- @tanstack/query-core@5.95.1
|
||||
- @tanstack/query-persist-client-core@5.95.1
|
||||
|
||||
## 5.95.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @tanstack/query-core@5.95.0
|
||||
- @tanstack/query-persist-client-core@5.95.0
|
||||
|
||||
## 5.94.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix(\*): resolve issue about excluded build directory ([#10312](https://github.com/TanStack/query/pull/10312))
|
||||
|
||||
- Updated dependencies [[`4b6536d`](https://github.com/TanStack/query/commit/4b6536dfce99036f4e37f52943c6fed3ad0e0a18)]:
|
||||
- @tanstack/query-core@5.94.5
|
||||
- @tanstack/query-persist-client-core@5.94.5
|
||||
|
||||
## 5.94.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- chore: fixed version ([#10064](https://github.com/TanStack/query/pull/10064))
|
||||
|
||||
- Updated dependencies [[`4c75210`](https://github.com/TanStack/query/commit/4c75210ce8235fe3d39b67e1029eff11278927cc)]:
|
||||
- @tanstack/query-core@5.94.4
|
||||
- @tanstack/query-persist-client-core@5.94.4
|
||||
|
||||
## 5.90.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix(streamedQuery): maintain error state on reset refetch with initialData defined ([#10287](https://github.com/TanStack/query/pull/10287))
|
||||
|
||||
- Updated dependencies [[`248975e`](https://github.com/TanStack/query/commit/248975e896f585f6eaa505c796e73fcf7bfd1eec)]:
|
||||
- @tanstack/query-persist-client-core@5.92.4
|
||||
- @tanstack/query-core@5.91.2
|
||||
|
||||
## 5.90.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`a89aab9`](https://github.com/TanStack/query/commit/a89aab975581c25c113a26c8af486b4cafad272a)]:
|
||||
- @tanstack/query-core@5.91.1
|
||||
- @tanstack/query-persist-client-core@5.92.3
|
||||
|
||||
## 5.90.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`6fa901b`](https://github.com/TanStack/query/commit/6fa901b97a22a80d0fca3f6ed86237ff0cbdd13b)]:
|
||||
- @tanstack/query-core@5.91.0
|
||||
- @tanstack/query-persist-client-core@5.92.2
|
||||
|
||||
## 5.90.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`e505568`](https://github.com/TanStack/query/commit/e505568f4d51c8281d38e9687091094b7d32a405)]:
|
||||
- @tanstack/query-persist-client-core@5.92.1
|
||||
|
||||
## 5.90.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`978fc52`](https://github.com/TanStack/query/commit/978fc52728a8b9eb33f0a82f4ddf42a95815bd7f)]:
|
||||
- @tanstack/query-persist-client-core@5.92.0
|
||||
|
||||
## 5.90.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`e7258c5`](https://github.com/TanStack/query/commit/e7258c5cb30cafa456cdb4e6bc75b43bf619954d)]:
|
||||
- @tanstack/query-core@5.90.20
|
||||
- @tanstack/query-persist-client-core@5.91.19
|
||||
|
||||
## 5.90.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`53fc74e`](https://github.com/TanStack/query/commit/53fc74ebb16730bd3317f039a69c6821386bae93)]:
|
||||
- @tanstack/query-core@5.90.19
|
||||
- @tanstack/query-persist-client-core@5.91.18
|
||||
|
||||
## 5.90.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`dea1614`](https://github.com/TanStack/query/commit/dea1614aaad5c572cf43cea54b64ac09dc4d5b41)]:
|
||||
- @tanstack/query-core@5.90.18
|
||||
- @tanstack/query-persist-client-core@5.91.17
|
||||
|
||||
## 5.90.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`269351b`](https://github.com/TanStack/query/commit/269351b8ce4b4846da3d320ac5b850ee6aada0d6)]:
|
||||
- @tanstack/query-core@5.90.17
|
||||
- @tanstack/query-persist-client-core@5.91.16
|
||||
|
||||
## 5.90.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`7f47906`](https://github.com/TanStack/query/commit/7f47906eaccc3f3aa5ce24b77a83bd7a620a237b)]:
|
||||
- @tanstack/query-core@5.90.16
|
||||
- @tanstack/query-persist-client-core@5.91.15
|
||||
|
||||
## 5.90.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`fccef79`](https://github.com/TanStack/query/commit/fccef797d57d4a9566517bba87c8377f363920f2)]:
|
||||
- @tanstack/query-core@5.90.15
|
||||
- @tanstack/query-persist-client-core@5.91.14
|
||||
|
||||
## 5.90.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`d576092`](https://github.com/TanStack/query/commit/d576092e2ece4ca3936add3eb0da5234c1d82ed4)]:
|
||||
- @tanstack/query-core@5.90.14
|
||||
- @tanstack/query-persist-client-core@5.91.13
|
||||
|
||||
## 5.90.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`4a0a78a`](https://github.com/TanStack/query/commit/4a0a78afbc2432f8cb6828035965853fa98c86a0)]:
|
||||
- @tanstack/query-core@5.90.13
|
||||
- @tanstack/query-persist-client-core@5.91.12
|
||||
|
||||
## 5.90.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`72d8ac5`](https://github.com/TanStack/query/commit/72d8ac5c592004b8f9c3ee086fcb9c3cd615ca05)]:
|
||||
- @tanstack/query-core@5.90.12
|
||||
- @tanstack/query-persist-client-core@5.91.11
|
||||
|
||||
## 5.90.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`c01b150`](https://github.com/TanStack/query/commit/c01b150e3673e11d6533768529a5e6fe3ebee68c)]:
|
||||
- @tanstack/query-core@5.90.11
|
||||
- @tanstack/query-persist-client-core@5.91.10
|
||||
|
||||
## 5.90.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`8e2e174`](https://github.com/TanStack/query/commit/8e2e174e9fd2e7b94cd232041e49c9d014d74e26), [`eb559a6`](https://github.com/TanStack/query/commit/eb559a66dc0d77dd46435f624fa64fc068bef9ae)]:
|
||||
- @tanstack/query-core@5.90.10
|
||||
- @tanstack/query-persist-client-core@5.91.9
|
||||
|
||||
## 5.90.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`08b211f`](https://github.com/TanStack/query/commit/08b211f8aa475e05d2f13a36517fc556861ef962)]:
|
||||
- @tanstack/query-core@5.90.9
|
||||
- @tanstack/query-persist-client-core@5.91.8
|
||||
|
||||
## 5.90.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`c0ec9fe`](https://github.com/TanStack/query/commit/c0ec9fe0d1426fe3f233adda3ebf23989ffaa110)]:
|
||||
- @tanstack/query-core@5.90.8
|
||||
- @tanstack/query-persist-client-core@5.91.7
|
||||
|
||||
## 5.90.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`b4cd121`](https://github.com/TanStack/query/commit/b4cd121a39d07cefaa3a3411136d342cc54ce8fb)]:
|
||||
- @tanstack/query-core@5.90.7
|
||||
- @tanstack/query-persist-client-core@5.91.6
|
||||
|
||||
## 5.90.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`1638c02`](https://github.com/TanStack/query/commit/1638c028df55648995d04431179904371a189772)]:
|
||||
- @tanstack/query-core@5.90.6
|
||||
- @tanstack/query-persist-client-core@5.91.5
|
||||
|
||||
## 5.90.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`e42ddfe`](https://github.com/TanStack/query/commit/e42ddfe919f34f847ca101aeef162c69845f9a1e)]:
|
||||
- @tanstack/query-core@5.90.5
|
||||
- @tanstack/query-persist-client-core@5.91.4
|
||||
|
||||
## 5.90.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`20ef922`](https://github.com/TanStack/query/commit/20ef922a0a7c3aee00150bf69123c338b0922922)]:
|
||||
- @tanstack/query-core@5.90.4
|
||||
- @tanstack/query-persist-client-core@5.91.3
|
||||
|
||||
## 5.90.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`4e1c433`](https://github.com/TanStack/query/commit/4e1c4338a72f7384600bbda99e44bc1891695df4)]:
|
||||
- @tanstack/query-core@5.90.3
|
||||
- @tanstack/query-persist-client-core@5.91.2
|
||||
|
||||
## 5.90.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`846d53d`](https://github.com/TanStack/query/commit/846d53d98992d50606c40634efa43dea9965b787)]:
|
||||
- @tanstack/query-persist-client-core@5.91.1
|
||||
|
||||
## 5.90.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`5cd86c6`](https://github.com/TanStack/query/commit/5cd86c6ef1720b87b13e1ab70ee823616f1f029a)]:
|
||||
- @tanstack/query-persist-client-core@5.91.0
|
||||
5
packages/query-async-storage-persister/eslint.config.js
Normal file
5
packages/query-async-storage-persister/eslint.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
// @ts-check
|
||||
|
||||
import rootConfig from './root.eslint.config.js'
|
||||
|
||||
export default [...rootConfig]
|
||||
66
packages/query-async-storage-persister/package.json
Normal file
66
packages/query-async-storage-persister/package.json
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"name": "@tanstack/query-async-storage-persister",
|
||||
"version": "5.102.8",
|
||||
"description": "A persister for asynchronous storages, to be used with TanStack/Query",
|
||||
"author": "tannerlinsley",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/TanStack/query.git",
|
||||
"directory": "packages/query-async-storage-persister"
|
||||
},
|
||||
"homepage": "https://tanstack.com/query",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/tannerlinsley"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "premove ./build ./coverage ./dist-ts ./.cache/test-types",
|
||||
"compile": "tsc --project tsconfig.json",
|
||||
"test:eslint": "eslint --concurrency=auto ./src",
|
||||
"test:types": "npm-run-all --serial test:types:*",
|
||||
"test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js --project tsconfig.json --outDir .cache/test-types/ts56 --tsBuildInfoFile .cache/test-types/ts56.tsbuildinfo",
|
||||
"test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js --project tsconfig.json --outDir .cache/test-types/ts57 --tsBuildInfoFile .cache/test-types/ts57.tsbuildinfo",
|
||||
"test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js --project tsconfig.json --outDir .cache/test-types/ts58 --tsBuildInfoFile .cache/test-types/ts58.tsbuildinfo",
|
||||
"test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js --project tsconfig.json --outDir .cache/test-types/ts59 --tsBuildInfoFile .cache/test-types/ts59.tsbuildinfo",
|
||||
"test:types:tscurrent": "tsc --project tsconfig.json --outDir .cache/test-types/tscurrent --tsBuildInfoFile .cache/test-types/tscurrent.tsbuildinfo",
|
||||
"test:types:ts70": "node ../../node_modules/typescript70/lib/tsc.js --project tsconfig.json --outDir .cache/test-types/ts70 --tsBuildInfoFile .cache/test-types/ts70.tsbuildinfo",
|
||||
"test:lib": "vitest",
|
||||
"test:lib:dev": "pnpm run test:lib --watch",
|
||||
"test:build": "publint --strict && attw --pack",
|
||||
"build": "tsdown --tsconfig tsconfig.prod.json"
|
||||
},
|
||||
"type": "module",
|
||||
"types": "build/legacy/index.d.ts",
|
||||
"main": "build/legacy/index.cjs",
|
||||
"module": "build/legacy/index.js",
|
||||
"react-native": "src/index.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"@tanstack/custom-condition": "./src/index.ts",
|
||||
"import": {
|
||||
"types": "./build/modern/index.d.ts",
|
||||
"default": "./build/modern/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./build/modern/index.d.cts",
|
||||
"default": "./build/modern/index.cjs"
|
||||
}
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"build",
|
||||
"src",
|
||||
"!src/__tests__"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tanstack/query-core": "workspace:*",
|
||||
"@tanstack/query-persist-client-core": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tanstack/query-test-utils": "workspace:*",
|
||||
"npm-run-all2": "^5.0.0"
|
||||
}
|
||||
}
|
||||
1
packages/query-async-storage-persister/root.eslint.config.js
Symbolic link
1
packages/query-async-storage-persister/root.eslint.config.js
Symbolic link
@@ -0,0 +1 @@
|
||||
../../eslint.config.js
|
||||
1
packages/query-async-storage-persister/root.tsdown.config.js
Symbolic link
1
packages/query-async-storage-persister/root.tsdown.config.js
Symbolic link
@@ -0,0 +1 @@
|
||||
../../scripts/getTsdownConfig.js
|
||||
@@ -0,0 +1,151 @@
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { sleep } from '@tanstack/query-test-utils'
|
||||
import { asyncThrottle } from '../asyncThrottle'
|
||||
|
||||
describe('asyncThrottle', () => {
|
||||
beforeEach(() => {
|
||||
vi.useFakeTimers()
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
vi.useRealTimers()
|
||||
})
|
||||
|
||||
it('basic', async () => {
|
||||
const interval = 10
|
||||
const execTimeStamps: Array<number> = []
|
||||
const mockFunc = vi.fn(
|
||||
async (id: number, complete?: (value?: unknown) => void) => {
|
||||
await sleep(1)
|
||||
execTimeStamps.push(Date.now())
|
||||
if (complete) {
|
||||
complete(id)
|
||||
}
|
||||
},
|
||||
)
|
||||
const testFunc = asyncThrottle(mockFunc, { interval })
|
||||
|
||||
testFunc(1)
|
||||
await vi.advanceTimersByTimeAsync(1)
|
||||
|
||||
testFunc(2)
|
||||
await vi.advanceTimersByTimeAsync(1)
|
||||
|
||||
new Promise((resolve) => testFunc(3, resolve))
|
||||
|
||||
await vi.advanceTimersToNextTimerAsync()
|
||||
await vi.advanceTimersByTimeAsync(interval)
|
||||
|
||||
expect(mockFunc).toHaveBeenCalledTimes(2)
|
||||
expect(mockFunc.mock.calls[1]?.[0]).toBe(3)
|
||||
expect(execTimeStamps.length).toBe(2)
|
||||
expect(execTimeStamps[1]! - execTimeStamps[0]!).toBeGreaterThanOrEqual(
|
||||
interval,
|
||||
)
|
||||
})
|
||||
|
||||
it('Bug #3331 case 1: Special timing', async () => {
|
||||
const interval = 1000
|
||||
const execTimeStamps: Array<number> = []
|
||||
const mockFunc = vi.fn(
|
||||
async (id: number, complete?: (value?: unknown) => void) => {
|
||||
await sleep(30)
|
||||
execTimeStamps.push(Date.now())
|
||||
if (complete) {
|
||||
complete(id)
|
||||
}
|
||||
},
|
||||
)
|
||||
const testFunc = asyncThrottle(mockFunc, { interval })
|
||||
|
||||
testFunc(1)
|
||||
testFunc(2)
|
||||
await vi.advanceTimersByTimeAsync(35)
|
||||
testFunc(3)
|
||||
await vi.advanceTimersByTimeAsync(35)
|
||||
new Promise((resolve) => testFunc(4, resolve))
|
||||
|
||||
await vi.advanceTimersToNextTimerAsync()
|
||||
await vi.advanceTimersByTimeAsync(interval)
|
||||
|
||||
expect(mockFunc).toHaveBeenCalledTimes(2)
|
||||
expect(mockFunc.mock.calls[1]?.[0]).toBe(4)
|
||||
expect(execTimeStamps.length).toBe(2)
|
||||
expect(execTimeStamps[1]! - execTimeStamps[0]!).toBeGreaterThanOrEqual(
|
||||
interval,
|
||||
)
|
||||
})
|
||||
|
||||
it('Bug #3331 case 2: "func" execution time is greater than the interval.', async () => {
|
||||
const interval = 1000
|
||||
const execTimeStamps: Array<number> = []
|
||||
const mockFunc = vi.fn(
|
||||
async (id: number, complete?: (value?: unknown) => void) => {
|
||||
await sleep(interval + 10)
|
||||
execTimeStamps.push(Date.now())
|
||||
if (complete) {
|
||||
complete(id)
|
||||
}
|
||||
},
|
||||
)
|
||||
const testFunc = asyncThrottle(mockFunc, { interval })
|
||||
|
||||
testFunc(1)
|
||||
testFunc(2)
|
||||
new Promise((resolve) => testFunc(3, resolve))
|
||||
|
||||
await vi.advanceTimersToNextTimerAsync()
|
||||
await vi.advanceTimersByTimeAsync(interval + 10)
|
||||
await vi.advanceTimersByTimeAsync(interval + 10)
|
||||
|
||||
expect(mockFunc).toHaveBeenCalledTimes(2)
|
||||
expect(mockFunc.mock.calls[1]?.[0]).toBe(3)
|
||||
expect(execTimeStamps.length).toBe(2)
|
||||
expect(execTimeStamps[1]! - execTimeStamps[0]!).toBeGreaterThanOrEqual(
|
||||
interval,
|
||||
)
|
||||
})
|
||||
|
||||
it('"func" throw error not break next invoke', async () => {
|
||||
const interval = 10
|
||||
|
||||
const mockFunc = vi.fn(
|
||||
async (id: number, complete?: (value?: unknown) => void) => {
|
||||
if (id === 1) throw new Error('error')
|
||||
await sleep(1)
|
||||
if (complete) {
|
||||
complete(id)
|
||||
}
|
||||
},
|
||||
)
|
||||
const testFunc = asyncThrottle(mockFunc, { interval })
|
||||
|
||||
testFunc(1)
|
||||
await vi.advanceTimersByTimeAsync(1)
|
||||
|
||||
new Promise((resolve) => testFunc(2, resolve))
|
||||
await vi.advanceTimersByTimeAsync(interval)
|
||||
|
||||
expect(mockFunc).toHaveBeenCalledTimes(2)
|
||||
expect(mockFunc.mock.calls[1]?.[0]).toBe(2)
|
||||
})
|
||||
|
||||
it('"onError" should be called when "func" throw error', () => {
|
||||
const err = new Error('error')
|
||||
const handleError = (e: unknown) => {
|
||||
expect(e).toBe(err)
|
||||
}
|
||||
|
||||
const testFunc = asyncThrottle(
|
||||
() => {
|
||||
throw err
|
||||
},
|
||||
{ onError: handleError },
|
||||
)
|
||||
testFunc()
|
||||
})
|
||||
|
||||
it('should throw error when "func" is not a function', () => {
|
||||
expect(() => asyncThrottle(1 as any)).toThrow()
|
||||
})
|
||||
})
|
||||
44
packages/query-async-storage-persister/src/asyncThrottle.ts
Normal file
44
packages/query-async-storage-persister/src/asyncThrottle.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { timeoutManager } from '@tanstack/query-core'
|
||||
import { noop } from './utils'
|
||||
|
||||
interface AsyncThrottleOptions {
|
||||
interval?: number
|
||||
onError?: (error: unknown) => void
|
||||
}
|
||||
|
||||
export function asyncThrottle<TArgs extends ReadonlyArray<unknown>>(
|
||||
func: (...args: TArgs) => Promise<void>,
|
||||
{ interval = 1000, onError = noop }: AsyncThrottleOptions = {},
|
||||
) {
|
||||
if (typeof func !== 'function') throw new Error('argument is not function.')
|
||||
|
||||
let nextExecutionTime = 0
|
||||
let lastArgs = null
|
||||
let isExecuting = false
|
||||
let isScheduled = false
|
||||
|
||||
return async (...args: TArgs) => {
|
||||
lastArgs = args
|
||||
if (isScheduled) return
|
||||
isScheduled = true
|
||||
while (isExecuting) {
|
||||
await new Promise((done) => timeoutManager.setTimeout(done, interval))
|
||||
}
|
||||
while (Date.now() < nextExecutionTime) {
|
||||
await new Promise((done) =>
|
||||
timeoutManager.setTimeout(done, nextExecutionTime - Date.now()),
|
||||
)
|
||||
}
|
||||
isScheduled = false
|
||||
isExecuting = true
|
||||
try {
|
||||
await func(...lastArgs)
|
||||
} catch (error) {
|
||||
try {
|
||||
onError(error)
|
||||
} catch {}
|
||||
}
|
||||
nextExecutionTime = Date.now() + interval
|
||||
isExecuting = false
|
||||
}
|
||||
}
|
||||
102
packages/query-async-storage-persister/src/index.ts
Normal file
102
packages/query-async-storage-persister/src/index.ts
Normal file
@@ -0,0 +1,102 @@
|
||||
import { asyncThrottle } from './asyncThrottle'
|
||||
import { noop } from './utils'
|
||||
import type {
|
||||
AsyncStorage,
|
||||
MaybePromise,
|
||||
PersistedClient,
|
||||
Persister,
|
||||
Promisable,
|
||||
} from '@tanstack/query-persist-client-core'
|
||||
|
||||
export type AsyncPersistRetryer = (props: {
|
||||
persistedClient: PersistedClient
|
||||
error: Error
|
||||
errorCount: number
|
||||
}) => Promisable<PersistedClient | undefined>
|
||||
|
||||
interface CreateAsyncStoragePersisterOptions {
|
||||
/** The storage client used for setting and retrieving items from cache.
|
||||
* For SSR pass in `undefined`. Note that window.localStorage can be
|
||||
* `null` in Android WebViews depending on how they are configured.
|
||||
*/
|
||||
storage: AsyncStorage<string> | undefined | null
|
||||
/** The key to use when storing the cache */
|
||||
key?: string
|
||||
/** To avoid spamming,
|
||||
* pass a time in ms to throttle saving the cache to disk */
|
||||
throttleTime?: number
|
||||
/**
|
||||
* How to serialize the data to storage.
|
||||
* @default `JSON.stringify`
|
||||
*/
|
||||
serialize?: (client: PersistedClient) => MaybePromise<string>
|
||||
/**
|
||||
* How to deserialize the data from storage.
|
||||
* @default `JSON.parse`
|
||||
*/
|
||||
deserialize?: (cachedString: string) => MaybePromise<PersistedClient>
|
||||
|
||||
retry?: AsyncPersistRetryer
|
||||
}
|
||||
|
||||
export const createAsyncStoragePersister = ({
|
||||
storage,
|
||||
key = `REACT_QUERY_OFFLINE_CACHE`,
|
||||
throttleTime = 1000,
|
||||
serialize = JSON.stringify,
|
||||
deserialize = JSON.parse,
|
||||
retry,
|
||||
}: CreateAsyncStoragePersisterOptions): Persister => {
|
||||
if (storage) {
|
||||
const trySave = async (
|
||||
persistedClient: PersistedClient,
|
||||
): Promise<Error | undefined> => {
|
||||
try {
|
||||
const serialized = await serialize(persistedClient)
|
||||
await storage.setItem(key, serialized)
|
||||
return
|
||||
} catch (error) {
|
||||
return error as Error
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
persistClient: asyncThrottle(
|
||||
async (persistedClient) => {
|
||||
let client: PersistedClient | undefined = persistedClient
|
||||
let error = await trySave(client)
|
||||
let errorCount = 0
|
||||
while (error && client) {
|
||||
errorCount++
|
||||
client = await retry?.({
|
||||
persistedClient: client,
|
||||
error,
|
||||
errorCount,
|
||||
})
|
||||
|
||||
if (client) {
|
||||
error = await trySave(client)
|
||||
}
|
||||
}
|
||||
},
|
||||
{ interval: throttleTime },
|
||||
),
|
||||
restoreClient: async () => {
|
||||
const cacheString = await storage.getItem(key)
|
||||
|
||||
if (!cacheString) {
|
||||
return
|
||||
}
|
||||
|
||||
return await deserialize(cacheString)
|
||||
},
|
||||
removeClient: () => storage.removeItem(key),
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
persistClient: noop,
|
||||
restoreClient: () => Promise.resolve(undefined),
|
||||
removeClient: noop,
|
||||
}
|
||||
}
|
||||
3
packages/query-async-storage-persister/src/utils.ts
Normal file
3
packages/query-async-storage-persister/src/utils.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export function noop(): void
|
||||
export function noop(): undefined
|
||||
export function noop() {}
|
||||
9
packages/query-async-storage-persister/tsconfig.json
Normal file
9
packages/query-async-storage-persister/tsconfig.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist-ts",
|
||||
"rootDir": "."
|
||||
},
|
||||
"include": ["src", "*.config.ts", "*.config.js", "package.json"],
|
||||
"references": [{ "path": "../query-persist-client-core" }]
|
||||
}
|
||||
10
packages/query-async-storage-persister/tsconfig.prod.json
Normal file
10
packages/query-async-storage-persister/tsconfig.prod.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"incremental": false,
|
||||
"composite": false,
|
||||
"rootDir": "../../"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["src/__tests__"]
|
||||
}
|
||||
7
packages/query-async-storage-persister/tsdown.config.ts
Normal file
7
packages/query-async-storage-persister/tsdown.config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { defineConfig } from 'tsdown'
|
||||
import { legacyConfig, modernConfig } from './root.tsdown.config.js'
|
||||
|
||||
export default defineConfig([
|
||||
modernConfig({ entry: ['src/*.ts'] }),
|
||||
legacyConfig({ entry: ['src/*.ts'] }),
|
||||
])
|
||||
30
packages/query-async-storage-persister/vite.config.ts
Normal file
30
packages/query-async-storage-persister/vite.config.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { defineConfig } from 'vitest/config'
|
||||
|
||||
import packageJson from './package.json'
|
||||
|
||||
export default defineConfig({
|
||||
// fix from https://github.com/vitest-dev/vitest/issues/6992#issuecomment-2509408660
|
||||
resolve: {
|
||||
conditions: ['@tanstack/custom-condition'],
|
||||
},
|
||||
environments: {
|
||||
ssr: {
|
||||
resolve: {
|
||||
conditions: ['@tanstack/custom-condition'],
|
||||
},
|
||||
},
|
||||
},
|
||||
test: {
|
||||
name: packageJson.name,
|
||||
dir: './src',
|
||||
watch: false,
|
||||
coverage: {
|
||||
enabled: !!process.env.CI,
|
||||
provider: 'istanbul',
|
||||
include: ['src/**/*'],
|
||||
exclude: ['src/__tests__/**'],
|
||||
},
|
||||
typecheck: { enabled: true },
|
||||
restoreMocks: true,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user