Skip to content

Commit 4c024c0

Browse files
authored
Merge branch 'main' into mutationInDeps
2 parents a1a4430 + c7fb5fd commit 4c024c0

File tree

109 files changed

+529
-363
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+529
-363
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ Hooks for fetching, caching and updating asynchronous data in React, Solid, Svel
88
<img alt="#TanStack" src="https://img.shields.io/twitter/url?color=%2308a0e9&label=%23TanStack&style=social&url=https%3A%2F%2Ftwitter.com%2Fintent%2Ftweet%3Fbutton_hashtag%3DTanStack">
99
</a><a href="https://discord.com/invite/WrRKjPJ" target="\_parent">
1010
<img alt="" src="https://img.shields.io/badge/Discord-TanStack-%235865F2" />
11-
</a><a href="https://github.com/TanStack/query/actions?query=workflow%3A%22react-query+tests%22">
12-
<img src="https://github.com/TanStack/query/workflows/react-query%20tests/badge.svg" />
1311
</a><a href="https://www.npmjs.com/package/@tanstack/query-core" target="\_parent">
1412
<img alt="" src="https://img.shields.io/npm/dm/@tanstack/query-core.svg" />
1513
</a><a href="https://bundlejs.com/?q=%40tanstack%2Freact-query&config=%7B%22esbuild%22%3A%7B%22external%22%3A%5B%22react%22%2C%22react-dom%22%5D%7D%7D&badge=" target="\_parent">

docs/eslint/eslint-plugin-query.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,23 @@ The plugin is a separate package that you need to install:
1111

1212
```bash
1313
$ npm i -D @tanstack/eslint-plugin-query
14-
# or
14+
```
15+
16+
or
17+
18+
```bash
1519
$ pnpm add -D @tanstack/eslint-plugin-query
16-
# or
20+
```
21+
22+
or
23+
24+
```bash
1725
$ yarn add -D @tanstack/eslint-plugin-query
18-
# or
26+
```
27+
28+
or
29+
30+
```bash
1931
$ bun add -D @tanstack/eslint-plugin-query
2032
```
2133

docs/framework/angular/devtools.md

+16-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,23 @@ The devtools are a separate package that you need to install:
99

1010
```bash
1111
$ npm i @tanstack/angular-query-devtools-experimental
12-
# or
12+
```
13+
14+
or
15+
16+
```bash
1317
$ pnpm add @tanstack/angular-query-devtools-experimental
14-
# or
18+
```
19+
20+
or
21+
22+
```bash
1523
$ yarn add @tanstack/angular-query-devtools-experimental
16-
# or
24+
```
25+
26+
or
27+
28+
```bash
1729
$ bun add @tanstack/angular-query-devtools-experimental
1830
```
1931

@@ -62,4 +74,4 @@ import { Component } from '@angular/core';
6274
- Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.
6375
- `shadowDOMTarget?: ShadowRoot`
6476
- Default behavior will apply the devtool's styles to the head tag within the DOM.
65-
- Use this to pass a shadow DOM target to the devtools so that the styles will be applied within the shadow DOM instad of within the head tag in the light DOM.
77+
- Use this to pass a shadow DOM target to the devtools so that the styles will be applied within the shadow DOM instead of within the head tag in the light DOM.

docs/framework/angular/installation.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,23 @@ _Angular Query is compatible with Angular v16 and higher_
1111

1212
```bash
1313
npm i @tanstack/angular-query-experimental
14-
# or
14+
```
15+
16+
or
17+
18+
```bash
1519
pnpm add @tanstack/angular-query-experimental
16-
# or
20+
```
21+
22+
or
23+
24+
```bash
1725
yarn add @tanstack/angular-query-experimental
18-
# or
26+
```
27+
28+
or
29+
30+
```bash
1931
bun add @tanstack/angular-query-experimental
2032
```
2133

docs/framework/react/devtools.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,23 @@ The devtools are a separate package that you need to install:
2121

2222
```bash
2323
$ npm i @tanstack/react-query-devtools
24-
# or
24+
```
25+
26+
or
27+
28+
```bash
2529
$ pnpm add @tanstack/react-query-devtools
26-
# or
30+
```
31+
32+
or
33+
34+
```bash
2735
$ yarn add @tanstack/react-query-devtools
28-
# or
36+
```
37+
38+
or
39+
40+
```bash
2941
$ bun add @tanstack/react-query-devtools
3042
```
3143

