From 8253a80b6f4922e602652edf43e68a2dcfc9a7c1 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Mon, 24 Jun 2024 06:51:03 +1000 Subject: [PATCH] ci: Add TS version tests (#7605) * Simplify implementation * Add to remaining packages --- package.json | 3 ++ .../package.json | 5 +++- .../tsconfig.build.json | 2 +- .../tsconfig.json | 13 +------- .../angular-query-experimental/package.json | 6 +++- .../tsconfig.build.json | 2 +- .../angular-query-experimental/tsconfig.json | 12 +------- packages/eslint-plugin-query/package.json | 6 +++- packages/eslint-plugin-query/tsconfig.json | 2 +- .../package.json | 6 +++- .../tsconfig.json | 8 +---- .../package.json | 6 +++- .../tsconfig.json | 2 +- packages/query-codemods/tsconfig.json | 2 +- packages/query-core/package.json | 6 +++- packages/query-core/tsconfig.json | 8 +---- packages/query-core/tsconfig.legacy.json | 8 +++++ packages/query-devtools/package.json | 6 +++- packages/query-devtools/tsconfig.json | 8 +---- .../query-persist-client-core/package.json | 6 +++- .../query-persist-client-core/tsconfig.json | 8 +---- .../query-sync-storage-persister/package.json | 6 +++- .../tsconfig.json | 8 +---- packages/react-query-devtools/package.json | 6 +++- packages/react-query-devtools/tsconfig.json | 3 +- .../package.json | 6 +++- .../tsconfig.json | 8 +---- .../react-query-persist-client/package.json | 6 +++- .../react-query-persist-client/tsconfig.json | 3 +- packages/react-query/package.json | 6 +++- packages/react-query/tsconfig.json | 3 +- packages/react-query/tsconfig.legacy.json | 8 +++++ packages/solid-query-devtools/package.json | 6 +++- packages/solid-query-devtools/tsconfig.json | 8 +---- .../solid-query-persist-client/package.json | 6 +++- .../solid-query-persist-client/tsconfig.json | 3 +- packages/solid-query/package.json | 6 +++- packages/solid-query/tsconfig.json | 3 +- packages/solid-query/tsconfig.legacy.json | 9 ++++++ packages/vue-query/package.json | 14 +++++---- packages/vue-query/tsconfig.json | 3 +- packages/vue-query/tsconfig.legacy.json | 5 ++++ pnpm-lock.yaml | 30 +++++++++++++++++++ 43 files changed, 171 insertions(+), 110 deletions(-) create mode 100644 packages/query-core/tsconfig.legacy.json create mode 100644 packages/react-query/tsconfig.legacy.json create mode 100644 packages/solid-query/tsconfig.legacy.json create mode 100644 packages/vue-query/tsconfig.legacy.json diff --git a/package.json b/package.json index 7aa69a888d..7298645e6f 100644 --- a/package.json +++ b/package.json @@ -78,6 +78,9 @@ "solid-js": "^1.8.17", "tsup": "^8.0.2", "typescript": "5.3.3", + "typescript50": "npm:typescript@5.0", + "typescript51": "npm:typescript@5.1", + "typescript52": "npm:typescript@5.2", "vite": "^5.2.11", "vitest": "^1.6.0" }, diff --git a/packages/angular-query-devtools-experimental/package.json b/packages/angular-query-devtools-experimental/package.json index 51f502b476..536a3e029d 100644 --- a/packages/angular-query-devtools-experimental/package.json +++ b/packages/angular-query-devtools-experimental/package.json @@ -22,7 +22,10 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", "test:build": "publint --strict", "test:attw": "attw --pack", "build": "ng-packagr -p ng-package.json -c tsconfig.build.json && rimraf ./build/package.json" diff --git a/packages/angular-query-devtools-experimental/tsconfig.build.json b/packages/angular-query-devtools-experimental/tsconfig.build.json index 2e37591ec1..426b01e33b 100644 --- a/packages/angular-query-devtools-experimental/tsconfig.build.json +++ b/packages/angular-query-devtools-experimental/tsconfig.build.json @@ -11,5 +11,5 @@ "strictInjectionParameters": true, "strictInputAccessModifiers": true }, - "include": ["src/**/*.ts", ".eslintrc.cjs"] + "include": ["src"] } diff --git a/packages/angular-query-devtools-experimental/tsconfig.json b/packages/angular-query-devtools-experimental/tsconfig.json index 764cb7f8c6..00a7ed1be5 100644 --- a/packages/angular-query-devtools-experimental/tsconfig.json +++ b/packages/angular-query-devtools-experimental/tsconfig.json @@ -1,27 +1,16 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "declaration": true, "declarationMap": true, "useDefineForClassFields": false, "target": "es2022", - "forceConsistentCasingInFileNames": true, - "strict": true, "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "importHelpers": true, "module": "esnext" }, - "angularCompilerOptions": { - "allowJs": false, - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - }, - "include": ["src/**/*.ts", ".eslintrc.cjs", "vite.config.ts"] + "include": ["src", ".eslintrc.cjs", "vite.config.ts"] } diff --git a/packages/angular-query-experimental/package.json b/packages/angular-query-experimental/package.json index 2819f238fa..70f10286e7 100644 --- a/packages/angular-query-experimental/package.json +++ b/packages/angular-query-experimental/package.json @@ -37,7 +37,11 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", "test:lib": "vitest", "test:lib:dev": "pnpm run test:lib --watch", "test:build": "publint --strict", diff --git a/packages/angular-query-experimental/tsconfig.build.json b/packages/angular-query-experimental/tsconfig.build.json index 2e37591ec1..426b01e33b 100644 --- a/packages/angular-query-experimental/tsconfig.build.json +++ b/packages/angular-query-experimental/tsconfig.build.json @@ -11,5 +11,5 @@ "strictInjectionParameters": true, "strictInputAccessModifiers": true }, - "include": ["src/**/*.ts", ".eslintrc.cjs"] + "include": ["src"] } diff --git a/packages/angular-query-experimental/tsconfig.json b/packages/angular-query-experimental/tsconfig.json index f42171348e..6b797b0475 100644 --- a/packages/angular-query-experimental/tsconfig.json +++ b/packages/angular-query-experimental/tsconfig.json @@ -1,15 +1,11 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "declaration": true, "declarationMap": true, "useDefineForClassFields": false, "target": "es2022", - "forceConsistentCasingInFileNames": true, - "strict": true, "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, @@ -17,11 +13,5 @@ "module": "ES2022", "types": ["vitest/globals"] }, - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - }, - "include": ["src/**/*.ts", ".eslintrc.cjs", "vite.config.ts"] + "include": ["src", ".eslintrc.cjs", "vite.config.ts"] } diff --git a/packages/eslint-plugin-query/package.json b/packages/eslint-plugin-query/package.json index 9b3539e50e..679e394f16 100644 --- a/packages/eslint-plugin-query/package.json +++ b/packages/eslint-plugin-query/package.json @@ -34,7 +34,11 @@ "scripts": { "clean": "rimraf ./dist && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", "test:lib": "vitest", "test:lib:dev": "pnpm run test:lib --watch", "test:build": "publint --strict", diff --git a/packages/eslint-plugin-query/tsconfig.json b/packages/eslint-plugin-query/tsconfig.json index e79d004a58..f7da7bc640 100644 --- a/packages/eslint-plugin-query/tsconfig.json +++ b/packages/eslint-plugin-query/tsconfig.json @@ -1,4 +1,4 @@ { "extends": "../../tsconfig.json", - "include": ["src/**/*.ts", "src/**/*.tsx", ".eslintrc.cjs", "vite.config.ts"] + "include": ["src", ".eslintrc.cjs", "vite.config.ts"] } diff --git a/packages/query-async-storage-persister/package.json b/packages/query-async-storage-persister/package.json index 87d871b6b7..d016b742b0 100644 --- a/packages/query-async-storage-persister/package.json +++ b/packages/query-async-storage-persister/package.json @@ -39,7 +39,11 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", "test:lib": "vitest", "test:lib:dev": "pnpm run test:lib --watch", "test:build": "publint --strict", diff --git a/packages/query-async-storage-persister/tsconfig.json b/packages/query-async-storage-persister/tsconfig.json index e1d149c6ec..26c7b2ae22 100644 --- a/packages/query-async-storage-persister/tsconfig.json +++ b/packages/query-async-storage-persister/tsconfig.json @@ -1,10 +1,4 @@ { "extends": "../../tsconfig.json", - "include": [ - "src/**/*.ts", - "src/**/*.tsx", - ".eslintrc.cjs", - "tsup.config.js", - "vite.config.ts" - ] + "include": ["src", ".eslintrc.cjs", "tsup.config.js", "vite.config.ts"] } diff --git a/packages/query-broadcast-client-experimental/package.json b/packages/query-broadcast-client-experimental/package.json index 0b8a692652..5264ab3d96 100644 --- a/packages/query-broadcast-client-experimental/package.json +++ b/packages/query-broadcast-client-experimental/package.json @@ -39,7 +39,11 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", "test:build": "publint --strict", "test:attw": "attw --pack", "build": "tsup" diff --git a/packages/query-broadcast-client-experimental/tsconfig.json b/packages/query-broadcast-client-experimental/tsconfig.json index 5f7408d1d4..4c168389bc 100644 --- a/packages/query-broadcast-client-experimental/tsconfig.json +++ b/packages/query-broadcast-client-experimental/tsconfig.json @@ -1,4 +1,4 @@ { "extends": "../../tsconfig.json", - "include": ["src/**/*.ts", "src/**/*.tsx", ".eslintrc.cjs", "tsup.config.js"] + "include": ["src", ".eslintrc.cjs", "tsup.config.js"] } diff --git a/packages/query-codemods/tsconfig.json b/packages/query-codemods/tsconfig.json index e79d004a58..f7da7bc640 100644 --- a/packages/query-codemods/tsconfig.json +++ b/packages/query-codemods/tsconfig.json @@ -1,4 +1,4 @@ { "extends": "../../tsconfig.json", - "include": ["src/**/*.ts", "src/**/*.tsx", ".eslintrc.cjs", "vite.config.ts"] + "include": ["src", ".eslintrc.cjs", "vite.config.ts"] } diff --git a/packages/query-core/package.json b/packages/query-core/package.json index dc1e8228a9..d7574d1c07 100644 --- a/packages/query-core/package.json +++ b/packages/query-core/package.json @@ -39,7 +39,11 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts53": "tsc", "test:lib": "vitest", "test:lib:dev": "pnpm run test:lib --watch", "test:build": "publint --strict", diff --git a/packages/query-core/tsconfig.json b/packages/query-core/tsconfig.json index e1d149c6ec..26c7b2ae22 100644 --- a/packages/query-core/tsconfig.json +++ b/packages/query-core/tsconfig.json @@ -1,10 +1,4 @@ { "extends": "../../tsconfig.json", - "include": [ - "src/**/*.ts", - "src/**/*.tsx", - ".eslintrc.cjs", - "tsup.config.js", - "vite.config.ts" - ] + "include": ["src", ".eslintrc.cjs", "tsup.config.js", "vite.config.ts"] } diff --git a/packages/query-core/tsconfig.legacy.json b/packages/query-core/tsconfig.legacy.json new file mode 100644 index 0000000000..6ec5a57577 --- /dev/null +++ b/packages/query-core/tsconfig.legacy.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "jsx": "react-jsx" + }, + "include": ["src"], + "exclude": ["src/__tests__"] +} diff --git a/packages/query-devtools/package.json b/packages/query-devtools/package.json index b7bba2beb0..76a20362b2 100644 --- a/packages/query-devtools/package.json +++ b/packages/query-devtools/package.json @@ -36,7 +36,11 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", "test:lib": "vitest", "test:lib:dev": "pnpm run test:lib --watch", "test:build": "publint --strict", diff --git a/packages/query-devtools/tsconfig.json b/packages/query-devtools/tsconfig.json index cfa0ef7e7c..e53c4dc8ef 100644 --- a/packages/query-devtools/tsconfig.json +++ b/packages/query-devtools/tsconfig.json @@ -4,11 +4,5 @@ "jsx": "preserve", "jsxImportSource": "solid-js" }, - "include": [ - "src/**/*.ts", - "src/**/*.tsx", - ".eslintrc.cjs", - "tsup.config.js", - "vite.config.ts" - ] + "include": ["src", ".eslintrc.cjs", "tsup.config.js", "vite.config.ts"] } diff --git a/packages/query-persist-client-core/package.json b/packages/query-persist-client-core/package.json index 2986c694b7..55e423d5f6 100644 --- a/packages/query-persist-client-core/package.json +++ b/packages/query-persist-client-core/package.json @@ -39,7 +39,11 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", "test:lib": "vitest", "test:lib:dev": "pnpm run test:lib --watch", "test:build": "publint --strict", diff --git a/packages/query-persist-client-core/tsconfig.json b/packages/query-persist-client-core/tsconfig.json index e1d149c6ec..26c7b2ae22 100644 --- a/packages/query-persist-client-core/tsconfig.json +++ b/packages/query-persist-client-core/tsconfig.json @@ -1,10 +1,4 @@ { "extends": "../../tsconfig.json", - "include": [ - "src/**/*.ts", - "src/**/*.tsx", - ".eslintrc.cjs", - "tsup.config.js", - "vite.config.ts" - ] + "include": ["src", ".eslintrc.cjs", "tsup.config.js", "vite.config.ts"] } diff --git a/packages/query-sync-storage-persister/package.json b/packages/query-sync-storage-persister/package.json index f77e28bc5e..cadf85d86a 100644 --- a/packages/query-sync-storage-persister/package.json +++ b/packages/query-sync-storage-persister/package.json @@ -39,7 +39,11 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", "test:lib": "vitest", "test:lib:dev": "pnpm run test:lib --watch", "test:build": "publint --strict", diff --git a/packages/query-sync-storage-persister/tsconfig.json b/packages/query-sync-storage-persister/tsconfig.json index e1d149c6ec..26c7b2ae22 100644 --- a/packages/query-sync-storage-persister/tsconfig.json +++ b/packages/query-sync-storage-persister/tsconfig.json @@ -1,10 +1,4 @@ { "extends": "../../tsconfig.json", - "include": [ - "src/**/*.ts", - "src/**/*.tsx", - ".eslintrc.cjs", - "tsup.config.js", - "vite.config.ts" - ] + "include": ["src", ".eslintrc.cjs", "tsup.config.js", "vite.config.ts"] } diff --git a/packages/react-query-devtools/package.json b/packages/react-query-devtools/package.json index 8be37e8513..66c9066655 100644 --- a/packages/react-query-devtools/package.json +++ b/packages/react-query-devtools/package.json @@ -59,7 +59,11 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", "test:lib": "vitest", "test:lib:dev": "pnpm run test:lib --watch", "test:build": "publint --strict", diff --git a/packages/react-query-devtools/tsconfig.json b/packages/react-query-devtools/tsconfig.json index 2d015235ab..93bb3c708b 100644 --- a/packages/react-query-devtools/tsconfig.json +++ b/packages/react-query-devtools/tsconfig.json @@ -4,8 +4,7 @@ "jsx": "react-jsx" }, "include": [ - "src/**/*.ts", - "src/**/*.tsx", + "src", ".eslintrc.cjs", "test-setup.ts", "tsup.config.js", diff --git a/packages/react-query-next-experimental/package.json b/packages/react-query-next-experimental/package.json index ac8bf0676f..cb11364a16 100644 --- a/packages/react-query-next-experimental/package.json +++ b/packages/react-query-next-experimental/package.json @@ -35,7 +35,11 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", "test:build": "publint --strict", "test:attw": "attw --pack", "build": "tsup" diff --git a/packages/react-query-next-experimental/tsconfig.json b/packages/react-query-next-experimental/tsconfig.json index cf78b5eb5f..42b4581d3c 100644 --- a/packages/react-query-next-experimental/tsconfig.json +++ b/packages/react-query-next-experimental/tsconfig.json @@ -3,11 +3,5 @@ "compilerOptions": { "jsx": "react-jsx" }, - "include": [ - "src/**/*.ts", - "src/**/*.tsx", - ".eslintrc.cjs", - "tsup.config.js", - "vite.config.ts" - ] + "include": ["src", ".eslintrc.cjs", "tsup.config.js", "vite.config.ts"] } diff --git a/packages/react-query-persist-client/package.json b/packages/react-query-persist-client/package.json index 6c1b1a7694..be48d5e156 100644 --- a/packages/react-query-persist-client/package.json +++ b/packages/react-query-persist-client/package.json @@ -39,7 +39,11 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", "test:lib": "vitest --retry=3", "test:lib:dev": "pnpm run test:lib --watch", "test:build": "publint --strict", diff --git a/packages/react-query-persist-client/tsconfig.json b/packages/react-query-persist-client/tsconfig.json index 2d015235ab..93bb3c708b 100644 --- a/packages/react-query-persist-client/tsconfig.json +++ b/packages/react-query-persist-client/tsconfig.json @@ -4,8 +4,7 @@ "jsx": "react-jsx" }, "include": [ - "src/**/*.ts", - "src/**/*.tsx", + "src", ".eslintrc.cjs", "test-setup.ts", "tsup.config.js", diff --git a/packages/react-query/package.json b/packages/react-query/package.json index d0faeaa0f9..3055eea395 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -35,7 +35,11 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts53": "tsc", "test:lib": "vitest --retry=3", "test:lib:dev": "pnpm run test:lib --watch", "test:build": "publint --strict", diff --git a/packages/react-query/tsconfig.json b/packages/react-query/tsconfig.json index 2d015235ab..93bb3c708b 100644 --- a/packages/react-query/tsconfig.json +++ b/packages/react-query/tsconfig.json @@ -4,8 +4,7 @@ "jsx": "react-jsx" }, "include": [ - "src/**/*.ts", - "src/**/*.tsx", + "src", ".eslintrc.cjs", "test-setup.ts", "tsup.config.js", diff --git a/packages/react-query/tsconfig.legacy.json b/packages/react-query/tsconfig.legacy.json new file mode 100644 index 0000000000..6ec5a57577 --- /dev/null +++ b/packages/react-query/tsconfig.legacy.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "jsx": "react-jsx" + }, + "include": ["src"], + "exclude": ["src/__tests__"] +} diff --git a/packages/solid-query-devtools/package.json b/packages/solid-query-devtools/package.json index de2dfdf307..0ed584402d 100644 --- a/packages/solid-query-devtools/package.json +++ b/packages/solid-query-devtools/package.json @@ -36,7 +36,11 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", "test:build": "publint --strict", "test:attw": "attw --pack", "build": "tsup", diff --git a/packages/solid-query-devtools/tsconfig.json b/packages/solid-query-devtools/tsconfig.json index cfa0ef7e7c..e53c4dc8ef 100644 --- a/packages/solid-query-devtools/tsconfig.json +++ b/packages/solid-query-devtools/tsconfig.json @@ -4,11 +4,5 @@ "jsx": "preserve", "jsxImportSource": "solid-js" }, - "include": [ - "src/**/*.ts", - "src/**/*.tsx", - ".eslintrc.cjs", - "tsup.config.js", - "vite.config.ts" - ] + "include": ["src", ".eslintrc.cjs", "tsup.config.js", "vite.config.ts"] } diff --git a/packages/solid-query-persist-client/package.json b/packages/solid-query-persist-client/package.json index 754307eb77..e459d2680a 100644 --- a/packages/solid-query-persist-client/package.json +++ b/packages/solid-query-persist-client/package.json @@ -46,7 +46,11 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", "test:lib": "vitest", "test:lib:dev": "pnpm run test:lib --watch", "test:build": "publint --strict", diff --git a/packages/solid-query-persist-client/tsconfig.json b/packages/solid-query-persist-client/tsconfig.json index 2f3d5e407e..e092a123e6 100644 --- a/packages/solid-query-persist-client/tsconfig.json +++ b/packages/solid-query-persist-client/tsconfig.json @@ -5,8 +5,7 @@ "jsxImportSource": "solid-js" }, "include": [ - "src/**/*.ts", - "src/**/*.tsx", + "src", ".eslintrc.cjs", "test-setup.ts", "tsup.config.js", diff --git a/packages/solid-query/package.json b/packages/solid-query/package.json index c0f5aa45cd..4f02394eb5 100644 --- a/packages/solid-query/package.json +++ b/packages/solid-query/package.json @@ -42,7 +42,11 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts53": "tsc", "test:lib": "vitest --retry=3", "test:lib:dev": "pnpm run test:lib --watch", "test:build": "publint --strict", diff --git a/packages/solid-query/tsconfig.json b/packages/solid-query/tsconfig.json index 2f3d5e407e..e092a123e6 100644 --- a/packages/solid-query/tsconfig.json +++ b/packages/solid-query/tsconfig.json @@ -5,8 +5,7 @@ "jsxImportSource": "solid-js" }, "include": [ - "src/**/*.ts", - "src/**/*.tsx", + "src", ".eslintrc.cjs", "test-setup.ts", "tsup.config.js", diff --git a/packages/solid-query/tsconfig.legacy.json b/packages/solid-query/tsconfig.legacy.json new file mode 100644 index 0000000000..dfd0e155c6 --- /dev/null +++ b/packages/solid-query/tsconfig.legacy.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "jsx": "preserve", + "jsxImportSource": "solid-js" + }, + "include": ["src"], + "exclude": ["src/__tests__"] +} diff --git a/packages/vue-query/package.json b/packages/vue-query/package.json index 8aae39621c..c42970b0c7 100644 --- a/packages/vue-query/package.json +++ b/packages/vue-query/package.json @@ -35,11 +35,15 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "vue-demi-switch 3 && tsc", - "test:lib": "pnpm run test:2 && pnpm run test:2.7 && pnpm run test:3", - "test:2": "vue-demi-switch 2 vue2 && vitest", - "test:2.7": "vue-demi-switch 2.7 vue2.7 && vitest", - "test:3": "vue-demi-switch 3 && vitest", + "test:types": "vue-demi-switch 3 && pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts53": "tsc", + "test:lib": "pnpm run test:lib:2 && pnpm run test:lib:2.7 && pnpm run test:lib:3", + "test:lib:2": "vue-demi-switch 2 vue2 && vitest", + "test:lib:2.7": "vue-demi-switch 2.7 vue2.7 && vitest", + "test:lib:3": "vue-demi-switch 3 && vitest", "test:lib:dev": "pnpm run test:lib --watch", "test:build": "publint --strict", "test:attw": "attw --pack", diff --git a/packages/vue-query/tsconfig.json b/packages/vue-query/tsconfig.json index 4ce4c4f704..57d67eb217 100644 --- a/packages/vue-query/tsconfig.json +++ b/packages/vue-query/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.json", "include": [ - "src/**/*.ts", - "src/**/*.tsx", + "src", ".eslintrc.cjs", "test-setup.ts", "tsup.config.js", diff --git a/packages/vue-query/tsconfig.legacy.json b/packages/vue-query/tsconfig.legacy.json new file mode 100644 index 0000000000..b1e014ba43 --- /dev/null +++ b/packages/vue-query/tsconfig.legacy.json @@ -0,0 +1,5 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src"], + "exclude": ["src/__mocks__", "src/__tests__"] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 86597bc86c..322feba361 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -123,6 +123,15 @@ importers: typescript: specifier: 5.3.3 version: 5.3.3 + typescript50: + specifier: npm:typescript@5.0 + version: typescript@5.0.4 + typescript51: + specifier: npm:typescript@5.1 + version: typescript@5.1.6 + typescript52: + specifier: npm:typescript@5.2 + version: typescript@5.2.2 vite: specifier: ^5.2.11 version: 5.2.11(@types/node@20.12.12)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) @@ -17116,6 +17125,21 @@ packages: typescript-auto-import-cache@0.3.2: resolution: {integrity: sha512-+laqe5SFL1vN62FPOOJSUDTZxtgsoOXjneYOXIpx5rQ4UMiN89NAtJLpqLqyebv9fgQ/IMeeTX+mQyRnwvJzvg==} + typescript@5.0.4: + resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} + engines: {node: '>=12.20'} + hasBin: true + + typescript@5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} + hasBin: true + + typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} + engines: {node: '>=14.17'} + hasBin: true + typescript@5.3.3: resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} @@ -38177,6 +38201,12 @@ snapshots: dependencies: semver: 7.6.2 + typescript@5.0.4: {} + + typescript@5.1.6: {} + + typescript@5.2.2: {} + typescript@5.3.3: {} typescript@5.4.2: {}