Skip to content

Commit

Permalink
chore: fix pr pipeline (#5345)
Browse files Browse the repository at this point in the history
* chore: remove unneeded script

* chore: fix syntax error after merging

* Empty-Commit

* chore: update to node18 to hopefully fix CI issues

see: vitest-dev/vitest#1191 (comment)
  • Loading branch information
TkDodo authored Apr 30, 2023
1 parent 77ead30 commit 3dae17c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 35 deletions.
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

0 comments on commit 3dae17c

Please sign in to comment.