docs/framework/react/guides/request-waterfalls.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ const [usersQuery, teamsQuery, projectsQuery] = useSuspenseQueries({
118118
{ queryKey: ['users'], queryFn: fetchUsers },
119119
{ queryKey: ['teams'], queryFn: fetchTeams },
120120
{ queryKey: ['projects'], queryFn: fetchProjects },
121-
]
122-
}
121+
],
122+
})
123123
```
124124

125125
### Nested Component Waterfalls

docs/framework/react/installation.md

+30-6
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,23 @@ or a good ol' `<script>` via
1111

1212
```bash
1313
npm i @tanstack/react-query
14-
# or
14+
```
15+
16+
or
17+
18+
```bash
1519
pnpm add @tanstack/react-query
16-
# or
20+
```
21+
22+
or
23+
24+
```bash
1725
yarn add @tanstack/react-query
18-
# or
26+
```
27+
28+
or
29+
30+
```bash
1931
bun add @tanstack/react-query
2032
```
2133

@@ -58,10 +70,22 @@ It is recommended to also use our [ESLint Plugin Query](../../../eslint/eslint-p
5870

5971
```bash
6072
npm i -D @tanstack/eslint-plugin-query
61-
# or
73+
```
74+
75+
or
76+
77+
```bash
6278
pnpm add -D @tanstack/eslint-plugin-query
63-
# or
79+
```
80+
81+
or
82+
83+
```bash
6484
yarn add -D @tanstack/eslint-plugin-query
65-
# or
85+
```
86+
87+
or
88+
89+
```bash
6690
bun add -D @tanstack/eslint-plugin-query
6791
```

docs/framework/solid/devtools.md

+16-4
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,23 @@ The devtools are a separate package that you need to install:
1313

1414
```bash
1515
$ npm i @tanstack/solid-query-devtools
16-
# or
16+
```
17+
18+
or
19+
20+
```bash
1721
$ pnpm add @tanstack/solid-query-devtools
18-
# or
22+
```
23+
24+
or
25+
26+
```bash
1927
$ yarn add @tanstack/solid-query-devtools
20-
# or
28+
```
29+
30+
or
31+
32+
```bash
2133
$ bun add @tanstack/solid-query-devtools
2234
```
2335

@@ -66,4 +78,4 @@ function App() {
6678
- Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.
6779
- `shadowDOMTarget?: ShadowRoot`
6880
- Default behavior will apply the devtool's styles to the head tag within the DOM.
69-
- Use this to pass a shadow DOM target to the devtools so that the styles will be applied within the shadow DOM instad of within the head tag in the light DOM.
81+
- Use this to pass a shadow DOM target to the devtools so that the styles will be applied within the shadow DOM instead of within the head tag in the light DOM.

docs/framework/solid/installation.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,23 @@ or a good ol' `<script>` via
1111

1212
```bash
1313
npm i @tanstack/solid-query
14-
# or
14+
```
15+
16+
or
17+
18+
```bash
1519
pnpm add @tanstack/solid-query
16-
# or
20+
```
21+
22+
or
23+
24+
```bash
1725
yarn add @tanstack/solid-query
18-
# or
26+
```
27+
28+
or
29+
30+
```bash
1931
bun add @tanstack/solid-query
2032
```
2133

docs/framework/svelte/installation.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,23 @@ You can install Svelte Query via [NPM](https://npmjs.com).
1111

1212
```bash
1313
npm i @tanstack/svelte-query
14-
# or
14+
```
15+
16+
or
17+
18+
```bash
1519
pnpm add @tanstack/svelte-query
16-
# or
20+
```
21+
22+
or
23+
24+
```bash
1725
yarn add @tanstack/svelte-query
18-
# or
26+
```
27+
28+
or
29+
30+
```bash
1931
bun add @tanstack/svelte-query
2032
```
2133

docs/framework/svelte/reactivity.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: reactivity
33
title: Reactivity
44
---
55

6-
Svelte uses a compiler to build your code which optimises rendering. By default, components run once, unless they are referenced in your markup. To be able to react to changes in options you need to use [stores](https://svelte.dev/docs/svelte-store).
6+
Svelte uses a compiler to build your code which optimizes rendering. By default, components run once, unless they are referenced in your markup. To be able to react to changes in options you need to use [stores](https://svelte.dev/docs/svelte-store).
77

88
In the below example, the `refetchInterval` option is set from the variable `intervalMs`, which is bound to the input field. However, as the query is not able to react to changes in `intervalMs`, `refetchInterval` will not change when the input value changes.
99

docs/framework/vue/devtools.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,23 @@ The devtools component is a separate package that you need to install:
1616

1717
```bash
1818
$ npm i @tanstack/vue-query-devtools
19-
# or
19+
```
20+
21+
or
22+
23+
```bash
2024
$ pnpm add @tanstack/vue-query-devtools
21-
# or
25+
```
26+
27+
or
28+
29+
```bash
2230
$ yarn add @tanstack/vue-query-devtools
23-
# or
31+
```
32+
33+
or
34+
35+
```bash
2436
$ bun add @tanstack/vue-query-devtools
2537
```
2638

docs/framework/vue/installation.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,23 @@ You can install Vue Query via [NPM](https://npmjs.com).
99

1010
```bash
1111
npm i @tanstack/vue-query
12-
# or
12+
```
13+
14+
or
15+
16+
```bash
1317
pnpm add @tanstack/vue-query
14-
# or
18+
```
19+
20+
or
21+
22+
```bash
1523
yarn add @tanstack/vue-query
16-
# or
24+
```
25+
26+
or
27+
28+
```bash
1729
bun add @tanstack/vue-query
1830
```
1931

eslint.config.js

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// @ts-ignore Needed due to moduleResolution Node vs Bundler
44
import { tanstackConfig } from '@tanstack/config/eslint'
55
import pluginCspell from '@cspell/eslint-plugin'
6+
import vitest from '@vitest/eslint-plugin'
67

78
export default [
89
...tanstackConfig,
@@ -40,4 +41,13 @@ export default [
4041
'no-case-declarations': 'off',
4142
},
4243
},
44+
{
45+
files: ['**/*.spec.ts*', '**/*.test.ts*', '**/*.test-d.ts*'],
46+
plugins: { vitest },
47+
rules: {
48+
...vitest.configs.recommended.rules,
49+
'vitest/expect-expect': 'warn',
50+
},
51+
settings: { vitest: { typecheck: true } },
52+
},
4353
]

examples/angular/basic/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@angular/core": "^17.3.12",
1515
"@angular/platform-browser": "^17.3.12",
1616
"@angular/platform-browser-dynamic": "^17.3.12",
17-
"@tanstack/angular-query-experimental": "^5.51.22",
17+
"@tanstack/angular-query-experimental": "^5.51.24",
1818
"rxjs": "^7.8.1",
1919
"tslib": "^2.6.3",
2020
"zone.js": "^0.14.8"
@@ -23,7 +23,7 @@
2323
"@angular-devkit/build-angular": "^17.3.8",
2424
"@angular/cli": "^17.3.8",
2525
"@angular/compiler-cli": "^17.3.12",
26-
"@tanstack/angular-query-devtools-experimental": "^5.51.22",
26+
"@tanstack/angular-query-devtools-experimental": "^5.51.24",
2727
"typescript": "5.3.3"
2828
}
2929
}

examples/angular/infinite-query-with-max-pages/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@angular/core": "^17.3.12",
1515
"@angular/platform-browser": "^17.3.12",
1616
"@angular/platform-browser-dynamic": "^17.3.12",
17-
"@tanstack/angular-query-experimental": "^5.51.22",
17+
"@tanstack/angular-query-experimental": "^5.51.24",
1818
"rxjs": "^7.8.1",
1919
"tslib": "^2.6.3",
2020
"zone.js": "^0.14.8"
@@ -23,7 +23,7 @@
2323
"@angular-devkit/build-angular": "^17.3.8",
2424
"@angular/cli": "^17.3.8",
2525
"@angular/compiler-cli": "^17.3.12",
26-
"@tanstack/angular-query-devtools-experimental": "^5.51.22",
26+
"@tanstack/angular-query-devtools-experimental": "^5.51.24",
2727
"typescript": "5.3.3"
2828
}
2929
}

0 commit comments

Comments
 (0)