Skip to content

Commit 3dae17c

Browse files
authored
chore: fix pr pipeline (#5345)
* 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)
1 parent 77ead30 commit 3dae17c

File tree

4 files changed

+21
-35
lines changed

4 files changed

+21
-35
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
version: 7
3131
- uses: actions/setup-node@v3
3232
with:
33-
node-version: 16.19.0
33+
node-version: 18.16.0
3434
registry-url: https://registry.npmjs.org/
3535
cache: 'pnpm'
3636
- name: Install dependencies

.github/workflows/pr.yml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
version: 7
2323
- uses: actions/setup-node@v3
2424
with:
25-
node-version: 16.14.2
25+
node-version: 18.16.0
2626
cache: 'pnpm'
2727
- name: Install dependencies
2828
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
@@ -42,7 +42,7 @@ jobs:
4242
version: 7
4343
- uses: actions/setup-node@v3
4444
with:
45-
node-version: 16.19.0
45+
node-version: 18.16.0
4646
cache: 'pnpm'
4747
- name: Install dependencies
4848
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
@@ -79,25 +79,8 @@ jobs:
7979
version: 7
8080
- uses: actions/setup-node@v3
8181
with:
82-
node-version: 16.14.2
82+
node-version: 18.16.0
8383
cache: 'pnpm'
8484
- name: Install dependencies
8585
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
8686
- run: pnpm run test:format --base=${{ github.event.pull_request.base.sha }}
87-
test-build:
88-
name: 'Test Build'
89-
runs-on: ubuntu-latest
90-
steps:
91-
- uses: actions/checkout@v3
92-
- uses: pnpm/[email protected]
93-
with:
94-
version: 7
95-
- uses: actions/setup-node@v3
96-
with:
97-
node-version: 16.14.2
98-
cache: 'pnpm'
99-
- name: Install dependencies
100-
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
101-
- run: pnpm run test:build
102-
env:
103-
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.19.0
1+
v18.16.0

packages/react-query-devtools/src/__tests__/devtools.test.tsx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,20 +1089,23 @@ describe('ReactQueryDevtools', () => {
10891089
let resolvePromise: (value: unknown) => void = () => undefined
10901090

10911091
function App() {
1092-
const { data } = useQuery(['key'], () => {
1093-
count++
1094-
1095-
// Resolve the promise immediately when
1096-
// the query is fetched for the first time
1097-
if (count === 1) {
1098-
return Promise.resolve('test')
1099-
}
1092+
const { data } = useQuery({
1093+
queryKey: ['key'],
1094+
queryFn: () => {
1095+
count++
11001096

1101-
return new Promise((resolve) => {
1102-
// Do not resolve immediately and store the
1103-
// resolve function to resolve the promise later
1104-
resolvePromise = resolve
1105-
})
1097+
// Resolve the promise immediately when
1098+
// the query is fetched for the first time
1099+
if (count === 1) {
1100+
return Promise.resolve('test')
1101+
}
1102+
1103+
return new Promise((resolve) => {
1104+
// Do not resolve immediately and store the
1105+
// resolve function to resolve the promise later
1106+
resolvePromise = resolve
1107+
})
1108+
},
11061109
})
11071110

11081111
return (

0 commit comments

Comments
 (0)