From 003e1a8c4725cb0f45a79ff784bfe1ebbd1b279c Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sat, 29 Jun 2024 12:59:12 +1000 Subject: [PATCH 01/80] tests: Use recommended `@testing-library/svelte` setup (#7645) --- eslint.config.js | 3 - package.json | 2 +- packages/svelte-query-devtools/tsconfig.json | 1 + .../svelte-query-persist-client/test-setup.ts | 6 -- .../AwaitOnSuccess/AwaitOnSuccess.svelte | 0 .../AwaitOnSuccess/Provider.svelte | 2 +- .../FreshData/FreshData.svelte | 0 .../FreshData/Provider.svelte | 2 +- .../InitialData/InitialData.svelte | 0 .../InitialData/Provider.svelte | 2 +- .../OnSuccess/OnSuccess.svelte | 0 .../OnSuccess/Provider.svelte | 2 +- .../PersistQueryClientProvider.test.ts | 0 .../RemoveCache/Provider.svelte | 2 +- .../RemoveCache/RemoveCache.svelte | 0 .../RestoreCache/Provider.svelte | 2 +- .../RestoreCache/RestoreCache.svelte | 0 .../UseQueries/Provider.svelte | 2 +- .../UseQueries/UseQueries.svelte | 0 .../tests/test-setup.ts | 1 + .../{src/__tests__ => tests}/utils.ts | 0 .../svelte-query-persist-client/tsconfig.json | 5 +- .../vite.config.ts | 7 +- packages/svelte-query/tests/test-setup.ts | 5 -- packages/svelte-query/tsconfig.json | 1 + packages/svelte-query/vite.config.ts | 3 +- pnpm-lock.yaml | 89 ++++++++++++++++--- 27 files changed, 98 insertions(+), 39 deletions(-) delete mode 100644 packages/svelte-query-persist-client/test-setup.ts rename packages/svelte-query-persist-client/{src/__tests__ => tests}/AwaitOnSuccess/AwaitOnSuccess.svelte (100%) rename packages/svelte-query-persist-client/{src/__tests__ => tests}/AwaitOnSuccess/Provider.svelte (88%) rename packages/svelte-query-persist-client/{src/__tests__ => tests}/FreshData/FreshData.svelte (100%) rename packages/svelte-query-persist-client/{src/__tests__ => tests}/FreshData/Provider.svelte (89%) rename packages/svelte-query-persist-client/{src/__tests__ => tests}/InitialData/InitialData.svelte (100%) rename packages/svelte-query-persist-client/{src/__tests__ => tests}/InitialData/Provider.svelte (88%) rename packages/svelte-query-persist-client/{src/__tests__ => tests}/OnSuccess/OnSuccess.svelte (100%) rename packages/svelte-query-persist-client/{src/__tests__ => tests}/OnSuccess/Provider.svelte (86%) rename packages/svelte-query-persist-client/{src/__tests__ => tests}/PersistQueryClientProvider.test.ts (100%) rename packages/svelte-query-persist-client/{src/__tests__ => tests}/RemoveCache/Provider.svelte (85%) rename packages/svelte-query-persist-client/{src/__tests__ => tests}/RemoveCache/RemoveCache.svelte (100%) rename packages/svelte-query-persist-client/{src/__tests__ => tests}/RestoreCache/Provider.svelte (88%) rename packages/svelte-query-persist-client/{src/__tests__ => tests}/RestoreCache/RestoreCache.svelte (100%) rename packages/svelte-query-persist-client/{src/__tests__ => tests}/UseQueries/Provider.svelte (88%) rename packages/svelte-query-persist-client/{src/__tests__ => tests}/UseQueries/UseQueries.svelte (100%) create mode 100644 packages/svelte-query-persist-client/tests/test-setup.ts rename packages/svelte-query-persist-client/{src/__tests__ => tests}/utils.ts (100%) diff --git a/eslint.config.js b/eslint.config.js index 92d3182183..ac7d5a5d7f 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -37,10 +37,7 @@ export default [ ], 'ts/ban-types': 'off', 'ts/no-empty-function': 'off', - 'ts/require-await': 'off', 'no-case-declarations': 'off', - 'no-empty': 'off', - 'no-prototype-builtins': 'off', }, }, ] diff --git a/package.json b/package.json index 523a70301d..d5ace070e3 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@cspell/eslint-plugin": "^8.9.1", "@eslint-react/eslint-plugin": "^1.5.16", "@solidjs/testing-library": "^0.8.8", - "@tanstack/config": "^0.8.6", + "@tanstack/config": "^0.9.0", "@testing-library/jest-dom": "^6.4.5", "@testing-library/react": "^15.0.7", "@types/node": "^20.12.12", diff --git a/packages/svelte-query-devtools/tsconfig.json b/packages/svelte-query-devtools/tsconfig.json index e1268ed76c..5933fb9d2b 100644 --- a/packages/svelte-query-devtools/tsconfig.json +++ b/packages/svelte-query-devtools/tsconfig.json @@ -8,6 +8,7 @@ "src/**/*.ts", "src/**/*.svelte", "eslint.config.js", + "svelte.config.js", "vite.config.ts" ] } diff --git a/packages/svelte-query-persist-client/test-setup.ts b/packages/svelte-query-persist-client/test-setup.ts deleted file mode 100644 index 921f7e3344..0000000000 --- a/packages/svelte-query-persist-client/test-setup.ts +++ /dev/null @@ -1,6 +0,0 @@ -import '@testing-library/jest-dom/vitest' -import { cleanup } from '@testing-library/svelte' -import { afterEach } from 'vitest' - -// https://testing-library.com/docs/svelte-testing-library/api/#cleanup -afterEach(() => cleanup()) diff --git a/packages/svelte-query-persist-client/src/__tests__/AwaitOnSuccess/AwaitOnSuccess.svelte b/packages/svelte-query-persist-client/tests/AwaitOnSuccess/AwaitOnSuccess.svelte similarity index 100% rename from packages/svelte-query-persist-client/src/__tests__/AwaitOnSuccess/AwaitOnSuccess.svelte rename to packages/svelte-query-persist-client/tests/AwaitOnSuccess/AwaitOnSuccess.svelte diff --git a/packages/svelte-query-persist-client/src/__tests__/AwaitOnSuccess/Provider.svelte b/packages/svelte-query-persist-client/tests/AwaitOnSuccess/Provider.svelte similarity index 88% rename from packages/svelte-query-persist-client/src/__tests__/AwaitOnSuccess/Provider.svelte rename to packages/svelte-query-persist-client/tests/AwaitOnSuccess/Provider.svelte index a677e51eb2..e94ef3616a 100644 --- a/packages/svelte-query-persist-client/src/__tests__/AwaitOnSuccess/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/AwaitOnSuccess/Provider.svelte @@ -1,5 +1,5 @@ + +
{$query.data}
diff --git a/packages/svelte-query/tests/QueryClientProvider/ParentComponent.svelte b/packages/svelte-query/tests/QueryClientProvider/ParentComponent.svelte new file mode 100644 index 0000000000..7129cf8a31 --- /dev/null +++ b/packages/svelte-query/tests/QueryClientProvider/ParentComponent.svelte @@ -0,0 +1,14 @@ + + + + + diff --git a/packages/svelte-query/tests/QueryClientProvider/QueryClientProvider.test.ts b/packages/svelte-query/tests/QueryClientProvider/QueryClientProvider.test.ts new file mode 100644 index 0000000000..86c9907cb7 --- /dev/null +++ b/packages/svelte-query/tests/QueryClientProvider/QueryClientProvider.test.ts @@ -0,0 +1,20 @@ +import { describe, expect, test } from 'vitest' +import { render, waitFor } from '@testing-library/svelte' +import { QueryCache } from '@tanstack/query-core' +import ParentComponent from './ParentComponent.svelte' + +describe('QueryClientProvider', () => { + test('Sets a specific cache for all queries to use', async () => { + const queryCache = new QueryCache() + + const rendered = render(ParentComponent, { + props: { + queryCache: queryCache, + }, + }) + + await waitFor(() => rendered.getByText('test')) + + expect(queryCache.find({ queryKey: ['hello'] })).toBeDefined() + }) +}) diff --git a/packages/svelte-query/tests/context.test.ts b/packages/svelte-query/tests/context/context.test.ts similarity index 54% rename from packages/svelte-query/tests/context.test.ts rename to packages/svelte-query/tests/context/context.test.ts index 8ea9dabeb1..f3428917d1 100644 --- a/packages/svelte-query/tests/context.test.ts +++ b/packages/svelte-query/tests/context/context.test.ts @@ -1,8 +1,8 @@ import { describe, expect, it } from 'vitest' -import { getIsRestoringContext } from '../src/context' +import { getIsRestoringContext } from '../../src/context' describe('getIsRestoringContext', () => { - it('Should not throw when called outside of a component', async () => { + it('Should not throw when called outside of a component', () => { expect(() => getIsRestoringContext()).to.not.throw() }) }) diff --git a/packages/svelte-query/tests/CreateMutation.svelte b/packages/svelte-query/tests/createMutation/BaseExample.svelte similarity index 62% rename from packages/svelte-query/tests/CreateMutation.svelte rename to packages/svelte-query/tests/createMutation/BaseExample.svelte index 2c3074e3a7..e4bf80d4dd 100644 --- a/packages/svelte-query/tests/CreateMutation.svelte +++ b/packages/svelte-query/tests/createMutation/BaseExample.svelte @@ -1,8 +1,8 @@ + + +
Data: {$query.data ?? 'undefined'}
+
Count: {$count}
diff --git a/packages/svelte-query/tests/createQuery.test.ts b/packages/svelte-query/tests/createQuery/createQuery.test.ts similarity index 83% rename from packages/svelte-query/tests/createQuery.test.ts rename to packages/svelte-query/tests/createQuery/createQuery.test.ts index 482043b7fd..0449eb951c 100644 --- a/packages/svelte-query/tests/createQuery.test.ts +++ b/packages/svelte-query/tests/createQuery/createQuery.test.ts @@ -1,13 +1,14 @@ import { describe, expect, test } from 'vitest' -import { render, waitFor } from '@testing-library/svelte' +import { fireEvent, render, waitFor } from '@testing-library/svelte' import { derived, writable } from 'svelte/store' import { QueryClient } from '@tanstack/query-core' -import CreateQuery from './CreateQuery.svelte' -import { sleep } from './utils' +import { sleep } from '../utils' +import BaseExample from './BaseExample.svelte' +import DisabledExample from './DisabledExample.svelte' describe('createQuery', () => { test('Render and wait for success', async () => { - const rendered = render(CreateQuery, { + const rendered = render(BaseExample, { props: { options: { queryKey: ['test'], @@ -38,7 +39,7 @@ describe('createQuery', () => { }, }) - const rendered = render(CreateQuery, { + const rendered = render(BaseExample, { props: { options: optionsStore, queryClient: new QueryClient(), @@ -61,7 +62,7 @@ describe('createQuery', () => { }, })) - const rendered = render(CreateQuery, { + const rendered = render(BaseExample, { props: { options: derivedStore, queryClient: new QueryClient(), @@ -84,7 +85,7 @@ describe('createQuery', () => { }, })) - const rendered = render(CreateQuery, { + const rendered = render(BaseExample, { props: { options: derivedStore, queryClient: new QueryClient({ @@ -125,7 +126,7 @@ describe('createQuery', () => { placeholderData: (previousData: string) => previousData, })) - const rendered = render(CreateQuery, { + const rendered = render(BaseExample, { props: { options: derivedStore, queryClient: new QueryClient(), @@ -154,4 +155,17 @@ describe('createQuery', () => { expect(rendered.queryByText('Success 2')).toBeInTheDocument() }) }) + + test('Should not fetch when switching to a disabled query', async () => { + const rendered = render(DisabledExample) + + await waitFor(() => rendered.getByText('Data: 0')) + + fireEvent.click(rendered.getByRole('button', { name: /Increment/i })) + + await waitFor(() => { + rendered.getByText('Count: 1') + rendered.getByText('Data: undefined') + }) + }) }) diff --git a/packages/svelte-query/tests/queryOptions.test.ts b/packages/svelte-query/tests/queryOptions/queryOptions.test.ts similarity index 98% rename from packages/svelte-query/tests/queryOptions.test.ts rename to packages/svelte-query/tests/queryOptions/queryOptions.test.ts index f73cc0c7d7..65c7e47679 100644 --- a/packages/svelte-query/tests/queryOptions.test.ts +++ b/packages/svelte-query/tests/queryOptions/queryOptions.test.ts @@ -1,6 +1,6 @@ import { QueryClient, dataTagSymbol, skipToken } from '@tanstack/query-core' import { describe, expectTypeOf, it } from 'vitest' -import { queryOptions } from '../src/queryOptions' +import { queryOptions } from '../../src/queryOptions' describe('queryOptions', () => { it('should not allow excess properties', () => { diff --git a/packages/svelte-query/tests/useIsFetching/BaseExample.svelte b/packages/svelte-query/tests/useIsFetching/BaseExample.svelte new file mode 100644 index 0000000000..f94b56dd2b --- /dev/null +++ b/packages/svelte-query/tests/useIsFetching/BaseExample.svelte @@ -0,0 +1,33 @@ + + + +
isFetching: {$isFetching}
+ +{#if $query.isSuccess} + {$query.data} +{/if} diff --git a/packages/svelte-query/tests/useIsFetching/useIsFetching.test.ts b/packages/svelte-query/tests/useIsFetching/useIsFetching.test.ts new file mode 100644 index 0000000000..7ca6ca6322 --- /dev/null +++ b/packages/svelte-query/tests/useIsFetching/useIsFetching.test.ts @@ -0,0 +1,14 @@ +import { describe, test } from 'vitest' +import { fireEvent, render } from '@testing-library/svelte' +import BaseExample from './BaseExample.svelte' + +describe('useIsFetching', () => { + test('should update as queries start and stop fetching', async () => { + const rendered = render(BaseExample) + + await rendered.findByText('isFetching: 0') + fireEvent.click(rendered.getByRole('button', { name: /setReady/i })) + await rendered.findByText('isFetching: 1') + await rendered.findByText('isFetching: 0') + }) +}) diff --git a/packages/svelte-query/tests/UseMutationState.svelte b/packages/svelte-query/tests/useMutationState/BaseExample.svelte similarity index 81% rename from packages/svelte-query/tests/UseMutationState.svelte rename to packages/svelte-query/tests/useMutationState/BaseExample.svelte index d980c8121e..543a9a5271 100644 --- a/packages/svelte-query/tests/UseMutationState.svelte +++ b/packages/svelte-query/tests/useMutationState/BaseExample.svelte @@ -1,12 +1,12 @@ diff --git a/packages/svelte-query/tests/context/context.test.ts b/packages/svelte-query/tests/context/context.test.ts index f3428917d1..cb2b6d9e15 100644 --- a/packages/svelte-query/tests/context/context.test.ts +++ b/packages/svelte-query/tests/context/context.test.ts @@ -1,8 +1,18 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, test } from 'vitest' +import { render } from '@testing-library/svelte' import { getIsRestoringContext } from '../../src/context' +import BaseExample from './BaseExample.svelte' + +describe('getQueryClientContext', () => { + test('Throw when called without a client in context', () => { + expect(() => render(BaseExample)).toThrowError( + 'No QueryClient was found in Svelte context. Did you forget to wrap your component with QueryClientProvider?', + ) + }) +}) describe('getIsRestoringContext', () => { - it('Should not throw when called outside of a component', () => { - expect(() => getIsRestoringContext()).to.not.throw() + test('Do not throw when called outside of a component', () => { + expect(() => getIsRestoringContext()).not.toThrowError() }) }) diff --git a/packages/svelte-query/tests/createInfiniteQuery/BaseExample.svelte b/packages/svelte-query/tests/createInfiniteQuery/BaseExample.svelte new file mode 100644 index 0000000000..613ca52223 --- /dev/null +++ b/packages/svelte-query/tests/createInfiniteQuery/BaseExample.svelte @@ -0,0 +1,19 @@ + + +
Data: {JSON.stringify($query.data)}
+
Status: {$query.status}
diff --git a/packages/svelte-query/tests/createInfiniteQuery/createInfiniteQuery.test.ts b/packages/svelte-query/tests/createInfiniteQuery/createInfiniteQuery.test.ts new file mode 100644 index 0000000000..2d14e51f03 --- /dev/null +++ b/packages/svelte-query/tests/createInfiniteQuery/createInfiniteQuery.test.ts @@ -0,0 +1,19 @@ +import { describe, test } from 'vitest' +import { render } from '@testing-library/svelte' + +import { sleep } from '../utils' +import BaseExample from './BaseExample.svelte' + +describe('createQuery', () => { + test('Render and wait for success', async () => { + const rendered = render(BaseExample) + + await rendered.findByText('Data: undefined') + await rendered.findByText('Status: pending') + + await sleep(20) + + await rendered.findByText('Data: {"pages":[0],"pageParams":[0]}') + await rendered.findByText('Status: success') + }) +}) diff --git a/packages/svelte-query/tests/createMutation/createMutation.test.ts b/packages/svelte-query/tests/createMutation/createMutation.test.ts index e306fd6763..88414c2651 100644 --- a/packages/svelte-query/tests/createMutation/createMutation.test.ts +++ b/packages/svelte-query/tests/createMutation/createMutation.test.ts @@ -1,9 +1,9 @@ -import { describe, expect, it, vi } from 'vitest' +import { describe, expect, test, vi } from 'vitest' import { fireEvent, render, waitFor } from '@testing-library/svelte' import BaseExample from './BaseExample.svelte' describe('createMutation', () => { - it('Call mutate and check function runs', async () => { + test('Call mutate and check function runs', async () => { const mutationFn = vi.fn() const rendered = render(BaseExample, { diff --git a/packages/svelte-query/tests/createQueries/createQueries.test.ts b/packages/svelte-query/tests/createQueries/createQueries.test.ts index 3ccd4818d5..b5f5a59cd5 100644 --- a/packages/svelte-query/tests/createQueries/createQueries.test.ts +++ b/packages/svelte-query/tests/createQueries/createQueries.test.ts @@ -1,11 +1,11 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, test } from 'vitest' import { render, waitFor } from '@testing-library/svelte' import { QueryClient } from '@tanstack/query-core' import { sleep } from '../utils' import BaseExample from './BaseExample.svelte' describe('createQueries', () => { - it('Render and wait for success', async () => { + test('Render and wait for success', async () => { const rendered = render(BaseExample, { props: { options: { @@ -41,7 +41,7 @@ describe('createQueries', () => { }) }) - it('should combine queries', async () => { + test('Combine queries', async () => { const ids = [1, 2, 3] const rendered = render(BaseExample, { diff --git a/packages/svelte-query/tests/infiniteQueryOptions/infiniteQueryOptions.test.ts b/packages/svelte-query/tests/infiniteQueryOptions/infiniteQueryOptions.test.ts new file mode 100644 index 0000000000..18b048f2c9 --- /dev/null +++ b/packages/svelte-query/tests/infiniteQueryOptions/infiniteQueryOptions.test.ts @@ -0,0 +1,28 @@ +import { describe, expectTypeOf, test } from 'vitest' +import { type InfiniteData } from '@tanstack/query-core' +import { infiniteQueryOptions } from '../../src/infiniteQueryOptions' + +describe('queryOptions', () => { + test('Should not allow excess properties', () => { + infiniteQueryOptions({ + queryKey: ['key'], + queryFn: () => Promise.resolve('data'), + getNextPageParam: () => 1, + initialPageParam: 1, + // @ts-expect-error this is a good error, because stallTime does not exist! + stallTime: 1000, + }) + }) + test('Should infer types for callbacks', () => { + infiniteQueryOptions({ + queryKey: ['key'], + queryFn: () => Promise.resolve('data'), + staleTime: 1000, + getNextPageParam: () => 1, + initialPageParam: 1, + select: (data) => { + expectTypeOf(data).toEqualTypeOf>() + }, + }) + }) +}) diff --git a/packages/svelte-query/tests/queryOptions/queryOptions.test.ts b/packages/svelte-query/tests/queryOptions/queryOptions.test.ts index 65c7e47679..02ca7b1869 100644 --- a/packages/svelte-query/tests/queryOptions/queryOptions.test.ts +++ b/packages/svelte-query/tests/queryOptions/queryOptions.test.ts @@ -1,9 +1,9 @@ import { QueryClient, dataTagSymbol, skipToken } from '@tanstack/query-core' -import { describe, expectTypeOf, it } from 'vitest' +import { describe, expectTypeOf, test } from 'vitest' import { queryOptions } from '../../src/queryOptions' describe('queryOptions', () => { - it('should not allow excess properties', () => { + test('Should not allow excess properties', () => { queryOptions({ queryKey: ['key'], queryFn: () => Promise.resolve(5), @@ -12,7 +12,7 @@ describe('queryOptions', () => { }) }) - it('should infer types for callbacks', () => { + test('Should infer types for callbacks', () => { queryOptions({ queryKey: ['key'], queryFn: () => Promise.resolve(5), @@ -23,7 +23,7 @@ describe('queryOptions', () => { }) }) - it('should work when passed to fetchQuery', async () => { + test('Should work when passed to fetchQuery', async () => { const options = queryOptions({ queryKey: ['key'], queryFn: () => Promise.resolve(5), @@ -33,7 +33,7 @@ describe('queryOptions', () => { expectTypeOf(data).toEqualTypeOf() }) - it('should tag the queryKey with the result type of the QueryFn', () => { + test('Should tag the queryKey with the result type of the QueryFn', () => { const { queryKey } = queryOptions({ queryKey: ['key'], queryFn: () => Promise.resolve(5), @@ -42,7 +42,7 @@ describe('queryOptions', () => { expectTypeOf(queryKey[dataTagSymbol]).toEqualTypeOf() }) - it('should tag the queryKey even if no promise is returned', () => { + test('Should tag the queryKey even if no promise is returned', () => { const { queryKey } = queryOptions({ queryKey: ['key'], queryFn: () => 5, @@ -51,7 +51,7 @@ describe('queryOptions', () => { expectTypeOf(queryKey[dataTagSymbol]).toEqualTypeOf() }) - it('should tag the queryKey with unknown if there is no queryFn', () => { + test('Should tag the queryKey with unknown if there is no queryFn', () => { const { queryKey } = queryOptions({ queryKey: ['key'], }) @@ -59,7 +59,7 @@ describe('queryOptions', () => { expectTypeOf(queryKey[dataTagSymbol]).toEqualTypeOf() }) - it('should tag the queryKey with the result type of the QueryFn if select is used', () => { + test('Should tag the queryKey with the result type of the QueryFn if select is used', () => { const { queryKey } = queryOptions({ queryKey: ['key'], queryFn: () => Promise.resolve(5), @@ -69,7 +69,7 @@ describe('queryOptions', () => { expectTypeOf(queryKey[dataTagSymbol]).toEqualTypeOf() }) - it('should return the proper type when passed to getQueryData', () => { + test('Should return the proper type when passed to getQueryData', () => { const { queryKey } = queryOptions({ queryKey: ['key'], queryFn: () => Promise.resolve(5), @@ -80,7 +80,7 @@ describe('queryOptions', () => { expectTypeOf(data).toEqualTypeOf() }) - it('should return the proper type when passed to getQueryState', () => { + test('Should return the proper type when passed to getQueryState', () => { const { queryKey } = queryOptions({ queryKey: ['key'], queryFn: () => Promise.resolve(5), @@ -91,7 +91,7 @@ describe('queryOptions', () => { expectTypeOf(state?.data).toEqualTypeOf() }) - it('should properly type updaterFn when passed to setQueryData', () => { + test('Should properly type updaterFn when passed to setQueryData', () => { const { queryKey } = queryOptions({ queryKey: ['key'], queryFn: () => Promise.resolve(5), @@ -105,7 +105,7 @@ describe('queryOptions', () => { expectTypeOf(data).toEqualTypeOf() }) - it('should properly type value when passed to setQueryData', () => { + test('Should properly type value when passed to setQueryData', () => { const { queryKey } = queryOptions({ queryKey: ['key'], queryFn: () => Promise.resolve(5), @@ -122,7 +122,7 @@ describe('queryOptions', () => { expectTypeOf(data).toEqualTypeOf() }) - it('should infer even if there is a conditional skipToken', () => { + test('Should infer even if there is a conditional skipToken', () => { const options = queryOptions({ queryKey: ['key'], queryFn: Math.random() > 0.5 ? skipToken : () => Promise.resolve(5), @@ -133,7 +133,7 @@ describe('queryOptions', () => { expectTypeOf(data).toEqualTypeOf() }) - it('should infer to unknown if we disable a query with just a skipToken', () => { + test('Should infer to unknown if we disable a query with just a skipToken', () => { const options = queryOptions({ queryKey: ['key'], queryFn: skipToken, diff --git a/packages/svelte-query/tests/useIsFetching/BaseExample.svelte b/packages/svelte-query/tests/useIsFetching/BaseExample.svelte index f94b56dd2b..97737ff37b 100644 --- a/packages/svelte-query/tests/useIsFetching/BaseExample.svelte +++ b/packages/svelte-query/tests/useIsFetching/BaseExample.svelte @@ -14,15 +14,13 @@ const options = derived(ready, ($ready) => ({ queryKey: [key], queryFn: async () => { - await sleep(50) + await sleep(20) return 'test' }, enabled: $ready, })) const query = createQuery(options, queryClient) - - $: console.log($isFetching) diff --git a/packages/svelte-query/tests/useIsMutating/BaseExample.svelte b/packages/svelte-query/tests/useIsMutating/BaseExample.svelte new file mode 100644 index 0000000000..7c30b57207 --- /dev/null +++ b/packages/svelte-query/tests/useIsMutating/BaseExample.svelte @@ -0,0 +1,24 @@ + + + + +
isMutating: {$isMutating}
diff --git a/packages/svelte-query/tests/useIsMutating/useIsMutating.test.ts b/packages/svelte-query/tests/useIsMutating/useIsMutating.test.ts new file mode 100644 index 0000000000..85725d292d --- /dev/null +++ b/packages/svelte-query/tests/useIsMutating/useIsMutating.test.ts @@ -0,0 +1,14 @@ +import { describe, test } from 'vitest' +import { fireEvent, render } from '@testing-library/svelte' +import BaseExample from './BaseExample.svelte' + +describe('useIsFetching', () => { + test('should update as queries start and stop fetching', async () => { + const rendered = render(BaseExample) + + await rendered.findByText('isMutating: 0') + fireEvent.click(rendered.getByRole('button', { name: /Trigger/i })) + await rendered.findByText('isMutating: 1') + await rendered.findByText('isMutating: 0') + }) +}) diff --git a/packages/svelte-query/tests/useMutationState/useMutationState.test.ts b/packages/svelte-query/tests/useMutationState/useMutationState.test.ts index 0a9cc72e0c..c2190cfb14 100644 --- a/packages/svelte-query/tests/useMutationState/useMutationState.test.ts +++ b/packages/svelte-query/tests/useMutationState/useMutationState.test.ts @@ -1,9 +1,9 @@ -import { describe, expect, it, vi } from 'vitest' +import { describe, expect, test, vi } from 'vitest' import { fireEvent, render, waitFor } from '@testing-library/svelte' import BaseExample from './BaseExample.svelte' describe('useMutationState', () => { - it('run few mutation functions and check from useMutationState ', async () => { + test('Run few mutation functions and check from useMutationState ', async () => { const successMutationFn = vi.fn() const errorMutationFn = vi.fn().mockImplementation(() => { @@ -41,7 +41,7 @@ describe('useMutationState', () => { }) }) - it('can select specific type of mutation ( i.e: error only )', async () => { + test('Can select specific type of mutation ( i.e: error only )', async () => { const successMutationFn = vi.fn() const errorMutationFn = vi.fn().mockImplementation(() => { throw 'error' @@ -80,7 +80,7 @@ describe('useMutationState', () => { }) }) - it('can select specific mutation using mutation key', async () => { + test('Can select specific mutation using mutation key', async () => { const successMutationFn = vi.fn() const errorMutationFn = vi.fn().mockImplementation(() => { throw 'error' From 98547b6b649e92aa63abf63ba3e07875abf29b24 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Wed, 3 Jul 2024 10:18:25 +1000 Subject: [PATCH 14/80] feat(eslint-plugin-query): Add compatibility with flat config (#7663) * feat(eslint-plugin-query): Add flat config compatibility * Add flat/recommended * Fix types * Use in basic-typescript * Load plugin with flat/recommended * Update docs * Add react and react-hooks back * Remove test * Fix attw --- docs/eslint/eslint-plugin-query.md | 60 +++++++++++++++---- .../react/basic-graphql-request/src/index.jsx | 1 - examples/react/basic-typescript/.eslintrc | 7 --- .../react/basic-typescript/eslint.config.js | 19 ++++++ examples/react/basic-typescript/src/index.tsx | 1 - examples/react/basic-typescript/tsconfig.json | 2 +- examples/react/basic/src/index.jsx | 1 - .../default-query-function/src/index.jsx | 1 - examples/react/simple/src/index.jsx | 1 - package.json | 2 +- packages/eslint-plugin-query/.attw.json | 3 + .../src/__tests__/configs.test.ts | 21 ------- packages/eslint-plugin-query/src/configs.ts | 34 ----------- packages/eslint-plugin-query/src/index.ts | 49 ++++++++++++++- pnpm-lock.yaml | 11 ++-- 15 files changed, 124 insertions(+), 89 deletions(-) delete mode 100644 examples/react/basic-typescript/.eslintrc create mode 100644 examples/react/basic-typescript/eslint.config.js create mode 100644 packages/eslint-plugin-query/.attw.json delete mode 100644 packages/eslint-plugin-query/src/__tests__/configs.test.ts delete mode 100644 packages/eslint-plugin-query/src/configs.ts diff --git a/docs/eslint/eslint-plugin-query.md b/docs/eslint/eslint-plugin-query.md index 661943b8b9..d54006654e 100644 --- a/docs/eslint/eslint-plugin-query.md +++ b/docs/eslint/eslint-plugin-query.md @@ -19,34 +19,68 @@ $ yarn add -D @tanstack/eslint-plugin-query $ bun add -D @tanstack/eslint-plugin-query ``` -## Usage +## Flat Config (`eslint.config.js`) -To enable all of the recommended rules for our plugin, add `plugin:@tanstack/eslint-plugin-query/recommended` in extends: +### Recommended setup -```json -{ - "extends": ["plugin:@tanstack/eslint-plugin-query/recommended"] -} +To enable all of the recommended rules for our plugin, add the following config: + +```js +import pluginQuery from '@tanstack/eslint-plugin-query' + +export default [ + ...pluginQuery.configs['flat/recommended'], + // Any other config... +] +``` + +### Custom setup + +Alternatively, you can load the plugin and configure only the rules you want to use: + +```js +import pluginQuery from '@tanstack/eslint-plugin-query' + +export default [ + { + plugins: { + '@tanstack/query': pluginQuery, + }, + rules: { + '@tanstack/query/exhaustive-deps': 'error', + }, + }, + // Any other config... +] ``` -### Alternative config +## Legacy Config (`.eslintrc`) -Alternatively, add `@tanstack/eslint-plugin-query` to the plugins section of your `.eslintrc` configuration file: +### Recommended setup + +To enable all of the recommended rules for our plugin, add `plugin:@tanstack/eslint-plugin-query/recommended` in extends: ```json { - "plugins": ["@tanstack/query"] + "extends": ["plugin:@tanstack/eslint-plugin-query/recommended"] } ``` -Then configure the rules you want to use under the rules section: +### Custom setup + +Alternatively, add `@tanstack/eslint-plugin-query` to the plugins section, and configure the rules you want to use: ```json { + "plugins": ["@tanstack/query"], "rules": { - "@tanstack/query/exhaustive-deps": "error", - "@tanstack/query/no-rest-destructuring": "warn", - "@tanstack/query/stable-query-client": "error" + "@tanstack/query/exhaustive-deps": "error" } } ``` + +## Rules + +- [@tanstack/query/exhaustive-deps](../exhaustive-deps) +- [@tanstack/query/no-rest-destructuring](../exhaustive-deps) +- [@tanstack/query/stable-query-client](../exhaustive-deps) diff --git a/examples/react/basic-graphql-request/src/index.jsx b/examples/react/basic-graphql-request/src/index.jsx index b484d73a23..10aad56931 100644 --- a/examples/react/basic-graphql-request/src/index.jsx +++ b/examples/react/basic-graphql-request/src/index.jsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/anchor-is-valid */ import React from 'react' import ReactDOM from 'react-dom/client' import { diff --git a/examples/react/basic-typescript/.eslintrc b/examples/react/basic-typescript/.eslintrc deleted file mode 100644 index 270fbc9ac0..0000000000 --- a/examples/react/basic-typescript/.eslintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": [ - "plugin:react/jsx-runtime", - "plugin:react-hooks/recommended", - "plugin:@tanstack/eslint-plugin-query/recommended" - ] -} diff --git a/examples/react/basic-typescript/eslint.config.js b/examples/react/basic-typescript/eslint.config.js new file mode 100644 index 0000000000..dee0fcc96c --- /dev/null +++ b/examples/react/basic-typescript/eslint.config.js @@ -0,0 +1,19 @@ +import { tanstackConfig } from '@tanstack/config/eslint' +import pluginQuery from '@tanstack/eslint-plugin-query' +import pluginReact from '@eslint-react/eslint-plugin' +import pluginReactHooks from 'eslint-plugin-react-hooks' + +export default [ + ...tanstackConfig, + ...pluginQuery.configs['flat/recommended'], + pluginReact.configs.recommended, + { + plugins: { + 'react-hooks': pluginReactHooks, + }, + rules: { + 'react-hooks/exhaustive-deps': 'error', + 'react-hooks/rules-of-hooks': 'error', + }, + }, +] diff --git a/examples/react/basic-typescript/src/index.tsx b/examples/react/basic-typescript/src/index.tsx index 09d700c7c1..d6aace092c 100644 --- a/examples/react/basic-typescript/src/index.tsx +++ b/examples/react/basic-typescript/src/index.tsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/anchor-is-valid */ import * as React from 'react' import ReactDOM from 'react-dom/client' import axios from 'axios' diff --git a/examples/react/basic-typescript/tsconfig.json b/examples/react/basic-typescript/tsconfig.json index 7c962d9747..23a8707ef4 100644 --- a/examples/react/basic-typescript/tsconfig.json +++ b/examples/react/basic-typescript/tsconfig.json @@ -20,5 +20,5 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, - "include": ["src"] + "include": ["src", "eslint.config.js"] } diff --git a/examples/react/basic/src/index.jsx b/examples/react/basic/src/index.jsx index e038ea9b33..3ee4ac23a8 100644 --- a/examples/react/basic/src/index.jsx +++ b/examples/react/basic/src/index.jsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/anchor-is-valid */ import React from 'react' import ReactDOM from 'react-dom/client' import axios from 'axios' diff --git a/examples/react/default-query-function/src/index.jsx b/examples/react/default-query-function/src/index.jsx index 5b494df68e..6a10ce9155 100644 --- a/examples/react/default-query-function/src/index.jsx +++ b/examples/react/default-query-function/src/index.jsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/anchor-is-valid */ import React from 'react' import ReactDOM from 'react-dom/client' import axios from 'axios' diff --git a/examples/react/simple/src/index.jsx b/examples/react/simple/src/index.jsx index 5aa4579fe7..fa7f86a58a 100644 --- a/examples/react/simple/src/index.jsx +++ b/examples/react/simple/src/index.jsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/anchor-is-valid */ import React from 'react' import ReactDOM from 'react-dom/client' import { diff --git a/package.json b/package.json index 0de7e54ea3..bf098199a9 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "namespace": "@tanstack", "devDependencies": { - "@arethetypeswrong/cli": "^0.15.3", + "@arethetypeswrong/cli": "^0.16.0", "@cspell/eslint-plugin": "^8.9.1", "@eslint-react/eslint-plugin": "^1.5.16", "@solidjs/testing-library": "^0.8.8", diff --git a/packages/eslint-plugin-query/.attw.json b/packages/eslint-plugin-query/.attw.json new file mode 100644 index 0000000000..329bfe8343 --- /dev/null +++ b/packages/eslint-plugin-query/.attw.json @@ -0,0 +1,3 @@ +{ + "ignoreRules": ["false-export-default"] +} diff --git a/packages/eslint-plugin-query/src/__tests__/configs.test.ts b/packages/eslint-plugin-query/src/__tests__/configs.test.ts deleted file mode 100644 index ee73289f90..0000000000 --- a/packages/eslint-plugin-query/src/__tests__/configs.test.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { configs } from '../configs' - -describe('configs', () => { - it('should match snapshot', () => { - expect(configs).toMatchInlineSnapshot(` - { - "recommended": { - "plugins": [ - "@tanstack/eslint-plugin-query", - ], - "rules": { - "@tanstack/query/exhaustive-deps": "error", - "@tanstack/query/no-rest-destructuring": "warn", - "@tanstack/query/stable-query-client": "error", - }, - }, - } - `) - }) -}) diff --git a/packages/eslint-plugin-query/src/configs.ts b/packages/eslint-plugin-query/src/configs.ts deleted file mode 100644 index 12d23f0d5b..0000000000 --- a/packages/eslint-plugin-query/src/configs.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { rules } from './rules' -import type { ESLintUtils } from '@typescript-eslint/utils' -import type { ExtraRuleDocs } from './types' - -function generateRecommendedConfig( - allRules: Record< - string, - ESLintUtils.RuleModule< - string, - ReadonlyArray, - ExtraRuleDocs, - ESLintUtils.RuleListener - > - >, -) { - return Object.entries(allRules).reduce( - (memo, [name, rule]) => { - const { recommended } = rule.meta.docs || {} - - return { - ...memo, - ...(recommended ? { [`@tanstack/query/${name}`]: recommended } : {}), - } - }, - {} as Record, - ) -} - -export const configs = { - recommended: { - plugins: ['@tanstack/eslint-plugin-query'], - rules: generateRecommendedConfig(rules), - }, -} diff --git a/packages/eslint-plugin-query/src/index.ts b/packages/eslint-plugin-query/src/index.ts index eef4c020b5..9a8e387b20 100644 --- a/packages/eslint-plugin-query/src/index.ts +++ b/packages/eslint-plugin-query/src/index.ts @@ -1,2 +1,47 @@ -export { configs } from './configs' -export { rules } from './rules' +import { rules } from './rules' +import type { ESLint, Linter } from 'eslint' +import type { RuleModule } from '@typescript-eslint/utils/ts-eslint' + +type RuleKey = keyof typeof rules + +interface Plugin extends Omit { + rules: Record> + configs: Record< + string, + ESLint.ConfigData | Linter.FlatConfig | Array + > +} + +const plugin: Plugin = { + meta: { + name: '@tanstack/eslint-plugin-query', + }, + configs: {}, + rules, +} + +// Assign configs here so we can reference `plugin` +Object.assign(plugin.configs, { + recommended: { + plugins: ['@tanstack/eslint-plugin-query'], + rules: { + '@tanstack/query/exhaustive-deps': 'error', + '@tanstack/query/no-rest-destructuring': 'warn', + '@tanstack/query/stable-query-client': 'error', + }, + }, + 'flat/recommended': [ + { + plugins: { + '@tanstack/query': plugin, + }, + rules: { + '@tanstack/query/exhaustive-deps': 'error', + '@tanstack/query/no-rest-destructuring': 'warn', + '@tanstack/query/stable-query-client': 'error', + }, + }, + ], +}) + +export default plugin diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f9efa7436..f12e7a998c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,8 +14,8 @@ importers: .: devDependencies: '@arethetypeswrong/cli': - specifier: ^0.15.3 - version: 0.15.3 + specifier: ^0.16.0 + version: 0.16.0 '@cspell/eslint-plugin': specifier: ^8.9.1 version: 8.9.1(eslint@8.57.0) @@ -2546,8 +2546,8 @@ packages: peerDependencies: ajv: '>=8' - '@arethetypeswrong/cli@0.15.3': - resolution: {integrity: sha512-sIMA9ZJBWDEg1+xt5RkAEflZuf8+PO8SdKj17x6PtETuUho+qlZJg4DgmKc3q+QwQ9zOB5VLK6jVRbFdNLdUIA==} + '@arethetypeswrong/cli@0.16.0': + resolution: {integrity: sha512-Vn3ihwlhueIvyJ6V3PKS8zwll9TId5Radvl3GS58ITimafJNoYRribKCoymYFiFS3jH6TspM30KhhiMvnMGvNQ==} engines: {node: '>=18'} hasBin: true @@ -19053,7 +19053,7 @@ snapshots: jsonpointer: 5.0.1 leven: 3.1.0 - '@arethetypeswrong/cli@0.15.3': + '@arethetypeswrong/cli@0.16.0': dependencies: '@arethetypeswrong/core': 0.15.1 chalk: 4.1.2 @@ -19062,6 +19062,7 @@ snapshots: marked: 9.1.6 marked-terminal: 6.2.0(marked@9.1.6) semver: 7.6.2 + which-pm-runs: 1.1.0 '@arethetypeswrong/core@0.15.1': dependencies: From af93a2394ca38ea59cd92215a947d6de8e167f67 Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Wed, 3 Jul 2024 00:20:36 +0000 Subject: [PATCH 15/80] release: v5.50.0 --- examples/react/algolia/package.json | 2 +- examples/react/basic-typescript/package.json | 2 +- examples/react/basic/package.json | 2 +- examples/solid/simple/package.json | 2 +- packages/eslint-plugin-query/package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/react/algolia/package.json b/examples/react/algolia/package.json index 26722b501d..864935c711 100644 --- a/examples/react/algolia/package.json +++ b/examples/react/algolia/package.json @@ -18,7 +18,7 @@ "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, "devDependencies": { - "@tanstack/eslint-plugin-query": "^5.49.1", + "@tanstack/eslint-plugin-query": "^5.50.0", "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", "@vitejs/plugin-react": "^4.2.1", diff --git a/examples/react/basic-typescript/package.json b/examples/react/basic-typescript/package.json index 4c85afee68..6119848575 100644 --- a/examples/react/basic-typescript/package.json +++ b/examples/react/basic-typescript/package.json @@ -18,7 +18,7 @@ "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, "devDependencies": { - "@tanstack/eslint-plugin-query": "^5.49.1", + "@tanstack/eslint-plugin-query": "^5.50.0", "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", "@vitejs/plugin-react": "^4.2.1", diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index 97fde647ea..3207f81f30 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -15,7 +15,7 @@ "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, "devDependencies": { - "@tanstack/eslint-plugin-query": "^5.49.1", + "@tanstack/eslint-plugin-query": "^5.50.0", "@vitejs/plugin-react": "^4.2.1", "vite": "^5.2.11" }, diff --git a/examples/solid/simple/package.json b/examples/solid/simple/package.json index 6c7a210a74..1bc4dc8d0e 100644 --- a/examples/solid/simple/package.json +++ b/examples/solid/simple/package.json @@ -14,7 +14,7 @@ "solid-js": "^1.8.17" }, "devDependencies": { - "@tanstack/eslint-plugin-query": "^5.49.1", + "@tanstack/eslint-plugin-query": "^5.50.0", "typescript": "5.3.3", "vite": "^5.2.11", "vite-plugin-solid": "^2.10.2" diff --git a/packages/eslint-plugin-query/package.json b/packages/eslint-plugin-query/package.json index 84ee4d9d63..eefec637ed 100644 --- a/packages/eslint-plugin-query/package.json +++ b/packages/eslint-plugin-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/eslint-plugin-query", - "version": "5.49.1", + "version": "5.50.0", "description": "ESLint plugin for TanStack Query", "author": "Eliya Cohen", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f12e7a998c..1b64d683d2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -343,7 +343,7 @@ importers: version: 19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522) devDependencies: '@tanstack/eslint-plugin-query': - specifier: ^5.49.1 + specifier: ^5.50.0 version: link:../../../packages/eslint-plugin-query '@types/react': specifier: npm:types-react@rc @@ -404,7 +404,7 @@ importers: version: 19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522) devDependencies: '@tanstack/eslint-plugin-query': - specifier: ^5.49.1 + specifier: ^5.50.0 version: link:../../../packages/eslint-plugin-query '@vitejs/plugin-react': specifier: ^4.2.1 @@ -466,7 +466,7 @@ importers: version: 19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522) devDependencies: '@tanstack/eslint-plugin-query': - specifier: ^5.49.1 + specifier: ^5.50.0 version: link:../../../packages/eslint-plugin-query '@types/react': specifier: npm:types-react@rc @@ -1261,7 +1261,7 @@ importers: version: 1.8.17 devDependencies: '@tanstack/eslint-plugin-query': - specifier: ^5.49.1 + specifier: ^5.50.0 version: link:../../../packages/eslint-plugin-query typescript: specifier: 5.3.3 From 70c40e7876a2b1ab04e5128bb82a9110964a8f24 Mon Sep 17 00:00:00 2001 From: 87xie Date: Wed, 3 Jul 2024 16:54:56 +0800 Subject: [PATCH 16/80] docs(react-query): Correct links in `usePrefetchQuery` (#7658) --- docs/framework/react/reference/usePrefetchInfiniteQuery.md | 4 ++-- docs/framework/react/reference/usePrefetchQuery.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/framework/react/reference/usePrefetchInfiniteQuery.md b/docs/framework/react/reference/usePrefetchInfiniteQuery.md index a1c5b4f7e3..19da4703aa 100644 --- a/docs/framework/react/reference/usePrefetchInfiniteQuery.md +++ b/docs/framework/react/reference/usePrefetchInfiniteQuery.md @@ -9,7 +9,7 @@ usePrefetchInfiniteQuery(options) **Options** -You can pass everything to `usePrefetchInfiniteQuery` that you can pass to [`queryClient.prefetchInfiniteQuery`](../../../reference/QueryClient#queryclientprefetchinfinitequery). Remember that some of them are required as below: +You can pass everything to `usePrefetchInfiniteQuery` that you can pass to [`queryClient.prefetchInfiniteQuery`](../../../../reference/QueryClient#queryclientprefetchinfinitequery). Remember that some of them are required as below: - `queryKey: QueryKey` @@ -34,4 +34,4 @@ You can pass everything to `usePrefetchInfiniteQuery` that you can pass to [`que - **Returns** -The `usePrefetchInfiniteQuery` does not return anything, it should be used just to fire a prefetch during render, before a suspense boundary that wraps a component that uses [`useSuspenseInfiniteQuery`](../reference/useSuspenseInfiniteQuery) +The `usePrefetchInfiniteQuery` does not return anything, it should be used just to fire a prefetch during render, before a suspense boundary that wraps a component that uses [`useSuspenseInfiniteQuery`](../useSuspenseInfiniteQuery) diff --git a/docs/framework/react/reference/usePrefetchQuery.md b/docs/framework/react/reference/usePrefetchQuery.md index 7fcc8f63f5..f8506d02f8 100644 --- a/docs/framework/react/reference/usePrefetchQuery.md +++ b/docs/framework/react/reference/usePrefetchQuery.md @@ -9,7 +9,7 @@ usePrefetchQuery(options) **Options** -You can pass everything to `usePrefetchQuery` that you can pass to [`queryClient.prefetchQuery`](../../../reference/QueryClient#queryclientprefetchquery). Remember that some of them are required as below: +You can pass everything to `usePrefetchQuery` that you can pass to [`queryClient.prefetchQuery`](../../../../reference/QueryClient#queryclientprefetchquery). Remember that some of them are required as below: - `queryKey: QueryKey` @@ -21,4 +21,4 @@ You can pass everything to `usePrefetchQuery` that you can pass to [`queryClient **Returns** -The `usePrefetchQuery` does not return anything, it should be used just to fire a prefetch during render, before a suspense boundary that wraps a component that uses [`useSuspenseQuery`](../reference/useSuspenseQuery). +The `usePrefetchQuery` does not return anything, it should be used just to fire a prefetch during render, before a suspense boundary that wraps a component that uses [`useSuspenseQuery`](../useSuspenseQuery). From f2741d153bd5f2449aee39ffaddfc3e2bbc7b915 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Fri, 5 Jul 2024 12:59:13 +1000 Subject: [PATCH 17/80] fix: Update package.json fields (#7674) --- package.json | 7 +- .../package.json | 36 +- .../angular-query-experimental/package.json | 50 +-- packages/eslint-plugin-query/package.json | 27 +- .../package.json | 26 +- .../package.json | 22 +- packages/query-codemods/package.json | 16 +- packages/query-core/package.json | 34 +- packages/query-devtools/package.json | 34 +- .../query-persist-client-core/package.json | 26 +- .../query-sync-storage-persister/package.json | 28 +- packages/react-query-devtools/package.json | 28 +- .../package.json | 28 +- .../react-query-persist-client/package.json | 26 +- packages/react-query/package.json | 36 +- packages/solid-query-devtools/package.json | 30 +- .../solid-query-persist-client/package.json | 26 +- packages/solid-query/package.json | 30 +- packages/svelte-query-devtools/package.json | 20 +- .../svelte-query-persist-client/package.json | 25 +- packages/svelte-query/package.json | 19 +- packages/vue-query-devtools/package.json | 14 +- packages/vue-query/package.json | 44 +-- pnpm-lock.yaml | 315 +++++++++++++----- 24 files changed, 552 insertions(+), 395 deletions(-) diff --git a/package.json b/package.json index bf098199a9..74eb2e4cda 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { - "name": "query", + "name": "root", "private": true, "repository": { "type": "git", "url": "https://github.com/TanStack/query.git" }, - "packageManager": "pnpm@9.3.0", + "packageManager": "pnpm@9.4.0", "type": "module", "scripts": { "clean": "pnpm --filter \"./packages/**\" run clean", @@ -38,9 +38,8 @@ "test:knip" ] }, - "namespace": "@tanstack", "devDependencies": { - "@arethetypeswrong/cli": "^0.16.0", + "@arethetypeswrong/cli": "^0.15.3", "@cspell/eslint-plugin": "^8.9.1", "@eslint-react/eslint-plugin": "^1.5.16", "@solidjs/testing-library": "^0.8.8", diff --git a/packages/angular-query-devtools-experimental/package.json b/packages/angular-query-devtools-experimental/package.json index 0806efd2f6..7f6cb12085 100644 --- a/packages/angular-query-devtools-experimental/package.json +++ b/packages/angular-query-devtools-experimental/package.json @@ -14,11 +14,6 @@ "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, - "type": "module", - "sideEffects": false, - "files": [ - "build" - ], "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint ./src", @@ -29,6 +24,24 @@ "test:build": "publint --strict && attw --pack", "build": "ng-packagr -p ng-package.json -c tsconfig.build.json && rimraf ./build/package.json" }, + "type": "module", + "types": "build/index.d.ts", + "module": "build/fesm2022/tanstack-angular-query-devtools-experimental.mjs", + "exports": { + ".": { + "types": "./build/index.d.ts", + "esm2022": "./build/esm2022/tanstack-angular-query-devtools-experimental.mjs", + "esm": "./build/esm2022/tanstack-angular-query-devtools-experimental.mjs", + "default": "./build/fesm2022/tanstack-angular-query-devtools-experimental.mjs" + }, + "./package.json": { + "default": "./package.json" + } + }, + "sideEffects": false, + "files": [ + "build" + ], "dependencies": { "@tanstack/query-devtools": "workspace:*", "tslib": "^2.6.2" @@ -47,18 +60,5 @@ "@angular/common": ">=16.0.0", "@angular/core": ">=16.0.0", "@tanstack/angular-query-experimental": "workspace:^" - }, - "module": "build/fesm2022/tanstack-angular-query-devtools-experimental.mjs", - "types": "build/index.d.ts", - "exports": { - "./package.json": { - "default": "./package.json" - }, - ".": { - "types": "./build/index.d.ts", - "esm2022": "./build/esm2022/tanstack-angular-query-devtools-experimental.mjs", - "esm": "./build/esm2022/tanstack-angular-query-devtools-experimental.mjs", - "default": "./build/fesm2022/tanstack-angular-query-devtools-experimental.mjs" - } } } diff --git a/packages/angular-query-experimental/package.json b/packages/angular-query-experimental/package.json index 6919217f59..1dda578b40 100644 --- a/packages/angular-query-experimental/package.json +++ b/packages/angular-query-experimental/package.json @@ -10,6 +10,10 @@ "directory": "packages/angular-query-experimental" }, "homepage": "https://tanstack.com/query", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, "keywords": [ "angular query", "angular", @@ -22,18 +26,6 @@ "state", "tanstack" ], - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "type": "module", - "sideEffects": false, - "files": [ - "build", - "!**/*.d.ts", - "!**/*.d.ts.map", - "build/rollup.d.ts" - ], "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint ./src", @@ -47,6 +39,27 @@ "test:build": "publint --strict && attw --pack", "build": "ng-packagr -p ng-package.json -c tsconfig.build.json && rimraf ./build/package.json && api-extractor run --local" }, + "type": "module", + "types": "build/rollup.d.ts", + "module": "build/fesm2022/tanstack-angular-query-experimental.mjs", + "exports": { + ".": { + "types": "./build/rollup.d.ts", + "esm2022": "./build/esm2022/tanstack-angular-query-experimental.mjs", + "esm": "./build/esm2022/tanstack-angular-query-experimental.mjs", + "default": "./build/fesm2022/tanstack-angular-query-experimental.mjs" + }, + "./package.json": { + "default": "./package.json" + } + }, + "sideEffects": false, + "files": [ + "build", + "!**/*.d.ts", + "!**/*.d.ts.map", + "build/rollup.d.ts" + ], "dependencies": { "@tanstack/query-core": "workspace:*", "tslib": "^2.6.2" @@ -68,18 +81,5 @@ "peerDependencies": { "@angular/core": ">=16.0.0", "@angular/common": ">=16.0.0" - }, - "module": "build/fesm2022/tanstack-angular-query-experimental.mjs", - "types": "build/rollup.d.ts", - "exports": { - "./package.json": { - "default": "./package.json" - }, - ".": { - "types": "./build/rollup.d.ts", - "esm2022": "./build/esm2022/tanstack-angular-query-experimental.mjs", - "esm": "./build/esm2022/tanstack-angular-query-experimental.mjs", - "default": "./build/fesm2022/tanstack-angular-query-experimental.mjs" - } } } diff --git a/packages/eslint-plugin-query/package.json b/packages/eslint-plugin-query/package.json index eefec637ed..588c821164 100644 --- a/packages/eslint-plugin-query/package.json +++ b/packages/eslint-plugin-query/package.json @@ -14,6 +14,19 @@ "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./dist && rimraf ./coverage", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", + "test:lib": "vitest", + "test:lib:dev": "pnpm run test:lib --watch", + "test:build": "publint --strict && attw --pack", + "build": "vite build" + }, "type": "module", "types": "dist/esm/index.d.ts", "main": "dist/cjs/index.cjs", @@ -31,19 +44,7 @@ }, "./package.json": "./package.json" }, - "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", - "test:eslint": "eslint ./src", - "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", - "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", - "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", - "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", - "test:types:ts53": "tsc", - "test:lib": "vitest", - "test:lib:dev": "pnpm run test:lib --watch", - "test:build": "publint --strict && attw --pack", - "build": "vite build" - }, + "sideEffects": false, "files": [ "dist", "src" diff --git a/packages/query-async-storage-persister/package.json b/packages/query-async-storage-persister/package.json index 3cd71ca98e..05574d5054 100644 --- a/packages/query-async-storage-persister/package.json +++ b/packages/query-async-storage-persister/package.json @@ -14,6 +14,19 @@ "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./build && rimraf ./coverage", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", + "test:lib": "vitest", + "test:lib:dev": "pnpm run test:lib --watch", + "test:build": "publint --strict && attw --pack", + "build": "tsup" + }, "type": "module", "types": "build/legacy/index.d.ts", "main": "build/legacy/index.cjs", @@ -36,19 +49,6 @@ "build", "src" ], - "scripts": { - "clean": "rimraf ./build && rimraf ./coverage", - "test:eslint": "eslint ./src", - "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", - "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", - "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", - "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", - "test:types:ts53": "tsc", - "test:lib": "vitest", - "test:lib:dev": "pnpm run test:lib --watch", - "test:build": "publint --strict && attw --pack", - "build": "tsup" - }, "dependencies": { "@tanstack/query-persist-client-core": "workspace:*" } diff --git a/packages/query-broadcast-client-experimental/package.json b/packages/query-broadcast-client-experimental/package.json index a96f65af59..fdfa3870fa 100644 --- a/packages/query-broadcast-client-experimental/package.json +++ b/packages/query-broadcast-client-experimental/package.json @@ -14,6 +14,17 @@ "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./build && rimraf ./coverage", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", + "test:build": "publint --strict && attw --pack", + "build": "tsup" + }, "type": "module", "types": "build/legacy/index.d.ts", "main": "build/legacy/index.cjs", @@ -36,17 +47,6 @@ "build", "src" ], - "scripts": { - "clean": "rimraf ./build && rimraf ./coverage", - "test:eslint": "eslint ./src", - "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", - "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", - "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", - "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", - "test:types:ts53": "tsc", - "test:build": "publint --strict && attw --pack", - "build": "tsup" - }, "dependencies": { "@tanstack/query-core": "workspace:*", "broadcast-channel": "^7.0.0" diff --git a/packages/query-codemods/package.json b/packages/query-codemods/package.json index 49093be40e..1a4b5e4d57 100644 --- a/packages/query-codemods/package.json +++ b/packages/query-codemods/package.json @@ -4,22 +4,26 @@ "description": "Collection of codemods to make the migration easier.", "author": "Balázs Máté Petró", "license": "MIT", - "repository": "tanstack/query", + "repository": { + "type": "git", + "url": "https://github.com/TanStack/query.git", + "directory": "packages/query-codemods" + }, "homepage": "https://tanstack.com/query", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, - "type": "module", - "exports": { - "./package.json": "./package.json" - }, - "sideEffects": false, "scripts": { "test:eslint": "eslint ./src", "test:lib": "vitest", "test:lib:dev": "pnpm run test:lib --watch" }, + "type": "module", + "exports": { + "./package.json": "./package.json" + }, + "sideEffects": false, "files": [ "src", "!src/jest.config.js", diff --git a/packages/query-core/package.json b/packages/query-core/package.json index 85f8348e61..5004004a0d 100644 --- a/packages/query-core/package.json +++ b/packages/query-core/package.json @@ -14,6 +14,22 @@ "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./build && rimraf ./coverage", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts47": "node ../../node_modules/typescript47/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts48": "node ../../node_modules/typescript48/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts49": "node ../../node_modules/typescript49/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts53": "tsc", + "test:lib": "vitest", + "test:lib:dev": "pnpm run test:lib --watch", + "test:build": "publint --strict && attw --pack", + "build": "tsup" + }, "type": "module", "types": "build/legacy/index.d.ts", "main": "build/legacy/index.cjs", @@ -35,21 +51,5 @@ "files": [ "build", "src" - ], - "scripts": { - "clean": "rimraf ./build && rimraf ./coverage", - "test:eslint": "eslint ./src", - "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", - "test:types:ts47": "node ../../node_modules/typescript47/lib/tsc.js -p tsconfig.legacy.json", - "test:types:ts48": "node ../../node_modules/typescript48/lib/tsc.js -p tsconfig.legacy.json", - "test:types:ts49": "node ../../node_modules/typescript49/lib/tsc.js -p tsconfig.legacy.json", - "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js -p tsconfig.legacy.json", - "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js -p tsconfig.legacy.json", - "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js -p tsconfig.legacy.json", - "test:types:ts53": "tsc", - "test:lib": "vitest", - "test:lib:dev": "pnpm run test:lib --watch", - "test:build": "publint --strict && attw --pack", - "build": "tsup" - } + ] } diff --git a/packages/query-devtools/package.json b/packages/query-devtools/package.json index f717c2d4fc..77fe77a3d1 100644 --- a/packages/query-devtools/package.json +++ b/packages/query-devtools/package.json @@ -4,12 +4,30 @@ "description": "Developer tools to interact with and visualize the TanStack Query cache", "author": "tannerlinsley", "license": "MIT", - "repository": "tanstack/query", + "repository": { + "type": "git", + "url": "https://github.com/TanStack/query.git", + "directory": "packages/query-devtools" + }, "homepage": "https://tanstack.com/query", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./build && rimraf ./coverage", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", + "test:lib": "vitest", + "test:lib:dev": "pnpm run test:lib --watch", + "test:build": "publint --strict && attw --pack", + "build": "tsup", + "build:dev": "tsup --watch" + }, "type": "module", "main": "./build/index.cjs", "module": "./build/index.js", @@ -33,20 +51,6 @@ }, "require": "./build/index.cjs" }, - "scripts": { - "clean": "rimraf ./build && rimraf ./coverage", - "test:eslint": "eslint ./src", - "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", - "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", - "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", - "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", - "test:types:ts53": "tsc", - "test:lib": "vitest", - "test:lib:dev": "pnpm run test:lib --watch", - "test:build": "publint --strict && attw --pack", - "build": "tsup", - "build:dev": "tsup --watch" - }, "files": [ "build", "src" diff --git a/packages/query-persist-client-core/package.json b/packages/query-persist-client-core/package.json index a30fb8fcdb..e5c0c87b0d 100644 --- a/packages/query-persist-client-core/package.json +++ b/packages/query-persist-client-core/package.json @@ -14,6 +14,19 @@ "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./build && rimraf ./coverage", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", + "test:lib": "vitest", + "test:lib:dev": "pnpm run test:lib --watch", + "test:build": "publint --strict && attw --pack", + "build": "tsup" + }, "type": "module", "types": "build/legacy/index.d.ts", "main": "build/legacy/index.cjs", @@ -36,19 +49,6 @@ "build", "src" ], - "scripts": { - "clean": "rimraf ./build && rimraf ./coverage", - "test:eslint": "eslint ./src", - "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", - "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", - "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", - "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", - "test:types:ts53": "tsc", - "test:lib": "vitest", - "test:lib:dev": "pnpm run test:lib --watch", - "test:build": "publint --strict && attw --pack", - "build": "tsup" - }, "dependencies": { "@tanstack/query-core": "workspace:*" } diff --git a/packages/query-sync-storage-persister/package.json b/packages/query-sync-storage-persister/package.json index a4f1baf7d8..d52835e7fa 100644 --- a/packages/query-sync-storage-persister/package.json +++ b/packages/query-sync-storage-persister/package.json @@ -7,13 +7,26 @@ "repository": { "type": "git", "url": "https://github.com/TanStack/query.git", - "directory": "packages/query-persist-client-core" + "directory": "packages/query-sync-storage-persister" }, "homepage": "https://tanstack.com/query", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./build && rimraf ./coverage", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", + "test:lib": "vitest", + "test:lib:dev": "pnpm run test:lib --watch", + "test:build": "publint --strict && attw --pack", + "build": "tsup" + }, "type": "module", "types": "build/legacy/index.d.ts", "main": "build/legacy/index.cjs", @@ -36,19 +49,6 @@ "build", "src" ], - "scripts": { - "clean": "rimraf ./build && rimraf ./coverage", - "test:eslint": "eslint ./src", - "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", - "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", - "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", - "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", - "test:types:ts53": "tsc", - "test:lib": "vitest", - "test:lib:dev": "pnpm run test:lib --watch", - "test:build": "publint --strict && attw --pack", - "build": "tsup" - }, "dependencies": { "@tanstack/query-core": "workspace:*", "@tanstack/query-persist-client-core": "workspace:*" diff --git a/packages/react-query-devtools/package.json b/packages/react-query-devtools/package.json index b29228ebe1..616d24f15c 100644 --- a/packages/react-query-devtools/package.json +++ b/packages/react-query-devtools/package.json @@ -14,6 +14,20 @@ "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./build && rimraf ./coverage", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", + "test:lib": "vitest", + "test:lib:dev": "pnpm run test:lib --watch", + "test:build": "publint --strict && attw --pack", + "build": "tsup", + "build:dev": "tsup --watch" + }, "type": "module", "types": "build/legacy/index.d.ts", "main": "build/legacy/index.cjs", @@ -56,20 +70,6 @@ "build", "src" ], - "scripts": { - "clean": "rimraf ./build && rimraf ./coverage", - "test:eslint": "eslint ./src", - "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", - "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", - "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", - "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", - "test:types:ts53": "tsc", - "test:lib": "vitest", - "test:lib:dev": "pnpm run test:lib --watch", - "test:build": "publint --strict && attw --pack", - "build": "tsup", - "build:dev": "tsup --watch" - }, "dependencies": { "@tanstack/query-devtools": "workspace:*" }, diff --git a/packages/react-query-next-experimental/package.json b/packages/react-query-next-experimental/package.json index 7f2e065f83..d3f12e4c69 100644 --- a/packages/react-query-next-experimental/package.json +++ b/packages/react-query-next-experimental/package.json @@ -4,12 +4,27 @@ "description": "Hydration utils for React Query in the NextJs app directory", "author": "tannerlinsley", "license": "MIT", - "repository": "tanstack/query", + "repository": { + "type": "git", + "url": "https://github.com/TanStack/query.git", + "directory": "packages/react-query-next-experimental" + }, "homepage": "https://tanstack.com/query", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./build && rimraf ./coverage", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", + "test:build": "publint --strict && attw --pack", + "build": "tsup" + }, "type": "module", "types": "build/legacy/index.d.ts", "main": "build/legacy/index.cjs", @@ -32,17 +47,6 @@ "build", "src" ], - "scripts": { - "clean": "rimraf ./build && rimraf ./coverage", - "test:eslint": "eslint ./src", - "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", - "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", - "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", - "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", - "test:types:ts53": "tsc", - "test:build": "publint --strict && attw --pack", - "build": "tsup" - }, "devDependencies": { "@tanstack/react-query": "workspace:*", "@types/react": "npm:types-react@rc", diff --git a/packages/react-query-persist-client/package.json b/packages/react-query-persist-client/package.json index a95cc1e997..ff9c5dc7a0 100644 --- a/packages/react-query-persist-client/package.json +++ b/packages/react-query-persist-client/package.json @@ -14,6 +14,19 @@ "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./build && rimraf ./coverage", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", + "test:lib": "vitest --retry=3", + "test:lib:dev": "pnpm run test:lib --watch", + "test:build": "publint --strict && attw --pack", + "build": "tsup" + }, "type": "module", "types": "build/legacy/index.d.ts", "main": "build/legacy/index.cjs", @@ -36,19 +49,6 @@ "build", "src" ], - "scripts": { - "clean": "rimraf ./build && rimraf ./coverage", - "test:eslint": "eslint ./src", - "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", - "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", - "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", - "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", - "test:types:ts53": "tsc", - "test:lib": "vitest --retry=3", - "test:lib:dev": "pnpm run test:lib --watch", - "test:build": "publint --strict && attw --pack", - "build": "tsup" - }, "dependencies": { "@tanstack/query-persist-client-core": "workspace:*" }, diff --git a/packages/react-query/package.json b/packages/react-query/package.json index c31b60d7c9..1f7bec93d6 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -14,24 +14,6 @@ "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, - "type": "module", - "types": "build/legacy/index.d.ts", - "main": "build/legacy/index.cjs", - "module": "build/legacy/index.js", - "exports": { - ".": { - "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, "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint ./src", @@ -50,6 +32,24 @@ "build:tsup": "tsup", "build:codemods": "cpy ../query-codemods/* ./build/codemods" }, + "type": "module", + "types": "build/legacy/index.d.ts", + "main": "build/legacy/index.cjs", + "module": "build/legacy/index.js", + "exports": { + ".": { + "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", diff --git a/packages/solid-query-devtools/package.json b/packages/solid-query-devtools/package.json index b30bd70a2f..0f756e0c42 100644 --- a/packages/solid-query-devtools/package.json +++ b/packages/solid-query-devtools/package.json @@ -4,12 +4,28 @@ "description": "Developer tools to interact with and visualize the TanStack/solid-query Query cache", "author": "tannerlinsley", "license": "MIT", - "repository": "tanstack/query", + "repository": { + "type": "git", + "url": "https://github.com/TanStack/query.git", + "directory": "packages/solid-query-devtools" + }, "homepage": "https://tanstack.com/query", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./build && rimraf ./coverage", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", + "test:build": "publint --strict && attw --pack", + "build": "tsup", + "build:dev": "tsup --watch" + }, "type": "module", "main": "./build/index.cjs", "module": "./build/index.js", @@ -33,18 +49,6 @@ }, "require": "./build/index.cjs" }, - "scripts": { - "clean": "rimraf ./build && rimraf ./coverage", - "test:eslint": "eslint ./src", - "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", - "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", - "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", - "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", - "test:types:ts53": "tsc", - "test:build": "publint --strict && attw --pack", - "build": "tsup", - "build:dev": "tsup --watch" - }, "files": [ "build", "src" diff --git a/packages/solid-query-persist-client/package.json b/packages/solid-query-persist-client/package.json index fa9b8132a8..12e46d0353 100644 --- a/packages/solid-query-persist-client/package.json +++ b/packages/solid-query-persist-client/package.json @@ -14,6 +14,19 @@ "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./build && rimraf ./coverage", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", + "test:lib": "vitest", + "test:lib:dev": "pnpm run test:lib --watch", + "test:build": "publint --strict && attw --pack", + "build": "tsup" + }, "type": "module", "types": "./build/index.d.ts", "main": "./build/index.cjs", @@ -43,19 +56,6 @@ "build", "src" ], - "scripts": { - "clean": "rimraf ./build && rimraf ./coverage", - "test:eslint": "eslint ./src", - "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", - "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", - "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", - "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", - "test:types:ts53": "tsc", - "test:lib": "vitest", - "test:lib:dev": "pnpm run test:lib --watch", - "test:build": "publint --strict && attw --pack", - "build": "tsup" - }, "dependencies": { "@tanstack/query-persist-client-core": "workspace:*" }, diff --git a/packages/solid-query/package.json b/packages/solid-query/package.json index 534d945814..7d9391e5f1 100644 --- a/packages/solid-query/package.json +++ b/packages/solid-query/package.json @@ -14,6 +14,21 @@ "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./build && rimraf ./coverage", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts49": "node ../../node_modules/typescript49/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts53": "tsc", + "test:lib": "vitest --retry=3", + "test:lib:dev": "pnpm run test:lib --watch", + "test:build": "publint --strict && attw --pack", + "build": "tsup", + "build:watch": "tsup --watch" + }, "type": "module", "main": "./build/index.cjs", "module": "./build/index.js", @@ -39,21 +54,6 @@ "default": "./build/index.cjs" } }, - "scripts": { - "clean": "rimraf ./build && rimraf ./coverage", - "test:eslint": "eslint ./src", - "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", - "test:types:ts49": "node ../../node_modules/typescript49/lib/tsc.js -p tsconfig.legacy.json", - "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js -p tsconfig.legacy.json", - "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js -p tsconfig.legacy.json", - "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js -p tsconfig.legacy.json", - "test:types:ts53": "tsc", - "test:lib": "vitest --retry=3", - "test:lib:dev": "pnpm run test:lib --watch", - "test:build": "publint --strict && attw --pack", - "build": "tsup", - "build:watch": "tsup --watch" - }, "files": [ "build", "src" diff --git a/packages/svelte-query-devtools/package.json b/packages/svelte-query-devtools/package.json index d159faf88d..6026eec5c3 100644 --- a/packages/svelte-query-devtools/package.json +++ b/packages/svelte-query-devtools/package.json @@ -4,12 +4,23 @@ "description": "Developer tools to interact with and visualize the TanStack/svelte-query cache", "author": "Lachlan Collins", "license": "MIT", - "repository": "tanstack/query", + "repository": { + "type": "git", + "url": "https://github.com/TanStack/query.git", + "directory": "packages/svelte-query-devtools" + }, "homepage": "https://tanstack.com/query", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./dist && rimraf ./coverage", + "test:types": "svelte-check --tsconfig ./tsconfig.json", + "test:eslint": "eslint ./src", + "test:build": "publint --strict && attw --pack", + "build": "svelte-package --input ./src --output ./dist" + }, "type": "module", "types": "dist/index.d.ts", "module": "dist/index.js", @@ -26,13 +37,6 @@ "dist", "src" ], - "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", - "test:types": "svelte-check --tsconfig ./tsconfig.json", - "test:eslint": "eslint ./src", - "test:build": "publint --strict && attw --pack", - "build": "svelte-package --input ./src --output ./dist" - }, "dependencies": { "@tanstack/query-devtools": "workspace:*", "esm-env": "^1.0.0" diff --git a/packages/svelte-query-persist-client/package.json b/packages/svelte-query-persist-client/package.json index cd0782cd0b..f2727ead3e 100644 --- a/packages/svelte-query-persist-client/package.json +++ b/packages/svelte-query-persist-client/package.json @@ -4,12 +4,25 @@ "description": "Svelte bindings to work with persisters in TanStack/svelte-query", "author": "Lachlan Collins", "license": "MIT", - "repository": "tanstack/query", + "repository": { + "type": "git", + "url": "https://github.com/TanStack/query.git", + "directory": "packages/svelte-query-persist-client" + }, "homepage": "https://tanstack.com/query", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./dist && rimraf ./coverage", + "test:types": "svelte-check --tsconfig ./tsconfig.json", + "test:eslint": "eslint ./src", + "test:lib": "vitest", + "test:lib:dev": "pnpm run test:lib --watch", + "test:build": "publint --strict && attw --pack", + "build": "svelte-package --input ./src --output ./dist" + }, "type": "module", "types": "dist/index.d.ts", "module": "dist/index.js", @@ -22,19 +35,11 @@ }, "./package.json": "./package.json" }, + "sideEffects": false, "files": [ "dist", "src" ], - "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", - "test:types": "svelte-check --tsconfig ./tsconfig.json", - "test:eslint": "eslint ./src", - "test:lib": "vitest", - "test:lib:dev": "pnpm run test:lib --watch", - "test:build": "publint --strict && attw --pack", - "build": "svelte-package --input ./src --output ./dist" - }, "dependencies": { "@tanstack/query-persist-client-core": "workspace:*" }, diff --git a/packages/svelte-query/package.json b/packages/svelte-query/package.json index bda0670b86..3ed2988f0b 100644 --- a/packages/svelte-query/package.json +++ b/packages/svelte-query/package.json @@ -14,6 +14,15 @@ "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./dist && rimraf ./coverage", + "test:types": "svelte-check --tsconfig ./tsconfig.json", + "test:eslint": "eslint ./src", + "test:lib": "vitest", + "test:lib:dev": "pnpm run test:lib --watch", + "test:build": "publint --strict && attw --pack", + "build": "svelte-package --input ./src --output ./dist" + }, "type": "module", "types": "dist/index.d.ts", "module": "dist/index.js", @@ -26,19 +35,11 @@ }, "./package.json": "./package.json" }, + "sideEffects": false, "files": [ "dist", "src" ], - "scripts": { - "clean": "rimraf ./dist && rimraf ./coverage", - "test:types": "svelte-check --tsconfig ./tsconfig.json", - "test:eslint": "eslint ./src", - "test:lib": "vitest", - "test:lib:dev": "pnpm run test:lib --watch", - "test:build": "publint --strict && attw --pack", - "build": "svelte-package --input ./src --output ./dist" - }, "dependencies": { "@tanstack/query-core": "workspace:*" }, diff --git a/packages/vue-query-devtools/package.json b/packages/vue-query-devtools/package.json index db0b6ffc4d..17bc49efa5 100644 --- a/packages/vue-query-devtools/package.json +++ b/packages/vue-query-devtools/package.json @@ -14,6 +14,13 @@ "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, + "scripts": { + "clean": "rimraf ./build && rimraf ./coverage", + "test:eslint": "eslint ./src", + "test:types": "vue-tsc", + "test:build": "publint --strict && attw --pack", + "build": "vite build" + }, "type": "module", "types": "dist/esm/index.d.ts", "module": "dist/esm/index.js", @@ -38,13 +45,6 @@ "dist", "src" ], - "scripts": { - "clean": "rimraf ./build && rimraf ./coverage", - "test:eslint": "eslint ./src", - "test:types": "vue-tsc", - "test:build": "publint --strict && attw --pack", - "build": "vite build" - }, "dependencies": { "@tanstack/query-devtools": "workspace:*" }, diff --git a/packages/vue-query/package.json b/packages/vue-query/package.json index a932e8487d..68a35f43c5 100644 --- a/packages/vue-query/package.json +++ b/packages/vue-query/package.json @@ -14,24 +14,6 @@ "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, - "type": "module", - "types": "build/legacy/index.d.ts", - "main": "build/legacy/index.cjs", - "module": "build/legacy/index.js", - "exports": { - ".": { - "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, "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint ./src", @@ -51,6 +33,28 @@ "test:build": "publint --strict && attw --pack", "build": "tsup" }, + "type": "module", + "types": "build/legacy/index.d.ts", + "main": "build/legacy/index.cjs", + "module": "build/legacy/index.js", + "exports": { + ".": { + "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" + ], "nx": { "targets": { "test:lib": { @@ -60,10 +64,6 @@ } } }, - "files": [ - "build", - "src" - ], "dependencies": { "@tanstack/match-sorter-utils": "^8.15.1", "@tanstack/query-core": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1b64d683d2..7650dde034 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,8 +14,8 @@ importers: .: devDependencies: '@arethetypeswrong/cli': - specifier: ^0.16.0 - version: 0.16.0 + specifier: ^0.15.3 + version: 0.15.3 '@cspell/eslint-plugin': specifier: ^8.9.1 version: 8.9.1(eslint@8.57.0) @@ -27,7 +27,7 @@ importers: version: 0.8.8(@solidjs/router@0.13.3(solid-js@1.8.17))(solid-js@1.8.17) '@tanstack/config': specifier: ^0.9.0 - version: 0.9.0(@types/node@20.12.12)(esbuild@0.19.11)(eslint@8.57.0)(rollup@4.14.1)(typescript@5.3.3)(vite@5.2.11(@types/node@20.12.12)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + version: 0.9.2(@types/node@20.12.12)(esbuild@0.19.11)(eslint@8.57.0)(rollup@4.14.1)(typescript@5.3.3)(vite@5.2.11(@types/node@20.12.12)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@testing-library/jest-dom': specifier: ^6.4.5 version: 6.4.5(vitest@1.6.0(@types/node@20.12.12)(jsdom@24.0.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) @@ -2546,8 +2546,8 @@ packages: peerDependencies: ajv: '>=8' - '@arethetypeswrong/cli@0.16.0': - resolution: {integrity: sha512-Vn3ihwlhueIvyJ6V3PKS8zwll9TId5Radvl3GS58ITimafJNoYRribKCoymYFiFS3jH6TspM30KhhiMvnMGvNQ==} + '@arethetypeswrong/cli@0.15.3': + resolution: {integrity: sha512-sIMA9ZJBWDEg1+xt5RkAEflZuf8+PO8SdKj17x6PtETuUho+qlZJg4DgmKc3q+QwQ9zOB5VLK6jVRbFdNLdUIA==} engines: {node: '>=18'} hasBin: true @@ -4600,6 +4600,10 @@ packages: resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint-community/regexpp@4.11.0': + resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint-react/ast@1.5.17': resolution: {integrity: sha512-X3FQ3gwIlvvzIRj/M5g/clx1Qx6bh88XHLJNYOan0/wz1twMOwbV7fOHPQ++2LHJg5xPPsdFI/LM8vPNsmfdbg==} @@ -6365,8 +6369,8 @@ packages: '@swc/helpers@0.5.5': resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} - '@tanstack/config@0.9.0': - resolution: {integrity: sha512-SeJjYW2RMaO+U51aNu3p92GHzs4yZPeKT9F4R32U7PgDFRGMLUpFh5oiYwtr5RuEddn0Vk9jwcfhnCuCHUgSuQ==} + '@tanstack/config@0.9.2': + resolution: {integrity: sha512-PRJbTH3fy2I5PumwS50FsTMieqmz1DDG+MKAU9FZxiIbZXtLSnR40YCfGYbngSZlI06y5BCyApqqG2FQRXDwsw==} engines: {node: '>=18'} hasBin: true @@ -6732,6 +6736,17 @@ packages: typescript: optional: true + '@typescript-eslint/eslint-plugin@7.15.0': + resolution: {integrity: sha512-uiNHpyjZtFrLwLDpHnzaDlP3Tt6sGMqTCiqmxaN4n4RP0EfYZDODJyddiFDF44Hjwxr5xAcaYxVKm9QKQFJFLA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.57.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/experimental-utils@3.10.1': resolution: {integrity: sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==} engines: {node: ^10.12.0 || >=12.0.0} @@ -6780,6 +6795,16 @@ packages: typescript: optional: true + '@typescript-eslint/parser@7.15.0': + resolution: {integrity: sha512-k9fYuQNnypLFcqORNClRykkGOMOj+pV6V91R4GO/l1FDGwpqmSwoOQrOHo3cGaH63e+D3ZiCAOsuS/D2c99j/A==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.57.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/rule-tester@8.0.0-alpha.30': resolution: {integrity: sha512-mqGc88a7uCoEMhdertGKaeLy8QrvqA5pKBchFosa+RX7EGU6ngJAmMj+ZRZka/r6hmTyDRbd44H3Z0ChOPgl+Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -6799,6 +6824,10 @@ packages: resolution: {integrity: sha512-gPrFSsoYcsffYXTOZ+hT7fyJr95rdVe4kGVX1ps/dJ+DfmlnjFN/GcMxXcVkeHDKqsq6uAcVaQaIi3cFffmAbA==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@7.15.0': + resolution: {integrity: sha512-Q/1yrF/XbxOTvttNVPihxh1b9fxamjEoz2Os/Pe38OHwxC24CyCqXxGTOdpb4lt6HYtqw9HetA/Rf6gDGaMPlw==} + engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@8.0.0-alpha.30': resolution: {integrity: sha512-FGW/iPWGyPFamAVZ60oCAthMqQrqafUGebF8UKuq/ha+e9SVG6YhJoRzurlQXOVf8dHfOhJ0ADMXyFnMc53clg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -6823,6 +6852,16 @@ packages: typescript: optional: true + '@typescript-eslint/type-utils@7.15.0': + resolution: {integrity: sha512-SkgriaeV6PDvpA6253PDVep0qCqgbO1IOBiycjnXsszNTVQe5flN5wR5jiczoEoDEnAqYFSFFc9al9BSGVltkg==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.57.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/types@3.10.1': resolution: {integrity: sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==} engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} @@ -6839,6 +6878,10 @@ packages: resolution: {integrity: sha512-mL7zNEOQybo5R3AavY+Am7KLv8BorIv7HCYS5rKoNZKQD9tsfGUpO4KdAn3sSUvTiS4PQkr2+K0KJbxj8H9NDg==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@7.15.0': + resolution: {integrity: sha512-aV1+B1+ySXbQH0pLK0rx66I3IkiZNidYobyfn0WFsdGhSXw+P3YOqeTq5GED458SfB24tg+ux3S+9g118hjlTw==} + engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@8.0.0-alpha.30': resolution: {integrity: sha512-4WzLlw27SO9pK9UFj/Hu7WGo8WveT0SEiIpFVsV2WwtQmLps6kouwtVCB8GJPZKJyurhZhcqCoQVQFmpv441Vg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -6879,6 +6922,15 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@7.15.0': + resolution: {integrity: sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/typescript-estree@8.0.0-alpha.30': resolution: {integrity: sha512-WSXbc9ZcXI+7yC+6q95u77i8FXz6HOLsw3ST+vMUlFy1lFbXyFL/3e6HDKQCm2Clt0krnoCPiTGvIn+GkYPn4Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -6900,6 +6952,12 @@ packages: peerDependencies: eslint: ^8.57.0 + '@typescript-eslint/utils@7.15.0': + resolution: {integrity: sha512-hfDMDqaqOqsUVGiEPSMLR/AjTSCsmJwjpKkYQRo1FNbmW4tBwBspYDwO9eh7sKSTwMQgBw9/T4DHudPaqshRWA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.57.0 + '@typescript-eslint/utils@8.0.0-alpha.30': resolution: {integrity: sha512-rfhqfLqFyXhHNDwMnHiVGxl/Z2q/3guQ1jLlGQ0hi9Rb7inmwz42crM+NnLPR+2vEnwyw1P/g7fnQgQ3qvFx4g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -6922,6 +6980,10 @@ packages: resolution: {integrity: sha512-Crb+F75U1JAEtBeQGxSKwI60hZmmzaqA3z9sYsVm8X7W5cwLEm5bRe0/uXS6+MR/y8CVpKSR/ontIAIEPFcEkA==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@7.15.0': + resolution: {integrity: sha512-Hqgy/ETgpt2L5xueA/zHHIl4fJI2O4XUE9l4+OIfbJIRSnTJb/QscncdqqZzofQegIJugRIF57OJea1khw2SDw==} + engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@8.0.0-alpha.30': resolution: {integrity: sha512-XZuNurZxBqmr6ZIRIwWFq7j5RZd6ZlkId/HZEWyfciK+CWoyOxSF9Pv2VXH9Rlu2ZG2PfbhLz2Veszl4Pfn7yA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -8287,10 +8349,6 @@ packages: resolution: {integrity: sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==} engines: {node: '>= 10.0'} - clean-regexp@1.0.0: - resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} - engines: {node: '>=4'} - clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -9503,6 +9561,10 @@ packages: resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} engines: {node: '>=10.13.0'} + enhanced-resolve@5.17.0: + resolution: {integrity: sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==} + engines: {node: '>=10.13.0'} + enquirer@2.3.6: resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} engines: {node: '>=8.6'} @@ -9760,6 +9822,12 @@ packages: eslint-import-resolver-webpack: optional: true + eslint-plugin-es-x@7.8.0: + resolution: {integrity: sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + eslint: ^8.57.0 + eslint-plugin-flowtype@5.10.0: resolution: {integrity: sha512-vcz32f+7TP+kvTUyMXZmCnNujBQZDNmcqPImw8b9PZ+16w1Qdm6ryRuYZYVaG9xRqqmAPr2Cs9FAX5gN+x/bjw==} engines: {node: ^10.12.0 || >=12.0.0} @@ -9774,8 +9842,8 @@ packages: '@babel/plugin-transform-react-jsx': ^7.14.9 eslint: ^8.57.0 - eslint-plugin-import-x@0.5.2: - resolution: {integrity: sha512-6f1YMmg3PdLwfiJDYnCRPfh67zJKbwbOKL99l6xGZDmIFkMht/4xyudafGEcDOmDlgp36e41W4RXDfOn7+pGRg==} + eslint-plugin-import-x@0.5.3: + resolution: {integrity: sha512-hJ/wkMcsLQXAZL3+txXIDpbW5cqwdm1rLTqV4VRY03aIbzE3zWE7rPZKW6Gzf7xyl1u3V1iYC6tOG77d9NF4GQ==} engines: {node: '>=16'} peerDependencies: eslint: ^8.57.0 @@ -9825,6 +9893,12 @@ packages: peerDependencies: eslint: ^8.57.0 + eslint-plugin-n@17.9.0: + resolution: {integrity: sha512-CPSaXDXdrT4nsrOrO4mT4VB6FMUkoySRkHWuuJJHVqsIEjIeZgMY1H7AzSwPbDScikBmLN82KeM1u7ixV7PzGg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 + eslint-plugin-react-compiler@0.0.0-experimental-c8b3f72-20240517: resolution: {integrity: sha512-cxUTFNMEKiLX6uFaRfrr2GHnB7KUHDMYLjEGzDec82ka6WyBCHg906nGSf3JvVnQKHaBDfUk7Mmv/JMvdgQB8Q==} engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} @@ -9910,12 +9984,6 @@ packages: peerDependencies: eslint: ^8.57.0 - eslint-plugin-unicorn@54.0.0: - resolution: {integrity: sha512-XxYLRiYtAWiAjPv6z4JREby1TAE2byBC7wlh0V4vWDCpccOSU1KovWV//jqPXF6bq3WKxqX9rdjoRQ1EhdmNdQ==} - engines: {node: '>=18.18'} - peerDependencies: - eslint: ^8.57.0 - eslint-plugin-vue@9.26.0: resolution: {integrity: sha512-eTvlxXgd4ijE1cdur850G6KalZqk65k1JKoOI2d1kT3hr8sPD07j1q98FRFdNnpxBELGPWxZmInxeHGF/GxtqQ==} engines: {node: ^14.17.0 || >=16.0.0} @@ -10722,8 +10790,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.6.0: - resolution: {integrity: sha512-UzcJi88Hw//CurUIRa9Jxb0vgOCcuD/MNjwmXp633cyaRKkCWACkoqHCtfZv43b1kqXGg/fpOa8bwgacCeXsVg==} + globals@15.8.0: + resolution: {integrity: sha512-VZAJ4cewHTExBWDHR6yptdIBlx9YSSZuwojj9Nt5mBRXQzrKakDsVKQ1J63sklLvzAJm0X5+RpO4i3Y2hcOnFw==} engines: {node: '>=18'} globalthis@1.0.3: @@ -12229,11 +12297,6 @@ packages: engines: {node: '>=4'} hasBin: true - jsesc@3.0.2: - resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} - engines: {node: '>=6'} - hasBin: true - json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} @@ -14114,10 +14177,6 @@ packages: resolution: {integrity: sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==} engines: {node: '>=10.4.0'} - pluralize@8.0.0: - resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} - engines: {node: '>=4'} - pngjs@3.4.0: resolution: {integrity: sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==} engines: {node: '>=4.0.0'} @@ -15446,10 +15505,6 @@ packages: regex-parser@2.2.11: resolution: {integrity: sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q==} - regexp-tree@0.1.27: - resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} - hasBin: true - regexp.prototype.flags@1.5.2: resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} engines: {node: '>= 0.4'} @@ -15462,10 +15517,6 @@ packages: resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==} engines: {node: '>=4'} - regjsparser@0.10.0: - resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} - hasBin: true - regjsparser@0.9.1: resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==} hasBin: true @@ -16384,6 +16435,9 @@ packages: resolution: {integrity: sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==} engines: {node: '>= 8'} + stable-hash@0.0.4: + resolution: {integrity: sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==} + stable@0.1.8: resolution: {integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==} deprecated: 'Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility' @@ -17303,8 +17357,8 @@ packages: typescript-auto-import-cache@0.3.2: resolution: {integrity: sha512-+laqe5SFL1vN62FPOOJSUDTZxtgsoOXjneYOXIpx5rQ4UMiN89NAtJLpqLqyebv9fgQ/IMeeTX+mQyRnwvJzvg==} - typescript-eslint@7.14.1: - resolution: {integrity: sha512-Eo1X+Y0JgGPspcANKjeR6nIqXl4VL5ldXLc15k4m9upq+eY5fhU2IueiEZL6jmHrKH8aCfbIvM/v3IrX5Hg99w==} + typescript-eslint@7.15.0: + resolution: {integrity: sha512-Ta40FhMXBCwHura4X4fncaCVkVcnJ9jnOq5+Lp4lN8F4DzHZtOwZdRvVBiNUGznUDHPwdGnrnwxmUOU2fFQqFA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.57.0 @@ -19053,7 +19107,7 @@ snapshots: jsonpointer: 5.0.1 leven: 3.1.0 - '@arethetypeswrong/cli@0.16.0': + '@arethetypeswrong/cli@0.15.3': dependencies: '@arethetypeswrong/core': 0.15.1 chalk: 4.1.2 @@ -19062,7 +19116,6 @@ snapshots: marked: 9.1.6 marked-terminal: 6.2.0(marked@9.1.6) semver: 7.6.2 - which-pm-runs: 1.1.0 '@arethetypeswrong/core@0.15.1': dependencies: @@ -21689,6 +21742,8 @@ snapshots: '@eslint-community/regexpp@4.10.0': {} + '@eslint-community/regexpp@4.11.0': {} + '@eslint-react/ast@1.5.17(eslint@8.57.0)(typescript@5.3.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) @@ -24254,17 +24309,16 @@ snapshots: '@swc/counter': 0.1.3 tslib: 2.6.2 - '@tanstack/config@0.9.0(@types/node@20.12.12)(esbuild@0.19.11)(eslint@8.57.0)(rollup@4.14.1)(typescript@5.3.3)(vite@5.2.11(@types/node@20.12.12)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': + '@tanstack/config@0.9.2(@types/node@20.12.12)(esbuild@0.19.11)(eslint@8.57.0)(rollup@4.14.1)(typescript@5.3.3)(vite@5.2.11(@types/node@20.12.12)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': dependencies: '@commitlint/parse': 19.0.3 '@eslint/js': 8.57.0 commander: 12.1.0 current-git-branch: 1.1.0 esbuild-register: 3.5.0(esbuild@0.19.11) - eslint-config-prettier: 9.1.0(eslint@8.57.0) - eslint-plugin-import-x: 0.5.2(eslint@8.57.0)(typescript@5.3.3) - eslint-plugin-unicorn: 54.0.0(eslint@8.57.0) - globals: 15.6.0 + eslint-plugin-import-x: 0.5.3(eslint@8.57.0)(typescript@5.3.3) + eslint-plugin-n: 17.9.0(eslint@8.57.0) + globals: 15.8.0 interpret: 3.1.1 jsonfile: 6.1.0 liftoff: 5.0.0 @@ -24272,7 +24326,7 @@ snapshots: rollup-plugin-preserve-directives: 0.4.0(rollup@4.14.1) semver: 7.6.2 simple-git: 3.25.0 - typescript-eslint: 7.14.1(eslint@8.57.0)(typescript@5.3.3) + typescript-eslint: 7.15.0(eslint@8.57.0)(typescript@5.3.3) v8flags: 4.0.1 vite-plugin-dts: 3.9.1(@types/node@20.12.12)(rollup@4.14.1)(typescript@5.3.3)(vite@5.2.11(@types/node@20.12.12)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) vite-plugin-externalize-deps: 0.8.0(vite@5.2.11(@types/node@20.12.12)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) @@ -24700,6 +24754,24 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/eslint-plugin@7.15.0(@typescript-eslint/parser@7.15.0(eslint@8.57.0)(typescript@5.3.3))(eslint@8.57.0)(typescript@5.3.3)': + dependencies: + '@eslint-community/regexpp': 4.11.0 + '@typescript-eslint/parser': 7.15.0(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/scope-manager': 7.15.0 + '@typescript-eslint/type-utils': 7.15.0(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/utils': 7.15.0(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 7.15.0 + eslint: 8.57.0 + graphemer: 1.4.0 + ignore: 5.3.1 + natural-compare: 1.4.0 + ts-api-utils: 1.3.0(typescript@5.3.3) + optionalDependencies: + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/experimental-utils@3.10.1(eslint@9.4.0)(typescript@5.4.2)': dependencies: '@types/json-schema': 7.0.14 @@ -24770,6 +24842,19 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/parser@7.15.0(eslint@8.57.0)(typescript@5.3.3)': + dependencies: + '@typescript-eslint/scope-manager': 7.15.0 + '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 7.15.0 + debug: 4.3.5(supports-color@6.1.0) + eslint: 8.57.0 + optionalDependencies: + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/rule-tester@8.0.0-alpha.30(@eslint/eslintrc@3.1.0)(eslint@8.57.0)(typescript@5.4.2)': dependencies: '@eslint/eslintrc': 3.1.0 @@ -24799,6 +24884,11 @@ snapshots: '@typescript-eslint/types': 7.14.1 '@typescript-eslint/visitor-keys': 7.14.1 + '@typescript-eslint/scope-manager@7.15.0': + dependencies: + '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/visitor-keys': 7.15.0 + '@typescript-eslint/scope-manager@8.0.0-alpha.30': dependencies: '@typescript-eslint/types': 8.0.0-alpha.30 @@ -24828,6 +24918,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/type-utils@7.15.0(eslint@8.57.0)(typescript@5.3.3)': + dependencies: + '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.3.3) + '@typescript-eslint/utils': 7.15.0(eslint@8.57.0)(typescript@5.3.3) + debug: 4.3.5(supports-color@6.1.0) + eslint: 8.57.0 + ts-api-utils: 1.3.0(typescript@5.3.3) + optionalDependencies: + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/types@3.10.1': {} '@typescript-eslint/types@4.33.0': {} @@ -24836,6 +24938,8 @@ snapshots: '@typescript-eslint/types@7.14.1': {} + '@typescript-eslint/types@7.15.0': {} + '@typescript-eslint/types@8.0.0-alpha.30': {} '@typescript-eslint/typescript-estree@3.10.1(typescript@5.4.2)': @@ -24896,6 +25000,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@7.15.0(typescript@5.3.3)': + dependencies: + '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/visitor-keys': 7.15.0 + debug: 4.3.5(supports-color@6.1.0) + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.4 + semver: 7.6.2 + ts-api-utils: 1.3.0(typescript@5.3.3) + optionalDependencies: + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/typescript-estree@8.0.0-alpha.30(typescript@5.4.2)': dependencies: '@typescript-eslint/types': 8.0.0-alpha.30 @@ -24937,6 +25056,17 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@7.15.0(eslint@8.57.0)(typescript@5.3.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@typescript-eslint/scope-manager': 7.15.0 + '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.3.3) + eslint: 8.57.0 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/utils@8.0.0-alpha.30(eslint@8.57.0)(typescript@5.4.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) @@ -24967,6 +25097,11 @@ snapshots: '@typescript-eslint/types': 7.14.1 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@7.15.0': + dependencies: + '@typescript-eslint/types': 7.15.0 + eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.0.0-alpha.30': dependencies: '@typescript-eslint/types': 8.0.0-alpha.30 @@ -26953,10 +27088,6 @@ snapshots: dependencies: source-map: 0.6.1 - clean-regexp@1.0.0: - dependencies: - escape-string-regexp: 1.0.5 - clean-stack@2.2.0: {} clean-stack@4.2.0: @@ -28273,6 +28404,11 @@ snapshots: graceful-fs: 4.2.11 tapable: 2.2.1 + enhanced-resolve@5.17.0: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.2.1 + enquirer@2.3.6: dependencies: ansi-colors: 4.1.3 @@ -28621,6 +28757,11 @@ snapshots: optionalDependencies: source-map: 0.6.1 + eslint-compat-utils@0.5.1(eslint@8.57.0): + dependencies: + eslint: 8.57.0 + semver: 7.6.2 + eslint-compat-utils@0.5.1(eslint@9.4.0): dependencies: eslint: 9.4.0 @@ -28702,6 +28843,13 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-plugin-es-x@7.8.0(eslint@8.57.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/regexpp': 4.11.0 + eslint: 8.57.0 + eslint-compat-utils: 0.5.1(eslint@8.57.0) + eslint-plugin-flowtype@5.10.0(eslint@9.4.0): dependencies: eslint: 9.4.0 @@ -28716,9 +28864,9 @@ snapshots: lodash: 4.17.21 string-natural-compare: 3.0.1 - eslint-plugin-import-x@0.5.2(eslint@8.57.0)(typescript@5.3.3): + eslint-plugin-import-x@0.5.3(eslint@8.57.0)(typescript@5.3.3): dependencies: - '@typescript-eslint/utils': 7.14.1(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/utils': 7.15.0(eslint@8.57.0)(typescript@5.3.3) debug: 4.3.5(supports-color@6.1.0) doctrine: 3.0.0 eslint: 8.57.0 @@ -28727,6 +28875,7 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.4 semver: 7.6.2 + stable-hash: 0.0.4 tslib: 2.6.2 transitivePeerDependencies: - supports-color @@ -28841,6 +28990,18 @@ snapshots: object.fromentries: 2.0.8 semver: 6.3.1 + eslint-plugin-n@17.9.0(eslint@8.57.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + enhanced-resolve: 5.17.0 + eslint: 8.57.0 + eslint-plugin-es-x: 7.8.0(eslint@8.57.0) + get-tsconfig: 4.7.5 + globals: 15.8.0 + ignore: 5.3.1 + minimatch: 9.0.4 + semver: 7.6.2 + eslint-plugin-react-compiler@0.0.0-experimental-c8b3f72-20240517(eslint@9.4.0): dependencies: '@babel/core': 7.24.6 @@ -29009,28 +29170,6 @@ snapshots: - supports-color - typescript - eslint-plugin-unicorn@54.0.0(eslint@8.57.0): - dependencies: - '@babel/helper-validator-identifier': 7.24.6 - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint/eslintrc': 3.1.0 - ci-info: 4.0.0 - clean-regexp: 1.0.0 - core-js-compat: 3.37.1 - eslint: 8.57.0 - esquery: 1.5.0 - indent-string: 4.0.0 - is-builtin-module: 3.2.1 - jsesc: 3.0.2 - pluralize: 8.0.0 - read-pkg-up: 7.0.1 - regexp-tree: 0.1.27 - regjsparser: 0.10.0 - semver: 7.6.2 - strip-indent: 3.0.0 - transitivePeerDependencies: - - supports-color - eslint-plugin-vue@9.26.0(eslint@9.4.0): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.4.0) @@ -29149,7 +29288,7 @@ snapshots: eslint@9.4.0: dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.4.0) - '@eslint-community/regexpp': 4.10.0 + '@eslint-community/regexpp': 4.11.0 '@eslint/config-array': 0.15.1 '@eslint/eslintrc': 3.1.0 '@eslint/js': 9.4.0 @@ -30096,7 +30235,7 @@ snapshots: globals@14.0.0: {} - globals@15.6.0: {} + globals@15.8.0: {} globalthis@1.0.3: dependencies: @@ -32262,8 +32401,6 @@ snapshots: jsesc@2.5.2: {} - jsesc@3.0.2: {} - json-buffer@3.0.1: {} json-parse-better-errors@1.0.2: {} @@ -34822,8 +34959,6 @@ snapshots: base64-js: 1.5.1 xmlbuilder: 15.1.1 - pluralize@8.0.0: {} - pngjs@3.4.0: {} pnp-webpack-plugin@1.6.4(typescript@5.4.2): @@ -36585,8 +36720,6 @@ snapshots: regex-parser@2.2.11: {} - regexp-tree@0.1.27: {} - regexp.prototype.flags@1.5.2: dependencies: call-bind: 1.0.7 @@ -36605,10 +36738,6 @@ snapshots: unicode-match-property-ecmascript: 2.0.0 unicode-match-property-value-ecmascript: 2.1.0 - regjsparser@0.10.0: - dependencies: - jsesc: 0.5.0 - regjsparser@0.9.1: dependencies: jsesc: 0.5.0 @@ -37669,6 +37798,8 @@ snapshots: dependencies: minipass: 3.3.6 + stable-hash@0.0.4: {} + stable@0.1.8: {} stack-utils@2.0.6: @@ -38669,11 +38800,11 @@ snapshots: dependencies: semver: 7.6.2 - typescript-eslint@7.14.1(eslint@8.57.0)(typescript@5.3.3): + typescript-eslint@7.15.0(eslint@8.57.0)(typescript@5.3.3): dependencies: - '@typescript-eslint/eslint-plugin': 7.14.1(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.3.3))(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/parser': 7.14.1(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/utils': 7.14.1(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/eslint-plugin': 7.15.0(@typescript-eslint/parser@7.15.0(eslint@8.57.0)(typescript@5.3.3))(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/parser': 7.15.0(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/utils': 7.15.0(eslint@8.57.0)(typescript@5.3.3) eslint: 8.57.0 optionalDependencies: typescript: 5.3.3 From e79275178c5e97e0ab6482a6fc6f0c6418d29672 Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Fri, 5 Jul 2024 03:00:51 +0000 Subject: [PATCH 18/80] release: v5.50.1 --- examples/angular/basic/package.json | 4 +- .../package.json | 4 +- examples/angular/router/package.json | 4 +- examples/angular/simple/package.json | 4 +- examples/react/algolia/package.json | 6 +- examples/react/auto-refetching/package.json | 4 +- .../react/basic-graphql-request/package.json | 4 +- examples/react/basic-typescript/package.json | 10 +- examples/react/basic/package.json | 6 +- .../react/default-query-function/package.json | 4 +- .../package.json | 4 +- .../load-more-infinite-scroll/package.json | 4 +- .../react/nextjs-app-prefetching/package.json | 4 +- .../nextjs-suspense-streaming/package.json | 6 +- examples/react/nextjs/package.json | 4 +- examples/react/offline/package.json | 8 +- .../optimistic-updates-cache/package.json | 4 +- .../react/optimistic-updates-ui/package.json | 4 +- examples/react/pagination/package.json | 4 +- examples/react/playground/package.json | 4 +- examples/react/prefetching/package.json | 4 +- examples/react/react-native/package.json | 4 +- examples/react/react-router/package.json | 4 +- examples/react/rick-morty/package.json | 4 +- examples/react/shadow-dom/package.json | 4 +- examples/react/simple/package.json | 4 +- examples/react/star-wars/package.json | 4 +- examples/react/suspense/package.json | 4 +- examples/solid/astro/package.json | 4 +- .../solid/basic-graphql-request/package.json | 4 +- examples/solid/basic-typescript/package.json | 4 +- .../solid/default-query-function/package.json | 4 +- examples/solid/simple/package.json | 6 +- .../solid/solid-start-streaming/package.json | 4 +- examples/svelte/auto-refetching/package.json | 4 +- examples/svelte/basic/package.json | 4 +- .../load-more-infinite-scroll/package.json | 4 +- .../package.json | 4 +- examples/svelte/playground/package.json | 4 +- examples/svelte/simple/package.json | 4 +- examples/svelte/ssr/package.json | 4 +- examples/svelte/star-wars/package.json | 4 +- examples/vue/2.6-basic/package.json | 2 +- examples/vue/2.7-basic/package.json | 2 +- examples/vue/basic/package.json | 4 +- examples/vue/dependent-queries/package.json | 2 +- examples/vue/nuxt3/package.json | 2 +- examples/vue/persister/package.json | 8 +- examples/vue/simple/package.json | 4 +- .../package.json | 2 +- .../angular-query-experimental/package.json | 2 +- packages/eslint-plugin-query/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- packages/query-core/package.json | 2 +- packages/query-devtools/package.json | 2 +- .../query-persist-client-core/package.json | 2 +- .../query-sync-storage-persister/package.json | 2 +- packages/react-query-devtools/package.json | 2 +- .../package.json | 2 +- .../react-query-persist-client/package.json | 2 +- packages/react-query/package.json | 2 +- packages/solid-query-devtools/package.json | 2 +- .../solid-query-persist-client/package.json | 2 +- packages/solid-query/package.json | 2 +- packages/svelte-query-devtools/package.json | 2 +- .../svelte-query-persist-client/package.json | 2 +- packages/svelte-query/package.json | 2 +- packages/vue-query-devtools/package.json | 2 +- packages/vue-query/package.json | 2 +- pnpm-lock.yaml | 204 +++++++++--------- 71 files changed, 228 insertions(+), 228 deletions(-) diff --git a/examples/angular/basic/package.json b/examples/angular/basic/package.json index 1e2e8d790c..07653a59de 100644 --- a/examples/angular/basic/package.json +++ b/examples/angular/basic/package.json @@ -14,7 +14,7 @@ "@angular/core": "^17.3.10", "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.49.1", + "@tanstack/angular-query-experimental": "^5.50.1", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -23,7 +23,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.49.1", + "@tanstack/angular-query-devtools-experimental": "^5.50.1", "typescript": "5.3.3" } } diff --git a/examples/angular/infinite-query-with-max-pages/package.json b/examples/angular/infinite-query-with-max-pages/package.json index bf0ca3fa82..b0cb9e96da 100644 --- a/examples/angular/infinite-query-with-max-pages/package.json +++ b/examples/angular/infinite-query-with-max-pages/package.json @@ -14,7 +14,7 @@ "@angular/core": "^17.3.10", "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.49.1", + "@tanstack/angular-query-experimental": "^5.50.1", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -23,7 +23,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.49.1", + "@tanstack/angular-query-devtools-experimental": "^5.50.1", "typescript": "5.3.3" } } diff --git a/examples/angular/router/package.json b/examples/angular/router/package.json index 4ac0dc58c6..5f3875fe5c 100644 --- a/examples/angular/router/package.json +++ b/examples/angular/router/package.json @@ -15,7 +15,7 @@ "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", "@angular/router": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.49.1", + "@tanstack/angular-query-experimental": "^5.50.1", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -24,7 +24,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.49.1", + "@tanstack/angular-query-devtools-experimental": "^5.50.1", "typescript": "5.3.3" } } diff --git a/examples/angular/simple/package.json b/examples/angular/simple/package.json index a0e300d0fd..65bcd5c231 100644 --- a/examples/angular/simple/package.json +++ b/examples/angular/simple/package.json @@ -15,7 +15,7 @@ "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", "@angular/router": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.49.1", + "@tanstack/angular-query-experimental": "^5.50.1", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -24,7 +24,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.49.1", + "@tanstack/angular-query-devtools-experimental": "^5.50.1", "typescript": "5.3.3" } } diff --git a/examples/react/algolia/package.json b/examples/react/algolia/package.json index 864935c711..aab9b0326a 100644 --- a/examples/react/algolia/package.json +++ b/examples/react/algolia/package.json @@ -11,14 +11,14 @@ "dependencies": { "@algolia/client-search": "4.23.3", "@algolia/transporter": "4.23.3", - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "algoliasearch": "4.23.3", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, "devDependencies": { - "@tanstack/eslint-plugin-query": "^5.50.0", + "@tanstack/eslint-plugin-query": "^5.50.1", "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", "@vitejs/plugin-react": "^4.2.1", diff --git a/examples/react/auto-refetching/package.json b/examples/react/auto-refetching/package.json index 323f8efeef..12cbf5a5d0 100644 --- a/examples/react/auto-refetching/package.json +++ b/examples/react/auto-refetching/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "axios": "^1.6.8", "isomorphic-unfetch": "4.0.2", "next": "^14.2.4", diff --git a/examples/react/basic-graphql-request/package.json b/examples/react/basic-graphql-request/package.json index 71ea170ea8..a13a9aaf59 100644 --- a/examples/react/basic-graphql-request/package.json +++ b/examples/react/basic-graphql-request/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "graphql": "^16.8.1", "graphql-request": "^7.0.1", "react": "19.0.0-rc-4c2e457c7c-20240522", diff --git a/examples/react/basic-typescript/package.json b/examples/react/basic-typescript/package.json index 6119848575..0f502c1192 100644 --- a/examples/react/basic-typescript/package.json +++ b/examples/react/basic-typescript/package.json @@ -9,16 +9,16 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/query-sync-storage-persister": "^5.49.1", - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", - "@tanstack/react-query-persist-client": "^5.49.2", + "@tanstack/query-sync-storage-persister": "^5.50.1", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", + "@tanstack/react-query-persist-client": "^5.50.1", "axios": "^1.6.8", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, "devDependencies": { - "@tanstack/eslint-plugin-query": "^5.50.0", + "@tanstack/eslint-plugin-query": "^5.50.1", "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", "@vitejs/plugin-react": "^4.2.1", diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index 3207f81f30..2d7b1e5b1c 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -8,14 +8,14 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "axios": "^1.6.8", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, "devDependencies": { - "@tanstack/eslint-plugin-query": "^5.50.0", + "@tanstack/eslint-plugin-query": "^5.50.1", "@vitejs/plugin-react": "^4.2.1", "vite": "^5.2.11" }, diff --git a/examples/react/default-query-function/package.json b/examples/react/default-query-function/package.json index c3fbeb52bc..8fbd3c5b03 100644 --- a/examples/react/default-query-function/package.json +++ b/examples/react/default-query-function/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "axios": "^1.6.8", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" diff --git a/examples/react/infinite-query-with-max-pages/package.json b/examples/react/infinite-query-with-max-pages/package.json index 02f335939e..f9f2750326 100644 --- a/examples/react/infinite-query-with-max-pages/package.json +++ b/examples/react/infinite-query-with-max-pages/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "axios": "^1.6.8", "isomorphic-unfetch": "4.0.2", "next": "^14.2.4", diff --git a/examples/react/load-more-infinite-scroll/package.json b/examples/react/load-more-infinite-scroll/package.json index 43e3cedcfc..16236a4920 100644 --- a/examples/react/load-more-infinite-scroll/package.json +++ b/examples/react/load-more-infinite-scroll/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "axios": "^1.6.8", "isomorphic-unfetch": "4.0.2", "next": "^14.2.4", diff --git a/examples/react/nextjs-app-prefetching/package.json b/examples/react/nextjs-app-prefetching/package.json index a154eb04e7..faf58c1c8c 100644 --- a/examples/react/nextjs-app-prefetching/package.json +++ b/examples/react/nextjs-app-prefetching/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "next": "^15.0.0-rc.0", "react": "^19.0.0-rc-4c2e457c7c-20240522", "react-dom": "^19.0.0-rc-4c2e457c7c-20240522" diff --git a/examples/react/nextjs-suspense-streaming/package.json b/examples/react/nextjs-suspense-streaming/package.json index 8063ab6834..f282f6a039 100644 --- a/examples/react/nextjs-suspense-streaming/package.json +++ b/examples/react/nextjs-suspense-streaming/package.json @@ -9,9 +9,9 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", - "@tanstack/react-query-next-experimental": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", + "@tanstack/react-query-next-experimental": "^5.50.1", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/react/nextjs/package.json b/examples/react/nextjs/package.json index 7023c9d8d6..31ddba1e7d 100644 --- a/examples/react/nextjs/package.json +++ b/examples/react/nextjs/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "ky": "^1.2.4", "next": "^14.2.4", "react": "^18.2.0", diff --git a/examples/react/offline/package.json b/examples/react/offline/package.json index 1a82b62ad5..69928dc0f5 100644 --- a/examples/react/offline/package.json +++ b/examples/react/offline/package.json @@ -8,11 +8,11 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/query-sync-storage-persister": "^5.49.1", + "@tanstack/query-sync-storage-persister": "^5.50.1", "@tanstack/react-location": "^3.7.4", - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", - "@tanstack/react-query-persist-client": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", + "@tanstack/react-query-persist-client": "^5.50.1", "ky": "^1.2.4", "msw": "^2.3.0", "react": "19.0.0-rc-4c2e457c7c-20240522", diff --git a/examples/react/optimistic-updates-cache/package.json b/examples/react/optimistic-updates-cache/package.json index 9c622d9024..3ced3eb4b8 100755 --- a/examples/react/optimistic-updates-cache/package.json +++ b/examples/react/optimistic-updates-cache/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "axios": "^1.6.8", "isomorphic-unfetch": "4.0.2", "next": "^14.2.4", diff --git a/examples/react/optimistic-updates-ui/package.json b/examples/react/optimistic-updates-ui/package.json index e9ad4a54d4..4c529ed159 100755 --- a/examples/react/optimistic-updates-ui/package.json +++ b/examples/react/optimistic-updates-ui/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "axios": "^1.6.8", "isomorphic-unfetch": "4.0.2", "next": "^14.2.4", diff --git a/examples/react/pagination/package.json b/examples/react/pagination/package.json index 4d307691b6..33f75c8b85 100644 --- a/examples/react/pagination/package.json +++ b/examples/react/pagination/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "axios": "^1.6.8", "isomorphic-unfetch": "4.0.2", "next": "^14.2.4", diff --git a/examples/react/playground/package.json b/examples/react/playground/package.json index 030df47108..7e4af9d0cd 100644 --- a/examples/react/playground/package.json +++ b/examples/react/playground/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, diff --git a/examples/react/prefetching/package.json b/examples/react/prefetching/package.json index b77e3a9759..a0bb98eddc 100644 --- a/examples/react/prefetching/package.json +++ b/examples/react/prefetching/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "axios": "^1.6.8", "isomorphic-unfetch": "4.0.2", "next": "^14.2.4", diff --git a/examples/react/react-native/package.json b/examples/react/react-native/package.json index 846fa268a4..ab97e75815 100644 --- a/examples/react/react-native/package.json +++ b/examples/react/react-native/package.json @@ -14,8 +14,8 @@ "@react-native-community/netinfo": "^11.3.1", "@react-navigation/native": "^6.1.6", "@react-navigation/stack": "^6.3.16", - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "expo": "^51.0.8", "expo-constants": "^16.0.1", "expo-status-bar": "^1.12.1", diff --git a/examples/react/react-router/package.json b/examples/react/react-router/package.json index 36dda89b8e..aa0b072e1c 100644 --- a/examples/react/react-router/package.json +++ b/examples/react/react-router/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "localforage": "^1.10.0", "match-sorter": "^6.3.4", "react": "19.0.0-rc-4c2e457c7c-20240522", diff --git a/examples/react/rick-morty/package.json b/examples/react/rick-morty/package.json index 4611782f93..08665f67b1 100644 --- a/examples/react/rick-morty/package.json +++ b/examples/react/rick-morty/package.json @@ -12,8 +12,8 @@ "@emotion/styled": "^11.11.5", "@mui/material": "^5.15.18", "@mui/styles": "^5.15.18", - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522", "react-router": "^6.23.1", diff --git a/examples/react/shadow-dom/package.json b/examples/react/shadow-dom/package.json index 0adc332ecb..253d24e18d 100644 --- a/examples/react/shadow-dom/package.json +++ b/examples/react/shadow-dom/package.json @@ -10,8 +10,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, diff --git a/examples/react/simple/package.json b/examples/react/simple/package.json index b3703136a0..6f60d18726 100644 --- a/examples/react/simple/package.json +++ b/examples/react/simple/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "axios": "^1.6.8", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" diff --git a/examples/react/star-wars/package.json b/examples/react/star-wars/package.json index 926729fddf..bda3023d0e 100644 --- a/examples/react/star-wars/package.json +++ b/examples/react/star-wars/package.json @@ -12,8 +12,8 @@ "@emotion/styled": "^11.11.5", "@mui/material": "^5.15.18", "@mui/styles": "^5.15.18", - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522", "react-router": "^6.23.1", diff --git a/examples/react/suspense/package.json b/examples/react/suspense/package.json index b1459c9b0a..89b586e354 100644 --- a/examples/react/suspense/package.json +++ b/examples/react/suspense/package.json @@ -3,8 +3,8 @@ "private": true, "type": "module", "dependencies": { - "@tanstack/react-query": "^5.49.2", - "@tanstack/react-query-devtools": "^5.49.2", + "@tanstack/react-query": "^5.50.1", + "@tanstack/react-query-devtools": "^5.50.1", "axios": "^1.6.8", "font-awesome": "^4.7.0", "react": "19.0.0-rc-4c2e457c7c-20240522", diff --git a/examples/solid/astro/package.json b/examples/solid/astro/package.json index 438a574ee6..ee5c438444 100644 --- a/examples/solid/astro/package.json +++ b/examples/solid/astro/package.json @@ -15,8 +15,8 @@ "@astrojs/tailwind": "^5.1.0", "@astrojs/vercel": "^7.6.0", "@astrojs/node": "^8.2.5", - "@tanstack/solid-query": "^5.49.1", - "@tanstack/solid-query-devtools": "^5.49.1", + "@tanstack/solid-query": "^5.50.1", + "@tanstack/solid-query-devtools": "^5.50.1", "astro": "^4.8.6", "solid-js": "^1.8.17", "tailwindcss": "^3.4.3", diff --git a/examples/solid/basic-graphql-request/package.json b/examples/solid/basic-graphql-request/package.json index a9a6839301..55db5131e3 100644 --- a/examples/solid/basic-graphql-request/package.json +++ b/examples/solid/basic-graphql-request/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.49.1", - "@tanstack/solid-query-devtools": "^5.49.1", + "@tanstack/solid-query": "^5.50.1", + "@tanstack/solid-query-devtools": "^5.50.1", "graphql": "^16.8.1", "graphql-request": "^7.0.1", "solid-js": "^1.8.17" diff --git a/examples/solid/basic-typescript/package.json b/examples/solid/basic-typescript/package.json index 9cbccb3b29..ee23d045af 100644 --- a/examples/solid/basic-typescript/package.json +++ b/examples/solid/basic-typescript/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.49.1", - "@tanstack/solid-query-devtools": "^5.49.1", + "@tanstack/solid-query": "^5.50.1", + "@tanstack/solid-query-devtools": "^5.50.1", "solid-js": "^1.8.17" }, "devDependencies": { diff --git a/examples/solid/default-query-function/package.json b/examples/solid/default-query-function/package.json index c7c45cd7f5..f290fafa26 100644 --- a/examples/solid/default-query-function/package.json +++ b/examples/solid/default-query-function/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.49.1", - "@tanstack/solid-query-devtools": "^5.49.1", + "@tanstack/solid-query": "^5.50.1", + "@tanstack/solid-query-devtools": "^5.50.1", "solid-js": "^1.8.17" }, "devDependencies": { diff --git a/examples/solid/simple/package.json b/examples/solid/simple/package.json index 1bc4dc8d0e..07dc7891d3 100644 --- a/examples/solid/simple/package.json +++ b/examples/solid/simple/package.json @@ -9,12 +9,12 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.49.1", - "@tanstack/solid-query-devtools": "^5.49.1", + "@tanstack/solid-query": "^5.50.1", + "@tanstack/solid-query-devtools": "^5.50.1", "solid-js": "^1.8.17" }, "devDependencies": { - "@tanstack/eslint-plugin-query": "^5.50.0", + "@tanstack/eslint-plugin-query": "^5.50.1", "typescript": "5.3.3", "vite": "^5.2.11", "vite-plugin-solid": "^2.10.2" diff --git a/examples/solid/solid-start-streaming/package.json b/examples/solid/solid-start-streaming/package.json index 7a30f32a5d..25c1c323e6 100644 --- a/examples/solid/solid-start-streaming/package.json +++ b/examples/solid/solid-start-streaming/package.json @@ -11,8 +11,8 @@ "@solidjs/meta": "^0.29.4", "@solidjs/router": "^0.13.3", "@solidjs/start": "^1.0.0-rc.1", - "@tanstack/solid-query": "^5.49.1", - "@tanstack/solid-query-devtools": "^5.49.1", + "@tanstack/solid-query": "^5.50.1", + "@tanstack/solid-query-devtools": "^5.50.1", "solid-js": "^1.8.17", "vinxi": "^0.3.10" }, diff --git a/examples/svelte/auto-refetching/package.json b/examples/svelte/auto-refetching/package.json index e04dcdbd91..8b6f11c247 100644 --- a/examples/svelte/auto-refetching/package.json +++ b/examples/svelte/auto-refetching/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.49.1", - "@tanstack/svelte-query-devtools": "^5.49.1" + "@tanstack/svelte-query": "^5.50.1", + "@tanstack/svelte-query-devtools": "^5.50.1" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.0", diff --git a/examples/svelte/basic/package.json b/examples/svelte/basic/package.json index 19437a5e2b..8056c08b59 100644 --- a/examples/svelte/basic/package.json +++ b/examples/svelte/basic/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.49.1", - "@tanstack/svelte-query-devtools": "^5.49.1" + "@tanstack/svelte-query": "^5.50.1", + "@tanstack/svelte-query-devtools": "^5.50.1" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.0", diff --git a/examples/svelte/load-more-infinite-scroll/package.json b/examples/svelte/load-more-infinite-scroll/package.json index 3d0466d282..15710fc594 100644 --- a/examples/svelte/load-more-infinite-scroll/package.json +++ b/examples/svelte/load-more-infinite-scroll/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.49.1", - "@tanstack/svelte-query-devtools": "^5.49.1" + "@tanstack/svelte-query": "^5.50.1", + "@tanstack/svelte-query-devtools": "^5.50.1" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.0", diff --git a/examples/svelte/optimistic-updates-typescript/package.json b/examples/svelte/optimistic-updates-typescript/package.json index d3fe1d4283..4f69c9410e 100644 --- a/examples/svelte/optimistic-updates-typescript/package.json +++ b/examples/svelte/optimistic-updates-typescript/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.49.1", - "@tanstack/svelte-query-devtools": "^5.49.1" + "@tanstack/svelte-query": "^5.50.1", + "@tanstack/svelte-query-devtools": "^5.50.1" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.0", diff --git a/examples/svelte/playground/package.json b/examples/svelte/playground/package.json index 7dd9f66f1a..74247a7d1a 100644 --- a/examples/svelte/playground/package.json +++ b/examples/svelte/playground/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.49.1", - "@tanstack/svelte-query-devtools": "^5.49.1" + "@tanstack/svelte-query": "^5.50.1", + "@tanstack/svelte-query-devtools": "^5.50.1" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.0", diff --git a/examples/svelte/simple/package.json b/examples/svelte/simple/package.json index dc47651296..3b87160f38 100644 --- a/examples/svelte/simple/package.json +++ b/examples/svelte/simple/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.49.1", - "@tanstack/svelte-query-devtools": "^5.49.1" + "@tanstack/svelte-query": "^5.50.1", + "@tanstack/svelte-query-devtools": "^5.50.1" }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^3.1.0", diff --git a/examples/svelte/ssr/package.json b/examples/svelte/ssr/package.json index 8005ea7a18..8320a33dda 100644 --- a/examples/svelte/ssr/package.json +++ b/examples/svelte/ssr/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.49.1", - "@tanstack/svelte-query-devtools": "^5.49.1" + "@tanstack/svelte-query": "^5.50.1", + "@tanstack/svelte-query-devtools": "^5.50.1" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.0", diff --git a/examples/svelte/star-wars/package.json b/examples/svelte/star-wars/package.json index 0290b6d4eb..e2731844b8 100644 --- a/examples/svelte/star-wars/package.json +++ b/examples/svelte/star-wars/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.49.1", - "@tanstack/svelte-query-devtools": "^5.49.1" + "@tanstack/svelte-query": "^5.50.1", + "@tanstack/svelte-query-devtools": "^5.50.1" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.0", diff --git a/examples/vue/2.6-basic/package.json b/examples/vue/2.6-basic/package.json index c5ef36b557..dff1062ca1 100644 --- a/examples/vue/2.6-basic/package.json +++ b/examples/vue/2.6-basic/package.json @@ -8,7 +8,7 @@ "_preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.49.1", + "@tanstack/vue-query": "^5.50.1", "@vue/composition-api": "1.7.2", "vue": "2.6.14", "vue-template-compiler": "2.6.14" diff --git a/examples/vue/2.7-basic/package.json b/examples/vue/2.7-basic/package.json index bfd8c479e0..83e18de5a1 100644 --- a/examples/vue/2.7-basic/package.json +++ b/examples/vue/2.7-basic/package.json @@ -8,7 +8,7 @@ "_serve": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.49.1", + "@tanstack/vue-query": "^5.50.1", "vue": "2.7.16", "vue-template-compiler": "2.7.16" }, diff --git a/examples/vue/basic/package.json b/examples/vue/basic/package.json index 6b8272949c..146448f653 100644 --- a/examples/vue/basic/package.json +++ b/examples/vue/basic/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.49.1", - "@tanstack/vue-query-devtools": "^5.49.1", + "@tanstack/vue-query": "^5.50.1", + "@tanstack/vue-query-devtools": "^5.50.1", "vue": "^3.4.27" }, "devDependencies": { diff --git a/examples/vue/dependent-queries/package.json b/examples/vue/dependent-queries/package.json index b3d6c91c41..e1ee7b48d1 100644 --- a/examples/vue/dependent-queries/package.json +++ b/examples/vue/dependent-queries/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.49.1", + "@tanstack/vue-query": "^5.50.1", "vue": "^3.4.27" }, "devDependencies": { diff --git a/examples/vue/nuxt3/package.json b/examples/vue/nuxt3/package.json index 31062fb1c5..4c63b27c8a 100644 --- a/examples/vue/nuxt3/package.json +++ b/examples/vue/nuxt3/package.json @@ -7,7 +7,7 @@ "_start": "node .output/server/index.mjs" }, "dependencies": { - "@tanstack/vue-query": "^5.49.1" + "@tanstack/vue-query": "^5.50.1" }, "devDependencies": { "nuxt": "^3.5.2" diff --git a/examples/vue/persister/package.json b/examples/vue/persister/package.json index a46ce0aa19..20f079b693 100644 --- a/examples/vue/persister/package.json +++ b/examples/vue/persister/package.json @@ -8,10 +8,10 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/query-core": "^5.49.1", - "@tanstack/query-persist-client-core": "^5.49.1", - "@tanstack/query-sync-storage-persister": "^5.49.1", - "@tanstack/vue-query": "^5.49.1", + "@tanstack/query-core": "^5.50.1", + "@tanstack/query-persist-client-core": "^5.50.1", + "@tanstack/query-sync-storage-persister": "^5.50.1", + "@tanstack/vue-query": "^5.50.1", "idb-keyval": "^6.2.1", "vue": "^3.4.27" }, diff --git a/examples/vue/simple/package.json b/examples/vue/simple/package.json index 6040b6ca4a..ecafbdc97e 100644 --- a/examples/vue/simple/package.json +++ b/examples/vue/simple/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.49.1", - "@tanstack/vue-query-devtools": "^5.49.1", + "@tanstack/vue-query": "^5.50.1", + "@tanstack/vue-query-devtools": "^5.50.1", "vue": "^3.4.27" }, "devDependencies": { diff --git a/packages/angular-query-devtools-experimental/package.json b/packages/angular-query-devtools-experimental/package.json index 7f6cb12085..e6c8e015c5 100644 --- a/packages/angular-query-devtools-experimental/package.json +++ b/packages/angular-query-devtools-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/angular-query-devtools-experimental", - "version": "5.49.1", + "version": "5.50.1", "description": "Developer tools to interact with and visualize the TanStack/angular-query cache", "author": "Arnoud de Vries", "license": "MIT", diff --git a/packages/angular-query-experimental/package.json b/packages/angular-query-experimental/package.json index 1dda578b40..9e062303dd 100644 --- a/packages/angular-query-experimental/package.json +++ b/packages/angular-query-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/angular-query-experimental", - "version": "5.49.1", + "version": "5.50.1", "description": "Signals for managing, caching and syncing asynchronous and remote data in Angular", "author": "Arnoud de Vries", "license": "MIT", diff --git a/packages/eslint-plugin-query/package.json b/packages/eslint-plugin-query/package.json index 588c821164..ec930d9904 100644 --- a/packages/eslint-plugin-query/package.json +++ b/packages/eslint-plugin-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/eslint-plugin-query", - "version": "5.50.0", + "version": "5.50.1", "description": "ESLint plugin for TanStack Query", "author": "Eliya Cohen", "license": "MIT", diff --git a/packages/query-async-storage-persister/package.json b/packages/query-async-storage-persister/package.json index 05574d5054..220cebfbe0 100644 --- a/packages/query-async-storage-persister/package.json +++ b/packages/query-async-storage-persister/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-async-storage-persister", - "version": "5.49.1", + "version": "5.50.1", "description": "A persister for asynchronous storages, to be used with TanStack/Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-broadcast-client-experimental/package.json b/packages/query-broadcast-client-experimental/package.json index fdfa3870fa..f3fb30afb3 100644 --- a/packages/query-broadcast-client-experimental/package.json +++ b/packages/query-broadcast-client-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-broadcast-client-experimental", - "version": "5.49.1", + "version": "5.50.1", "description": "An experimental plugin to for broadcasting the state of your queryClient between browser tabs/windows", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-core/package.json b/packages/query-core/package.json index 5004004a0d..025bcddcdc 100644 --- a/packages/query-core/package.json +++ b/packages/query-core/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-core", - "version": "5.49.1", + "version": "5.50.1", "description": "The framework agnostic core that powers TanStack Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-devtools/package.json b/packages/query-devtools/package.json index 77fe77a3d1..87e28fa52b 100644 --- a/packages/query-devtools/package.json +++ b/packages/query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-devtools", - "version": "5.49.1", + "version": "5.50.1", "description": "Developer tools to interact with and visualize the TanStack Query cache", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-persist-client-core/package.json b/packages/query-persist-client-core/package.json index e5c0c87b0d..f09c724d3d 100644 --- a/packages/query-persist-client-core/package.json +++ b/packages/query-persist-client-core/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-persist-client-core", - "version": "5.49.1", + "version": "5.50.1", "description": "Set of utilities for interacting with persisters, which can save your queryClient for later use", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-sync-storage-persister/package.json b/packages/query-sync-storage-persister/package.json index d52835e7fa..2b7408d75e 100644 --- a/packages/query-sync-storage-persister/package.json +++ b/packages/query-sync-storage-persister/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-sync-storage-persister", - "version": "5.49.1", + "version": "5.50.1", "description": "A persister for synchronous storages, to be used with TanStack/Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query-devtools/package.json b/packages/react-query-devtools/package.json index 616d24f15c..473bec90d0 100644 --- a/packages/react-query-devtools/package.json +++ b/packages/react-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query-devtools", - "version": "5.49.2", + "version": "5.50.1", "description": "Developer tools to interact with and visualize the TanStack/react-query cache", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query-next-experimental/package.json b/packages/react-query-next-experimental/package.json index d3f12e4c69..2961ffa426 100644 --- a/packages/react-query-next-experimental/package.json +++ b/packages/react-query-next-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query-next-experimental", - "version": "5.49.2", + "version": "5.50.1", "description": "Hydration utils for React Query in the NextJs app directory", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query-persist-client/package.json b/packages/react-query-persist-client/package.json index ff9c5dc7a0..5fe49601e0 100644 --- a/packages/react-query-persist-client/package.json +++ b/packages/react-query-persist-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query-persist-client", - "version": "5.49.2", + "version": "5.50.1", "description": "React bindings to work with persisters in TanStack/react-query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query/package.json b/packages/react-query/package.json index 1f7bec93d6..9ca09c9865 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query", - "version": "5.49.2", + "version": "5.50.1", "description": "Hooks for managing, caching and syncing asynchronous and remote data in React", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query-devtools/package.json b/packages/solid-query-devtools/package.json index 0f756e0c42..ef00ae8f84 100644 --- a/packages/solid-query-devtools/package.json +++ b/packages/solid-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query-devtools", - "version": "5.49.1", + "version": "5.50.1", "description": "Developer tools to interact with and visualize the TanStack/solid-query Query cache", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query-persist-client/package.json b/packages/solid-query-persist-client/package.json index 12e46d0353..6666056cc5 100644 --- a/packages/solid-query-persist-client/package.json +++ b/packages/solid-query-persist-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query-persist-client", - "version": "5.49.1", + "version": "5.50.1", "description": "Solid.js bindings to work with persisters in TanStack/solid-query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query/package.json b/packages/solid-query/package.json index 7d9391e5f1..b78e9459d2 100644 --- a/packages/solid-query/package.json +++ b/packages/solid-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query", - "version": "5.49.1", + "version": "5.50.1", "description": "Primitives for managing, caching and syncing asynchronous and remote data in Solid", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/svelte-query-devtools/package.json b/packages/svelte-query-devtools/package.json index 6026eec5c3..0f6e27ca58 100644 --- a/packages/svelte-query-devtools/package.json +++ b/packages/svelte-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query-devtools", - "version": "5.49.1", + "version": "5.50.1", "description": "Developer tools to interact with and visualize the TanStack/svelte-query cache", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/svelte-query-persist-client/package.json b/packages/svelte-query-persist-client/package.json index f2727ead3e..c0a62a3c99 100644 --- a/packages/svelte-query-persist-client/package.json +++ b/packages/svelte-query-persist-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query-persist-client", - "version": "5.49.1", + "version": "5.50.1", "description": "Svelte bindings to work with persisters in TanStack/svelte-query", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/svelte-query/package.json b/packages/svelte-query/package.json index 3ed2988f0b..ad22379e92 100644 --- a/packages/svelte-query/package.json +++ b/packages/svelte-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query", - "version": "5.49.1", + "version": "5.50.1", "description": "Primitives for managing, caching and syncing asynchronous and remote data in Svelte", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/vue-query-devtools/package.json b/packages/vue-query-devtools/package.json index 17bc49efa5..41de891082 100644 --- a/packages/vue-query-devtools/package.json +++ b/packages/vue-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-query-devtools", - "version": "5.49.1", + "version": "5.50.1", "description": "Developer tools to interact with and visualize the TanStack/vue-query cache", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/vue-query/package.json b/packages/vue-query/package.json index 68a35f43c5..14afe7541a 100644 --- a/packages/vue-query/package.json +++ b/packages/vue-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-query", - "version": "5.49.1", + "version": "5.50.1", "description": "Hooks for managing, caching and syncing asynchronous and remote data in Vue", "author": "Damian Osipiuk", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7650dde034..388c4747c4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -146,7 +146,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))) '@tanstack/angular-query-experimental': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -168,7 +168,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -192,7 +192,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))) '@tanstack/angular-query-experimental': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -214,7 +214,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -241,7 +241,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(rxjs@7.8.1) '@tanstack/angular-query-experimental': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -263,7 +263,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -290,7 +290,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(rxjs@7.8.1) '@tanstack/angular-query-experimental': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -312,7 +312,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -327,10 +327,10 @@ importers: specifier: 4.23.3 version: 4.23.3 '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools algoliasearch: specifier: 4.23.3 @@ -343,7 +343,7 @@ importers: version: 19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522) devDependencies: '@tanstack/eslint-plugin-query': - specifier: ^5.50.0 + specifier: ^5.50.1 version: link:../../../packages/eslint-plugin-query '@types/react': specifier: npm:types-react@rc @@ -364,10 +364,10 @@ importers: examples/react/auto-refetching: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools axios: specifier: ^1.6.8 @@ -388,10 +388,10 @@ importers: examples/react/basic: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools axios: specifier: ^1.6.8 @@ -404,7 +404,7 @@ importers: version: 19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522) devDependencies: '@tanstack/eslint-plugin-query': - specifier: ^5.50.0 + specifier: ^5.50.1 version: link:../../../packages/eslint-plugin-query '@vitejs/plugin-react': specifier: ^4.2.1 @@ -416,10 +416,10 @@ importers: examples/react/basic-graphql-request: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools graphql: specifier: ^16.8.1 @@ -444,16 +444,16 @@ importers: examples/react/basic-typescript: dependencies: '@tanstack/query-sync-storage-persister': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/query-sync-storage-persister '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools '@tanstack/react-query-persist-client': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-persist-client axios: specifier: ^1.6.8 @@ -466,7 +466,7 @@ importers: version: 19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522) devDependencies: '@tanstack/eslint-plugin-query': - specifier: ^5.50.0 + specifier: ^5.50.1 version: link:../../../packages/eslint-plugin-query '@types/react': specifier: npm:types-react@rc @@ -493,10 +493,10 @@ importers: examples/react/default-query-function: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools axios: specifier: ^1.6.8 @@ -518,10 +518,10 @@ importers: examples/react/infinite-query-with-max-pages: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools axios: specifier: ^1.6.8 @@ -545,10 +545,10 @@ importers: examples/react/load-more-infinite-scroll: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools axios: specifier: ^1.6.8 @@ -572,10 +572,10 @@ importers: examples/react/nextjs: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools ky: specifier: ^1.2.4 @@ -599,10 +599,10 @@ importers: examples/react/nextjs-app-prefetching: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools next: specifier: ^15.0.0-rc.0 @@ -630,13 +630,13 @@ importers: examples/react/nextjs-suspense-streaming: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools '@tanstack/react-query-next-experimental': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-next-experimental next: specifier: ^14.2.4 @@ -664,19 +664,19 @@ importers: examples/react/offline: dependencies: '@tanstack/query-sync-storage-persister': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/query-sync-storage-persister '@tanstack/react-location': specifier: ^3.7.4 version: 3.7.4(react-dom@19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522))(react@19.0.0-rc-4c2e457c7c-20240522) '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools '@tanstack/react-query-persist-client': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-persist-client ky: specifier: ^1.2.4 @@ -704,10 +704,10 @@ importers: examples/react/optimistic-updates-cache: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools axios: specifier: ^1.6.8 @@ -741,10 +741,10 @@ importers: examples/react/optimistic-updates-ui: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools axios: specifier: ^1.6.8 @@ -778,10 +778,10 @@ importers: examples/react/pagination: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools axios: specifier: ^1.6.8 @@ -802,10 +802,10 @@ importers: examples/react/playground: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -824,10 +824,10 @@ importers: examples/react/prefetching: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools axios: specifier: ^1.6.8 @@ -857,10 +857,10 @@ importers: specifier: ^6.3.16 version: 6.3.16(yri22tnekttmcucjv33ecr33bu) '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools expo: specifier: ^51.0.8 @@ -909,10 +909,10 @@ importers: examples/react/react-router: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools localforage: specifier: ^1.10.0 @@ -973,10 +973,10 @@ importers: specifier: ^5.15.18 version: 5.15.18(react@19.0.0-rc-4c2e457c7c-20240522)(types-react@19.0.0-rc.1) '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -1001,10 +1001,10 @@ importers: examples/react/shadow-dom: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -1047,10 +1047,10 @@ importers: examples/react/simple: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools axios: specifier: ^1.6.8 @@ -1084,10 +1084,10 @@ importers: specifier: ^5.15.18 version: 5.15.18(react@19.0.0-rc-4c2e457c7c-20240522)(types-react@19.0.0-rc.1) '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -1112,10 +1112,10 @@ importers: examples/react/suspense: dependencies: '@tanstack/react-query': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.49.2 + specifier: ^5.50.1 version: link:../../../packages/react-query-devtools axios: specifier: ^1.6.8 @@ -1158,10 +1158,10 @@ importers: specifier: ^7.6.0 version: 7.6.0(astro@4.9.1(@types/node@20.12.12)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)(typescript@5.3.3))(encoding@0.1.13)(next@14.2.4(@babel/core@7.24.6)(react-dom@19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522))(react@18.3.1)(sass@1.71.1))(react@18.3.1) '@tanstack/solid-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/solid-query-devtools astro: specifier: ^4.8.6 @@ -1179,10 +1179,10 @@ importers: examples/solid/basic-graphql-request: dependencies: '@tanstack/solid-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/solid-query-devtools graphql: specifier: ^16.8.1 @@ -1207,10 +1207,10 @@ importers: examples/solid/basic-typescript: dependencies: '@tanstack/solid-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -1229,10 +1229,10 @@ importers: examples/solid/default-query-function: dependencies: '@tanstack/solid-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -1251,17 +1251,17 @@ importers: examples/solid/simple: dependencies: '@tanstack/solid-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 version: 1.8.17 devDependencies: '@tanstack/eslint-plugin-query': - specifier: ^5.50.0 + specifier: ^5.50.1 version: link:../../../packages/eslint-plugin-query typescript: specifier: 5.3.3 @@ -1285,10 +1285,10 @@ importers: specifier: ^1.0.0-rc.1 version: 1.0.0(@testing-library/jest-dom@6.4.5(vitest@1.6.0(@types/node@20.12.12)(jsdom@24.0.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(rollup@4.14.1)(solid-js@1.8.17)(vinxi@0.3.11(@types/node@20.12.12)(idb-keyval@6.2.1)(ioredis@5.3.2)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vite@5.2.11(@types/node@20.12.12)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@tanstack/solid-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -1300,10 +1300,10 @@ importers: examples/svelte/auto-refetching: dependencies: '@tanstack/svelte-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1331,10 +1331,10 @@ importers: examples/svelte/basic: dependencies: '@tanstack/svelte-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1362,10 +1362,10 @@ importers: examples/svelte/load-more-infinite-scroll: dependencies: '@tanstack/svelte-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1393,10 +1393,10 @@ importers: examples/svelte/optimistic-updates-typescript: dependencies: '@tanstack/svelte-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1424,10 +1424,10 @@ importers: examples/svelte/playground: dependencies: '@tanstack/svelte-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1455,10 +1455,10 @@ importers: examples/svelte/simple: dependencies: '@tanstack/svelte-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/vite-plugin-svelte': @@ -1483,10 +1483,10 @@ importers: examples/svelte/ssr: dependencies: '@tanstack/svelte-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1514,10 +1514,10 @@ importers: examples/svelte/star-wars: dependencies: '@tanstack/svelte-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1554,10 +1554,10 @@ importers: examples/vue/basic: dependencies: '@tanstack/vue-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/vue-query '@tanstack/vue-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/vue-query-devtools vue: specifier: ^3.4.27 @@ -1576,7 +1576,7 @@ importers: examples/vue/dependent-queries: dependencies: '@tanstack/vue-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/vue-query vue: specifier: ^3.4.27 @@ -1595,16 +1595,16 @@ importers: examples/vue/persister: dependencies: '@tanstack/query-core': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/query-core '@tanstack/query-persist-client-core': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/query-persist-client-core '@tanstack/query-sync-storage-persister': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/query-sync-storage-persister '@tanstack/vue-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/vue-query idb-keyval: specifier: ^6.2.1 @@ -1626,10 +1626,10 @@ importers: examples/vue/simple: dependencies: '@tanstack/vue-query': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/vue-query '@tanstack/vue-query-devtools': - specifier: ^5.49.1 + specifier: ^5.50.1 version: link:../../../packages/vue-query-devtools vue: specifier: ^3.4.27 From 2273105df980b3763747c101c301e213ed1df98b Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Fri, 5 Jul 2024 14:55:31 +1000 Subject: [PATCH 19/80] ci: Add preview workflow (#7675) * ci: Add preview workflow * Mark query-codemods as private * Ignore query-codemods for CSB * Test templates * Fix templates glob * Fix private fields * Move --compact * One of these will work * One more attempt * Adjust command * Specific template * Remove private... * no-template --- .codesandbox/ci.json | 17 ++++++++++- .github/workflows/preview.yml | 29 +++++++++++++++++++ examples/solid/astro/package.json | 2 +- .../solid/solid-start-streaming/package.json | 3 +- packages/query-codemods/package.json | 2 +- 5 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/preview.yml diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index ba5a486c61..2da6bd16de 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -7,6 +7,21 @@ "/examples/svelte/basic", "/examples/vue/basic" ], - "packages": ["packages/**"], + "packages": [ + "packages/angular-query-devtools-experimental", + "packages/angular-query-experimental", + "packages/query-core", + "packages/query-devtools", + "packages/query-sync-storage-persister", + "packages/react-query", + "packages/react-query-devtools", + "packages/react-query-persist-client", + "packages/solid-query", + "packages/solid-query-devtools", + "packages/svelte-query", + "packages/svelte-query-devtools", + "packages/vue-query", + "packages/vue-query-devtools" + ], "node": "20" } diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000000..c802d27d35 --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,29 @@ +name: preview + +on: + pull_request_review: + types: [submitted] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +env: + NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} + +jobs: + preview: + name: Preview + if: github.event.review.state == 'APPROVED' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Tools + uses: tanstack/config/.github/setup@main + - name: Build Packages + run: pnpm run build:all + - name: Publish Previews + run: pnpx pkg-pr-new publish --no-template --compact ./packages/* diff --git a/examples/solid/astro/package.json b/examples/solid/astro/package.json index ee5c438444..fe5d671bc9 100644 --- a/examples/solid/astro/package.json +++ b/examples/solid/astro/package.json @@ -1,7 +1,7 @@ { "name": "solid-query-astro-example", + "private": true, "type": "module", - "version": "0.0.1", "scripts": { "dev": "astro dev", "start": "astro dev", diff --git a/examples/solid/solid-start-streaming/package.json b/examples/solid/solid-start-streaming/package.json index 25c1c323e6..4f3da820fc 100644 --- a/examples/solid/solid-start-streaming/package.json +++ b/examples/solid/solid-start-streaming/package.json @@ -1,5 +1,6 @@ { - "name": "example-basic", + "name": "solid-start-streaming-example", + "private": true, "type": "module", "scripts": { "dev": "vinxi dev", diff --git a/packages/query-codemods/package.json b/packages/query-codemods/package.json index 1a4b5e4d57..35c7b6ac11 100644 --- a/packages/query-codemods/package.json +++ b/packages/query-codemods/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-codemods", - "version": "4.24.3", + "private": true, "description": "Collection of codemods to make the migration easier.", "author": "Balázs Máté Petró", "license": "MIT", From ea4d8f29da59aecc7d552e2715526ebccdbb8ba3 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 7 Jul 2024 08:01:17 +1000 Subject: [PATCH 20/80] ci: Use pkg-pr-new templates (#7676) * WIP: Try pkg-pr-new templates * Remove approved * Try one dir * Update preview.yml * Update preview.yml * Update preview.yml * Test moving to dep * Merge with pr.yml * Update example names * Use pnpm pack * All examples * Undo angular basic change * Remove .codesandbox/ci.json --- .codesandbox/ci.json | 27 ----------------- .github/workflows/pr.yml | 14 +++++++++ .github/workflows/preview.yml | 29 ------------------- .../react/nextjs-app-prefetching/package.json | 2 +- examples/react/shadow-dom/package.json | 2 +- examples/solid/astro/package.json | 2 +- .../solid/solid-start-streaming/package.json | 2 +- package.json | 5 ++-- 8 files changed, 20 insertions(+), 63 deletions(-) delete mode 100644 .codesandbox/ci.json delete mode 100644 .github/workflows/preview.yml diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json deleted file mode 100644 index 2da6bd16de..0000000000 --- a/.codesandbox/ci.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "buildCommand": "build:csb", - "sandboxes": [ - "/examples/angular/basic", - "/examples/react/basic-typescript", - "/examples/solid/basic-typescript", - "/examples/svelte/basic", - "/examples/vue/basic" - ], - "packages": [ - "packages/angular-query-devtools-experimental", - "packages/angular-query-experimental", - "packages/query-core", - "packages/query-devtools", - "packages/query-sync-storage-persister", - "packages/react-query", - "packages/react-query-devtools", - "packages/react-query-persist-client", - "packages/solid-query", - "packages/solid-query-devtools", - "packages/svelte-query", - "packages/svelte-query-devtools", - "packages/vue-query", - "packages/vue-query-devtools" - ], - "node": "20" -} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2d54af7083..3d3eea2618 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -40,3 +40,17 @@ jobs: directory: packages env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + preview: + name: Preview + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Tools + uses: tanstack/config/.github/setup@main + - name: Build Packages + run: pnpm run build:all + - name: Publish Previews + run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*' diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml deleted file mode 100644 index c802d27d35..0000000000 --- a/.github/workflows/preview.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: preview - -on: - pull_request_review: - types: [submitted] - -concurrency: - group: ${{ github.workflow }}-${{ github.event.number || github.ref }} - cancel-in-progress: true - -env: - NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - -jobs: - preview: - name: Preview - if: github.event.review.state == 'APPROVED' - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup Tools - uses: tanstack/config/.github/setup@main - - name: Build Packages - run: pnpm run build:all - - name: Publish Previews - run: pnpx pkg-pr-new publish --no-template --compact ./packages/* diff --git a/examples/react/nextjs-app-prefetching/package.json b/examples/react/nextjs-app-prefetching/package.json index faf58c1c8c..f3478e4ccb 100644 --- a/examples/react/nextjs-app-prefetching/package.json +++ b/examples/react/nextjs-app-prefetching/package.json @@ -1,5 +1,5 @@ { - "name": "nextjs-app-prefetching", + "name": "@tanstack/query-example-react-nextjs-app-prefetching", "private": true, "type": "module", "scripts": { diff --git a/examples/react/shadow-dom/package.json b/examples/react/shadow-dom/package.json index 253d24e18d..68d284c42a 100644 --- a/examples/react/shadow-dom/package.json +++ b/examples/react/shadow-dom/package.json @@ -1,5 +1,5 @@ { - "name": "shadow-dom", + "name": "@tanstack/query-example-react-shadow-dom", "private": true, "version": "0.0.0", "type": "module", diff --git a/examples/solid/astro/package.json b/examples/solid/astro/package.json index fe5d671bc9..20f2a8ef4c 100644 --- a/examples/solid/astro/package.json +++ b/examples/solid/astro/package.json @@ -1,5 +1,5 @@ { - "name": "solid-query-astro-example", + "name": "@tanstack/query-example-solid-astro", "private": true, "type": "module", "scripts": { diff --git a/examples/solid/solid-start-streaming/package.json b/examples/solid/solid-start-streaming/package.json index 4f3da820fc..575458b550 100644 --- a/examples/solid/solid-start-streaming/package.json +++ b/examples/solid/solid-start-streaming/package.json @@ -1,5 +1,5 @@ { - "name": "solid-start-streaming-example", + "name": "@tanstack/query-example-solid-start-streaming", "private": true, "type": "module", "scripts": { diff --git a/package.json b/package.json index 74eb2e4cda..3b47732a5f 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,8 @@ "test:build": "nx affected --target=test:build --exclude=examples/**", "test:types": "nx affected --target=test:types --exclude=examples/**", "test:knip": "knip", - "build": "nx affected --target=build --exclude=examples/**", - "build:all": "nx run-many --target=build --exclude=examples/**", - "build:csb": "nx run-many --target=build --exclude=examples/** --exclude=integrations/**", + "build": "nx affected --target=build --exclude=examples/** --exclude=integrations/**", + "build:all": "nx run-many --target=build --exclude=examples/** --exclude=integrations/**", "watch": "pnpm run build:all && nx watch --all -- pnpm run build:all", "dev": "pnpm run watch", "prettier": "prettier --ignore-unknown '**/*'", From 9e5bc7be31da19c6efdc960396001de86310074e Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 7 Jul 2024 08:56:43 +1000 Subject: [PATCH 21/80] fix(solid): Correct deps/devDeps/peerDeps (#7682) --- examples/solid/astro/package.json | 2 +- .../angular-cli-standalone-17/package.json | 2 +- .../package.json | 2 +- packages/angular-query-experimental/package.json | 6 +++--- packages/solid-query-devtools/package.json | 2 +- packages/solid-query-persist-client/package.json | 7 ++++--- packages/solid-query/package.json | 4 ++-- pnpm-lock.yaml | 14 +++----------- 8 files changed, 16 insertions(+), 23 deletions(-) diff --git a/examples/solid/astro/package.json b/examples/solid/astro/package.json index 20f2a8ef4c..70649aeb40 100644 --- a/examples/solid/astro/package.json +++ b/examples/solid/astro/package.json @@ -11,10 +11,10 @@ }, "dependencies": { "@astrojs/check": "^0.7.0", + "@astrojs/node": "^8.2.5", "@astrojs/solid-js": "^4.2.0", "@astrojs/tailwind": "^5.1.0", "@astrojs/vercel": "^7.6.0", - "@astrojs/node": "^8.2.5", "@tanstack/solid-query": "^5.50.1", "@tanstack/solid-query-devtools": "^5.50.1", "astro": "^4.8.6", diff --git a/integrations/angular-cli-standalone-17/package.json b/integrations/angular-cli-standalone-17/package.json index 2a27accf4a..dfac00125a 100644 --- a/integrations/angular-cli-standalone-17/package.json +++ b/integrations/angular-cli-standalone-17/package.json @@ -8,8 +8,8 @@ "@angular/common": "^17.3.10", "@angular/core": "^17.3.10", "@angular/platform-browser": "^17.3.10", - "@tanstack/angular-query-experimental": "workspace:*", "@tanstack/angular-query-devtools-experimental": "workspace:*", + "@tanstack/angular-query-experimental": "workspace:*", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" diff --git a/packages/angular-query-devtools-experimental/package.json b/packages/angular-query-devtools-experimental/package.json index e6c8e015c5..13acb4a749 100644 --- a/packages/angular-query-devtools-experimental/package.json +++ b/packages/angular-query-devtools-experimental/package.json @@ -47,9 +47,9 @@ "tslib": "^2.6.2" }, "devDependencies": { + "@angular/common": "^17.3.10", "@angular/compiler-cli": "^17.3.10", "@angular/core": "^17.3.10", - "@angular/common": "^17.3.10", "@tanstack/angular-query-experimental": "workspace:*", "eslint-plugin-jsdoc": "^48.2.13", "ng-packagr": "^17.3.0", diff --git a/packages/angular-query-experimental/package.json b/packages/angular-query-experimental/package.json index 9e062303dd..8afb76b539 100644 --- a/packages/angular-query-experimental/package.json +++ b/packages/angular-query-experimental/package.json @@ -72,14 +72,14 @@ "@angular/core": "^17.3.10", "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", - "eslint-plugin-jsdoc": "^48.2.13", "@microsoft/api-extractor": "^7.46.2", + "eslint-plugin-jsdoc": "^48.2.13", "ng-packagr": "^17.3.0", "typescript": "5.3.3", "zone.js": "^0.14.6" }, "peerDependencies": { - "@angular/core": ">=16.0.0", - "@angular/common": ">=16.0.0" + "@angular/common": ">=16.0.0", + "@angular/core": ">=16.0.0" } } diff --git a/packages/solid-query-devtools/package.json b/packages/solid-query-devtools/package.json index ef00ae8f84..bf383fa2f8 100644 --- a/packages/solid-query-devtools/package.json +++ b/packages/solid-query-devtools/package.json @@ -57,8 +57,8 @@ "@tanstack/query-devtools": "workspace:*" }, "devDependencies": { + "@tanstack/solid-query": "workspace:*", "solid-js": "^1.8.17", - "@tanstack/solid-query": "workspace:^", "tsup-preset-solid": "^2.2.0", "vite-plugin-solid": "^2.10.2" }, diff --git a/packages/solid-query-persist-client/package.json b/packages/solid-query-persist-client/package.json index 6666056cc5..e6400a7758 100644 --- a/packages/solid-query-persist-client/package.json +++ b/packages/solid-query-persist-client/package.json @@ -60,12 +60,13 @@ "@tanstack/query-persist-client-core": "workspace:*" }, "devDependencies": { + "@tanstack/solid-query": "workspace:*", + "solid-js": "^1.8.17", "tsup-preset-solid": "^2.2.0", - "vite-plugin-solid": "^2.10.2", - "solid-js": "^1.8.17" + "vite-plugin-solid": "^2.10.2" }, "peerDependencies": { - "@tanstack/solid-query": "workspace:*", + "@tanstack/solid-query": "workspace:^", "solid-js": "^1.6.0" } } diff --git a/packages/solid-query/package.json b/packages/solid-query/package.json index b78e9459d2..88c30e6f32 100644 --- a/packages/solid-query/package.json +++ b/packages/solid-query/package.json @@ -59,11 +59,11 @@ "src" ], "dependencies": { - "@tanstack/query-core": "workspace:*", - "solid-js": "^1.8.17" + "@tanstack/query-core": "workspace:*" }, "devDependencies": { "tsup-preset-solid": "^2.2.0", + "solid-js": "^1.8.17", "vite-plugin-solid": "^2.10.2" }, "peerDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 388c4747c4..968e7e6b39 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2141,10 +2141,10 @@ importers: '@tanstack/query-core': specifier: workspace:* version: link:../query-core + devDependencies: solid-js: specifier: ^1.8.17 version: 1.8.17 - devDependencies: tsup-preset-solid: specifier: ^2.2.0 version: 2.2.0(esbuild@0.21.3)(solid-js@1.8.17)(tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.12.12))(postcss@8.4.38)(typescript@5.4.2)) @@ -2159,7 +2159,7 @@ importers: version: link:../query-devtools devDependencies: '@tanstack/solid-query': - specifier: workspace:^ + specifier: workspace:* version: link:../solid-query solid-js: specifier: ^1.8.17 @@ -2176,10 +2176,10 @@ importers: '@tanstack/query-persist-client-core': specifier: workspace:* version: link:../query-persist-client-core + devDependencies: '@tanstack/solid-query': specifier: workspace:* version: link:../solid-query - devDependencies: solid-js: specifier: ^1.8.17 version: 1.8.17 @@ -22657,11 +22657,7 @@ snapshots: jest-runner: 26.6.3 jest-runtime: 26.6.3 transitivePeerDependencies: - - bufferutil - - canvas - supports-color - - ts-node - - utf-8-validate '@jest/test-sequencer@27.5.1': dependencies: @@ -31413,11 +31409,7 @@ snapshots: stack-utils: 2.0.6 throat: 5.0.0 transitivePeerDependencies: - - bufferutil - - canvas - supports-color - - ts-node - - utf-8-validate jest-circus@27.5.1: dependencies: From 706bce3164175c6d9ef9499df1d861c2c47ec4b6 Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Sat, 6 Jul 2024 22:59:33 +0000 Subject: [PATCH 22/80] release: v5.50.2 --- examples/angular/basic/package.json | 4 +- .../package.json | 4 +- examples/angular/router/package.json | 4 +- examples/angular/simple/package.json | 4 +- examples/solid/astro/package.json | 4 +- .../solid/basic-graphql-request/package.json | 4 +- examples/solid/basic-typescript/package.json | 4 +- .../solid/default-query-function/package.json | 4 +- examples/solid/simple/package.json | 4 +- .../solid/solid-start-streaming/package.json | 4 +- .../package.json | 2 +- .../angular-query-experimental/package.json | 2 +- packages/solid-query-devtools/package.json | 2 +- .../solid-query-persist-client/package.json | 2 +- packages/solid-query/package.json | 2 +- pnpm-lock.yaml | 48 +++++++++++-------- 16 files changed, 53 insertions(+), 45 deletions(-) diff --git a/examples/angular/basic/package.json b/examples/angular/basic/package.json index 07653a59de..7f0388adeb 100644 --- a/examples/angular/basic/package.json +++ b/examples/angular/basic/package.json @@ -14,7 +14,7 @@ "@angular/core": "^17.3.10", "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.50.1", + "@tanstack/angular-query-experimental": "^5.50.2", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -23,7 +23,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.50.1", + "@tanstack/angular-query-devtools-experimental": "^5.50.2", "typescript": "5.3.3" } } diff --git a/examples/angular/infinite-query-with-max-pages/package.json b/examples/angular/infinite-query-with-max-pages/package.json index b0cb9e96da..e47053a1ff 100644 --- a/examples/angular/infinite-query-with-max-pages/package.json +++ b/examples/angular/infinite-query-with-max-pages/package.json @@ -14,7 +14,7 @@ "@angular/core": "^17.3.10", "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.50.1", + "@tanstack/angular-query-experimental": "^5.50.2", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -23,7 +23,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.50.1", + "@tanstack/angular-query-devtools-experimental": "^5.50.2", "typescript": "5.3.3" } } diff --git a/examples/angular/router/package.json b/examples/angular/router/package.json index 5f3875fe5c..47c3a86598 100644 --- a/examples/angular/router/package.json +++ b/examples/angular/router/package.json @@ -15,7 +15,7 @@ "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", "@angular/router": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.50.1", + "@tanstack/angular-query-experimental": "^5.50.2", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -24,7 +24,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.50.1", + "@tanstack/angular-query-devtools-experimental": "^5.50.2", "typescript": "5.3.3" } } diff --git a/examples/angular/simple/package.json b/examples/angular/simple/package.json index 65bcd5c231..ea5db8725f 100644 --- a/examples/angular/simple/package.json +++ b/examples/angular/simple/package.json @@ -15,7 +15,7 @@ "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", "@angular/router": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.50.1", + "@tanstack/angular-query-experimental": "^5.50.2", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -24,7 +24,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.50.1", + "@tanstack/angular-query-devtools-experimental": "^5.50.2", "typescript": "5.3.3" } } diff --git a/examples/solid/astro/package.json b/examples/solid/astro/package.json index 70649aeb40..a3adb08b9c 100644 --- a/examples/solid/astro/package.json +++ b/examples/solid/astro/package.json @@ -15,8 +15,8 @@ "@astrojs/solid-js": "^4.2.0", "@astrojs/tailwind": "^5.1.0", "@astrojs/vercel": "^7.6.0", - "@tanstack/solid-query": "^5.50.1", - "@tanstack/solid-query-devtools": "^5.50.1", + "@tanstack/solid-query": "^5.50.2", + "@tanstack/solid-query-devtools": "^5.50.2", "astro": "^4.8.6", "solid-js": "^1.8.17", "tailwindcss": "^3.4.3", diff --git a/examples/solid/basic-graphql-request/package.json b/examples/solid/basic-graphql-request/package.json index 55db5131e3..efd23d76e3 100644 --- a/examples/solid/basic-graphql-request/package.json +++ b/examples/solid/basic-graphql-request/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.50.1", - "@tanstack/solid-query-devtools": "^5.50.1", + "@tanstack/solid-query": "^5.50.2", + "@tanstack/solid-query-devtools": "^5.50.2", "graphql": "^16.8.1", "graphql-request": "^7.0.1", "solid-js": "^1.8.17" diff --git a/examples/solid/basic-typescript/package.json b/examples/solid/basic-typescript/package.json index ee23d045af..3c4c16c3d2 100644 --- a/examples/solid/basic-typescript/package.json +++ b/examples/solid/basic-typescript/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.50.1", - "@tanstack/solid-query-devtools": "^5.50.1", + "@tanstack/solid-query": "^5.50.2", + "@tanstack/solid-query-devtools": "^5.50.2", "solid-js": "^1.8.17" }, "devDependencies": { diff --git a/examples/solid/default-query-function/package.json b/examples/solid/default-query-function/package.json index f290fafa26..9c4da68053 100644 --- a/examples/solid/default-query-function/package.json +++ b/examples/solid/default-query-function/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.50.1", - "@tanstack/solid-query-devtools": "^5.50.1", + "@tanstack/solid-query": "^5.50.2", + "@tanstack/solid-query-devtools": "^5.50.2", "solid-js": "^1.8.17" }, "devDependencies": { diff --git a/examples/solid/simple/package.json b/examples/solid/simple/package.json index 07dc7891d3..0252f2f8ec 100644 --- a/examples/solid/simple/package.json +++ b/examples/solid/simple/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.50.1", - "@tanstack/solid-query-devtools": "^5.50.1", + "@tanstack/solid-query": "^5.50.2", + "@tanstack/solid-query-devtools": "^5.50.2", "solid-js": "^1.8.17" }, "devDependencies": { diff --git a/examples/solid/solid-start-streaming/package.json b/examples/solid/solid-start-streaming/package.json index 575458b550..530056af08 100644 --- a/examples/solid/solid-start-streaming/package.json +++ b/examples/solid/solid-start-streaming/package.json @@ -12,8 +12,8 @@ "@solidjs/meta": "^0.29.4", "@solidjs/router": "^0.13.3", "@solidjs/start": "^1.0.0-rc.1", - "@tanstack/solid-query": "^5.50.1", - "@tanstack/solid-query-devtools": "^5.50.1", + "@tanstack/solid-query": "^5.50.2", + "@tanstack/solid-query-devtools": "^5.50.2", "solid-js": "^1.8.17", "vinxi": "^0.3.10" }, diff --git a/packages/angular-query-devtools-experimental/package.json b/packages/angular-query-devtools-experimental/package.json index 13acb4a749..d5c5797e21 100644 --- a/packages/angular-query-devtools-experimental/package.json +++ b/packages/angular-query-devtools-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/angular-query-devtools-experimental", - "version": "5.50.1", + "version": "5.50.2", "description": "Developer tools to interact with and visualize the TanStack/angular-query cache", "author": "Arnoud de Vries", "license": "MIT", diff --git a/packages/angular-query-experimental/package.json b/packages/angular-query-experimental/package.json index 8afb76b539..b5750f6f3f 100644 --- a/packages/angular-query-experimental/package.json +++ b/packages/angular-query-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/angular-query-experimental", - "version": "5.50.1", + "version": "5.50.2", "description": "Signals for managing, caching and syncing asynchronous and remote data in Angular", "author": "Arnoud de Vries", "license": "MIT", diff --git a/packages/solid-query-devtools/package.json b/packages/solid-query-devtools/package.json index bf383fa2f8..ebe3fcaf09 100644 --- a/packages/solid-query-devtools/package.json +++ b/packages/solid-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query-devtools", - "version": "5.50.1", + "version": "5.50.2", "description": "Developer tools to interact with and visualize the TanStack/solid-query Query cache", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query-persist-client/package.json b/packages/solid-query-persist-client/package.json index e6400a7758..9a7051c84f 100644 --- a/packages/solid-query-persist-client/package.json +++ b/packages/solid-query-persist-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query-persist-client", - "version": "5.50.1", + "version": "5.50.2", "description": "Solid.js bindings to work with persisters in TanStack/solid-query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query/package.json b/packages/solid-query/package.json index 88c30e6f32..fcc41a2b88 100644 --- a/packages/solid-query/package.json +++ b/packages/solid-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query", - "version": "5.50.1", + "version": "5.50.2", "description": "Primitives for managing, caching and syncing asynchronous and remote data in Solid", "author": "tannerlinsley", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 968e7e6b39..a112120837 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -146,7 +146,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))) '@tanstack/angular-query-experimental': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -168,7 +168,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -192,7 +192,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))) '@tanstack/angular-query-experimental': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -214,7 +214,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -241,7 +241,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(rxjs@7.8.1) '@tanstack/angular-query-experimental': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -263,7 +263,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -290,7 +290,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(rxjs@7.8.1) '@tanstack/angular-query-experimental': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -312,7 +312,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -1158,10 +1158,10 @@ importers: specifier: ^7.6.0 version: 7.6.0(astro@4.9.1(@types/node@20.12.12)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)(typescript@5.3.3))(encoding@0.1.13)(next@14.2.4(@babel/core@7.24.6)(react-dom@19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522))(react@18.3.1)(sass@1.71.1))(react@18.3.1) '@tanstack/solid-query': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/solid-query-devtools astro: specifier: ^4.8.6 @@ -1179,10 +1179,10 @@ importers: examples/solid/basic-graphql-request: dependencies: '@tanstack/solid-query': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/solid-query-devtools graphql: specifier: ^16.8.1 @@ -1207,10 +1207,10 @@ importers: examples/solid/basic-typescript: dependencies: '@tanstack/solid-query': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -1229,10 +1229,10 @@ importers: examples/solid/default-query-function: dependencies: '@tanstack/solid-query': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -1251,10 +1251,10 @@ importers: examples/solid/simple: dependencies: '@tanstack/solid-query': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -1285,10 +1285,10 @@ importers: specifier: ^1.0.0-rc.1 version: 1.0.0(@testing-library/jest-dom@6.4.5(vitest@1.6.0(@types/node@20.12.12)(jsdom@24.0.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(rollup@4.14.1)(solid-js@1.8.17)(vinxi@0.3.11(@types/node@20.12.12)(idb-keyval@6.2.1)(ioredis@5.3.2)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vite@5.2.11(@types/node@20.12.12)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@tanstack/solid-query': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.50.1 + specifier: ^5.50.2 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -22657,7 +22657,11 @@ snapshots: jest-runner: 26.6.3 jest-runtime: 26.6.3 transitivePeerDependencies: + - bufferutil + - canvas - supports-color + - ts-node + - utf-8-validate '@jest/test-sequencer@27.5.1': dependencies: @@ -31409,7 +31413,11 @@ snapshots: stack-utils: 2.0.6 throat: 5.0.0 transitivePeerDependencies: + - bufferutil + - canvas - supports-color + - ts-node + - utf-8-validate jest-circus@27.5.1: dependencies: From d2a92d97ae3cfe2e2f8480305693835c88959c63 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 7 Jul 2024 09:42:41 +1000 Subject: [PATCH 23/80] docs(examples): Fix duplicate example name (#7684) --- examples/vue/2.7-basic/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vue/2.7-basic/package.json b/examples/vue/2.7-basic/package.json index 83e18de5a1..6af427256f 100644 --- a/examples/vue/2.7-basic/package.json +++ b/examples/vue/2.7-basic/package.json @@ -1,5 +1,5 @@ { - "name": "@tanstack/query-example-vue-2.6-basic", + "name": "@tanstack/query-example-vue-2.7-basic", "private": true, "scripts": { "dev": "vite", From 2df92a67cc9003d801b5ea9db5efe48f7eab5c41 Mon Sep 17 00:00:00 2001 From: Aponia Date: Sun, 7 Jul 2024 19:17:45 -0700 Subject: [PATCH 24/80] refactor(svelte-query): specify StoreOrVal in function signature (#7453) Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> --- packages/svelte-query/src/createMutation.ts | 5 ++++- packages/svelte-query/src/types.ts | 8 +++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/svelte-query/src/createMutation.ts b/packages/svelte-query/src/createMutation.ts index 5997d8b2f0..97053fb0f4 100644 --- a/packages/svelte-query/src/createMutation.ts +++ b/packages/svelte-query/src/createMutation.ts @@ -6,6 +6,7 @@ import type { CreateMutateFunction, CreateMutationOptions, CreateMutationResult, + StoreOrVal, } from './types' import type { DefaultError, QueryClient } from '@tanstack/query-core' @@ -15,7 +16,9 @@ export function createMutation< TVariables = void, TContext = unknown, >( - options: CreateMutationOptions, + options: StoreOrVal< + CreateMutationOptions + >, queryClient?: QueryClient, ): CreateMutationResult { const client = useQueryClient(queryClient) diff --git a/packages/svelte-query/src/types.ts b/packages/svelte-query/src/types.ts index 032a312f95..4fd8bdb271 100644 --- a/packages/svelte-query/src/types.ts +++ b/packages/svelte-query/src/types.ts @@ -89,11 +89,9 @@ export type CreateMutationOptions< TError = DefaultError, TVariables = void, TContext = unknown, -> = StoreOrVal< - OmitKeyof< - MutationObserverOptions, - '_defaulted' - > +> = OmitKeyof< + MutationObserverOptions, + '_defaulted' > export type CreateMutateFunction< From c107fc54a919db07e85b21aaac3f57a1a6678ff9 Mon Sep 17 00:00:00 2001 From: 87xie Date: Mon, 8 Jul 2024 10:17:57 +0800 Subject: [PATCH 25/80] docs(react-query): correct links in the `prefetching.md` file (#7671) Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> --- docs/framework/react/guides/prefetching.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/framework/react/guides/prefetching.md b/docs/framework/react/guides/prefetching.md index 50626d3059..53b2e4e8a8 100644 --- a/docs/framework/react/guides/prefetching.md +++ b/docs/framework/react/guides/prefetching.md @@ -196,7 +196,7 @@ This starts fetching `'article-comments'` immediately and flattens the waterfall [//]: # 'Suspense' -If you want to prefetch together with Suspense, you will have to do things a bit differently. You can't use `useSuspenseQueries` to prefetch, since the prefetch would block the component from rendering. You also can not use `useQuery` for the prefetch, because that wouldn't start the prefetch until after suspenseful query had resolved. For this scenario, you can use the [`usePrefetchQuery`](../reference/usePrefetchQuery) or the [`usePrefetchInfiniteQuery`](../reference/usePrefetchInfiniteQuery) hooks available in the library. +If you want to prefetch together with Suspense, you will have to do things a bit differently. You can't use `useSuspenseQueries` to prefetch, since the prefetch would block the component from rendering. You also can not use `useQuery` for the prefetch, because that wouldn't start the prefetch until after suspenseful query had resolved. For this scenario, you can use the [`usePrefetchQuery`](../../reference/usePrefetchQuery) or the [`usePrefetchInfiniteQuery`](../../reference/usePrefetchInfiniteQuery) hooks available in the library. You can now use `useSuspenseQuery` in the component that actually needs the data. You _might_ want to wrap this later component in its own `` boundary so the "secondary" query we are prefetching does not block rendering of the "primary" data. @@ -378,7 +378,7 @@ Because data fetching in the component tree itself can easily lead to request wa In this approach, you explicitly declare for each _route_ what data is going to be needed for that component tree, ahead of time. Because Server Rendering has traditionally needed all data to be loaded before rendering starts, this has been the dominating approach for SSR'd apps for a long time. This is still a common approach and you can read more about it in the [Server Rendering & Hydration guide](../ssr). -For now, let's focus on the client side case and look at an example of how you can make this work with [Tanstack Router](https://tanstack.com/router). These examples leave out a lot of setup and boilerplate to stay concise, you can check out a [full React Query example](https://tanstack.com/router/v1/docs/examples/react/with-react-query?file=src%2Fmain.tsx) over in the [Tanstack Router docs](https://tanstack.com/router/v1/docs). +For now, let's focus on the client side case and look at an example of how you can make this work with [Tanstack Router](https://tanstack.com/router). These examples leave out a lot of setup and boilerplate to stay concise, you can check out a [full React Query example](https://tanstack.com/router/v1/docs/framework/react/examples/basic-react-query-file-based) over in the [Tanstack Router docs](https://tanstack.com/router/v1/docs). When integrating at the router level, you can choose to either _block_ rendering of that route until all data is present, or you can start a prefetch but not await the result. That way, you can start rendering the route as soon as possible. You can also mix these two approaches and await some critical data, but start rendering before all the secondary data has finished loading. In this example, we'll configure an `/article` route to not render until the article data has finished loading, as well as start prefetching comments as soon as possible, but not block rendering the route if comments haven't finished loading yet. From c1945ff938897f73526ab99c60a683598e6a4f19 Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Mon, 8 Jul 2024 02:21:42 +0000 Subject: [PATCH 26/80] release: v5.50.3 --- examples/svelte/auto-refetching/package.json | 4 +-- examples/svelte/basic/package.json | 4 +-- .../load-more-infinite-scroll/package.json | 4 +-- .../package.json | 4 +-- examples/svelte/playground/package.json | 4 +-- examples/svelte/simple/package.json | 4 +-- examples/svelte/ssr/package.json | 4 +-- examples/svelte/star-wars/package.json | 4 +-- packages/svelte-query-devtools/package.json | 2 +- .../svelte-query-persist-client/package.json | 2 +- packages/svelte-query/package.json | 2 +- pnpm-lock.yaml | 32 +++++++++---------- 12 files changed, 35 insertions(+), 35 deletions(-) diff --git a/examples/svelte/auto-refetching/package.json b/examples/svelte/auto-refetching/package.json index 8b6f11c247..baa9684814 100644 --- a/examples/svelte/auto-refetching/package.json +++ b/examples/svelte/auto-refetching/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.50.1", - "@tanstack/svelte-query-devtools": "^5.50.1" + "@tanstack/svelte-query": "^5.50.3", + "@tanstack/svelte-query-devtools": "^5.50.3" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.0", diff --git a/examples/svelte/basic/package.json b/examples/svelte/basic/package.json index 8056c08b59..f712f7e950 100644 --- a/examples/svelte/basic/package.json +++ b/examples/svelte/basic/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.50.1", - "@tanstack/svelte-query-devtools": "^5.50.1" + "@tanstack/svelte-query": "^5.50.3", + "@tanstack/svelte-query-devtools": "^5.50.3" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.0", diff --git a/examples/svelte/load-more-infinite-scroll/package.json b/examples/svelte/load-more-infinite-scroll/package.json index 15710fc594..8d439bed1c 100644 --- a/examples/svelte/load-more-infinite-scroll/package.json +++ b/examples/svelte/load-more-infinite-scroll/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.50.1", - "@tanstack/svelte-query-devtools": "^5.50.1" + "@tanstack/svelte-query": "^5.50.3", + "@tanstack/svelte-query-devtools": "^5.50.3" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.0", diff --git a/examples/svelte/optimistic-updates-typescript/package.json b/examples/svelte/optimistic-updates-typescript/package.json index 4f69c9410e..200a7f4983 100644 --- a/examples/svelte/optimistic-updates-typescript/package.json +++ b/examples/svelte/optimistic-updates-typescript/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.50.1", - "@tanstack/svelte-query-devtools": "^5.50.1" + "@tanstack/svelte-query": "^5.50.3", + "@tanstack/svelte-query-devtools": "^5.50.3" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.0", diff --git a/examples/svelte/playground/package.json b/examples/svelte/playground/package.json index 74247a7d1a..684aee2000 100644 --- a/examples/svelte/playground/package.json +++ b/examples/svelte/playground/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.50.1", - "@tanstack/svelte-query-devtools": "^5.50.1" + "@tanstack/svelte-query": "^5.50.3", + "@tanstack/svelte-query-devtools": "^5.50.3" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.0", diff --git a/examples/svelte/simple/package.json b/examples/svelte/simple/package.json index 3b87160f38..8f0c478928 100644 --- a/examples/svelte/simple/package.json +++ b/examples/svelte/simple/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.50.1", - "@tanstack/svelte-query-devtools": "^5.50.1" + "@tanstack/svelte-query": "^5.50.3", + "@tanstack/svelte-query-devtools": "^5.50.3" }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^3.1.0", diff --git a/examples/svelte/ssr/package.json b/examples/svelte/ssr/package.json index 8320a33dda..16d3e5e9cb 100644 --- a/examples/svelte/ssr/package.json +++ b/examples/svelte/ssr/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.50.1", - "@tanstack/svelte-query-devtools": "^5.50.1" + "@tanstack/svelte-query": "^5.50.3", + "@tanstack/svelte-query-devtools": "^5.50.3" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.0", diff --git a/examples/svelte/star-wars/package.json b/examples/svelte/star-wars/package.json index e2731844b8..49e25f3394 100644 --- a/examples/svelte/star-wars/package.json +++ b/examples/svelte/star-wars/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.50.1", - "@tanstack/svelte-query-devtools": "^5.50.1" + "@tanstack/svelte-query": "^5.50.3", + "@tanstack/svelte-query-devtools": "^5.50.3" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.0", diff --git a/packages/svelte-query-devtools/package.json b/packages/svelte-query-devtools/package.json index 0f6e27ca58..aa3b529be2 100644 --- a/packages/svelte-query-devtools/package.json +++ b/packages/svelte-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query-devtools", - "version": "5.50.1", + "version": "5.50.3", "description": "Developer tools to interact with and visualize the TanStack/svelte-query cache", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/svelte-query-persist-client/package.json b/packages/svelte-query-persist-client/package.json index c0a62a3c99..1b938d2526 100644 --- a/packages/svelte-query-persist-client/package.json +++ b/packages/svelte-query-persist-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query-persist-client", - "version": "5.50.1", + "version": "5.50.3", "description": "Svelte bindings to work with persisters in TanStack/svelte-query", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/svelte-query/package.json b/packages/svelte-query/package.json index ad22379e92..99d159b935 100644 --- a/packages/svelte-query/package.json +++ b/packages/svelte-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query", - "version": "5.50.1", + "version": "5.50.3", "description": "Primitives for managing, caching and syncing asynchronous and remote data in Svelte", "author": "Lachlan Collins", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a112120837..c60b00d5a6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1300,10 +1300,10 @@ importers: examples/svelte/auto-refetching: dependencies: '@tanstack/svelte-query': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1331,10 +1331,10 @@ importers: examples/svelte/basic: dependencies: '@tanstack/svelte-query': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1362,10 +1362,10 @@ importers: examples/svelte/load-more-infinite-scroll: dependencies: '@tanstack/svelte-query': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1393,10 +1393,10 @@ importers: examples/svelte/optimistic-updates-typescript: dependencies: '@tanstack/svelte-query': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1424,10 +1424,10 @@ importers: examples/svelte/playground: dependencies: '@tanstack/svelte-query': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1455,10 +1455,10 @@ importers: examples/svelte/simple: dependencies: '@tanstack/svelte-query': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/vite-plugin-svelte': @@ -1483,10 +1483,10 @@ importers: examples/svelte/ssr: dependencies: '@tanstack/svelte-query': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1514,10 +1514,10 @@ importers: examples/svelte/star-wars: dependencies: '@tanstack/svelte-query': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.50.1 + specifier: ^5.50.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': From 41009c964cb55eeb3a7e4ba63b636d0366d99799 Mon Sep 17 00:00:00 2001 From: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com> Date: Mon, 8 Jul 2024 04:02:28 -0400 Subject: [PATCH 27/80] feat(vue-query): add support for getters in query keys (#7608) * feat(vue-query): add support for getters in query keys * add support for nested queries * fix type test * don't export helper function * fix useQueries types * fix lint issue --- .../src/__tests__/useQueries.test.ts | 92 +++++++++++++++++++ .../vue-query/src/__tests__/useQuery.test.ts | 84 +++++++++++++++++ packages/vue-query/src/useQueries.ts | 33 ++++--- packages/vue-query/src/utils.ts | 61 ++++++++++-- 4 files changed, 247 insertions(+), 23 deletions(-) diff --git a/packages/vue-query/src/__tests__/useQueries.test.ts b/packages/vue-query/src/__tests__/useQueries.test.ts index 14f160b47c..86ca11d980 100644 --- a/packages/vue-query/src/__tests__/useQueries.test.ts +++ b/packages/vue-query/src/__tests__/useQueries.test.ts @@ -275,4 +275,96 @@ describe('useQueries', () => { expect(fetchFn).toHaveBeenCalled() }) + + test('should allow getters for query keys', async () => { + const fetchFn = vi.fn() + const key1 = ref('key1') + const key2 = ref('key2') + + useQueries({ + queries: [ + { + queryKey: ['key', () => key1.value, () => key2.value], + queryFn: fetchFn, + }, + ], + }) + + expect(fetchFn).toHaveBeenCalledTimes(1) + + key1.value = 'key3' + + await flushPromises() + + expect(fetchFn).toHaveBeenCalledTimes(2) + + key2.value = 'key4' + + await flushPromises() + + expect(fetchFn).toHaveBeenCalledTimes(3) + }) + + test('should allow arbitrarily nested getters for query keys', async () => { + const fetchFn = vi.fn() + const key1 = ref('key1') + const key2 = ref('key2') + const key3 = ref('key3') + const key4 = ref('key4') + const key5 = ref('key5') + + useQueries({ + queries: [ + { + queryKey: [ + 'key', + key1, + () => key2.value, + { key: () => key3.value }, + [{ foo: { bar: () => key4.value } }], + () => ({ + foo: { + bar: { + baz: () => key5.value, + }, + }, + }), + ], + queryFn: fetchFn, + }, + ], + }) + + expect(fetchFn).toHaveBeenCalledTimes(1) + + key1.value = 'key1-updated' + + await flushPromises() + + expect(fetchFn).toHaveBeenCalledTimes(2) + + key2.value = 'key2-updated' + + await flushPromises() + + expect(fetchFn).toHaveBeenCalledTimes(3) + + key3.value = 'key3-updated' + + await flushPromises() + + expect(fetchFn).toHaveBeenCalledTimes(4) + + key4.value = 'key4-updated' + + await flushPromises() + + expect(fetchFn).toHaveBeenCalledTimes(5) + + key5.value = 'key5-updated' + + await flushPromises() + + expect(fetchFn).toHaveBeenCalledTimes(6) + }) }) diff --git a/packages/vue-query/src/__tests__/useQuery.test.ts b/packages/vue-query/src/__tests__/useQuery.test.ts index 49e2880d77..c8556dc7f7 100644 --- a/packages/vue-query/src/__tests__/useQuery.test.ts +++ b/packages/vue-query/src/__tests__/useQuery.test.ts @@ -287,6 +287,90 @@ describe('useQuery', () => { expect(fetchFn).toHaveBeenCalled() }) + test('should allow getters for query keys', async () => { + const fetchFn = vi.fn() + const key1 = ref('key1') + const key2 = ref('key2') + + useQuery({ + queryKey: ['key', () => key1.value, () => key2.value], + queryFn: fetchFn, + }) + + expect(fetchFn).toHaveBeenCalledTimes(1) + + key1.value = 'key3' + + await flushPromises() + + expect(fetchFn).toHaveBeenCalledTimes(2) + + key2.value = 'key4' + + await flushPromises() + + expect(fetchFn).toHaveBeenCalledTimes(3) + }) + + test('should allow arbitrarily nested getters for query keys', async () => { + const fetchFn = vi.fn() + const key1 = ref('key1') + const key2 = ref('key2') + const key3 = ref('key3') + const key4 = ref('key4') + const key5 = ref('key5') + + useQuery({ + queryKey: [ + 'key', + key1, + () => key2.value, + { key: () => key3.value }, + [{ foo: { bar: () => key4.value } }], + () => ({ + foo: { + bar: { + baz: () => key5.value, + }, + }, + }), + ], + queryFn: fetchFn, + }) + + expect(fetchFn).toHaveBeenCalledTimes(1) + + key1.value = 'key1-updated' + + await flushPromises() + + expect(fetchFn).toHaveBeenCalledTimes(2) + + key2.value = 'key2-updated' + + await flushPromises() + + expect(fetchFn).toHaveBeenCalledTimes(3) + + key3.value = 'key3-updated' + + await flushPromises() + + expect(fetchFn).toHaveBeenCalledTimes(4) + + key4.value = 'key4-updated' + + await flushPromises() + + expect(fetchFn).toHaveBeenCalledTimes(5) + + key5.value = 'key5-updated' + + await flushPromises() + + expect(fetchFn).toHaveBeenCalledTimes(6) + }) + describe('throwOnError', () => { test('should evaluate throwOnError when query is expected to throw', async () => { const boundaryFn = vi.fn() diff --git a/packages/vue-query/src/useQueries.ts b/packages/vue-query/src/useQueries.ts index b67d8f9b4f..9300bb0ad7 100644 --- a/packages/vue-query/src/useQueries.ts +++ b/packages/vue-query/src/useQueries.ts @@ -5,6 +5,7 @@ import { onScopeDispose, readonly, shallowRef, + unref, watch, } from 'vue-demi' @@ -268,22 +269,26 @@ export function useQueries< const client = queryClient || useQueryClient() - const defaultedQueries = computed(() => - cloneDeepUnref(queries as MaybeRefDeep>).map( - (queryOptions) => { - if (typeof queryOptions.enabled === 'function') { - queryOptions.enabled = queryOptions.enabled() - } + const defaultedQueries = computed(() => { + // Only unref the top level array. + const queriesRaw = unref(queries) as ReadonlyArray - const defaulted = client.defaultQueryOptions(queryOptions) - defaulted._optimisticResults = client.isRestoring.value - ? 'isRestoring' - : 'optimistic' + // Unref the rest for each element in the top level array. + return queriesRaw.map((queryOptions) => { + const clonedOptions = cloneDeepUnref(queryOptions) - return defaulted - }, - ), - ) + if (typeof clonedOptions.enabled === 'function') { + clonedOptions.enabled = queryOptions.enabled() + } + + const defaulted = client.defaultQueryOptions(clonedOptions) + defaulted._optimisticResults = client.isRestoring.value + ? 'isRestoring' + : 'optimistic' + + return defaulted + }) + }) const observer = new QueriesObserver( client, diff --git a/packages/vue-query/src/utils.ts b/packages/vue-query/src/utils.ts index 46de4a3ce8..df68e966cd 100644 --- a/packages/vue-query/src/utils.ts +++ b/packages/vue-query/src/utils.ts @@ -17,13 +17,20 @@ export function updateState( }) } -export function cloneDeep( +// Helper function for cloning deep objects where +// the level and key is provided to the callback function. +function _cloneDeep( value: MaybeRefDeep, - customize?: (val: MaybeRefDeep) => T | undefined, + customize?: ( + val: MaybeRefDeep, + key: string, + level: number, + ) => T | undefined, + currentKey: string = '', + currentLevel: number = 0, ): T { if (customize) { - const result = customize(value) - // If it's a ref of undefined, return undefined + const result = customize(value, currentKey, currentLevel) if (result === undefined && isRef(value)) { return result as T } @@ -33,13 +40,15 @@ export function cloneDeep( } if (Array.isArray(value)) { - return value.map((val) => cloneDeep(val, customize)) as unknown as T + return value.map((val, index) => + _cloneDeep(val, customize, String(index), currentLevel + 1), + ) as unknown as T } if (typeof value === 'object' && isPlainObject(value)) { const entries = Object.entries(value).map(([key, val]) => [ key, - cloneDeep(val, customize), + _cloneDeep(val, customize, key, currentLevel + 1), ]) return Object.fromEntries(entries) } @@ -47,10 +56,40 @@ export function cloneDeep( return value as T } -export function cloneDeepUnref(obj: MaybeRefDeep): T { - return cloneDeep(obj, (val) => { +export function cloneDeep( + value: MaybeRefDeep, + customize?: ( + val: MaybeRefDeep, + key: string, + level: number, + ) => T | undefined, +): T { + return _cloneDeep(value, customize) +} + +export function cloneDeepUnref( + obj: MaybeRefDeep, + unrefGetters = false, +): T { + return cloneDeep(obj, (val, key, level) => { + // Check if we're at the top level and the key is 'queryKey' + // + // If so, take the recursive descent where we resolve + // getters to values as well as refs. + if (level === 1 && key === 'queryKey') { + return cloneDeepUnref(val, true) + } + + // Resolve getters to values if specified. + if (unrefGetters && isFunction(val)) { + // Cast due to older TS versions not allowing calling + // on certain intersection types. + return cloneDeepUnref((val as Function)(), unrefGetters) + } + + // Unref refs and continue to recurse into the value. if (isRef(val)) { - return cloneDeepUnref(unref(val)) + return cloneDeepUnref(unref(val), unrefGetters) } return undefined @@ -66,6 +105,10 @@ function isPlainObject(value: unknown): value is Object { return prototype === null || prototype === Object.prototype } +function isFunction(value: unknown): value is Function { + return typeof value === 'function' +} + export function shouldThrowError) => boolean>( throwOnError: boolean | T | undefined, params: Parameters, From 7e3c9e9ccb7405fdcbd4eaf5b5971619218de1b2 Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Mon, 8 Jul 2024 08:05:42 +0000 Subject: [PATCH 28/80] release: v5.51.0 --- examples/vue/2.6-basic/package.json | 2 +- examples/vue/2.7-basic/package.json | 2 +- examples/vue/basic/package.json | 4 ++-- examples/vue/dependent-queries/package.json | 2 +- examples/vue/nuxt3/package.json | 2 +- examples/vue/persister/package.json | 2 +- examples/vue/simple/package.json | 4 ++-- packages/vue-query-devtools/package.json | 2 +- packages/vue-query/package.json | 2 +- pnpm-lock.yaml | 12 ++++++------ 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/examples/vue/2.6-basic/package.json b/examples/vue/2.6-basic/package.json index dff1062ca1..bf61b06257 100644 --- a/examples/vue/2.6-basic/package.json +++ b/examples/vue/2.6-basic/package.json @@ -8,7 +8,7 @@ "_preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.50.1", + "@tanstack/vue-query": "^5.51.0", "@vue/composition-api": "1.7.2", "vue": "2.6.14", "vue-template-compiler": "2.6.14" diff --git a/examples/vue/2.7-basic/package.json b/examples/vue/2.7-basic/package.json index 6af427256f..6000b3cb2b 100644 --- a/examples/vue/2.7-basic/package.json +++ b/examples/vue/2.7-basic/package.json @@ -8,7 +8,7 @@ "_serve": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.50.1", + "@tanstack/vue-query": "^5.51.0", "vue": "2.7.16", "vue-template-compiler": "2.7.16" }, diff --git a/examples/vue/basic/package.json b/examples/vue/basic/package.json index 146448f653..1f5528422d 100644 --- a/examples/vue/basic/package.json +++ b/examples/vue/basic/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.50.1", - "@tanstack/vue-query-devtools": "^5.50.1", + "@tanstack/vue-query": "^5.51.0", + "@tanstack/vue-query-devtools": "^5.51.0", "vue": "^3.4.27" }, "devDependencies": { diff --git a/examples/vue/dependent-queries/package.json b/examples/vue/dependent-queries/package.json index e1ee7b48d1..ea35559265 100644 --- a/examples/vue/dependent-queries/package.json +++ b/examples/vue/dependent-queries/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.50.1", + "@tanstack/vue-query": "^5.51.0", "vue": "^3.4.27" }, "devDependencies": { diff --git a/examples/vue/nuxt3/package.json b/examples/vue/nuxt3/package.json index 4c63b27c8a..dac72d0c7b 100644 --- a/examples/vue/nuxt3/package.json +++ b/examples/vue/nuxt3/package.json @@ -7,7 +7,7 @@ "_start": "node .output/server/index.mjs" }, "dependencies": { - "@tanstack/vue-query": "^5.50.1" + "@tanstack/vue-query": "^5.51.0" }, "devDependencies": { "nuxt": "^3.5.2" diff --git a/examples/vue/persister/package.json b/examples/vue/persister/package.json index 20f079b693..2e6b8a04a8 100644 --- a/examples/vue/persister/package.json +++ b/examples/vue/persister/package.json @@ -11,7 +11,7 @@ "@tanstack/query-core": "^5.50.1", "@tanstack/query-persist-client-core": "^5.50.1", "@tanstack/query-sync-storage-persister": "^5.50.1", - "@tanstack/vue-query": "^5.50.1", + "@tanstack/vue-query": "^5.51.0", "idb-keyval": "^6.2.1", "vue": "^3.4.27" }, diff --git a/examples/vue/simple/package.json b/examples/vue/simple/package.json index ecafbdc97e..8748c15691 100644 --- a/examples/vue/simple/package.json +++ b/examples/vue/simple/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.50.1", - "@tanstack/vue-query-devtools": "^5.50.1", + "@tanstack/vue-query": "^5.51.0", + "@tanstack/vue-query-devtools": "^5.51.0", "vue": "^3.4.27" }, "devDependencies": { diff --git a/packages/vue-query-devtools/package.json b/packages/vue-query-devtools/package.json index 41de891082..56eb35e9f5 100644 --- a/packages/vue-query-devtools/package.json +++ b/packages/vue-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-query-devtools", - "version": "5.50.1", + "version": "5.51.0", "description": "Developer tools to interact with and visualize the TanStack/vue-query cache", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/vue-query/package.json b/packages/vue-query/package.json index 14afe7541a..54529ec6a7 100644 --- a/packages/vue-query/package.json +++ b/packages/vue-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-query", - "version": "5.50.1", + "version": "5.51.0", "description": "Hooks for managing, caching and syncing asynchronous and remote data in Vue", "author": "Damian Osipiuk", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c60b00d5a6..a99f43527b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1554,10 +1554,10 @@ importers: examples/vue/basic: dependencies: '@tanstack/vue-query': - specifier: ^5.50.1 + specifier: ^5.51.0 version: link:../../../packages/vue-query '@tanstack/vue-query-devtools': - specifier: ^5.50.1 + specifier: ^5.51.0 version: link:../../../packages/vue-query-devtools vue: specifier: ^3.4.27 @@ -1576,7 +1576,7 @@ importers: examples/vue/dependent-queries: dependencies: '@tanstack/vue-query': - specifier: ^5.50.1 + specifier: ^5.51.0 version: link:../../../packages/vue-query vue: specifier: ^3.4.27 @@ -1604,7 +1604,7 @@ importers: specifier: ^5.50.1 version: link:../../../packages/query-sync-storage-persister '@tanstack/vue-query': - specifier: ^5.50.1 + specifier: ^5.51.0 version: link:../../../packages/vue-query idb-keyval: specifier: ^6.2.1 @@ -1626,10 +1626,10 @@ importers: examples/vue/simple: dependencies: '@tanstack/vue-query': - specifier: ^5.50.1 + specifier: ^5.51.0 version: link:../../../packages/vue-query '@tanstack/vue-query-devtools': - specifier: ^5.50.1 + specifier: ^5.51.0 version: link:../../../packages/vue-query-devtools vue: specifier: ^3.4.27 From 14d9c49fba6715a21e62dd473c11c8454cdc51f9 Mon Sep 17 00:00:00 2001 From: John Dunn <47347324+johnwdunn20@users.noreply.github.com> Date: Mon, 8 Jul 2024 01:06:33 -0700 Subject: [PATCH 29/80] docs: add Query Rewind to vue community projects (#7688) --- docs/framework/vue/community/community-projects.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/framework/vue/community/community-projects.md b/docs/framework/vue/community/community-projects.md index 2950d2a7c6..8c3fbed616 100644 --- a/docs/framework/vue/community/community-projects.md +++ b/docs/framework/vue/community/community-projects.md @@ -12,3 +12,9 @@ There are lots of community projects that build on top of Vue Query and use it t A library for creating typesafe standardized query keys, useful for cache management in `@tanstack/query` Link: https://github.com/lukemorales/query-key-factory + +## Query Rewind + +Time travel and visualize state during development + +Link: https://reactqueryrewind.com/ From 362f8e6a3792411fec073156bc9635b0ad4cd11d Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Wed, 10 Jul 2024 07:39:44 +1000 Subject: [PATCH 30/80] ci: Improve Nx inputs (#7702) --- nx.json | 60 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/nx.json b/nx.json index 6570b33474..afb9c2239a 100644 --- a/nx.json +++ b/nx.json @@ -7,7 +7,6 @@ "namedInputs": { "sharedGlobals": [ "{workspaceRoot}/.nvmrc", - "{workspaceRoot}/eslint.config.js", "{workspaceRoot}/package.json", "{workspaceRoot}/scripts/getTsupConfig.js", "{workspaceRoot}/tsconfig.json" @@ -17,52 +16,51 @@ "{projectRoot}/**/*", "!{projectRoot}/**/*.md" ], - "public": [ + "production": [ "default", - "{projectRoot}/build", - "{projectRoot}/dist", + "!{projectRoot}/tests/**/*", "!{projectRoot}/eslint.config.js" ] }, "targetDefaults": { - "test:lib": { - "dependsOn": ["^build"], - "inputs": ["default", "^public"], - "outputs": ["{projectRoot}/coverage"], - "cache": true + "test:format": { + "cache": true, + "inputs": ["{workspaceRoot}/**/*"] }, - "test:eslint": { - "dependsOn": ["^build"], - "inputs": ["default", "^public"], - "cache": true + "test:knip": { + "cache": true, + "inputs": ["{workspaceRoot}/**/*"] }, - "test:types": { - "dependsOn": ["^build"], - "inputs": ["default", "^public"], - "cache": true + "test:sherif": { + "cache": true, + "inputs": ["{workspaceRoot}/**/package.json"] }, - "test:build": { - "dependsOn": ["build"], - "inputs": ["default", "^public"], - "cache": true + "test:eslint": { + "cache": true, + "dependsOn": ["^build"], + "inputs": ["default", "^production", "{workspaceRoot}/eslint.config.js"] }, - "build": { + "test:lib": { + "cache": true, "dependsOn": ["^build"], - "inputs": ["default", "^public"], - "outputs": ["{projectRoot}/build", "{projectRoot}/dist"], - "cache": true + "inputs": ["default", "^production"], + "outputs": ["{projectRoot}/coverage"] }, - "test:knip": { + "test:types": { "cache": true, - "inputs": ["{workspaceRoot}/**/*"] + "dependsOn": ["^build"], + "inputs": ["default", "^production"] }, - "test:format": { + "build": { "cache": true, - "inputs": ["{workspaceRoot}/**/*"] + "dependsOn": ["^build"], + "inputs": ["production", "^production"], + "outputs": ["{projectRoot}/build", "{projectRoot}/dist"] }, - "test:sherif": { + "test:build": { "cache": true, - "inputs": ["{workspaceRoot}/**/*"] + "dependsOn": ["build"], + "inputs": ["production"] } } } From 7fc94729d4ea4a4f21ddbf25d29d79471e220d8e Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:52:01 +1000 Subject: [PATCH 31/80] docs(examples): Modernise React examples (#7704) * docs(examples): Update react/basic-typescript * Replace basic with basic-typescript * Fix lockfile * Update react/basic-graphql-request * Improve react/suspense * More tweaks to react/suspense * Update react/simple * Update react/offline * Convert default-query-function * Remove axios and ky usage * Replace axios with fetch * Undo lint-stagesd * Sync solid/basic and solid/basic-graphql-request --- examples/react/algolia/package.json | 12 -- examples/react/auto-refetching/package.json | 1 - .../react/auto-refetching/src/pages/index.js | 5 +- .../react/basic-graphql-request/.eslintrc | 3 - .../eslint.config.js | 0 .../react/basic-graphql-request/index.html | 2 +- .../react/basic-graphql-request/package.json | 12 -- .../src/{index.jsx => index.tsx} | 46 +++-- .../tsconfig.json | 0 examples/react/basic-typescript/.gitignore | 27 --- examples/react/basic-typescript/README.md | 6 - examples/react/basic-typescript/index.html | 16 -- examples/react/basic-typescript/package.json | 42 ----- .../basic-typescript/public/emblem-light.svg | 13 -- examples/react/basic/.eslintrc | 7 - examples/react/basic/eslint.config.js | 19 +++ examples/react/basic/index.html | 2 +- examples/react/basic/package.json | 22 +-- examples/react/basic/src/index.jsx | 138 --------------- .../{basic-typescript => basic}/src/index.tsx | 31 ++-- examples/react/basic/tsconfig.json | 24 +++ .../vite.config.ts | 0 .../react/default-query-function/index.html | 2 +- .../react/default-query-function/package.json | 14 +- .../src/{index.jsx => index.tsx} | 40 +++-- .../default-query-function/tsconfig.json | 24 +++ .../default-query-function/vite.config.ts | 6 + .../package.json | 1 - .../src/pages/index.js | 5 +- .../load-more-infinite-scroll/package.json | 1 - .../src/pages/index.js | 5 +- examples/react/nextjs/package.json | 1 - .../react/nextjs/src/hooks/usePosts/index.js | 6 +- examples/react/offline/index.html | 2 +- examples/react/offline/package.json | 14 +- .../react/offline/src/{App.jsx => App.tsx} | 8 +- examples/react/offline/src/api.js | 63 ------- examples/react/offline/src/api.ts | 83 +++++++++ .../offline/src/{index.jsx => index.tsx} | 2 +- .../offline/src/{movies.js => movies.ts} | 8 +- examples/react/offline/tsconfig.json | 24 +++ examples/react/offline/vite.config.ts | 6 + .../optimistic-updates-cache/package.json | 1 - .../src/pages/index.tsx | 13 +- .../react/optimistic-updates-ui/package.json | 1 - .../optimistic-updates-ui/src/pages/index.tsx | 20 ++- examples/react/pagination/package.json | 1 - examples/react/pagination/src/pages/index.js | 5 +- examples/react/playground/package.json | 12 -- examples/react/prefetching/package.json | 1 - examples/react/prefetching/src/pages/index.js | 9 +- examples/react/react-router/package.json | 12 -- examples/react/rick-morty/package.json | 12 -- examples/react/simple/index.html | 2 +- examples/react/simple/package.json | 14 +- .../react/simple/src/{index.jsx => index.tsx} | 17 +- examples/react/simple/tsconfig.json | 24 +++ examples/react/simple/vite.config.ts | 6 + examples/react/star-wars/package.json | 12 -- examples/react/suspense/index.html | 2 +- examples/react/suspense/package.json | 20 +-- .../src/components/{Button.jsx => Button.tsx} | 10 +- .../components/{Project.jsx => Project.tsx} | 14 +- .../components/{Projects.jsx => Projects.tsx} | 22 +-- .../components/{Spinner.jsx => Spinner.tsx} | 0 .../suspense/src/{index.jsx => index.tsx} | 6 +- examples/react/suspense/src/queries.js | 25 --- examples/react/suspense/src/queries.ts | 23 +++ examples/react/suspense/tsconfig.json | 24 +++ examples/react/suspense/vite.config.ts | 6 + .../solid/basic-graphql-request/src/index.tsx | 28 +-- .../{basic-typescript => basic}/.eslintrc.cjs | 0 .../{basic-typescript => basic}/.gitignore | 0 .../{basic-typescript => basic}/README.md | 0 .../{basic-typescript => basic}/index.html | 0 .../{basic-typescript => basic}/package.json | 2 +- .../src/assets/favicon.ico | Bin .../{basic-typescript => basic}/src/index.tsx | 24 +-- .../{basic-typescript => basic}/tsconfig.json | 0 .../vite.config.ts | 0 examples/solid/simple/src/index.tsx | 9 +- pnpm-lock.yaml | 160 +++++------------- 82 files changed, 516 insertions(+), 764 deletions(-) delete mode 100644 examples/react/basic-graphql-request/.eslintrc rename examples/react/{basic-typescript => basic-graphql-request}/eslint.config.js (100%) rename examples/react/basic-graphql-request/src/{index.jsx => index.tsx} (84%) rename examples/react/{basic-typescript => basic-graphql-request}/tsconfig.json (100%) delete mode 100644 examples/react/basic-typescript/.gitignore delete mode 100644 examples/react/basic-typescript/README.md delete mode 100644 examples/react/basic-typescript/index.html delete mode 100644 examples/react/basic-typescript/package.json delete mode 100644 examples/react/basic-typescript/public/emblem-light.svg delete mode 100644 examples/react/basic/.eslintrc create mode 100644 examples/react/basic/eslint.config.js delete mode 100644 examples/react/basic/src/index.jsx rename examples/react/{basic-typescript => basic}/src/index.tsx (87%) create mode 100644 examples/react/basic/tsconfig.json rename examples/react/{basic-typescript => basic}/vite.config.ts (100%) rename examples/react/default-query-function/src/{index.jsx => index.tsx} (81%) create mode 100644 examples/react/default-query-function/tsconfig.json create mode 100644 examples/react/default-query-function/vite.config.ts rename examples/react/offline/src/{App.jsx => App.tsx} (99%) delete mode 100644 examples/react/offline/src/api.js create mode 100644 examples/react/offline/src/api.ts rename examples/react/offline/src/{index.jsx => index.tsx} (78%) rename examples/react/offline/src/{movies.js => movies.ts} (88%) create mode 100644 examples/react/offline/tsconfig.json create mode 100644 examples/react/offline/vite.config.ts rename examples/react/simple/src/{index.jsx => index.tsx} (76%) create mode 100644 examples/react/simple/tsconfig.json create mode 100644 examples/react/simple/vite.config.ts rename examples/react/suspense/src/components/{Button.jsx => Button.tsx} (69%) rename examples/react/suspense/src/components/{Project.jsx => Project.tsx} (75%) rename examples/react/suspense/src/components/{Projects.jsx => Projects.tsx} (52%) rename examples/react/suspense/src/components/{Spinner.jsx => Spinner.tsx} (100%) rename examples/react/suspense/src/{index.jsx => index.tsx} (94%) delete mode 100644 examples/react/suspense/src/queries.js create mode 100644 examples/react/suspense/src/queries.ts create mode 100644 examples/react/suspense/tsconfig.json create mode 100644 examples/react/suspense/vite.config.ts rename examples/solid/{basic-typescript => basic}/.eslintrc.cjs (100%) rename examples/solid/{basic-typescript => basic}/.gitignore (100%) rename examples/solid/{basic-typescript => basic}/README.md (100%) rename examples/solid/{basic-typescript => basic}/index.html (100%) rename examples/solid/{basic-typescript => basic}/package.json (87%) rename examples/solid/{basic-typescript => basic}/src/assets/favicon.ico (100%) rename examples/solid/{basic-typescript => basic}/src/index.tsx (90%) rename examples/solid/{basic-typescript => basic}/tsconfig.json (100%) rename examples/solid/{basic-typescript => basic}/vite.config.ts (100%) diff --git a/examples/react/algolia/package.json b/examples/react/algolia/package.json index aab9b0326a..48bae7aa7d 100644 --- a/examples/react/algolia/package.json +++ b/examples/react/algolia/package.json @@ -24,17 +24,5 @@ "@vitejs/plugin-react": "^4.2.1", "typescript": "5.3.3", "vite": "^5.2.11" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] } } diff --git a/examples/react/auto-refetching/package.json b/examples/react/auto-refetching/package.json index 12cbf5a5d0..3ec3ef35e0 100644 --- a/examples/react/auto-refetching/package.json +++ b/examples/react/auto-refetching/package.json @@ -10,7 +10,6 @@ "dependencies": { "@tanstack/react-query": "^5.50.1", "@tanstack/react-query-devtools": "^5.50.1", - "axios": "^1.6.8", "isomorphic-unfetch": "4.0.2", "next": "^14.2.4", "react": "^18.2.0", diff --git a/examples/react/auto-refetching/src/pages/index.js b/examples/react/auto-refetching/src/pages/index.js index 09831ec7d8..ace9bc343a 100644 --- a/examples/react/auto-refetching/src/pages/index.js +++ b/examples/react/auto-refetching/src/pages/index.js @@ -1,5 +1,4 @@ import React from 'react' -import axios from 'axios' // @@ -30,8 +29,8 @@ function Example() { const { status, data, error, isFetching } = useQuery({ queryKey: ['todos'], queryFn: async () => { - const res = await axios.get('/api/data') - return res.data + const response = await fetch('/api/data') + return await response.json() }, // Refetch the data every second refetchInterval: intervalMs, diff --git a/examples/react/basic-graphql-request/.eslintrc b/examples/react/basic-graphql-request/.eslintrc deleted file mode 100644 index 4e03b9e10b..0000000000 --- a/examples/react/basic-graphql-request/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["plugin:react/jsx-runtime", "plugin:react-hooks/recommended"] -} diff --git a/examples/react/basic-typescript/eslint.config.js b/examples/react/basic-graphql-request/eslint.config.js similarity index 100% rename from examples/react/basic-typescript/eslint.config.js rename to examples/react/basic-graphql-request/eslint.config.js diff --git a/examples/react/basic-graphql-request/index.html b/examples/react/basic-graphql-request/index.html index 433cf93816..f098940196 100644 --- a/examples/react/basic-graphql-request/index.html +++ b/examples/react/basic-graphql-request/index.html @@ -11,6 +11,6 @@
- + diff --git a/examples/react/basic-graphql-request/package.json b/examples/react/basic-graphql-request/package.json index a13a9aaf59..0230c361a9 100644 --- a/examples/react/basic-graphql-request/package.json +++ b/examples/react/basic-graphql-request/package.json @@ -18,17 +18,5 @@ "devDependencies": { "@vitejs/plugin-react": "^4.2.1", "vite": "^5.2.11" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] } } diff --git a/examples/react/basic-graphql-request/src/index.jsx b/examples/react/basic-graphql-request/src/index.tsx similarity index 84% rename from examples/react/basic-graphql-request/src/index.jsx rename to examples/react/basic-graphql-request/src/index.tsx index 10aad56931..09995939cd 100644 --- a/examples/react/basic-graphql-request/src/index.jsx +++ b/examples/react/basic-graphql-request/src/index.tsx @@ -1,18 +1,24 @@ import React from 'react' import ReactDOM from 'react-dom/client' import { - useQuery, - useQueryClient, QueryClient, QueryClientProvider, + useQuery, + useQueryClient, } from '@tanstack/react-query' import { ReactQueryDevtools } from '@tanstack/react-query-devtools' -import { request, gql } from 'graphql-request' +import { gql, request } from 'graphql-request' const endpoint = 'https://graphqlzero.almansi.me/api' const queryClient = new QueryClient() +type Post = { + id: number + title: string + body: string +} + function App() { const [postId, setPostId] = React.useState(-1) @@ -44,7 +50,7 @@ function usePosts() { queryFn: async () => { const { posts: { data }, - } = await request( + } = await request<{ posts: { data: Array } }>( endpoint, gql` query { @@ -62,7 +68,11 @@ function usePosts() { }) } -function Posts({ setPostId }) { +function Posts({ + setPostId, +}: { + setPostId: React.Dispatch> +}) { const queryClient = useQueryClient() const { status, data, error, isFetching } = usePosts() @@ -106,11 +116,11 @@ function Posts({ setPostId }) { ) } -function usePost(postId) { - return useQuery( - ['post', postId], - async () => { - const { post } = await request( +function usePost(postId: number) { + return useQuery({ + queryKey: ['post', postId], + queryFn: async () => { + const { post } = await request<{ post: Post }>( endpoint, gql` query { @@ -125,13 +135,17 @@ function usePost(postId) { return post }, - { - enabled: !!postId, - }, - ) + enabled: !!postId, + }) } -function Post({ postId, setPostId }) { +function Post({ + postId, + setPostId, +}: { + postId: number + setPostId: React.Dispatch> +}) { const { status, data, error, isFetching } = usePost(postId) return ( @@ -158,5 +172,5 @@ function Post({ postId, setPostId }) { ) } -const rootElement = document.getElementById('root') +const rootElement = document.getElementById('root') as HTMLElement ReactDOM.createRoot(rootElement).render() diff --git a/examples/react/basic-typescript/tsconfig.json b/examples/react/basic-graphql-request/tsconfig.json similarity index 100% rename from examples/react/basic-typescript/tsconfig.json rename to examples/react/basic-graphql-request/tsconfig.json diff --git a/examples/react/basic-typescript/.gitignore b/examples/react/basic-typescript/.gitignore deleted file mode 100644 index 4673b022e5..0000000000 --- a/examples/react/basic-typescript/.gitignore +++ /dev/null @@ -1,27 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -pnpm-lock.yaml -yarn.lock -package-lock.json - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/examples/react/basic-typescript/README.md b/examples/react/basic-typescript/README.md deleted file mode 100644 index 1cf8892652..0000000000 --- a/examples/react/basic-typescript/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# Example - -To run this example: - -- `npm install` -- `npm run dev` diff --git a/examples/react/basic-typescript/index.html b/examples/react/basic-typescript/index.html deleted file mode 100644 index aed742fcef..0000000000 --- a/examples/react/basic-typescript/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - TanStack Query React Basic TypeScript Example App - - - -
- - - diff --git a/examples/react/basic-typescript/package.json b/examples/react/basic-typescript/package.json deleted file mode 100644 index 0f502c1192..0000000000 --- a/examples/react/basic-typescript/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@tanstack/query-example-react-basic-typescript", - "private": true, - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview", - "test:types": "tsc" - }, - "dependencies": { - "@tanstack/query-sync-storage-persister": "^5.50.1", - "@tanstack/react-query": "^5.50.1", - "@tanstack/react-query-devtools": "^5.50.1", - "@tanstack/react-query-persist-client": "^5.50.1", - "axios": "^1.6.8", - "react": "19.0.0-rc-4c2e457c7c-20240522", - "react-dom": "19.0.0-rc-4c2e457c7c-20240522" - }, - "devDependencies": { - "@tanstack/eslint-plugin-query": "^5.50.1", - "@types/react": "^18.2.79", - "@types/react-dom": "^18.2.25", - "@vitejs/plugin-react": "^4.2.1", - "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", - "typescript": "5.3.3", - "vite": "^5.2.11" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - } -} diff --git a/examples/react/basic-typescript/public/emblem-light.svg b/examples/react/basic-typescript/public/emblem-light.svg deleted file mode 100644 index a58e69ad5e..0000000000 --- a/examples/react/basic-typescript/public/emblem-light.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - emblem-light - Created with Sketch. - - - - - - - - \ No newline at end of file diff --git a/examples/react/basic/.eslintrc b/examples/react/basic/.eslintrc deleted file mode 100644 index 270fbc9ac0..0000000000 --- a/examples/react/basic/.eslintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": [ - "plugin:react/jsx-runtime", - "plugin:react-hooks/recommended", - "plugin:@tanstack/eslint-plugin-query/recommended" - ] -} diff --git a/examples/react/basic/eslint.config.js b/examples/react/basic/eslint.config.js new file mode 100644 index 0000000000..dee0fcc96c --- /dev/null +++ b/examples/react/basic/eslint.config.js @@ -0,0 +1,19 @@ +import { tanstackConfig } from '@tanstack/config/eslint' +import pluginQuery from '@tanstack/eslint-plugin-query' +import pluginReact from '@eslint-react/eslint-plugin' +import pluginReactHooks from 'eslint-plugin-react-hooks' + +export default [ + ...tanstackConfig, + ...pluginQuery.configs['flat/recommended'], + pluginReact.configs.recommended, + { + plugins: { + 'react-hooks': pluginReactHooks, + }, + rules: { + 'react-hooks/exhaustive-deps': 'error', + 'react-hooks/rules-of-hooks': 'error', + }, + }, +] diff --git a/examples/react/basic/index.html b/examples/react/basic/index.html index acfcd2e4e5..d7c231330c 100644 --- a/examples/react/basic/index.html +++ b/examples/react/basic/index.html @@ -11,6 +11,6 @@
- + diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index 2d7b1e5b1c..9c02fc5dbc 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -5,30 +5,24 @@ "scripts": { "dev": "vite", "build": "vite build", - "preview": "vite preview" + "preview": "vite preview", + "test:types": "tsc" }, "dependencies": { + "@tanstack/query-sync-storage-persister": "^5.50.1", "@tanstack/react-query": "^5.50.1", "@tanstack/react-query-devtools": "^5.50.1", - "axios": "^1.6.8", + "@tanstack/react-query-persist-client": "^5.50.1", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, "devDependencies": { "@tanstack/eslint-plugin-query": "^5.50.1", + "@types/react": "^18.2.79", + "@types/react-dom": "^18.2.25", "@vitejs/plugin-react": "^4.2.1", + "eslint": "^8.57.0", + "typescript": "5.3.3", "vite": "^5.2.11" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] } } diff --git a/examples/react/basic/src/index.jsx b/examples/react/basic/src/index.jsx deleted file mode 100644 index 3ee4ac23a8..0000000000 --- a/examples/react/basic/src/index.jsx +++ /dev/null @@ -1,138 +0,0 @@ -import React from 'react' -import ReactDOM from 'react-dom/client' -import axios from 'axios' -import { - useQuery, - useQueryClient, - QueryClient, - QueryClientProvider, -} from '@tanstack/react-query' -import { ReactQueryDevtools } from '@tanstack/react-query-devtools' - -const queryClient = new QueryClient() - -function App() { - const [postId, setPostId] = React.useState(-1) - - return ( - -

- As you visit the posts below, you will notice them in a loading state - the first time you load them. However, after you return to this list and - click on any posts you have already visited again, you will see them - load instantly and background refresh right before your eyes!{' '} - - (You may need to throttle your network speed to simulate longer - loading sequences) - -

- {postId > -1 ? ( - - ) : ( - - )} - -
- ) -} - -function usePosts() { - return useQuery({ - queryKey: ['posts'], - queryFn: async () => { - const { data } = await axios.get( - 'https://jsonplaceholder.typicode.com/posts', - ) - return data - }, - }) -} - -function Posts({ setPostId }) { - const queryClient = useQueryClient() - const { status, data, error, isFetching } = usePosts() - - return ( -
-

Posts

-
- {status === 'pending' ? ( - 'Loading...' - ) : status === 'error' ? ( - Error: {error.message} - ) : ( - <> - -
{isFetching ? 'Background Updating...' : ' '}
- - )} -
-
- ) -} - -const getPostById = async (id) => { - const { data } = await axios.get( - `https://jsonplaceholder.typicode.com/posts/${id}`, - ) - return data -} - -function usePost(postId) { - return useQuery({ - queryKey: ['post', postId], - queryFn: () => getPostById(postId), - enabled: !!postId, - }) -} - -function Post({ postId, setPostId }) { - const { status, data, error, isFetching } = usePost(postId) - - return ( -
- - {!postId || status === 'pending' ? ( - 'Loading...' - ) : status === 'error' ? ( - Error: {error.message} - ) : ( - <> -

{data.title}

-
-

{data.body}

-
-
{isFetching ? 'Background Updating...' : ' '}
- - )} -
- ) -} - -const rootElement = document.getElementById('root') -ReactDOM.createRoot(rootElement).render() diff --git a/examples/react/basic-typescript/src/index.tsx b/examples/react/basic/src/index.tsx similarity index 87% rename from examples/react/basic-typescript/src/index.tsx rename to examples/react/basic/src/index.tsx index d6aace092c..052ce4c797 100644 --- a/examples/react/basic-typescript/src/index.tsx +++ b/examples/react/basic/src/index.tsx @@ -1,12 +1,6 @@ import * as React from 'react' import ReactDOM from 'react-dom/client' -import axios from 'axios' -import { - QueryClient, - skipToken, - useQuery, - useQueryClient, -} from '@tanstack/react-query' +import { QueryClient, useQuery, useQueryClient } from '@tanstack/react-query' import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client' import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister' import { ReactQueryDevtools } from '@tanstack/react-query-devtools' @@ -33,10 +27,8 @@ function usePosts() { return useQuery({ queryKey: ['posts'], queryFn: async (): Promise> => { - const { data } = await axios.get( - 'https://jsonplaceholder.typicode.com/posts', - ) - return data + const response = await fetch('https://jsonplaceholder.typicode.com/posts') + return await response.json() }, }) } @@ -55,12 +47,12 @@ function Posts({
{status === 'pending' ? ( 'Loading...' - ) : error instanceof Error ? ( + ) : status === 'error' ? ( Error: {error.message} ) : ( <> {!postId || status === 'pending' ? ( 'Loading...' - ) : error instanceof Error ? ( + ) : status === 'error' ? ( Error: {error.message} ) : ( <> -

{data?.title}

+

{data.title}

-

{data?.body}

+

{data.body}

{isFetching ? 'Background Updating...' : ' '}
diff --git a/examples/react/basic/tsconfig.json b/examples/react/basic/tsconfig.json new file mode 100644 index 0000000000..23a8707ef4 --- /dev/null +++ b/examples/react/basic/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src", "eslint.config.js"] +} diff --git a/examples/react/basic-typescript/vite.config.ts b/examples/react/basic/vite.config.ts similarity index 100% rename from examples/react/basic-typescript/vite.config.ts rename to examples/react/basic/vite.config.ts diff --git a/examples/react/default-query-function/index.html b/examples/react/default-query-function/index.html index 3365e7fa58..07e1d099d2 100644 --- a/examples/react/default-query-function/index.html +++ b/examples/react/default-query-function/index.html @@ -11,6 +11,6 @@
- + diff --git a/examples/react/default-query-function/package.json b/examples/react/default-query-function/package.json index 8fbd3c5b03..7b9a9db79a 100644 --- a/examples/react/default-query-function/package.json +++ b/examples/react/default-query-function/package.json @@ -10,24 +10,12 @@ "dependencies": { "@tanstack/react-query": "^5.50.1", "@tanstack/react-query-devtools": "^5.50.1", - "axios": "^1.6.8", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, "devDependencies": { "@vitejs/plugin-react": "^4.2.1", + "typescript": "5.3.3", "vite": "^5.2.11" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] } } diff --git a/examples/react/default-query-function/src/index.jsx b/examples/react/default-query-function/src/index.tsx similarity index 81% rename from examples/react/default-query-function/src/index.jsx rename to examples/react/default-query-function/src/index.tsx index 6a10ce9155..72a45b7f3c 100644 --- a/examples/react/default-query-function/src/index.jsx +++ b/examples/react/default-query-function/src/index.tsx @@ -1,20 +1,26 @@ import React from 'react' import ReactDOM from 'react-dom/client' -import axios from 'axios' import { - useQuery, - useQueryClient, QueryClient, QueryClientProvider, + useQuery, + useQueryClient, } from '@tanstack/react-query' import { ReactQueryDevtools } from '@tanstack/react-query-devtools' +import type { QueryKey } from '@tanstack/react-query' + +type Post = { + id: number + title: string + body: string +} // Define a default query function that will receive the query key -const defaultQueryFn = async ({ queryKey }) => { - const { data } = await axios.get( +const defaultQueryFn = async ({ queryKey }: { queryKey: QueryKey }) => { + const response = await fetch( `https://jsonplaceholder.typicode.com${queryKey[0]}`, ) - return data + return await response.json() } // provide the default query function to your app via the query client @@ -51,11 +57,15 @@ function App() { ) } -function Posts({ setPostId }) { +function Posts({ + setPostId, +}: { + setPostId: React.Dispatch> +}) { const queryClient = useQueryClient() // All you have to do now is pass a key! - const { status, data, error, isFetching } = useQuery({ + const { status, data, error, isFetching } = useQuery>({ queryKey: ['/posts'], }) @@ -78,7 +88,7 @@ function Posts({ setPostId }) { style={ // We can use the queryCache here to show bold links for // ones that are cached - queryClient.getQueryData(['post', post.id]) + queryClient.getQueryData([`/posts/${post.id}`]) ? { fontWeight: 'bold', color: 'green', @@ -99,9 +109,15 @@ function Posts({ setPostId }) { ) } -function Post({ postId, setPostId }) { +function Post({ + postId, + setPostId, +}: { + postId: number + setPostId: React.Dispatch> +}) { // You can even leave out the queryFn and just go straight into options - const { status, data, error, isFetching } = useQuery({ + const { status, data, error, isFetching } = useQuery({ queryKey: [`/posts/${postId}`], enabled: !!postId, }) @@ -130,5 +146,5 @@ function Post({ postId, setPostId }) { ) } -const rootElement = document.getElementById('root') +const rootElement = document.getElementById('root') as HTMLElement ReactDOM.createRoot(rootElement).render() diff --git a/examples/react/default-query-function/tsconfig.json b/examples/react/default-query-function/tsconfig.json new file mode 100644 index 0000000000..23a8707ef4 --- /dev/null +++ b/examples/react/default-query-function/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src", "eslint.config.js"] +} diff --git a/examples/react/default-query-function/vite.config.ts b/examples/react/default-query-function/vite.config.ts new file mode 100644 index 0000000000..9ffcc67574 --- /dev/null +++ b/examples/react/default-query-function/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +export default defineConfig({ + plugins: [react()], +}) diff --git a/examples/react/infinite-query-with-max-pages/package.json b/examples/react/infinite-query-with-max-pages/package.json index f9f2750326..636bb35bd0 100644 --- a/examples/react/infinite-query-with-max-pages/package.json +++ b/examples/react/infinite-query-with-max-pages/package.json @@ -10,7 +10,6 @@ "dependencies": { "@tanstack/react-query": "^5.50.1", "@tanstack/react-query-devtools": "^5.50.1", - "axios": "^1.6.8", "isomorphic-unfetch": "4.0.2", "next": "^14.2.4", "react": "^18.2.0", diff --git a/examples/react/infinite-query-with-max-pages/src/pages/index.js b/examples/react/infinite-query-with-max-pages/src/pages/index.js index ad7e6b6858..8df4c0e8d9 100644 --- a/examples/react/infinite-query-with-max-pages/src/pages/index.js +++ b/examples/react/infinite-query-with-max-pages/src/pages/index.js @@ -1,5 +1,4 @@ import React from 'react' -import axios from 'axios' import { useInfiniteQuery, QueryClient, @@ -32,8 +31,8 @@ function Example() { } = useInfiniteQuery({ queryKey: ['projects'], queryFn: async ({ pageParam }) => { - const res = await axios.get('/api/projects?cursor=' + pageParam) - return res.data + const response = await fetch(`/api/projects?cursor=${pageParam}`) + return await response.json() }, initialPageParam: 0, getPreviousPageParam: (firstPage) => firstPage.previousId ?? undefined, diff --git a/examples/react/load-more-infinite-scroll/package.json b/examples/react/load-more-infinite-scroll/package.json index 16236a4920..c35c1f54b9 100644 --- a/examples/react/load-more-infinite-scroll/package.json +++ b/examples/react/load-more-infinite-scroll/package.json @@ -10,7 +10,6 @@ "dependencies": { "@tanstack/react-query": "^5.50.1", "@tanstack/react-query-devtools": "^5.50.1", - "axios": "^1.6.8", "isomorphic-unfetch": "4.0.2", "next": "^14.2.4", "react": "^18.2.0", diff --git a/examples/react/load-more-infinite-scroll/src/pages/index.js b/examples/react/load-more-infinite-scroll/src/pages/index.js index 1635230ca5..b3b679be4e 100644 --- a/examples/react/load-more-infinite-scroll/src/pages/index.js +++ b/examples/react/load-more-infinite-scroll/src/pages/index.js @@ -1,6 +1,5 @@ import React from 'react' import Link from 'next/link' -import axios from 'axios' import { useInView } from 'react-intersection-observer' import { useInfiniteQuery, @@ -36,8 +35,8 @@ function Example() { } = useInfiniteQuery({ queryKey: ['projects'], queryFn: async ({ pageParam }) => { - const res = await axios.get('/api/projects?cursor=' + pageParam) - return res.data + const response = await fetch(`/api/projects?cursor=${pageParam}`) + return await response.json() }, initialPageParam: 0, getPreviousPageParam: (firstPage) => firstPage.previousId ?? undefined, diff --git a/examples/react/nextjs/package.json b/examples/react/nextjs/package.json index 31ddba1e7d..6c40ed726f 100644 --- a/examples/react/nextjs/package.json +++ b/examples/react/nextjs/package.json @@ -10,7 +10,6 @@ "dependencies": { "@tanstack/react-query": "^5.50.1", "@tanstack/react-query-devtools": "^5.50.1", - "ky": "^1.2.4", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/react/nextjs/src/hooks/usePosts/index.js b/examples/react/nextjs/src/hooks/usePosts/index.js index d6956566c4..8affadecf8 100644 --- a/examples/react/nextjs/src/hooks/usePosts/index.js +++ b/examples/react/nextjs/src/hooks/usePosts/index.js @@ -1,9 +1,9 @@ -import ky from 'ky' import { useQuery } from '@tanstack/react-query' const fetchPosts = async (limit = 10) => { - const parsed = await ky('https://jsonplaceholder.typicode.com/posts').json() - return parsed.filter((x) => x.id <= limit) + const response = await fetch('https://jsonplaceholder.typicode.com/posts') + const data = await response.json() + return data.filter((x) => x.id <= limit) } const usePosts = (limit) => { diff --git a/examples/react/offline/index.html b/examples/react/offline/index.html index 30039c3a62..5e3e966568 100644 --- a/examples/react/offline/index.html +++ b/examples/react/offline/index.html @@ -11,6 +11,6 @@
- + diff --git a/examples/react/offline/package.json b/examples/react/offline/package.json index 69928dc0f5..09ca99196d 100644 --- a/examples/react/offline/package.json +++ b/examples/react/offline/package.json @@ -13,7 +13,6 @@ "@tanstack/react-query": "^5.50.1", "@tanstack/react-query-devtools": "^5.50.1", "@tanstack/react-query-persist-client": "^5.50.1", - "ky": "^1.2.4", "msw": "^2.3.0", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522", @@ -21,20 +20,9 @@ }, "devDependencies": { "@vitejs/plugin-react": "^4.2.1", + "typescript": "5.3.3", "vite": "^5.2.11" }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, "msw": { "workerDirectory": [ "public" diff --git a/examples/react/offline/src/App.jsx b/examples/react/offline/src/App.tsx similarity index 99% rename from examples/react/offline/src/App.jsx rename to examples/react/offline/src/App.tsx index 5e430e8187..a891b5607d 100644 --- a/examples/react/offline/src/App.jsx +++ b/examples/react/offline/src/App.tsx @@ -1,15 +1,13 @@ import * as React from 'react' - import { - useQuery, - QueryClient, MutationCache, + QueryClient, onlineManager, useIsRestoring, + useQuery, } from '@tanstack/react-query' import { ReactQueryDevtools } from '@tanstack/react-query-devtools' import toast, { Toaster } from 'react-hot-toast' - import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client' import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister' import { @@ -170,7 +168,7 @@ function Detail() { return 'Loading...' } - function submitForm(event) { + function submitForm(event: any) { event.preventDefault() updateMovie.mutate({ diff --git a/examples/react/offline/src/api.js b/examples/react/offline/src/api.js deleted file mode 100644 index 6f6ac7a8bb..0000000000 --- a/examples/react/offline/src/api.js +++ /dev/null @@ -1,63 +0,0 @@ -import { delay, HttpResponse, http, passthrough } from 'msw' -import { setupWorker } from 'msw/browser' -import ky from 'ky' - -const movies = [ - { - id: '1', - title: 'Guardians of the Galaxy', - comment: '', - }, - { - id: '2', - title: 'Wall-E', - comment: '', - }, -] - -export const fetchMovie = (id) => ky.get(`/movies/${id}`).json() -export const fetchMovies = () => ky.get('/movies').json() -export const updateMovie = (id, comment) => - ky.post(`/movies/${id}`, { json: { comment } }).json() - -export const worker = setupWorker( - ...[ - http.get('/movies', async () => { - console.log('movies') - await delay(1000) - return HttpResponse.json({ - ts: Date.now(), - movies: movies.map(({ id, title }) => ({ id, title })), - }) - }), - http.get('/movies/:id', async ({ params }) => { - const { id } = params - - const movie = movies.find((movie) => movie.id === id) - if (!movie) { - return new HttpResponse(`Movie with id ${id} not found`, { - status: 404, - }) - } - - await delay(1000) - return HttpResponse.json({ ts: Date.now(), movie }) - }), - http.post('/movies/:id', async ({ request, params }) => { - const { id } = params - const body = await request.json() - const { comment } = body - - movies.forEach((movie) => { - if (movie.id === id) { - movie.comment = comment.toUpperCase() - } - }) - - await delay(1000) - return HttpResponse.json({ message: `Successfully updated movie ${id}` }) - }), - http.get('*.js', () => passthrough()), - http.get('*.svg', () => passthrough()), - ], -) diff --git a/examples/react/offline/src/api.ts b/examples/react/offline/src/api.ts new file mode 100644 index 0000000000..eb547bdfaf --- /dev/null +++ b/examples/react/offline/src/api.ts @@ -0,0 +1,83 @@ +import { HttpResponse, delay, http, passthrough } from 'msw' +import { setupWorker } from 'msw/browser' + +const movies = [ + { + id: '1', + title: 'Guardians of the Galaxy', + comment: '', + }, + { + id: '2', + title: 'Wall-E', + comment: '', + }, +] + +export const fetchMovie = async ( + id: string, +): Promise<{ + ts: number + movie: { comment: string; id: string; title: string } +}> => { + const response = await fetch(`/movies/${id}`) + return await response.json() +} + +export const fetchMovies = async (): Promise<{ + ts: number + movies: typeof movies +}> => { + const response = await fetch('/movies') + return await response.json() +} + +export const updateMovie = async (id: string, comment: string) => { + const response = await fetch(`/movies/${id}`, { + method: 'POST', + body: JSON.stringify({ comment }), + }) + return await response.json() +} + +export const worker = setupWorker( + http.get('/movies', async () => { + await delay(500) + return HttpResponse.json({ + ts: Date.now(), + movies: movies.map(({ id, title }) => ({ id, title })), + }) + }), + + http.get('/movies/:id', async ({ params }) => { + const { id } = params + + const movie = movies.find((movie) => movie.id === id) + + if (!movie) { + return new HttpResponse(`Movie with id ${id} not found`, { + status: 404, + }) + } + + await delay(500) + return HttpResponse.json({ ts: Date.now(), movie }) + }), + + http.post('/movies/:id', async ({ request, params }) => { + const { id } = params + const body = await request.json() + const { comment } = body + + movies.forEach((movie) => { + if (movie.id === id) { + movie.comment = comment.toUpperCase() + } + }) + + await delay(500) + return HttpResponse.json({ message: `Successfully updated movie ${id}` }) + }), + http.get('*.js', () => passthrough()), + http.get('*.svg', () => passthrough()), +) diff --git a/examples/react/offline/src/index.jsx b/examples/react/offline/src/index.tsx similarity index 78% rename from examples/react/offline/src/index.jsx rename to examples/react/offline/src/index.tsx index 026a35b323..d6791b40c1 100644 --- a/examples/react/offline/src/index.jsx +++ b/examples/react/offline/src/index.tsx @@ -5,7 +5,7 @@ import { worker } from './api' worker.start() -const rootElement = document.getElementById('root') +const rootElement = document.getElementById('root') as HTMLElement ReactDOM.createRoot(rootElement).render(
diff --git a/examples/react/offline/src/movies.js b/examples/react/offline/src/movies.ts similarity index 88% rename from examples/react/offline/src/movies.js rename to examples/react/offline/src/movies.ts index 12fb656539..d2a37e8bf8 100644 --- a/examples/react/offline/src/movies.js +++ b/examples/react/offline/src/movies.ts @@ -1,15 +1,15 @@ +import * as React from 'react' import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query' import * as api from './api' -import * as React from 'react' export const movieKeys = { all: () => ['movies'], list: () => [...movieKeys.all(), 'list'], details: () => [...movieKeys.all(), 'detail'], - detail: (id) => [...movieKeys.details(), id], + detail: (id: string) => [...movieKeys.details(), id], } -export const useMovie = (movieId) => { +export const useMovie = (movieId: string) => { const queryClient = useQueryClient() const movieQuery = useQuery({ @@ -17,7 +17,7 @@ export const useMovie = (movieId) => { queryFn: () => api.fetchMovie(movieId), }) - const [comment, setComment] = React.useState() + const [comment, setComment] = React.useState() const updateMovie = useMutation({ mutationKey: movieKeys.detail(movieId), diff --git a/examples/react/offline/tsconfig.json b/examples/react/offline/tsconfig.json new file mode 100644 index 0000000000..23a8707ef4 --- /dev/null +++ b/examples/react/offline/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src", "eslint.config.js"] +} diff --git a/examples/react/offline/vite.config.ts b/examples/react/offline/vite.config.ts new file mode 100644 index 0000000000..9ffcc67574 --- /dev/null +++ b/examples/react/offline/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +export default defineConfig({ + plugins: [react()], +}) diff --git a/examples/react/optimistic-updates-cache/package.json b/examples/react/optimistic-updates-cache/package.json index 3ced3eb4b8..33520ea40c 100755 --- a/examples/react/optimistic-updates-cache/package.json +++ b/examples/react/optimistic-updates-cache/package.json @@ -11,7 +11,6 @@ "dependencies": { "@tanstack/react-query": "^5.50.1", "@tanstack/react-query-devtools": "^5.50.1", - "axios": "^1.6.8", "isomorphic-unfetch": "4.0.2", "next": "^14.2.4", "react": "^18.2.0", diff --git a/examples/react/optimistic-updates-cache/src/pages/index.tsx b/examples/react/optimistic-updates-cache/src/pages/index.tsx index b03e3aa16f..b5b9343d2f 100644 --- a/examples/react/optimistic-updates-cache/src/pages/index.tsx +++ b/examples/react/optimistic-updates-cache/src/pages/index.tsx @@ -1,5 +1,4 @@ import * as React from 'react' -import axios from 'axios' import { queryOptions, @@ -22,8 +21,8 @@ type Todos = { } async function fetchTodos(): Promise { - const res = await axios.get('/api/data') - return res.data + const response = await fetch('/api/data') + return await response.json() } const todoListOptions = queryOptions({ @@ -37,7 +36,13 @@ function Example() { const { isFetching, ...queryInfo } = useQuery(todoListOptions) const addTodoMutation = useMutation({ - mutationFn: (newTodo) => axios.post('/api/data', { text: newTodo }), + mutationFn: async (newTodo: string) => { + const response = await fetch('/api/data', { + method: 'POST', + body: JSON.stringify({ text: newTodo }), + }) + return await response.json() + }, // When mutate is called: onMutate: async (newTodo: string) => { setText('') diff --git a/examples/react/optimistic-updates-ui/package.json b/examples/react/optimistic-updates-ui/package.json index 4c529ed159..aa6be1b41d 100755 --- a/examples/react/optimistic-updates-ui/package.json +++ b/examples/react/optimistic-updates-ui/package.json @@ -10,7 +10,6 @@ "dependencies": { "@tanstack/react-query": "^5.50.1", "@tanstack/react-query-devtools": "^5.50.1", - "axios": "^1.6.8", "isomorphic-unfetch": "4.0.2", "next": "^14.2.4", "react": "^18.2.0", diff --git a/examples/react/optimistic-updates-ui/src/pages/index.tsx b/examples/react/optimistic-updates-ui/src/pages/index.tsx index 677e1b42fa..a382f1c8a1 100644 --- a/examples/react/optimistic-updates-ui/src/pages/index.tsx +++ b/examples/react/optimistic-updates-ui/src/pages/index.tsx @@ -1,12 +1,10 @@ import * as React from 'react' -import axios from 'axios' - import { - useQuery, - useQueryClient, - useMutation, QueryClient, QueryClientProvider, + useMutation, + useQuery, + useQueryClient, } from '@tanstack/react-query' import { ReactQueryDevtools } from '@tanstack/react-query-devtools' @@ -21,8 +19,8 @@ type Todos = { } async function fetchTodos(): Promise { - const res = await axios.get('/api/data') - return res.data + const response = await fetch('/api/data') + return await response.json() } function useTodos() { @@ -35,7 +33,13 @@ function Example() { const todoQuery = useTodos() const addTodoMutation = useMutation({ - mutationFn: (newTodo: string) => axios.post('/api/data', { text: newTodo }), + mutationFn: async (newTodo: string) => { + const response = await fetch('/api/data', { + method: 'POST', + body: JSON.stringify({ text: newTodo }), + }) + return await response.json() + }, onSettled: () => queryClient.invalidateQueries({ queryKey: ['todos'] }), }) diff --git a/examples/react/pagination/package.json b/examples/react/pagination/package.json index 33f75c8b85..8fc4070b5a 100644 --- a/examples/react/pagination/package.json +++ b/examples/react/pagination/package.json @@ -10,7 +10,6 @@ "dependencies": { "@tanstack/react-query": "^5.50.1", "@tanstack/react-query-devtools": "^5.50.1", - "axios": "^1.6.8", "isomorphic-unfetch": "4.0.2", "next": "^14.2.4", "react": "^18.2.0", diff --git a/examples/react/pagination/src/pages/index.js b/examples/react/pagination/src/pages/index.js index 6206f8547f..1b937ffd51 100644 --- a/examples/react/pagination/src/pages/index.js +++ b/examples/react/pagination/src/pages/index.js @@ -1,5 +1,4 @@ import React from 'react' -import axios from 'axios' import { useQuery, useQueryClient, @@ -20,8 +19,8 @@ export default function App() { } async function fetchProjects(page = 0) { - const { data } = await axios.get('/api/projects?page=' + page) - return data + const response = await fetch(`/api/projects?page=${page}`) + return await response.json() } function Example() { diff --git a/examples/react/playground/package.json b/examples/react/playground/package.json index 7e4af9d0cd..cf58d757a8 100644 --- a/examples/react/playground/package.json +++ b/examples/react/playground/package.json @@ -16,17 +16,5 @@ "devDependencies": { "@vitejs/plugin-react": "^4.2.1", "vite": "^5.2.11" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] } } diff --git a/examples/react/prefetching/package.json b/examples/react/prefetching/package.json index a0bb98eddc..bb293cbded 100644 --- a/examples/react/prefetching/package.json +++ b/examples/react/prefetching/package.json @@ -10,7 +10,6 @@ "dependencies": { "@tanstack/react-query": "^5.50.1", "@tanstack/react-query-devtools": "^5.50.1", - "axios": "^1.6.8", "isomorphic-unfetch": "4.0.2", "next": "^14.2.4", "react": "^18.2.0", diff --git a/examples/react/prefetching/src/pages/index.js b/examples/react/prefetching/src/pages/index.js index c8edc5465d..4c37c32c8f 100644 --- a/examples/react/prefetching/src/pages/index.js +++ b/examples/react/prefetching/src/pages/index.js @@ -1,20 +1,19 @@ import React from 'react' -import axios from 'axios' import { useQuery, useQueryClient } from '@tanstack/react-query' import { ReactQueryDevtools } from '@tanstack/react-query-devtools' const getCharacters = async () => { await new Promise((r) => setTimeout(r, 500)) - const { data } = await axios.get('https://rickandmortyapi.com/api/character/') - return data + const response = await fetch('https://rickandmortyapi.com/api/character/') + return await response.json() } const getCharacter = async (selectedChar) => { await new Promise((r) => setTimeout(r, 500)) - const { data } = await axios.get( + const response = await fetch( `https://rickandmortyapi.com/api/character/${selectedChar}`, ) - return data + return await response.json() } export default function Example() { diff --git a/examples/react/react-router/package.json b/examples/react/react-router/package.json index aa0b072e1c..996bd7c877 100644 --- a/examples/react/react-router/package.json +++ b/examples/react/react-router/package.json @@ -27,17 +27,5 @@ "@vitejs/plugin-react": "^4.2.1", "typescript": "5.3.3", "vite": "^5.2.11" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] } } diff --git a/examples/react/rick-morty/package.json b/examples/react/rick-morty/package.json index 08665f67b1..334c9e841e 100644 --- a/examples/react/rick-morty/package.json +++ b/examples/react/rick-morty/package.json @@ -22,17 +22,5 @@ "devDependencies": { "@vitejs/plugin-react": "^4.2.1", "vite": "^5.2.11" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] } } diff --git a/examples/react/simple/index.html b/examples/react/simple/index.html index d743f7dff7..857a3425b6 100644 --- a/examples/react/simple/index.html +++ b/examples/react/simple/index.html @@ -11,6 +11,6 @@
- + diff --git a/examples/react/simple/package.json b/examples/react/simple/package.json index 6f60d18726..05e1832338 100644 --- a/examples/react/simple/package.json +++ b/examples/react/simple/package.json @@ -10,24 +10,12 @@ "dependencies": { "@tanstack/react-query": "^5.50.1", "@tanstack/react-query-devtools": "^5.50.1", - "axios": "^1.6.8", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, "devDependencies": { "@vitejs/plugin-react": "^4.2.1", + "typescript": "5.3.3", "vite": "^5.2.11" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] } } diff --git a/examples/react/simple/src/index.jsx b/examples/react/simple/src/index.tsx similarity index 76% rename from examples/react/simple/src/index.jsx rename to examples/react/simple/src/index.tsx index fa7f86a58a..6a137cb9e2 100644 --- a/examples/react/simple/src/index.jsx +++ b/examples/react/simple/src/index.tsx @@ -6,13 +6,13 @@ import { useQuery, } from '@tanstack/react-query' import { ReactQueryDevtools } from '@tanstack/react-query-devtools' -import axios from 'axios' const queryClient = new QueryClient() export default function App() { return ( + ) @@ -21,10 +21,12 @@ export default function App() { function Example() { const { isPending, error, data, isFetching } = useQuery({ queryKey: ['repoData'], - queryFn: () => - axios - .get('https://api.github.com/repos/tannerlinsley/react-query') - .then((res) => res.data), + queryFn: async () => { + const response = await fetch( + 'https://api.github.com/repos/TanStack/query', + ) + return await response.json() + }, }) if (isPending) return 'Loading...' @@ -33,16 +35,15 @@ function Example() { return (
-

{data.name}

+

{data.full_name}

{data.description}

👀 {data.subscribers_count}{' '} ✨ {data.stargazers_count}{' '} 🍴 {data.forks_count}
{isFetching ? 'Updating...' : ''}
-
) } -const rootElement = document.getElementById('root') +const rootElement = document.getElementById('root') as HTMLElement ReactDOM.createRoot(rootElement).render() diff --git a/examples/react/simple/tsconfig.json b/examples/react/simple/tsconfig.json new file mode 100644 index 0000000000..23a8707ef4 --- /dev/null +++ b/examples/react/simple/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src", "eslint.config.js"] +} diff --git a/examples/react/simple/vite.config.ts b/examples/react/simple/vite.config.ts new file mode 100644 index 0000000000..9ffcc67574 --- /dev/null +++ b/examples/react/simple/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +export default defineConfig({ + plugins: [react()], +}) diff --git a/examples/react/star-wars/package.json b/examples/react/star-wars/package.json index bda3023d0e..9cc6375427 100644 --- a/examples/react/star-wars/package.json +++ b/examples/react/star-wars/package.json @@ -22,17 +22,5 @@ "devDependencies": { "@vitejs/plugin-react": "^4.2.1", "vite": "^5.2.11" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] } } diff --git a/examples/react/suspense/index.html b/examples/react/suspense/index.html index bbf1315b5e..aca35c1a17 100644 --- a/examples/react/suspense/index.html +++ b/examples/react/suspense/index.html @@ -11,6 +11,6 @@
- + diff --git a/examples/react/suspense/package.json b/examples/react/suspense/package.json index 89b586e354..605a39d4f4 100644 --- a/examples/react/suspense/package.json +++ b/examples/react/suspense/package.json @@ -2,10 +2,14 @@ "name": "@tanstack/query-example-react-suspense", "private": true, "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, "dependencies": { "@tanstack/react-query": "^5.50.1", "@tanstack/react-query-devtools": "^5.50.1", - "axios": "^1.6.8", "font-awesome": "^4.7.0", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522", @@ -13,17 +17,7 @@ }, "devDependencies": { "@vitejs/plugin-react": "^4.2.1", + "typescript": "5.3.3", "vite": "^5.2.11" - }, - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview" - }, - "browserslist": [ - ">0.2%", - "not dead", - "not ie <= 11", - "not op_mini all" - ] + } } diff --git a/examples/react/suspense/src/components/Button.jsx b/examples/react/suspense/src/components/Button.tsx similarity index 69% rename from examples/react/suspense/src/components/Button.jsx rename to examples/react/suspense/src/components/Button.tsx index 67f33c4bde..252272ff74 100644 --- a/examples/react/suspense/src/components/Button.jsx +++ b/examples/react/suspense/src/components/Button.tsx @@ -2,10 +2,16 @@ import React from 'react' import Spinner from './Spinner' -export default function Button({ children, onClick }) { +export default function Button({ + children, + onClick, +}: { + children: React.ReactNode + onClick: any +}) { const [isPending, startTransition] = React.useTransition() - const handleClick = (e) => { + const handleClick = (e: any) => { startTransition(() => { onClick(e) }) diff --git a/examples/react/suspense/src/components/Project.jsx b/examples/react/suspense/src/components/Project.tsx similarity index 75% rename from examples/react/suspense/src/components/Project.jsx rename to examples/react/suspense/src/components/Project.tsx index a3ffdb4b09..84ca4e454d 100644 --- a/examples/react/suspense/src/components/Project.jsx +++ b/examples/react/suspense/src/components/Project.tsx @@ -1,12 +1,16 @@ import React from 'react' import { useSuspenseQuery } from '@tanstack/react-query' - +import { fetchProject } from '../queries' import Button from './Button' import Spinner from './Spinner' -import { fetchProject } from '../queries' - -export default function Project({ activeProject, setActiveProject }) { +export default function Project({ + activeProject, + setActiveProject, +}: { + activeProject: string + setActiveProject: React.Dispatch> +}) { const { data, isFetching } = useSuspenseQuery({ queryKey: ['project', activeProject], queryFn: () => fetchProject(activeProject), @@ -22,7 +26,7 @@ export default function Project({ activeProject, setActiveProject }) {

forks: {data.forks_count}

stars: {data.stargazers_count}

-

watchers: {data.watchers}

+

watchers: {data.watchers_count}

) : null}
diff --git a/examples/react/suspense/src/components/Projects.jsx b/examples/react/suspense/src/components/Projects.tsx similarity index 52% rename from examples/react/suspense/src/components/Projects.jsx rename to examples/react/suspense/src/components/Projects.tsx index 5f652d22a3..f1307692a9 100644 --- a/examples/react/suspense/src/components/Projects.jsx +++ b/examples/react/suspense/src/components/Projects.tsx @@ -1,12 +1,14 @@ import React from 'react' -import { useSuspenseQuery, useQueryClient } from '@tanstack/react-query' - +import { useQueryClient, useSuspenseQuery } from '@tanstack/react-query' +import { fetchProject, fetchProjects } from '../queries' import Button from './Button' import Spinner from './Spinner' -import { fetchProjects, fetchProject } from '../queries' - -export default function Projects({ setActiveProject }) { +export default function Projects({ + setActiveProject, +}: { + setActiveProject: React.Dispatch> +}) { const queryClient = useQueryClient() const { data, isFetching } = useSuspenseQuery({ queryKey: ['projects'], @@ -15,17 +17,17 @@ export default function Projects({ setActiveProject }) { return (
-

Projects {isFetching ? : null}

+

TanStack Repositories {isFetching ? : null}

{data.map((project) => ( -

+