Skip to content

Commit

Permalink
Merge branch 'main' into react-query/feature/cli-error-handling
Browse files Browse the repository at this point in the history
  • Loading branch information
gwansikk authored Dec 10, 2024
2 parents d4213ce + 7af2803 commit ebb0389
Show file tree
Hide file tree
Showing 5 changed files with 583 additions and 382 deletions.
2 changes: 1 addition & 1 deletion examples/react-native-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"jest": "catalog:",
"jest-expo": "catalog:react-native",
"react-test-renderer": "18.3.1",
"typescript": "^5.3.3"
"typescript": "^5.7.2"
},
"jest": {
"preset": "jest-expo"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"sherif": "^1.0.2",
"tsup": "^8.3.5",
"turbo": "^2.3.3",
"typescript": "^5.4.5",
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vitest": "^2.1.8"
}
Expand Down
50 changes: 45 additions & 5 deletions packages/react-query-4/src/SuspenseInfiniteQuery.test-d.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
//@ts-expect-error no suspense
suspense={boolean}
>
{(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
{(query) => (
<>
{query.data.pages
.filter(({ text }) => text)
.map((item, index) => (
<div key={index}>{item.text}</div>
))}
</>
)}
</SuspenseInfiniteQuery>
))()
;(() => (
Expand All @@ -25,7 +33,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
//@ts-expect-error no useErrorBoundary
useErrorBoundary={boolean}
>
{(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
{(query) => (
<>
{query.data.pages
.filter(({ text }) => text)
.map((item, index) => (
<div key={index}>{item.text}</div>
))}
</>
)}
</SuspenseInfiniteQuery>
))()
;(() => (
Expand All @@ -35,7 +51,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
//@ts-expect-error no enabled
enabled={boolean}
>
{(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
{(query) => (
<>
{query.data.pages
.filter(({ text }) => text)
.map((item, index) => (
<div key={index}>{item.text}</div>
))}
</>
)}
</SuspenseInfiniteQuery>
))()
;(() => (
Expand All @@ -45,7 +69,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
//@ts-expect-error no placeholderData
placeholderData="placeholder"
>
{(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
{(query) => (
<>
{query.data.pages
.filter(({ text }) => text)
.map((item, index) => (
<div key={index}>{item.text}</div>
))}
</>
)}
</SuspenseInfiniteQuery>
))()
;(() => (
Expand All @@ -55,7 +87,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
//@ts-expect-error no placeholderData
placeholderData="placeholder"
>
{(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
{(query) => (
<>
{query.data.pages
.filter(({ text }) => text)
.map((item, index) => (
<div key={index}>{item.text}</div>
))}
</>
)}
</SuspenseInfiniteQuery>
))()
;(() => (
Expand Down
50 changes: 45 additions & 5 deletions packages/react-query-5/src/SuspenseInfiniteQuery.test-d.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
getNextPageParam={(lastPage) => lastPage.text}
initialPageParam="initialPageParam"
>
{(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
{(query) => (
<>
{query.data.pages
.filter(({ text }) => text)
.map((item, index) => (
<div key={index}>{item.text}</div>
))}
</>
)}
</SuspenseInfiniteQuery>
))()
;(() => (
Expand All @@ -27,7 +35,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
getNextPageParam={(lastPage) => lastPage.text}
initialPageParam="initialPageParam"
>
{(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
{(query) => (
<>
{query.data.pages
.filter(({ text }) => text)
.map((item, index) => (
<div key={index}>{item.text}</div>
))}
</>
)}
</SuspenseInfiniteQuery>
))()
;(() => (
Expand All @@ -39,7 +55,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
getNextPageParam={(lastPage) => lastPage.text}
initialPageParam="initialPageParam"
>
{(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
{(query) => (
<>
{query.data.pages
.filter(({ text }) => text)
.map((item, index) => (
<div key={index}>{item.text}</div>
))}
</>
)}
</SuspenseInfiniteQuery>
))()
;(() => (
Expand All @@ -51,7 +75,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
getNextPageParam={(lastPage) => lastPage.text}
initialPageParam="initialPageParam"
>
{(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
{(query) => (
<>
{query.data.pages
.filter(({ text }) => text)
.map((item, index) => (
<div key={index}>{item.text}</div>
))}
</>
)}
</SuspenseInfiniteQuery>
))()
;(() => (
Expand All @@ -63,7 +95,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
getNextPageParam={(lastPage) => lastPage.text}
initialPageParam="initialPageParam"
>
{(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
{(query) => (
<>
{query.data.pages
.filter(({ text }) => text)
.map((item, index) => (
<div key={index}>{item.text}</div>
))}
</>
)}
</SuspenseInfiniteQuery>
))()
;(() => (
Expand Down
Loading

0 comments on commit ebb0389

Please sign in to comment.