Skip to content

Commit e21267d

Browse files
authored
Merge branch 'main' into fix/9643-exhaustive-deps-with-variables-and-type-assertions
2 parents 0740c7e + 8e42926 commit e21267d

File tree

28 files changed

+77
-128
lines changed

28 files changed

+77
-128
lines changed

.github/workflows/pr.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,15 @@ jobs:
7474
| Main | [![](https://deno.bundlejs.com/badge?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config={%22esbuild%22:{%22external%22:[%22react@^19.1.1/jsx-runtime?target=es2022%22,%22react@^19.1.1?target=es2022%22]}}&badge=detailed)](https://bundlejs.com/?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.1.1/jsx-runtime?target=es2022%22,%22react@%5E19.1.1?target=es2022%22%5D%7D%7D) |
7575
| This PR | [![](https://deno.bundlejs.com/badge?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config={%22esbuild%22:{%22external%22:[%22react@^19.1.1/jsx-runtime?target=es2022%22,%22react@^19.1.1?target=es2022%22]}}&badge=detailed)](https://bundlejs.com/?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.1.1/jsx-runtime?target=es2022%22,%22react@%5E19.1.1?target=es2022%22%5D%7D%7D) |
7676
continue-on-error: true
77+
provenance:
78+
name: Provenance
79+
runs-on: ubuntu-latest
80+
steps:
81+
- name: Checkout
82+
uses: actions/[email protected]
83+
with:
84+
fetch-depth: 0
85+
- name: Check Provenance
86+
uses: danielroe/[email protected]
87+
with:
88+
fail-on-downgrade: true

.github/workflows/release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@ jobs:
3838
run: pnpm run changeset:version
3939
- name: Commit version files
4040
run: |
41-
git config --global user.name 'Tanner Linsley'
42-
git config --global user.email '[email protected]' git add -A
43-
git commit -m "ci: Version Packages"
44-
git push
41+
if [[ -n "$(git status --porcelain)" ]]; then
42+
git config --global user.name 'Tanner Linsley'
43+
git config --global user.email '[email protected]'
44+
git add -A
45+
git commit -m "ci: Version Packages"
46+
git push
47+
fi
4548
env:
4649
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4750
- name: Publish Packages

docs/framework/react/devtools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function App() {
7474

7575
### Options
7676

77-
- `initialIsOpen: Boolean`
77+
- `initialIsOpen: boolean`
7878
- Set this `true` if you want the dev tools to default to being open
7979
- `buttonPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "relative"`
8080
- Defaults to `bottom-right`

docs/framework/solid/devtools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function App() {
6868

6969
### Options
7070

71-
- `initialIsOpen: Boolean`
71+
- `initialIsOpen: boolean`
7272
- Set this `true` if you want the dev tools to default to being open
7373
- `buttonPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right"`
7474
- Defaults to `bottom-right`

docs/framework/svelte/devtools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Place the following code as high in your Svelte app as you can. The closer it is
6161

6262
### Options
6363

64-
- `initialIsOpen: Boolean`
64+
- `initialIsOpen: boolean`
6565
- Set this `true` if you want the dev tools to default to being open
6666
- `buttonPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "relative"`
6767
- Defaults to `bottom-right`

docs/framework/svelte/reactivity.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ In the below example, the `refetchInterval` option is set from the variable `int
1111
<script lang="ts">
1212
import { createQuery } from '@tanstack/svelte-query'
1313
14-
const endpoint = 'http://localhost:5173/api/data'
15-
1614
let intervalMs = 1000
1715
1816
const query = createQuery({
1917
queryKey: ['refetch'],
20-
queryFn: async () => await fetch(endpoint).then((r) => r.json()),
18+
queryFn: async () => await fetch('/api/data').then((r) => r.json()),
2119
refetchInterval: intervalMs,
2220
})
2321
</script>
@@ -32,14 +30,12 @@ To solve this, we can convert `intervalMs` into a writable store. The query opti
3230
import { derived, writable } from 'svelte/store'
3331
import { createQuery } from '@tanstack/svelte-query'
3432
35-
const endpoint = 'http://localhost:5173/api/data'
36-
3733
const intervalMs = writable(1000)
3834
3935
const query = createQuery(
4036
derived(intervalMs, ($intervalMs) => ({
4137
queryKey: ['refetch'],
42-
queryFn: async () => await fetch(endpoint).then((r) => r.json()),
38+
queryFn: async () => await fetch('/api/data').then((r) => r.json()),
4339
refetchInterval: $intervalMs,
4440
})),
4541
)

docs/framework/vue/devtools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ import { VueQueryDevtools } from '@tanstack/vue-query-devtools'
6161

6262
### Options
6363

64-
- `initialIsOpen: Boolean`
64+
- `initialIsOpen: boolean`
6565
- Set this `true` if you want the dev tools to default to being open.
6666
- `buttonPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right"`
6767
- Defaults to `bottom-right`.

examples/svelte/auto-refetching/src/routes/+page.svelte

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
const client = useQueryClient()
1212
13-
const endpoint = 'http://localhost:5173/api/data'
13+
const endpoint = '/api/data'
1414
1515
$: todos = createQuery<{ items: string[] }>({
1616
queryKey: ['refetch'],
@@ -21,7 +21,9 @@
2121
2222
const addMutation = createMutation({
2323
mutationFn: (value: string) =>
24-
fetch(`${endpoint}?add=${value}`).then((r) => r.json()),
24+
fetch(`${endpoint}?add=${encodeURIComponent(value)}`).then((r) =>
25+
r.json(),
26+
),
2527
onSuccess: () => client.invalidateQueries({ queryKey: ['refetch'] }),
2628
})
2729
@@ -31,7 +33,7 @@
3133
})
3234
</script>
3335

34-
<h1>Auto Refetch with stale-time set to 1s</h1>
36+
<h1>Auto Refetch with stale-time set to {intervalMs}ms</h1>
3537

3638
<p>
3739
This example is best experienced on your own machine, where you can open

examples/svelte/auto-refetching/svelte.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
33

44
/** @type {import('@sveltejs/kit').Config} */
55
const config = {
6-
// Consult https://github.com/sveltejs/svelte-preprocess
7-
// for more information about preprocessors
86
preprocess: vitePreprocess(),
9-
107
kit: {
118
adapter: adapter(),
129
},

examples/svelte/basic/svelte.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
33

44
/** @type {import('@sveltejs/kit').Config} */
55
const config = {
6-
// Consult https://github.com/sveltejs/svelte-preprocess
7-
// for more information about preprocessors
86
preprocess: vitePreprocess(),
9-
107
kit: {
118
adapter: adapter(),
129
},

0 commit comments

Comments
 (0)