@tanstack/react-query-persist-client 4.29.10 → 4.29.12

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-query-persist-client",
3
- "version": "4.29.10",
3
+ "version": "4.29.12",
4
4
  "description": "React bindings to work with persisters in TanStack/react-query",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -34,13 +34,13 @@
34
34
  "react-17": "npm:react@^17.0.2",
35
35
  "react-dom": "^18.2.0",
36
36
  "react-dom-17": "npm:react-dom@^17.0.2",
37
- "@tanstack/react-query": "4.29.10"
37
+ "@tanstack/react-query": "4.29.12"
38
38
  },
39
39
  "dependencies": {
40
- "@tanstack/query-persist-client-core": "4.29.10"
40
+ "@tanstack/query-persist-client-core": "4.29.11"
41
41
  },
42
42
  "peerDependencies": {
43
- "@tanstack/react-query": "4.29.10"
43
+ "@tanstack/react-query": "4.29.12"
44
44
  },
45
45
  "scripts": {
46
46
  "clean": "rimraf ./build",
@@ -288,10 +288,13 @@ describe('PersistQueryClientProvider', () => {
288
288
 
289
289
  queryClient.clear()
290
290
 
291
+ let fetched = false
292
+
291
293
  function Page() {
292
294
  const state = useQuery(
293
295
  key,
294
296
  async () => {
297
+ fetched = true
295
298
  await sleep(10)
296
299
  return 'fetched'
297
300
  },
@@ -322,7 +325,9 @@ describe('PersistQueryClientProvider', () => {
322
325
  await waitFor(() => rendered.getByText('data: null'))
323
326
  await waitFor(() => rendered.getByText('data: hydrated'))
324
327
 
325
- expect(states).toHaveLength(2)
328
+ expect(states).toHaveLength(3)
329
+
330
+ expect(fetched).toBe(false)
326
331
 
327
332
  expect(states[0]).toMatchObject({
328
333
  status: 'loading',
@@ -335,6 +340,9 @@ describe('PersistQueryClientProvider', () => {
335
340
  fetchStatus: 'idle',
336
341
  data: 'hydrated',
337
342
  })
343
+
344
+ // #5443 seems like we get an extra render now ...
345
+ expect(states[1]).toStrictEqual(states[2])
338
346
  })
339
347
 
340
348
  test('should call onSuccess after successful restoring', async () => {
@@ -1 +0,0 @@
1
- {"version":3,"file":"PersistQueryClientProvider.d.ts","sourceRoot":"","sources":["../../src/PersistQueryClientProvider.tsx"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAA;AAEpF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAGrE,oBAAY,+BAA+B,GAAG,wBAAwB,GAAG;IACvE,cAAc,EAAE,IAAI,CAAC,yBAAyB,EAAE,aAAa,CAAC,CAAA;IAC9D,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,0BAA0B,8DAMpC,+BAA+B,KAAG,WAkCpC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"PersistQueryClientProvider.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/PersistQueryClientProvider.test.tsx"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/__tests__/utils.ts"],"names":[],"mappings":";;AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElD,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,WAAW,CAGzE;AAED,eAAO,MAAM,UAAU;;;;CAItB,CAAA;AAGD,wBAAgB,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,CAGxC;AAED,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIpD;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC,EAAE,MAAM,kBAMxD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,qCAAqC,CAAA;AAEnD,cAAc,8BAA8B,CAAA"}