From 950e86d8556d012d082b97a45681aff819619741 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Fri, 26 May 2023 13:02:27 +1000 Subject: [PATCH 1/3] Remove duplicate imports --- packages/query-core/src/queryClient.ts | 3 ++- packages/query-core/src/queryObserver.ts | 21 ++++++++++--------- .../query-core/src/tests/queryCache.test.tsx | 3 +-- .../query-core/src/tests/queryClient.test.tsx | 3 +-- packages/query-core/src/types.ts | 3 +-- packages/query-devtools/src/Devtools.tsx | 2 +- .../query-persist-client-core/src/persist.ts | 2 +- packages/react-query/src/suspense.ts | 5 +---- .../__tests__/QueryClientProvider.test.tsx | 3 +-- .../__tests__/createInfiniteQuery.test.tsx | 3 +-- .../src/__tests__/useIsMutating.test.tsx | 3 +-- packages/solid-query/src/createBaseQuery.ts | 3 +-- packages/vue-query/src/useMutationState.ts | 2 +- packages/vue-query/src/useQueries.ts | 4 ++-- 14 files changed, 26 insertions(+), 34 deletions(-) diff --git a/packages/query-core/src/queryClient.ts b/packages/query-core/src/queryClient.ts index b8c1833a55..b96b1eb26e 100644 --- a/packages/query-core/src/queryClient.ts +++ b/packages/query-core/src/queryClient.ts @@ -25,6 +25,8 @@ import type { ResetOptions, SetDataOptions, DefaultError, + CancelOptions, + DefaultedQueryObserverOptions, } from './types' import type { QueryState } from './query' import { QueryCache } from './queryCache' @@ -33,7 +35,6 @@ import { focusManager } from './focusManager' import { onlineManager } from './onlineManager' import { notifyManager } from './notifyManager' import { infiniteQueryBehavior } from './infiniteQueryBehavior' -import type { CancelOptions, DefaultedQueryObserverOptions } from './types' // TYPES diff --git a/packages/query-core/src/queryObserver.ts b/packages/query-core/src/queryObserver.ts index 396a3e9f4c..4b4efca7ed 100644 --- a/packages/query-core/src/queryObserver.ts +++ b/packages/query-core/src/queryObserver.ts @@ -1,14 +1,6 @@ -import type { DefaultedQueryObserverOptions, DefaultError } from './types' -import { - isServer, - isValidTimeout, - noop, - replaceData, - shallowEqualObjects, - timeUntilStale, -} from './utils' -import { notifyManager } from './notifyManager' import type { + DefaultedQueryObserverOptions, + DefaultError, PlaceholderDataFunction, QueryKey, QueryObserverBaseResult, @@ -17,6 +9,15 @@ import type { QueryOptions, RefetchOptions, } from './types' +import { + isServer, + isValidTimeout, + noop, + replaceData, + shallowEqualObjects, + timeUntilStale, +} from './utils' +import { notifyManager } from './notifyManager' import type { Query, QueryState, FetchOptions } from './query' import type { QueryClient } from './queryClient' import { focusManager } from './focusManager' diff --git a/packages/query-core/src/tests/queryCache.test.tsx b/packages/query-core/src/tests/queryCache.test.tsx index 8e328ae8fd..ade73b5c8f 100644 --- a/packages/query-core/src/tests/queryCache.test.tsx +++ b/packages/query-core/src/tests/queryCache.test.tsx @@ -1,6 +1,5 @@ import { sleep, queryKey, createQueryClient } from './utils' -import { QueryClient } from '..' -import { QueryCache, QueryObserver } from '..' +import { QueryClient, QueryCache, QueryObserver } from '..' import { waitFor } from '@testing-library/react' import { vi } from 'vitest' diff --git a/packages/query-core/src/tests/queryClient.test.tsx b/packages/query-core/src/tests/queryClient.test.tsx index bde738afb8..1ba906f028 100644 --- a/packages/query-core/src/tests/queryClient.test.tsx +++ b/packages/query-core/src/tests/queryClient.test.tsx @@ -13,8 +13,7 @@ import type { QueryFunction, QueryObserverOptions, } from '..' -import { MutationObserver, QueryObserver } from '..' -import { focusManager, onlineManager } from '..' +import { MutationObserver, QueryObserver, focusManager, onlineManager } from '..' import { noop } from '../utils' import { vi } from 'vitest' diff --git a/packages/query-core/src/types.ts b/packages/query-core/src/types.ts index b08c4d905e..248ff47f66 100644 --- a/packages/query-core/src/types.ts +++ b/packages/query-core/src/types.ts @@ -1,12 +1,11 @@ /* istanbul ignore file */ import type { MutationState } from './mutation' -import type { QueryBehavior, Query } from './query' +import type { FetchDirection, QueryBehavior, Query } from './query' import type { RetryValue, RetryDelayValue } from './retryer' import type { QueryFilters, QueryTypeFilter } from './utils' import type { QueryCache } from './queryCache' import type { MutationCache } from './mutationCache' -import type { FetchDirection } from './query' export interface Register { // defaultError: Error diff --git a/packages/query-devtools/src/Devtools.tsx b/packages/query-devtools/src/Devtools.tsx index d006a85e53..2781bf6ee0 100644 --- a/packages/query-devtools/src/Devtools.tsx +++ b/packages/query-devtools/src/Devtools.tsx @@ -1,5 +1,4 @@ import type { Accessor, Component, JSX, Setter } from 'solid-js' -import { For } from 'solid-js' import { createEffect, createMemo, @@ -7,6 +6,7 @@ import { on, onCleanup, onMount, + For, Show, } from 'solid-js' import { rankItem } from '@tanstack/match-sorter-utils' diff --git a/packages/query-persist-client-core/src/persist.ts b/packages/query-persist-client-core/src/persist.ts index ce0ff1962c..f2b3187ddb 100644 --- a/packages/query-persist-client-core/src/persist.ts +++ b/packages/query-persist-client-core/src/persist.ts @@ -3,9 +3,9 @@ import type { DehydratedState, DehydrateOptions, HydrateOptions, + NotifyEventType, } from '@tanstack/query-core' import { dehydrate, hydrate } from '@tanstack/query-core' -import type { NotifyEventType } from '@tanstack/query-core' export type Promisable = T | PromiseLike diff --git a/packages/react-query/src/suspense.ts b/packages/react-query/src/suspense.ts index ce20199de4..f9cb3c9c1e 100644 --- a/packages/react-query/src/suspense.ts +++ b/packages/react-query/src/suspense.ts @@ -1,8 +1,5 @@ -import type { DefaultedQueryObserverOptions } from '@tanstack/query-core' -import type { QueryObserver } from '@tanstack/query-core' +import type { DefaultedQueryObserverOptions, QueryObserverResult, QueryKey, QueryObserver } from '@tanstack/query-core' import type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary' -import type { QueryObserverResult } from '@tanstack/query-core' -import type { QueryKey } from '@tanstack/query-core' export const ensureStaleTime = ( defaultedOptions: DefaultedQueryObserverOptions, diff --git a/packages/solid-query/src/__tests__/QueryClientProvider.test.tsx b/packages/solid-query/src/__tests__/QueryClientProvider.test.tsx index 31aaea43ae..a6276227ba 100644 --- a/packages/solid-query/src/__tests__/QueryClientProvider.test.tsx +++ b/packages/solid-query/src/__tests__/QueryClientProvider.test.tsx @@ -1,9 +1,8 @@ import { render, screen, waitFor } from '@solidjs/testing-library' -import { queryKey } from './utils' +import { createQueryClient, sleep, queryKey } from './utils' import { QueryCache } from '@tanstack/query-core' import { createQuery, QueryClientProvider, useQueryClient } from '..' -import { createQueryClient, sleep } from './utils' import { vi } from 'vitest' describe('QueryClientProvider', () => { diff --git a/packages/solid-query/src/__tests__/createInfiniteQuery.test.tsx b/packages/solid-query/src/__tests__/createInfiniteQuery.test.tsx index 9d8c4b6f2c..40fb2a34c3 100644 --- a/packages/solid-query/src/__tests__/createInfiniteQuery.test.tsx +++ b/packages/solid-query/src/__tests__/createInfiniteQuery.test.tsx @@ -1,6 +1,6 @@ import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library' -import { createQueryClient, sleep } from './utils' +import { createQueryClient, sleep, Blink, queryKey, setActTimeout } from './utils' import { createEffect, @@ -23,7 +23,6 @@ import { QueryClientProvider, keepPreviousData, } from '..' -import { Blink, queryKey, setActTimeout } from './utils' import { vi } from 'vitest' import type { Mock } from 'vitest' diff --git a/packages/solid-query/src/__tests__/useIsMutating.test.tsx b/packages/solid-query/src/__tests__/useIsMutating.test.tsx index be9c8b2923..7c34504f91 100644 --- a/packages/solid-query/src/__tests__/useIsMutating.test.tsx +++ b/packages/solid-query/src/__tests__/useIsMutating.test.tsx @@ -1,10 +1,9 @@ import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library' import { createMutation, QueryClientProvider, useIsMutating } from '..' -import { createQueryClient, sleep } from './utils' +import { createQueryClient, sleep, setActTimeout } from './utils' import { createEffect, createRenderEffect, createSignal, Show } from 'solid-js' import * as MutationCacheModule from '../../../query-core/src/mutationCache' -import { setActTimeout } from './utils' import { vi } from 'vitest' describe('useIsMutating', () => { diff --git a/packages/solid-query/src/createBaseQuery.ts b/packages/solid-query/src/createBaseQuery.ts index e22500a143..843194ecbf 100644 --- a/packages/solid-query/src/createBaseQuery.ts +++ b/packages/solid-query/src/createBaseQuery.ts @@ -8,8 +8,7 @@ import type { QueryObserverResult, } from '@tanstack/query-core' import type { QueryClient } from './QueryClient' -import { hydrate } from '@tanstack/query-core' -import { notifyManager } from '@tanstack/query-core' +import { hydrate, notifyManager } from '@tanstack/query-core' import type { Accessor } from 'solid-js' import { isServer } from 'solid-js/web' import { diff --git a/packages/vue-query/src/useMutationState.ts b/packages/vue-query/src/useMutationState.ts index 4a8c6f2ad5..50859b5c8f 100644 --- a/packages/vue-query/src/useMutationState.ts +++ b/packages/vue-query/src/useMutationState.ts @@ -4,8 +4,8 @@ import type { MutationFilters as MF, Mutation, DefaultError, + MutationState, } from '@tanstack/query-core' -import type { MutationState } from '@tanstack/query-core' import { useQueryClient } from './useQueryClient' import { cloneDeepUnref } from './utils' import type { QueryClient } from './queryClient' diff --git a/packages/vue-query/src/useQueries.ts b/packages/vue-query/src/useQueries.ts index f7ed69763d..47651ff623 100644 --- a/packages/vue-query/src/useQueries.ts +++ b/packages/vue-query/src/useQueries.ts @@ -4,12 +4,12 @@ import type { QueriesPlaceholderDataFunction, QueryKey, QueriesObserverOptions, + QueryFunction, + QueryObserverResult, } from '@tanstack/query-core' import type { Ref } from 'vue-demi' import { computed, onScopeDispose, readonly, ref, watch } from 'vue-demi' -import type { QueryFunction, QueryObserverResult } from '@tanstack/query-core' - import { useQueryClient } from './useQueryClient' import { cloneDeepUnref } from './utils' import type { UseQueryOptions } from './useQuery' From 44bcee80f72892bb4bc004358d09912072a540c3 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Fri, 26 May 2023 13:04:09 +1000 Subject: [PATCH 2/3] Fix typescript-eslint support for TS 5.0 --- package.json | 4 +- packages/eslint-plugin-query/package.json | 6 +- pnpm-lock.yaml | 236 ++++++++++++++-------- 3 files changed, 157 insertions(+), 89 deletions(-) diff --git a/package.json b/package.json index cf484777d6..485090c5e5 100644 --- a/package.json +++ b/package.json @@ -52,8 +52,8 @@ "@types/react-dom": "^18.0.5", "@types/semver": "^7.3.13", "@types/testing-library__jest-dom": "^5.14.5", - "@typescript-eslint/eslint-plugin": "^5.51.0", - "@typescript-eslint/parser": "^5.51.0", + "@typescript-eslint/eslint-plugin": "^5.54.0", + "@typescript-eslint/parser": "^5.54.0", "@vitest/coverage-istanbul": "^0.27.1", "axios": "^1.4.0", "babel-preset-solid": "^1.6.10", diff --git a/packages/eslint-plugin-query/package.json b/packages/eslint-plugin-query/package.json index de03274f24..a06c73a30c 100644 --- a/packages/eslint-plugin-query/package.json +++ b/packages/eslint-plugin-query/package.json @@ -42,9 +42,9 @@ "outDir": "build/lib" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^5.51.0", - "@typescript-eslint/parser": "^5.51.0", - "@typescript-eslint/utils": "^5.51.0", + "@typescript-eslint/eslint-plugin": "^5.54.0", + "@typescript-eslint/parser": "^5.54.0", + "@typescript-eslint/utils": "^5.54.0", "eslint": "^8.34.0", "tsup": "^6.7.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 05fd549d5c..40fd044e8a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,8 +31,8 @@ importers: '@types/react-dom': ^18.0.5 '@types/semver': ^7.3.13 '@types/testing-library__jest-dom': ^5.14.5 - '@typescript-eslint/eslint-plugin': ^5.51.0 - '@typescript-eslint/parser': ^5.51.0 + '@typescript-eslint/eslint-plugin': ^5.54.0 + '@typescript-eslint/parser': ^5.54.0 '@vitest/coverage-istanbul': ^0.27.1 axios: ^1.4.0 babel-preset-solid: ^1.6.10 @@ -96,8 +96,8 @@ importers: '@types/react-dom': 18.0.11 '@types/semver': 7.3.13 '@types/testing-library__jest-dom': 5.14.5_d573maxasnl5kxwdyzebcnmhpm - '@typescript-eslint/eslint-plugin': 5.53.0_cna4dee435jve7uzkku7fdsbay - '@typescript-eslint/parser': 5.53.0_twx2qloifaq5rdyv2wmfnyf27m + '@typescript-eslint/eslint-plugin': 5.59.7_lhwnuo7mh7t3uu6mtx7cuxuc7m + '@typescript-eslint/parser': 5.59.7_twx2qloifaq5rdyv2wmfnyf27m '@vitest/coverage-istanbul': 0.27.3 axios: 1.4.0 babel-preset-solid: 1.6.10_@babel+core@7.20.12 @@ -110,7 +110,7 @@ importers: eslint-config-prettier: 8.6.0_eslint@8.34.0 eslint-config-react-app: 7.0.1_4ucp7kmmt6mm7ajuoa4z6fky3m eslint-import-resolver-typescript: 3.5.3_mvgyw3chnqkp6sgfmmtihyjpnm - eslint-plugin-import: 2.27.5_2hqppaeqs2axgzqg6vttejknky + eslint-plugin-import: 2.27.5_36tnx7j76xmyw4sddv6l5lsnda eslint-plugin-jsx-a11y: 6.7.1_eslint@8.34.0 eslint-plugin-prettier: 4.2.1_c55dtrtzl4q7ozvpzijpko3dje eslint-plugin-promise: 6.1.1_eslint@8.34.0 @@ -959,15 +959,15 @@ importers: packages/eslint-plugin-query: specifiers: - '@typescript-eslint/eslint-plugin': ^5.51.0 - '@typescript-eslint/parser': ^5.51.0 - '@typescript-eslint/utils': ^5.51.0 + '@typescript-eslint/eslint-plugin': ^5.54.0 + '@typescript-eslint/parser': ^5.54.0 + '@typescript-eslint/utils': ^5.54.0 eslint: ^8.34.0 tsup: ^6.7.0 devDependencies: - '@typescript-eslint/eslint-plugin': 5.53.0_dbs2zxbe2aiqaiiio3svelvkai - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0 - '@typescript-eslint/utils': 5.53.0_eslint@8.34.0 + '@typescript-eslint/eslint-plugin': 5.59.7_prqcae67pddiqbosymhw3vyt7q + '@typescript-eslint/parser': 5.59.7_eslint@8.34.0 + '@typescript-eslint/utils': 5.59.7_eslint@8.34.0 eslint: 8.34.0 tsup: 6.7.0 @@ -6305,6 +6305,21 @@ packages: eslint-visitor-keys: 3.3.0 dev: true + /@eslint-community/eslint-utils/4.4.0_eslint@8.34.0: + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + dependencies: + eslint: 8.34.0 + eslint-visitor-keys: 3.3.0 + dev: true + + /@eslint-community/regexpp/4.5.1: + resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: true + /@eslint/eslintrc/1.4.1: resolution: {integrity: sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -8665,8 +8680,8 @@ packages: - supports-color dev: true - /@typescript-eslint/eslint-plugin/5.53.0_cna4dee435jve7uzkku7fdsbay: - resolution: {integrity: sha512-alFpFWNucPLdUOySmXCJpzr6HKC3bu7XooShWM+3w/EL6J2HIoB2PFxpLnq4JauWVk6DiVeNKzQlFEaE+X9sGw==} + /@typescript-eslint/eslint-plugin/5.59.7_lhwnuo7mh7t3uu6mtx7cuxuc7m: + resolution: {integrity: sha512-BL+jYxUFIbuYwy+4fF86k5vdT9lT0CNJ6HtwrIvGh0PhH8s0yy5rjaKH2fDCrz5ITHy07WCzVGNvAmjJh4IJFA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -8676,16 +8691,16 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.53.0_twx2qloifaq5rdyv2wmfnyf27m - '@typescript-eslint/scope-manager': 5.53.0 - '@typescript-eslint/type-utils': 5.53.0_twx2qloifaq5rdyv2wmfnyf27m - '@typescript-eslint/utils': 5.53.0_twx2qloifaq5rdyv2wmfnyf27m + '@eslint-community/regexpp': 4.5.1 + '@typescript-eslint/parser': 5.59.7_twx2qloifaq5rdyv2wmfnyf27m + '@typescript-eslint/scope-manager': 5.59.7 + '@typescript-eslint/type-utils': 5.59.7_twx2qloifaq5rdyv2wmfnyf27m + '@typescript-eslint/utils': 5.59.7_twx2qloifaq5rdyv2wmfnyf27m debug: 4.3.4 eslint: 8.34.0 grapheme-splitter: 1.0.4 ignore: 5.2.0 natural-compare-lite: 1.4.0 - regexpp: 3.2.0 semver: 7.3.8 tsutils: 3.21.0_typescript@5.0.4 typescript: 5.0.4 @@ -8693,8 +8708,8 @@ packages: - supports-color dev: true - /@typescript-eslint/eslint-plugin/5.53.0_dbs2zxbe2aiqaiiio3svelvkai: - resolution: {integrity: sha512-alFpFWNucPLdUOySmXCJpzr6HKC3bu7XooShWM+3w/EL6J2HIoB2PFxpLnq4JauWVk6DiVeNKzQlFEaE+X9sGw==} + /@typescript-eslint/eslint-plugin/5.59.7_prqcae67pddiqbosymhw3vyt7q: + resolution: {integrity: sha512-BL+jYxUFIbuYwy+4fF86k5vdT9lT0CNJ6HtwrIvGh0PhH8s0yy5rjaKH2fDCrz5ITHy07WCzVGNvAmjJh4IJFA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -8704,16 +8719,16 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0 - '@typescript-eslint/scope-manager': 5.53.0 - '@typescript-eslint/type-utils': 5.53.0_eslint@8.34.0 - '@typescript-eslint/utils': 5.53.0_eslint@8.34.0 + '@eslint-community/regexpp': 4.5.1 + '@typescript-eslint/parser': 5.59.7_eslint@8.34.0 + '@typescript-eslint/scope-manager': 5.59.7 + '@typescript-eslint/type-utils': 5.59.7_eslint@8.34.0 + '@typescript-eslint/utils': 5.59.7_eslint@8.34.0 debug: 4.3.4 eslint: 8.34.0 grapheme-splitter: 1.0.4 ignore: 5.2.0 natural-compare-lite: 1.4.0 - regexpp: 3.2.0 semver: 7.3.8 tsutils: 3.21.0 transitivePeerDependencies: @@ -8787,8 +8802,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.53.0_eslint@8.34.0: - resolution: {integrity: sha512-MKBw9i0DLYlmdOb3Oq/526+al20AJZpANdT6Ct9ffxcV8nKCHz63t/S0IhlTFNsBIHJv+GY5SFJ0XfqVeydQrQ==} + /@typescript-eslint/parser/5.59.7_eslint@8.34.0: + resolution: {integrity: sha512-VhpsIEuq/8i5SF+mPg9jSdIwgMBBp0z9XqjiEay+81PYLJuroN+ET1hM5IhkiYMJd9MkTz8iJLt7aaGAgzWUbQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -8797,17 +8812,17 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.53.0 - '@typescript-eslint/types': 5.53.0 - '@typescript-eslint/typescript-estree': 5.53.0 + '@typescript-eslint/scope-manager': 5.59.7 + '@typescript-eslint/types': 5.59.7 + '@typescript-eslint/typescript-estree': 5.59.7 debug: 4.3.4 eslint: 8.34.0 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser/5.53.0_twx2qloifaq5rdyv2wmfnyf27m: - resolution: {integrity: sha512-MKBw9i0DLYlmdOb3Oq/526+al20AJZpANdT6Ct9ffxcV8nKCHz63t/S0IhlTFNsBIHJv+GY5SFJ0XfqVeydQrQ==} + /@typescript-eslint/parser/5.59.7_twx2qloifaq5rdyv2wmfnyf27m: + resolution: {integrity: sha512-VhpsIEuq/8i5SF+mPg9jSdIwgMBBp0z9XqjiEay+81PYLJuroN+ET1hM5IhkiYMJd9MkTz8iJLt7aaGAgzWUbQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -8816,9 +8831,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.53.0 - '@typescript-eslint/types': 5.53.0 - '@typescript-eslint/typescript-estree': 5.53.0_typescript@5.0.4 + '@typescript-eslint/scope-manager': 5.59.7 + '@typescript-eslint/types': 5.59.7 + '@typescript-eslint/typescript-estree': 5.59.7_typescript@5.0.4 debug: 4.3.4 eslint: 8.34.0 typescript: 5.0.4 @@ -8842,8 +8857,16 @@ packages: '@typescript-eslint/visitor-keys': 5.53.0 dev: true - /@typescript-eslint/type-utils/5.53.0_eslint@8.34.0: - resolution: {integrity: sha512-HO2hh0fmtqNLzTAme/KnND5uFNwbsdYhCZghK2SoxGp3Ifn2emv+hi0PBUjzzSh0dstUIFqOj3bp0AwQlK4OWw==} + /@typescript-eslint/scope-manager/5.59.7: + resolution: {integrity: sha512-FL6hkYWK9zBGdxT2wWEd2W8ocXMu3K94i3gvMrjXpx+koFYdYV7KprKfirpgY34vTGzEPPuKoERpP8kD5h7vZQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.59.7 + '@typescript-eslint/visitor-keys': 5.59.7 + dev: true + + /@typescript-eslint/type-utils/5.59.7_eslint@8.34.0: + resolution: {integrity: sha512-ozuz/GILuYG7osdY5O5yg0QxXUAEoI4Go3Do5xeu+ERH9PorHBPSdvD3Tjp2NN2bNLh1NJQSsQu2TPu/Ly+HaQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -8852,8 +8875,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.53.0 - '@typescript-eslint/utils': 5.53.0_eslint@8.34.0 + '@typescript-eslint/typescript-estree': 5.59.7 + '@typescript-eslint/utils': 5.59.7_eslint@8.34.0 debug: 4.3.4 eslint: 8.34.0 tsutils: 3.21.0 @@ -8861,8 +8884,8 @@ packages: - supports-color dev: true - /@typescript-eslint/type-utils/5.53.0_twx2qloifaq5rdyv2wmfnyf27m: - resolution: {integrity: sha512-HO2hh0fmtqNLzTAme/KnND5uFNwbsdYhCZghK2SoxGp3Ifn2emv+hi0PBUjzzSh0dstUIFqOj3bp0AwQlK4OWw==} + /@typescript-eslint/type-utils/5.59.7_twx2qloifaq5rdyv2wmfnyf27m: + resolution: {integrity: sha512-ozuz/GILuYG7osdY5O5yg0QxXUAEoI4Go3Do5xeu+ERH9PorHBPSdvD3Tjp2NN2bNLh1NJQSsQu2TPu/Ly+HaQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -8871,8 +8894,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.53.0_typescript@5.0.4 - '@typescript-eslint/utils': 5.53.0_twx2qloifaq5rdyv2wmfnyf27m + '@typescript-eslint/typescript-estree': 5.59.7_typescript@5.0.4 + '@typescript-eslint/utils': 5.59.7_twx2qloifaq5rdyv2wmfnyf27m debug: 4.3.4 eslint: 8.34.0 tsutils: 3.21.0_typescript@5.0.4 @@ -8891,6 +8914,11 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@typescript-eslint/types/5.59.7: + resolution: {integrity: sha512-UnVS2MRRg6p7xOSATscWkKjlf/NDKuqo5TdbWck6rIRZbmKpVNTLALzNvcjIfHBE7736kZOFc/4Z3VcZwuOM/A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + /@typescript-eslint/typescript-estree/2.34.0_typescript@5.0.4: resolution: {integrity: sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==} engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} @@ -8933,7 +8961,7 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree/5.53.0: + /@typescript-eslint/typescript-estree/5.53.0_typescript@5.0.4: resolution: {integrity: sha512-eKmipH7QyScpHSkhbptBBYh9v8FxtngLquq292YTEQ1pxVs39yFBlLC1xeIZcPPz1RWGqb7YgERJRGkjw8ZV7w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -8948,13 +8976,34 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.8 + tsutils: 3.21.0_typescript@5.0.4 + typescript: 5.0.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/typescript-estree/5.59.7: + resolution: {integrity: sha512-4A1NtZ1I3wMN2UGDkU9HMBL+TIQfbrh4uS0WDMMpf3xMRursDbqEf1ahh6vAAe3mObt8k3ZATnezwG4pdtWuUQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.59.7 + '@typescript-eslint/visitor-keys': 5.59.7 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.3.8 tsutils: 3.21.0 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree/5.53.0_typescript@5.0.4: - resolution: {integrity: sha512-eKmipH7QyScpHSkhbptBBYh9v8FxtngLquq292YTEQ1pxVs39yFBlLC1xeIZcPPz1RWGqb7YgERJRGkjw8ZV7w==} + /@typescript-eslint/typescript-estree/5.59.7_typescript@5.0.4: + resolution: {integrity: sha512-4A1NtZ1I3wMN2UGDkU9HMBL+TIQfbrh4uS0WDMMpf3xMRursDbqEf1ahh6vAAe3mObt8k3ZATnezwG4pdtWuUQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -8962,8 +9011,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.53.0 - '@typescript-eslint/visitor-keys': 5.53.0 + '@typescript-eslint/types': 5.59.7 + '@typescript-eslint/visitor-keys': 5.59.7 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -8974,7 +9023,7 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.53.0_eslint@8.34.0: + /@typescript-eslint/utils/5.53.0_twx2qloifaq5rdyv2wmfnyf27m: resolution: {integrity: sha512-VUOOtPv27UNWLxFwQK/8+7kvxVC+hPHNsJjzlJyotlaHjLSIgOCKj9I0DBUjwOOA64qjBwx5afAPjksqOxMO0g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -8984,7 +9033,7 @@ packages: '@types/semver': 7.3.13 '@typescript-eslint/scope-manager': 5.53.0 '@typescript-eslint/types': 5.53.0 - '@typescript-eslint/typescript-estree': 5.53.0 + '@typescript-eslint/typescript-estree': 5.53.0_typescript@5.0.4 eslint: 8.34.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.34.0 @@ -8994,20 +9043,40 @@ packages: - typescript dev: true - /@typescript-eslint/utils/5.53.0_twx2qloifaq5rdyv2wmfnyf27m: - resolution: {integrity: sha512-VUOOtPv27UNWLxFwQK/8+7kvxVC+hPHNsJjzlJyotlaHjLSIgOCKj9I0DBUjwOOA64qjBwx5afAPjksqOxMO0g==} + /@typescript-eslint/utils/5.59.7_eslint@8.34.0: + resolution: {integrity: sha512-yCX9WpdQKaLufz5luG4aJbOpdXf/fjwGMcLFXZVPUz3QqLirG5QcwwnIHNf8cjLjxK4qtzTO8udUtMQSAToQnQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: + '@eslint-community/eslint-utils': 4.4.0_eslint@8.34.0 '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.53.0 - '@typescript-eslint/types': 5.53.0 - '@typescript-eslint/typescript-estree': 5.53.0_typescript@5.0.4 + '@typescript-eslint/scope-manager': 5.59.7 + '@typescript-eslint/types': 5.59.7 + '@typescript-eslint/typescript-estree': 5.59.7 + eslint: 8.34.0 + eslint-scope: 5.1.1 + semver: 7.3.8 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/utils/5.59.7_twx2qloifaq5rdyv2wmfnyf27m: + resolution: {integrity: sha512-yCX9WpdQKaLufz5luG4aJbOpdXf/fjwGMcLFXZVPUz3QqLirG5QcwwnIHNf8cjLjxK4qtzTO8udUtMQSAToQnQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0_eslint@8.34.0 + '@types/json-schema': 7.0.11 + '@types/semver': 7.3.13 + '@typescript-eslint/scope-manager': 5.59.7 + '@typescript-eslint/types': 5.59.7 + '@typescript-eslint/typescript-estree': 5.59.7_typescript@5.0.4 eslint: 8.34.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.34.0 semver: 7.3.8 transitivePeerDependencies: - supports-color @@ -9030,6 +9099,14 @@ packages: eslint-visitor-keys: 3.3.0 dev: true + /@typescript-eslint/visitor-keys/5.59.7: + resolution: {integrity: sha512-tyN+X2jvMslUszIiYbF0ZleP+RqQsFVpGrKI6e0Eet1w8WmhsAtmzaqm8oM8WJQ1ysLwhnsK/4hYHJjOgJVfQQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.59.7 + eslint-visitor-keys: 3.3.0 + dev: true + /@vitejs/plugin-react/4.0.0_vite@4.2.1: resolution: {integrity: sha512-HX0XzMjL3hhOYm+0s95pb0Z7F8O81G7joUHgfDd/9J/ZZf5k4xX6QAMFkKsHFxaHlf6X7GD7+XuaZ66ULiJuhQ==} engines: {node: ^14.18.0 || >=16.0.0} @@ -9773,7 +9850,7 @@ packages: /axios/0.24.0: resolution: {integrity: sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==} dependencies: - follow-redirects: 1.15.1 + follow-redirects: 1.15.1_debug@4.3.4 transitivePeerDependencies: - debug dev: true @@ -9788,7 +9865,7 @@ packages: /axios/1.1.3: resolution: {integrity: sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==} dependencies: - follow-redirects: 1.15.1 + follow-redirects: 1.15.1_debug@4.3.4 form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -9798,7 +9875,7 @@ packages: /axios/1.4.0: resolution: {integrity: sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==} dependencies: - follow-redirects: 1.15.1 + follow-redirects: 1.15.1_debug@4.3.4 form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -11805,14 +11882,14 @@ packages: '@babel/core': 7.20.12 '@babel/eslint-parser': 7.19.1_ydmbqfus77qykiqxhcwsorsqbq '@rushstack/eslint-patch': 1.2.0 - '@typescript-eslint/eslint-plugin': 5.53.0_cna4dee435jve7uzkku7fdsbay - '@typescript-eslint/parser': 5.53.0_twx2qloifaq5rdyv2wmfnyf27m + '@typescript-eslint/eslint-plugin': 5.59.7_lhwnuo7mh7t3uu6mtx7cuxuc7m + '@typescript-eslint/parser': 5.59.7_twx2qloifaq5rdyv2wmfnyf27m babel-preset-react-app: 10.0.1 confusing-browser-globals: 1.0.11 eslint: 8.34.0 eslint-plugin-flowtype: 8.0.3_eslint@8.34.0 - eslint-plugin-import: 2.27.5_2hqppaeqs2axgzqg6vttejknky - eslint-plugin-jest: 25.7.0_3xjlynnlultkpswjdd3twav6w4 + eslint-plugin-import: 2.27.5_36tnx7j76xmyw4sddv6l5lsnda + eslint-plugin-jest: 25.7.0_2speqnm4gbphbfsl4vldlaavqu eslint-plugin-jsx-a11y: 6.7.1_eslint@8.34.0 eslint-plugin-react: 7.32.2_eslint@8.34.0 eslint-plugin-react-hooks: 4.6.0_eslint@8.34.0 @@ -11854,7 +11931,7 @@ packages: debug: 4.3.4 enhanced-resolve: 5.12.0 eslint: 8.34.0 - eslint-plugin-import: 2.27.5_2hqppaeqs2axgzqg6vttejknky + eslint-plugin-import: 2.27.5_36tnx7j76xmyw4sddv6l5lsnda get-tsconfig: 4.4.0 globby: 13.1.3 is-core-module: 2.11.0 @@ -11864,7 +11941,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.4_jvsnonggsvtbpeuntyocjsdqbm: + /eslint-module-utils/2.7.4_5ho7uar2bohn4nhueorc3fgh54: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -11885,15 +11962,16 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 4.33.0_twx2qloifaq5rdyv2wmfnyf27m + '@typescript-eslint/parser': 5.59.7_twx2qloifaq5rdyv2wmfnyf27m debug: 3.2.7 eslint: 8.34.0 eslint-import-resolver-node: 0.3.7 + eslint-import-resolver-typescript: 3.5.3_mvgyw3chnqkp6sgfmmtihyjpnm transitivePeerDependencies: - supports-color dev: true - /eslint-module-utils/2.7.4_yfzt44nswbaazp63chcrlz6vvq: + /eslint-module-utils/2.7.4_jvsnonggsvtbpeuntyocjsdqbm: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -11914,11 +11992,10 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.53.0_twx2qloifaq5rdyv2wmfnyf27m + '@typescript-eslint/parser': 4.33.0_twx2qloifaq5rdyv2wmfnyf27m debug: 3.2.7 eslint: 8.34.0 eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.5.3_mvgyw3chnqkp6sgfmmtihyjpnm transitivePeerDependencies: - supports-color dev: true @@ -11946,7 +12023,7 @@ packages: string-natural-compare: 3.0.1 dev: true - /eslint-plugin-import/2.27.5_2hqppaeqs2axgzqg6vttejknky: + /eslint-plugin-import/2.27.5_36tnx7j76xmyw4sddv6l5lsnda: resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} engines: {node: '>=4'} peerDependencies: @@ -11956,7 +12033,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.53.0_twx2qloifaq5rdyv2wmfnyf27m + '@typescript-eslint/parser': 5.59.7_twx2qloifaq5rdyv2wmfnyf27m array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 @@ -11964,7 +12041,7 @@ packages: doctrine: 2.1.0 eslint: 8.34.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4_yfzt44nswbaazp63chcrlz6vvq + eslint-module-utils: 2.7.4_5ho7uar2bohn4nhueorc3fgh54 has: 1.0.3 is-core-module: 2.11.0 is-glob: 4.0.3 @@ -12025,7 +12102,7 @@ packages: - typescript dev: true - /eslint-plugin-jest/25.7.0_3xjlynnlultkpswjdd3twav6w4: + /eslint-plugin-jest/25.7.0_2speqnm4gbphbfsl4vldlaavqu: resolution: {integrity: sha512-PWLUEXeeF7C9QGKqvdSbzLOiLTx+bno7/HC9eefePfEb257QFHg7ye3dh80AZVkaa/RQsBB1Q/ORQvg2X7F0NQ==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} peerDependencies: @@ -12038,7 +12115,7 @@ packages: jest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 5.53.0_cna4dee435jve7uzkku7fdsbay + '@typescript-eslint/eslint-plugin': 5.59.7_lhwnuo7mh7t3uu6mtx7cuxuc7m '@typescript-eslint/experimental-utils': 5.53.0_twx2qloifaq5rdyv2wmfnyf27m eslint: 8.34.0 transitivePeerDependencies: @@ -12227,7 +12304,7 @@ packages: peerDependencies: eslint: ^7.5.0 || ^8.0.0 dependencies: - '@typescript-eslint/utils': 5.53.0_twx2qloifaq5rdyv2wmfnyf27m + '@typescript-eslint/utils': 5.59.7_twx2qloifaq5rdyv2wmfnyf27m eslint: 8.34.0 transitivePeerDependencies: - supports-color @@ -12839,15 +12916,6 @@ packages: resolution: {integrity: sha512-1gIBiWJNR0tKUNv8gZuk7l9rVX06OuLzY9AoGio7y/JT4V1IZErEMEq2TJS+PFcw/y0RshZ1J/27VfK1UQzYVg==} engines: {node: '>=0.4.0'} - /follow-redirects/1.15.1: - resolution: {integrity: sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - /follow-redirects/1.15.1_debug@4.3.4: resolution: {integrity: sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==} engines: {node: '>=4.0'} From 498ddfa1c13351654f55965037916bb8adbf38ad Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Fri, 26 May 2023 13:08:42 +1000 Subject: [PATCH 3/3] Fix prettier --- packages/query-core/src/tests/queryClient.test.tsx | 7 ++++++- packages/react-query/src/suspense.ts | 7 ++++++- .../src/__tests__/createInfiniteQuery.test.tsx | 8 +++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/query-core/src/tests/queryClient.test.tsx b/packages/query-core/src/tests/queryClient.test.tsx index 1ba906f028..b29ddf67a2 100644 --- a/packages/query-core/src/tests/queryClient.test.tsx +++ b/packages/query-core/src/tests/queryClient.test.tsx @@ -13,7 +13,12 @@ import type { QueryFunction, QueryObserverOptions, } from '..' -import { MutationObserver, QueryObserver, focusManager, onlineManager } from '..' +import { + MutationObserver, + QueryObserver, + focusManager, + onlineManager, +} from '..' import { noop } from '../utils' import { vi } from 'vitest' diff --git a/packages/react-query/src/suspense.ts b/packages/react-query/src/suspense.ts index f9cb3c9c1e..e29d369abe 100644 --- a/packages/react-query/src/suspense.ts +++ b/packages/react-query/src/suspense.ts @@ -1,4 +1,9 @@ -import type { DefaultedQueryObserverOptions, QueryObserverResult, QueryKey, QueryObserver } from '@tanstack/query-core' +import type { + DefaultedQueryObserverOptions, + QueryObserverResult, + QueryKey, + QueryObserver, +} from '@tanstack/query-core' import type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary' export const ensureStaleTime = ( diff --git a/packages/solid-query/src/__tests__/createInfiniteQuery.test.tsx b/packages/solid-query/src/__tests__/createInfiniteQuery.test.tsx index 40fb2a34c3..00ad1e6011 100644 --- a/packages/solid-query/src/__tests__/createInfiniteQuery.test.tsx +++ b/packages/solid-query/src/__tests__/createInfiniteQuery.test.tsx @@ -1,6 +1,12 @@ import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library' -import { createQueryClient, sleep, Blink, queryKey, setActTimeout } from './utils' +import { + createQueryClient, + sleep, + Blink, + queryKey, + setActTimeout, +} from './utils' import { createEffect,