@tanstack/react-query 5.64.2 → 5.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/query-codemods/eslint.config.js +1 -1
- package/build/query-codemods/package.json +1 -0
- package/build/query-codemods/root.eslint.config.js +54 -0
- package/build/query-codemods/root.vite.config.js +17 -0
- package/build/query-codemods/tsconfig.json +4 -1
- package/build/query-codemods/vite.config.ts +7 -0
- package/package.json +4 -3
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
// @ts-ignore Needed due to moduleResolution Node vs Bundler
|
|
4
|
+
import { tanstackConfig } from '@tanstack/config/eslint'
|
|
5
|
+
import pluginCspell from '@cspell/eslint-plugin'
|
|
6
|
+
import vitest from '@vitest/eslint-plugin'
|
|
7
|
+
|
|
8
|
+
export default [
|
|
9
|
+
...tanstackConfig,
|
|
10
|
+
{
|
|
11
|
+
name: 'tanstack/temp',
|
|
12
|
+
plugins: {
|
|
13
|
+
cspell: pluginCspell,
|
|
14
|
+
},
|
|
15
|
+
rules: {
|
|
16
|
+
'cspell/spellchecker': [
|
|
17
|
+
'warn',
|
|
18
|
+
{
|
|
19
|
+
cspell: {
|
|
20
|
+
words: [
|
|
21
|
+
'codemod', // We support our codemod
|
|
22
|
+
'combinate', // Library name
|
|
23
|
+
'extralight', // Our public interface
|
|
24
|
+
'jscodeshift',
|
|
25
|
+
'Promisable', // Our public interface
|
|
26
|
+
'retryer', // Our public interface
|
|
27
|
+
'solidjs', // Our target framework
|
|
28
|
+
'tabular-nums', // https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric
|
|
29
|
+
'tanstack', // Our package scope
|
|
30
|
+
'todos', // Too general word to be caught as error
|
|
31
|
+
'TSES', // @typescript-eslint package's interface
|
|
32
|
+
'tsqd', // Our public interface (TanStack Query Devtools shorthand)
|
|
33
|
+
'tsup', // We use tsup as builder
|
|
34
|
+
'typecheck', // Field of vite.config.ts
|
|
35
|
+
'vue-demi', // dependency of @tanstack/vue-query
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
41
|
+
'@typescript-eslint/no-unsafe-function-type': 'off',
|
|
42
|
+
'no-case-declarations': 'off',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
files: ['**/*.spec.ts*', '**/*.test.ts*', '**/*.test-d.ts*'],
|
|
47
|
+
plugins: { vitest },
|
|
48
|
+
rules: {
|
|
49
|
+
...vitest.configs.recommended.rules,
|
|
50
|
+
'vitest/expect-expect': 'warn',
|
|
51
|
+
},
|
|
52
|
+
settings: { vitest: { typecheck: true } },
|
|
53
|
+
},
|
|
54
|
+
]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
import ts from 'typescript'
|
|
5
|
+
|
|
6
|
+
const tsconfig = ts.readConfigFile(
|
|
7
|
+
path.resolve(__dirname, '..', 'tsconfig.json'),
|
|
8
|
+
ts.sys.readFile,
|
|
9
|
+
).config
|
|
10
|
+
|
|
11
|
+
export const dynamicAliases = Object.entries(
|
|
12
|
+
tsconfig.compilerOptions.paths || {},
|
|
13
|
+
).reduce((aliases, [key, [value]]) => {
|
|
14
|
+
const aliasKey = key.replace('/*', '')
|
|
15
|
+
aliases[aliasKey] = path.resolve(value.replace('/*', ''))
|
|
16
|
+
return aliases
|
|
17
|
+
}, /** @type {Record<string, string>} */ ({}))
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "../../tsconfig.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
+
"outDir": "./dist-ts",
|
|
5
|
+
"rootDir": ".",
|
|
6
|
+
"baseUrl": ".",
|
|
4
7
|
"moduleResolution": "Bundler"
|
|
5
8
|
},
|
|
6
|
-
"include": ["src", "
|
|
9
|
+
"include": ["src", "*.config.js", "*.config.ts", "package.json"]
|
|
7
10
|
}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { defineConfig } from 'vitest/config'
|
|
2
|
+
import tsconfigPaths from 'vite-tsconfig-paths'
|
|
3
|
+
|
|
4
|
+
import { dynamicAliases } from './root.vite.config'
|
|
2
5
|
import packageJson from './package.json'
|
|
3
6
|
|
|
4
7
|
export default defineConfig({
|
|
8
|
+
plugins: [tsconfigPaths({ ignoreConfigErrors: true })],
|
|
9
|
+
resolve: {
|
|
10
|
+
alias: dynamicAliases,
|
|
11
|
+
},
|
|
5
12
|
test: {
|
|
6
13
|
name: packageJson.name,
|
|
7
14
|
dir: './src',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/react-query",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.65.0",
|
|
4
4
|
"description": "Hooks for managing, caching and syncing asynchronous and remote data in React",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"!build/codemods/**/__tests__"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@tanstack/query-core": "5.
|
|
46
|
+
"@tanstack/query-core": "5.65.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@testing-library/react": "^16.1.0",
|
|
@@ -52,10 +52,11 @@
|
|
|
52
52
|
"@types/react-dom": "^19.0.2",
|
|
53
53
|
"@vitejs/plugin-react": "^4.3.3",
|
|
54
54
|
"eslint-plugin-react-compiler": "19.0.0-beta-df7b47d-20241124",
|
|
55
|
+
"npm-run-all": "^4.1.5",
|
|
55
56
|
"react": "^19.0.0",
|
|
56
57
|
"react-dom": "^19.0.0",
|
|
57
58
|
"react-error-boundary": "^4.1.2",
|
|
58
|
-
"@tanstack/query-persist-client-core": "5.
|
|
59
|
+
"@tanstack/query-persist-client-core": "5.65.0"
|
|
59
60
|
},
|
|
60
61
|
"peerDependencies": {
|
|
61
62
|
"react": "^18 || ^19"
|