Skip to content

Commit 05e18d3

Browse files
authored
Merge branch 'main' into use-query-state
2 parents 7bf9b4e + c190f68 commit 05e18d3

File tree

272 files changed

+1713
-1933
lines changed

Some content is hidden

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

272 files changed

+1713
-1933
lines changed

.eslintrc.cjs

+35
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const config = {
66
parser: '@typescript-eslint/parser',
77
plugins: ['@typescript-eslint', 'import'],
88
extends: [
9+
'plugin:@cspell/recommended',
910
'plugin:@typescript-eslint/eslint-recommended',
1011
'plugin:@typescript-eslint/recommended',
1112
'plugin:import/recommended',
@@ -34,6 +35,27 @@ const config = {
3435
},
3536
},
3637
rules: {
38+
'@cspell/spellchecker': [
39+
'error',
40+
{
41+
cspell: {
42+
words: [
43+
'tanstack', // Our package scope
44+
'tsqd', // Our public interface (TanStack Query Devtools shorthand)
45+
'retryer', // Our public interface
46+
'Promisable', // Our public interface
47+
'extralight', // Our public interface
48+
'codemod', // We support our codemod
49+
50+
'TSES', // @typescript-eslint package's interface
51+
'tsup', // We use tsup as builder
52+
'solidjs', // Our target framework
53+
'tabular-nums', // https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric
54+
'todos', // Too general word to be caught as error
55+
],
56+
},
57+
},
58+
],
3759
'@typescript-eslint/array-type': [
3860
'error',
3961
{ default: 'generic', readonly: 'generic' },
@@ -45,6 +67,19 @@ const config = {
4567
{ prefer: 'type-imports' },
4668
],
4769
'@typescript-eslint/explicit-module-boundary-types': 'off',
70+
'@typescript-eslint/naming-convention': [
71+
'error',
72+
{
73+
selector: 'typeParameter',
74+
format: ['PascalCase'],
75+
leadingUnderscore: 'forbid',
76+
trailingUnderscore: 'forbid',
77+
custom: {
78+
regex: '^(T|T[A-Z][A-Za-z]+)$',
79+
match: true,
80+
},
81+
},
82+
],
4883
'@typescript-eslint/no-empty-interface': 'off',
4984
'@typescript-eslint/no-explicit-any': 'off',
5085
'@typescript-eslint/no-non-null-assertion': 'off',

.github/workflows/ci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ concurrency:
1515

1616
env:
1717
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
18-
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
1918

2019
jobs:
2120
test-and-publish:

.github/workflows/pr.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
env:
15+
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
1516
NX_CLOUD_DISTRIBUTED_EXECUTION: true
1617
NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT: 3
17-
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
18-
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
19-
NX_VERBOSE_LOGGING: true
2018

2119
jobs:
2220
main:

docs/framework/angular/quick-start.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@ If you're looking for a fully functioning example, please have a look at our [ba
1212
### Provide the client to your App
1313

1414
```ts
15+
import { provideHttpClient } from '@angular/common/http'
16+
import {
17+
provideAngularQuery,
18+
QueryClient,
19+
} from '@tanstack/angular-query-experimental'
20+
1521
bootstrapApplication(AppComponent, {
16-
providers: [provideAngularQuery(new QueryClient())],
22+
providers: [provideHttpClient(), provideAngularQuery(new QueryClient())],
1723
})
1824
```
1925

@@ -45,6 +51,7 @@ import {
4551
`,
4652
})
4753
export class TodosComponent {
54+
todoService = inject(TodoService)
4855
queryClient = injectQueryClient()
4956

5057
query = injectQuery(() => ({

examples/angular/basic/package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33
"private": true,
44
"type": "module",
55
"scripts": {
6-
"start": "vite",
76
"dev": "vite",
87
"build": "vite build",
9-
"serve": "vite preview"
8+
"preview": "vite preview",
9+
"test:types": "tsc"
1010
},
11-
"license": "MIT",
1211
"dependencies": {
1312
"@angular/common": "^17.0.8",
1413
"@angular/compiler": "^17.0.8",
1514
"@angular/core": "^17.0.8",
1615
"@angular/platform-browser": "^17.0.8",
17-
"@tanstack/angular-query-devtools-experimental": "^5.13.3",
18-
"@tanstack/angular-query-experimental": "^5.13.4",
16+
"@tanstack/angular-query-devtools-experimental": "^5.18.1",
17+
"@tanstack/angular-query-experimental": "^5.18.1",
1918
"rxjs": "^7.8.1",
2019
"zone.js": "^0.14.2"
2120
},

integrations/angular-cli-standalone-17/package.json renamed to examples/angular/cli-standalone-17/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"name": "angular-cli-standalone-17",
3-
"version": "0.0.0",
2+
"name": "@tanstack/query-example-angular-cli-standalone-17",
3+
"private": true,
44
"scripts": {
5-
"build": "ng build"
5+
"build": "ng build",
6+
"test:types": "tsc"
67
},
7-
"private": true,
88
"dependencies": {
99
"@angular/animations": "^17.0.8",
1010
"@angular/common": "^17.0.8",

examples/angular/default-query-function/package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33
"private": true,
44
"type": "module",
55
"scripts": {
6-
"start": "vite",
76
"dev": "vite",
87
"build": "vite build",
9-
"serve": "vite preview"
8+
"preview": "vite preview",
9+
"test:types": "tsc"
1010
},
11-
"license": "MIT",
1211
"dependencies": {
1312
"@angular/common": "^17.0.8",
1413
"@angular/compiler": "^17.0.8",
1514
"@angular/core": "^17.0.8",
1615
"@angular/platform-browser": "^17.0.8",
17-
"@tanstack/angular-query-devtools-experimental": "^5.13.3",
18-
"@tanstack/angular-query-experimental": "^5.13.4",
16+
"@tanstack/angular-query-devtools-experimental": "^5.18.1",
17+
"@tanstack/angular-query-experimental": "^5.18.1",
1918
"axios": "^1.6.2",
2019
"rxjs": "^7.8.1",
2120
"zone.js": "^0.14.2"

examples/angular/simple/package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33
"private": true,
44
"type": "module",
55
"scripts": {
6-
"start": "vite",
76
"dev": "vite",
87
"build": "vite build",
9-
"serve": "vite preview"
8+
"preview": "vite preview",
9+
"test:types": "tsc"
1010
},
11-
"license": "MIT",
1211
"dependencies": {
1312
"@angular/common": "^17.0.8",
1413
"@angular/compiler": "^17.0.8",
1514
"@angular/core": "^17.0.8",
1615
"@angular/platform-browser": "^17.0.8",
17-
"@tanstack/angular-query-devtools-experimental": "^5.13.3",
18-
"@tanstack/angular-query-experimental": "^5.13.4",
16+
"@tanstack/angular-query-devtools-experimental": "^5.18.1",
17+
"@tanstack/angular-query-experimental": "^5.18.1",
1918
"rxjs": "^7.8.1",
2019
"zone.js": "^0.14.2"
2120
},

examples/react/algolia/package.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
{
22
"name": "@tanstack/query-example-react-algolia",
33
"private": true,
4-
"main": "src/index.tsx",
4+
"type": "module",
55
"scripts": {
66
"dev": "vite",
7-
"build": "tsc && vite build",
8-
"preview": "vite preview"
7+
"build": "vite build",
8+
"preview": "vite preview",
9+
"test:types": "tsc"
910
},
1011
"dependencies": {
1112
"@algolia/client-search": "4.22.0",
1213
"@algolia/transporter": "4.22.0",
13-
"@tanstack/react-query": "^5.0.0",
14-
"@tanstack/react-query-devtools": "^5.0.0",
14+
"@tanstack/react-query": "^5.18.1",
15+
"@tanstack/react-query-devtools": "^5.18.1",
1516
"algoliasearch": "4.22.0",
1617
"react": "^18.2.0",
1718
"react-dom": "^18.2.0"
1819
},
1920
"devDependencies": {
20-
"@tanstack/eslint-plugin-query": "^5.0.0",
21+
"@tanstack/eslint-plugin-query": "^5.18.1",
2122
"@types/react": "^18.2.45",
2223
"@types/react-dom": "^18.2.18",
2324
"@vitejs/plugin-react": "^4.2.1",

examples/react/algolia/tsconfig.json

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
{
22
"compilerOptions": {
33
"target": "ES2020",
4-
"lib": ["dom", "dom.iterable", "esnext"],
5-
"allowJs": true,
4+
"useDefineForClassFields": true,
5+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
6+
"module": "ESNext",
67
"skipLibCheck": true,
7-
"esModuleInterop": true,
8-
"allowSyntheticDefaultImports": true,
9-
"strict": true,
10-
"forceConsistentCasingInFileNames": true,
11-
"noFallthroughCasesInSwitch": true,
12-
"module": "esnext",
13-
"moduleResolution": "node",
8+
9+
/* Bundler mode */
10+
"moduleResolution": "bundler",
11+
"allowImportingTsExtensions": true,
1412
"resolveJsonModule": true,
1513
"isolatedModules": true,
1614
"noEmit": true,
17-
"jsx": "react-jsx"
15+
"jsx": "react-jsx",
16+
17+
/* Linting */
18+
"strict": true,
19+
"noUnusedLocals": true,
20+
"noUnusedParameters": true,
21+
"noFallthroughCasesInSwitch": true
1822
},
1923
"include": ["src"]
2024
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
eslint: {
3+
ignoreDuringBuilds: true,
4+
},
5+
}
+8-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
{
2-
"name": "@tanstack/query-example-react-refetch-interval",
2+
"name": "@tanstack/query-example-react-auto-refetching",
33
"private": true,
4-
"main": "index.js",
5-
"license": "MIT",
4+
"scripts": {
5+
"dev": "next",
6+
"build": "next build",
7+
"start": "next start"
8+
},
69
"dependencies": {
7-
"@tanstack/react-query": "^5.0.0",
8-
"@tanstack/react-query-devtools": "^5.0.0",
10+
"@tanstack/react-query": "^5.18.1",
11+
"@tanstack/react-query-devtools": "^5.18.1",
912
"axios": "^1.6.2",
1013
"isomorphic-unfetch": "4.0.2",
1114
"next": "^14.0.0",
1215
"react": "^18.2.0",
1316
"react-dom": "^18.2.0"
14-
},
15-
"scripts": {
16-
"dev": "next",
17-
"start": "next start",
18-
"build": "next build"
1917
}
2018
}

examples/react/basic-graphql-request/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "@tanstack/query-example-react-basic-graphql-request",
33
"private": true,
4-
"main": "src/index.jsx",
4+
"type": "module",
55
"scripts": {
66
"dev": "vite",
77
"build": "vite build",
88
"preview": "vite preview"
99
},
1010
"dependencies": {
11-
"@tanstack/react-query": "^5.0.0",
12-
"@tanstack/react-query-devtools": "^5.0.0",
11+
"@tanstack/react-query": "^5.18.1",
12+
"@tanstack/react-query-devtools": "^5.18.1",
1313
"graphql": "^16.8.1",
1414
"graphql-request": "^6.1.0",
1515
"react": "^18.2.0",

examples/react/basic-typescript/package.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
{
22
"name": "@tanstack/query-example-react-basic-typescript",
33
"private": true,
4-
"main": "src/index.tsx",
4+
"type": "module",
55
"scripts": {
66
"dev": "vite",
7-
"build": "tsc && vite build",
8-
"preview": "vite preview"
7+
"build": "vite build",
8+
"preview": "vite preview",
9+
"test:types": "tsc"
910
},
1011
"dependencies": {
11-
"@tanstack/query-sync-storage-persister": "^5.0.0",
12-
"@tanstack/react-query": "^5.0.0",
13-
"@tanstack/react-query-devtools": "^5.0.0",
14-
"@tanstack/react-query-persist-client": "^5.0.0",
12+
"@tanstack/query-sync-storage-persister": "^5.18.1",
13+
"@tanstack/react-query": "^5.18.1",
14+
"@tanstack/react-query-devtools": "^5.18.1",
15+
"@tanstack/react-query-persist-client": "^5.18.1",
1516
"axios": "^1.6.2",
1617
"react": "^18.2.0",
1718
"react-dom": "^18.2.0"
1819
},
1920
"devDependencies": {
20-
"@tanstack/eslint-plugin-query": "^5.0.0",
21+
"@tanstack/eslint-plugin-query": "^5.18.1",
2122
"@types/react": "^18.2.45",
2223
"@types/react-dom": "^18.2.18",
2324
"@vitejs/plugin-react": "^4.2.1",
+14-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
{
22
"compilerOptions": {
33
"target": "ES2020",
4-
"lib": ["dom", "dom.iterable", "esnext"],
5-
"allowJs": true,
4+
"useDefineForClassFields": true,
5+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
6+
"module": "ESNext",
67
"skipLibCheck": true,
7-
"esModuleInterop": true,
8-
"allowSyntheticDefaultImports": true,
9-
"strict": true,
10-
"forceConsistentCasingInFileNames": true,
11-
"noFallthroughCasesInSwitch": true,
12-
"module": "esnext",
13-
"moduleResolution": "node",
8+
9+
/* Bundler mode */
10+
"moduleResolution": "bundler",
11+
"allowImportingTsExtensions": true,
1412
"resolveJsonModule": true,
1513
"isolatedModules": true,
1614
"noEmit": true,
17-
"jsx": "react-jsx"
15+
"jsx": "react-jsx",
16+
17+
/* Linting */
18+
"strict": true,
19+
"noUnusedLocals": true,
20+
"noUnusedParameters": true,
21+
"noFallthroughCasesInSwitch": true
1822
},
1923
"include": ["src"]
2024
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { defineConfig } from 'vite'
22
import react from '@vitejs/plugin-react'
33

4-
// https://vitejs.dev/config/
54
export default defineConfig({
65
plugins: [react()],
76
})

0 commit comments

Comments
 (0)