Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix pr pipeline #5345

Merged
merged 4 commits into from
Apr 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 16.19.0
node-version: 18.16.0
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
- name: Install dependencies
Expand Down
23 changes: 3 additions & 20 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 16.14.2
node-version: 18.16.0
cache: 'pnpm'
- name: Install dependencies
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
Expand All @@ -42,7 +42,7 @@ jobs:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 16.19.0
node-version: 18.16.0
cache: 'pnpm'
- name: Install dependencies
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
Expand Down Expand Up @@ -79,25 +79,8 @@ jobs:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 16.14.2
node-version: 18.16.0
cache: 'pnpm'
- name: Install dependencies
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
- run: pnpm run test:format --base=${{ github.event.pull_request.base.sha }}
test-build:
name: 'Test Build'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.4
with:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 16.14.2
cache: 'pnpm'
- name: Install dependencies
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
- run: pnpm run test:build
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.19.0
v18.16.0
29 changes: 16 additions & 13 deletions packages/react-query-devtools/src/__tests__/devtools.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1089,20 +1089,23 @@ describe('ReactQueryDevtools', () => {
let resolvePromise: (value: unknown) => void = () => undefined

function App() {
const { data } = useQuery(['key'], () => {
count++

// Resolve the promise immediately when
// the query is fetched for the first time
if (count === 1) {
return Promise.resolve('test')
}
const { data } = useQuery({
queryKey: ['key'],
queryFn: () => {
count++

return new Promise((resolve) => {
// Do not resolve immediately and store the
// resolve function to resolve the promise later
resolvePromise = resolve
})
// Resolve the promise immediately when
// the query is fetched for the first time
if (count === 1) {
return Promise.resolve('test')
}

return new Promise((resolve) => {
// Do not resolve immediately and store the
// resolve function to resolve the promise later
resolvePromise = resolve
})
},
})

return (
Expand Down