Skip to content

Commit 67cf8b6

Browse files
ref: ts cutoff (#10253)
* ref: update typescript versions * check for tsgo * drop 5.2 and 5.3 * docs * ref: fix tsup config * ref: use built-in NoInfer * ci: apply automated fixes * fix tsup config * Revert "ref: use built-in NoInfer" This reverts commit 45d428c. # Conflicts: # packages/preact-query/src/useQuery.ts * ref: remove tsgo for now * fix builds * fix: update svelte-check * fix: svelte-check still needs ts 5.9 * fix: knip + ts rewrite * ci: apply automated fixes * fix: make ts 5.9 the tscurrent version * fix custom conditions * fix: coderabbit comments * fix: lockfile * revert docs * fix: override eslint to 8.56.1 --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent fe25edc commit 67cf8b6

File tree

40 files changed

+530
-498
lines changed

40 files changed

+530
-498
lines changed

.github/renovate.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@
2525
"react-dom",
2626
"tsup",
2727
"typescript",
28-
"typescript50",
29-
"typescript51",
30-
"typescript52",
31-
"typescript53",
3228
"typescript54",
3329
"typescript55",
3430
"typescript56",
3531
"typescript57",
32+
"typescript58",
33+
"typescript59",
34+
"typescript60",
3635
"vue",
3736
"vue-tsc",
3837
"vue2",

docs/framework/react/typescript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ React Query is now written in **TypeScript** to make sure the library and your p
77

88
Things to keep in mind:
99

10-
- Types currently require using TypeScript **v4.7** or greater
10+
- TanStack Query follows [DefinitelyTyped's support window](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window) and supports TypeScript versions released within the last 2 years. At the moment, that means TypeScript **5.4** and newer.
1111
- Changes to types in this repository are considered **non-breaking** and are usually released as **patch** semver changes (otherwise every type enhancement would be a major version!).
1212
- It is **highly recommended that you lock your react-query package version to a specific patch release and upgrade with the expectation that types may be fixed or upgraded between any release**
1313
- The non-type-related public API of React Query still follows semver very strictly.

docs/framework/solid/typescript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Solid Query is written in **TypeScript** to make sure the library and your proje
77

88
Things to keep in mind:
99

10-
- Types currently require using TypeScript **v4.7** or greater
10+
- TanStack Query follows [DefinitelyTyped's support window](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window) and supports TypeScript versions released within the last 2 years. At the moment, that means TypeScript **5.4** and newer.
1111
- Changes to types in this repository are considered **non-breaking** and are usually released as **patch** semver changes (otherwise every type enhancement would be a major version!).
1212
- It is **highly recommended that you lock your solid-query package version to a specific patch release and upgrade with the expectation that types may be fixed or upgraded between any release**
1313
- The non-type-related public API of Solid Query still follows semver very strictly.

package.json

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,14 @@
7272
"size-limit": "^12.0.0",
7373
"tinyglobby": "^0.2.15",
7474
"tsup": "^8.4.0",
75-
"typescript": "5.8.3",
76-
"typescript50": "npm:typescript@5.0",
77-
"typescript51": "npm:typescript@5.1",
78-
"typescript52": "npm:typescript@5.2",
79-
"typescript53": "npm:typescript@5.3",
75+
"typescript": "5.9.3",
8076
"typescript54": "npm:typescript@5.4",
8177
"typescript55": "npm:typescript@5.5",
8278
"typescript56": "npm:typescript@5.6",
8379
"typescript57": "npm:typescript@5.7",
80+
"typescript58": "npm:typescript@5.8",
81+
"typescript59": "npm:typescript@5.9",
82+
"typescript60": "npm:typescript@6.0.1-rc",
8483
"vite": "^6.4.1",
8584
"vitest": "^4.0.18"
8685
},
@@ -89,6 +88,18 @@
8988
"@types/react": "^19.2.7",
9089
"@types/react-dom": "^19.2.3",
9190
"@types/node": "^22.15.3",
91+
"@typescript-eslint/eslint-plugin": "8.56.1",
92+
"@typescript-eslint/parser": "8.56.1",
93+
"@typescript-eslint/project-service": "8.56.1",
94+
"@typescript-eslint/rule-tester": "8.56.1",
95+
"@typescript-eslint/scope-manager": "8.56.1",
96+
"@typescript-eslint/tsconfig-utils": "8.56.1",
97+
"@typescript-eslint/type-utils": "8.56.1",
98+
"@typescript-eslint/types": "8.56.1",
99+
"@typescript-eslint/typescript-estree": "8.56.1",
100+
"@typescript-eslint/utils": "8.56.1",
101+
"@typescript-eslint/visitor-keys": "8.56.1",
102+
"typescript-eslint": "8.56.1",
92103
"vite": "^6.4.1",
93104
"esbuild": "^0.27.2"
94105
}

packages/angular-query-experimental/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,14 @@
3131
"compile": "tsc --build",
3232
"test:eslint": "eslint --concurrency=auto ./src",
3333
"test:types": "npm-run-all --serial test:types:*",
34-
"test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js --build",
35-
"test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js --build",
36-
"test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js --build",
37-
"test:types:ts53": "node ../../node_modules/typescript53/lib/tsc.js --build",
3834
"test:types:ts54": "node ../../node_modules/typescript54/lib/tsc.js --build",
3935
"test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js --build",
4036
"test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js --build",
4137
"test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js --build",
38+
"test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js --build",
39+
"test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js --build",
4240
"test:types:tscurrent": "tsc --build",
41+
"test:types:ts60": "node ../../node_modules/typescript60/lib/tsc.js --build",
4342
"test:lib": "vitest",
4443
"test:lib:dev": "pnpm run test:lib --watch",
4544
"test:build": "pnpm pack && publint ./dist/*.tgz --strict && attw ./dist/*.tgz; premove ./dist/*.tgz",

packages/angular-query-experimental/tsup.config.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

packages/angular-query-persist-client/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@
2020
"compile": "tsc --build",
2121
"test:eslint": "eslint --concurrency=auto ./src",
2222
"test:types": "npm-run-all --serial test:types:*",
23-
"test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js --build",
24-
"test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js --build",
25-
"test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js --build",
26-
"test:types:ts53": "node ../../node_modules/typescript53/lib/tsc.js --build",
2723
"test:types:ts54": "node ../../node_modules/typescript54/lib/tsc.js --build",
2824
"test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js --build",
2925
"test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js --build",
3026
"test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js --build",
27+
"test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js --build",
28+
"test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js --build",
3129
"test:types:tscurrent": "tsc --build",
30+
"test:types:ts60": "node ../../node_modules/typescript60/lib/tsc.js --build",
3231
"test:lib": "vitest",
3332
"test:lib:dev": "pnpm run test:lib --watch",
3433
"test:build": "publint --strict && attw --pack",

packages/angular-query-persist-client/tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default defineConfig({
55
sourcemap: true,
66
clean: true,
77
format: ['esm'],
8-
dts: true,
8+
experimentalDts: true,
99
outDir: 'build',
1010
outExtension({ format }) {
1111
return format === 'esm' ? { js: '.mjs' } : { js: '.js' }

packages/eslint-plugin-query/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@
1919
"compile": "tsc --build",
2020
"test:eslint": "eslint --concurrency=auto ./src",
2121
"test:types": "npm-run-all --serial test:types:*",
22-
"test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js --build",
23-
"test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js --build",
24-
"test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js --build",
25-
"test:types:ts53": "node ../../node_modules/typescript53/lib/tsc.js --build",
2622
"test:types:ts54": "node ../../node_modules/typescript54/lib/tsc.js --build",
2723
"test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js --build",
2824
"test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js --build",
2925
"test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js --build",
26+
"test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js --build",
27+
"test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js --build",
3028
"test:types:tscurrent": "tsc --build",
29+
"test:types:ts60": "node ../../node_modules/typescript60/lib/tsc.js --build",
3130
"test:lib": "vitest",
3231
"test:lib:dev": "pnpm run test:lib --watch",
3332
"test:build": "publint --strict && attw --pack",
@@ -70,7 +69,7 @@
7069
},
7170
"peerDependencies": {
7271
"eslint": "^8.57.0 || ^9.0.0",
73-
"typescript": "^5.0.0"
72+
"typescript": "^5.4.0"
7473
},
7574
"peerDependenciesMeta": {
7675
"typescript": {

packages/eslint-plugin-query/root.tsup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function modernConfig(opts) {
1111
format: ['cjs', 'esm'],
1212
target: ['chrome91', 'firefox90', 'edge91', 'safari15', 'ios15', 'opera77'],
1313
outDir: 'build/modern',
14-
dts: true,
14+
experimentalDts: true,
1515
sourcemap: true,
1616
clean: true,
1717
external: ['typescript'],
@@ -38,7 +38,7 @@ export function legacyConfig(opts) {
3838
format: ['cjs', 'esm'],
3939
target: ['es2020', 'node16'],
4040
outDir: 'build/legacy',
41-
dts: true,
41+
experimentalDts: true,
4242
sourcemap: true,
4343
clean: true,
4444
external: ['typescript'],

0 commit comments

Comments
 (0)