Skip to content

Commit

Permalink
chore: update typescript version to 5.7.2 (#1374)
Browse files Browse the repository at this point in the history
# Overview

<!--
    A clear and concise description of what this pr is about.
 -->

This PR upgrades to the newest stable version of typescript to align
with Tanstack query's version change
(TanStack/query#8327)



## PR Checklist

- [✅] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------

Co-authored-by: Jonghyeon Ko <[email protected]>
  • Loading branch information
saul-atomrigs and manudeli authored Dec 10, 2024
1 parent e6ec403 commit 7af2803
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 7af2803

Please sign in to comment.