From 15e42ba445cd738db730821f95663ba737256530 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 25 Jun 2024 21:18:27 +1000 Subject: [PATCH] ci: Add tests for TS 4.7, 4.8, 4.9 (#7618) * ci: Add tests for TS 4.7, 4.8, 4.9 * Capitalise --- examples/react/algolia/tsconfig.json | 2 +- examples/react/basic-typescript/tsconfig.json | 2 +- .../nextjs-app-prefetching/tsconfig.json | 2 +- examples/react/react-router/tsconfig.json | 2 +- examples/react/shadow-dom/tsconfig.json | 2 +- examples/react/shadow-dom/tsconfig.node.json | 2 +- .../solid/basic-graphql-request/tsconfig.json | 2 +- examples/solid/basic-typescript/tsconfig.json | 2 +- .../default-query-function/tsconfig.json | 2 +- examples/solid/simple/tsconfig.json | 2 +- integrations/react-next-15/tsconfig.json | 2 +- integrations/react-next/tsconfig.json | 2 +- integrations/vue-vite/tsconfig.json | 2 +- integrations/vue-vite/tsconfig.node.json | 2 +- package.json | 3 ++ .../tsconfig.build.json | 4 +- .../tsconfig.json | 13 +++--- .../tsconfig.build.json | 4 +- .../angular-query-experimental/tsconfig.json | 13 +++--- packages/eslint-plugin-query/tsconfig.json | 3 ++ .../tsconfig.json | 3 ++ .../tsconfig.json | 3 ++ packages/query-codemods/tsconfig.json | 3 ++ packages/query-core/package.json | 3 ++ packages/query-core/tsconfig.json | 3 ++ packages/query-core/tsconfig.legacy.json | 3 -- packages/query-devtools/tsconfig.json | 3 +- .../query-persist-client-core/tsconfig.json | 3 ++ .../tsconfig.json | 3 ++ packages/react-query-devtools/tsconfig.json | 3 +- .../tsconfig.json | 3 +- .../react-query-persist-client/tsconfig.json | 3 +- packages/react-query/package.json | 3 ++ packages/react-query/tsconfig.json | 3 +- packages/solid-query-devtools/tsconfig.json | 3 +- .../solid-query-persist-client/tsconfig.json | 3 +- packages/solid-query/package.json | 1 + packages/solid-query/tsconfig.json | 3 +- packages/svelte-query-devtools/tsconfig.json | 3 ++ .../svelte-query-persist-client/tsconfig.json | 3 ++ packages/svelte-query/tsconfig.json | 3 ++ packages/vue-query-devtools/tsconfig.json | 3 ++ packages/vue-query/package.json | 3 ++ packages/vue-query/tsconfig.json | 3 ++ pnpm-lock.yaml | 42 +++++++++++++++++-- scripts/tsconfig.json | 7 ++++ tsconfig.json | 4 +- 47 files changed, 142 insertions(+), 49 deletions(-) create mode 100644 scripts/tsconfig.json diff --git a/examples/react/algolia/tsconfig.json b/examples/react/algolia/tsconfig.json index 6d545f543f..7c962d9747 100644 --- a/examples/react/algolia/tsconfig.json +++ b/examples/react/algolia/tsconfig.json @@ -7,7 +7,7 @@ "skipLibCheck": true, /* Bundler mode */ - "moduleResolution": "bundler", + "moduleResolution": "Bundler", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, diff --git a/examples/react/basic-typescript/tsconfig.json b/examples/react/basic-typescript/tsconfig.json index 6d545f543f..7c962d9747 100644 --- a/examples/react/basic-typescript/tsconfig.json +++ b/examples/react/basic-typescript/tsconfig.json @@ -7,7 +7,7 @@ "skipLibCheck": true, /* Bundler mode */ - "moduleResolution": "bundler", + "moduleResolution": "Bundler", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, diff --git a/examples/react/nextjs-app-prefetching/tsconfig.json b/examples/react/nextjs-app-prefetching/tsconfig.json index e3ea9649f2..44eb6012cc 100644 --- a/examples/react/nextjs-app-prefetching/tsconfig.json +++ b/examples/react/nextjs-app-prefetching/tsconfig.json @@ -9,7 +9,7 @@ "noEmit": true, "esModuleInterop": true, "module": "esnext", - "moduleResolution": "bundler", + "moduleResolution": "Bundler", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", diff --git a/examples/react/react-router/tsconfig.json b/examples/react/react-router/tsconfig.json index 6d545f543f..7c962d9747 100644 --- a/examples/react/react-router/tsconfig.json +++ b/examples/react/react-router/tsconfig.json @@ -7,7 +7,7 @@ "skipLibCheck": true, /* Bundler mode */ - "moduleResolution": "bundler", + "moduleResolution": "Bundler", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, diff --git a/examples/react/shadow-dom/tsconfig.json b/examples/react/shadow-dom/tsconfig.json index a7fc6fbf23..97cbe737d4 100644 --- a/examples/react/shadow-dom/tsconfig.json +++ b/examples/react/shadow-dom/tsconfig.json @@ -7,7 +7,7 @@ "skipLibCheck": true, /* Bundler mode */ - "moduleResolution": "bundler", + "moduleResolution": "Bundler", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, diff --git a/examples/react/shadow-dom/tsconfig.node.json b/examples/react/shadow-dom/tsconfig.node.json index 97ede7ee6f..cbd2a63ddf 100644 --- a/examples/react/shadow-dom/tsconfig.node.json +++ b/examples/react/shadow-dom/tsconfig.node.json @@ -3,7 +3,7 @@ "composite": true, "skipLibCheck": true, "module": "ESNext", - "moduleResolution": "bundler", + "moduleResolution": "Bundler", "allowSyntheticDefaultImports": true, "strict": true }, diff --git a/examples/solid/basic-graphql-request/tsconfig.json b/examples/solid/basic-graphql-request/tsconfig.json index 7ab027b8d2..3ea2b43156 100644 --- a/examples/solid/basic-graphql-request/tsconfig.json +++ b/examples/solid/basic-graphql-request/tsconfig.json @@ -7,7 +7,7 @@ "skipLibCheck": true, /* Bundler mode */ - "moduleResolution": "bundler", + "moduleResolution": "Bundler", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, diff --git a/examples/solid/basic-typescript/tsconfig.json b/examples/solid/basic-typescript/tsconfig.json index 7ab027b8d2..3ea2b43156 100644 --- a/examples/solid/basic-typescript/tsconfig.json +++ b/examples/solid/basic-typescript/tsconfig.json @@ -7,7 +7,7 @@ "skipLibCheck": true, /* Bundler mode */ - "moduleResolution": "bundler", + "moduleResolution": "Bundler", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, diff --git a/examples/solid/default-query-function/tsconfig.json b/examples/solid/default-query-function/tsconfig.json index 7ab027b8d2..3ea2b43156 100644 --- a/examples/solid/default-query-function/tsconfig.json +++ b/examples/solid/default-query-function/tsconfig.json @@ -7,7 +7,7 @@ "skipLibCheck": true, /* Bundler mode */ - "moduleResolution": "bundler", + "moduleResolution": "Bundler", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, diff --git a/examples/solid/simple/tsconfig.json b/examples/solid/simple/tsconfig.json index cc504a1647..a8b4db76c1 100644 --- a/examples/solid/simple/tsconfig.json +++ b/examples/solid/simple/tsconfig.json @@ -7,7 +7,7 @@ "skipLibCheck": true, /* Bundler mode */ - "moduleResolution": "bundler", + "moduleResolution": "Bundler", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, diff --git a/integrations/react-next-15/tsconfig.json b/integrations/react-next-15/tsconfig.json index e3ea9649f2..44eb6012cc 100644 --- a/integrations/react-next-15/tsconfig.json +++ b/integrations/react-next-15/tsconfig.json @@ -9,7 +9,7 @@ "noEmit": true, "esModuleInterop": true, "module": "esnext", - "moduleResolution": "bundler", + "moduleResolution": "Bundler", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", diff --git a/integrations/react-next/tsconfig.json b/integrations/react-next/tsconfig.json index e3ea9649f2..44eb6012cc 100644 --- a/integrations/react-next/tsconfig.json +++ b/integrations/react-next/tsconfig.json @@ -9,7 +9,7 @@ "noEmit": true, "esModuleInterop": true, "module": "esnext", - "moduleResolution": "bundler", + "moduleResolution": "Bundler", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", diff --git a/integrations/vue-vite/tsconfig.json b/integrations/vue-vite/tsconfig.json index 4cf77182ea..fe0d2242ce 100644 --- a/integrations/vue-vite/tsconfig.json +++ b/integrations/vue-vite/tsconfig.json @@ -7,7 +7,7 @@ "skipLibCheck": true, /* Bundler mode */ - "moduleResolution": "bundler", + "moduleResolution": "Bundler", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, diff --git a/integrations/vue-vite/tsconfig.node.json b/integrations/vue-vite/tsconfig.node.json index 42872c59f5..3adda81a1c 100644 --- a/integrations/vue-vite/tsconfig.node.json +++ b/integrations/vue-vite/tsconfig.node.json @@ -3,7 +3,7 @@ "composite": true, "skipLibCheck": true, "module": "ESNext", - "moduleResolution": "bundler", + "moduleResolution": "Bundler", "allowSyntheticDefaultImports": true }, "include": ["vite.config.ts"] diff --git a/package.json b/package.json index 7298645e6f..801a65f1f7 100644 --- a/package.json +++ b/package.json @@ -78,6 +78,9 @@ "solid-js": "^1.8.17", "tsup": "^8.0.2", "typescript": "5.3.3", + "typescript47": "npm:typescript@4.7", + "typescript48": "npm:typescript@4.8", + "typescript49": "npm:typescript@4.9", "typescript50": "npm:typescript@5.0", "typescript51": "npm:typescript@5.1", "typescript52": "npm:typescript@5.2", diff --git a/packages/angular-query-devtools-experimental/tsconfig.build.json b/packages/angular-query-devtools-experimental/tsconfig.build.json index 426b01e33b..ca4b454102 100644 --- a/packages/angular-query-devtools-experimental/tsconfig.build.json +++ b/packages/angular-query-devtools-experimental/tsconfig.build.json @@ -1,10 +1,10 @@ { "extends": "./node_modules/ng-packagr/lib/ts/conf/tsconfig.ngc.json", "compilerOptions": { - "moduleResolution": "bundler", "allowJs": true, + "module": "ESNext", "moduleDetection": "force", - "module": "ESNext" + "moduleResolution": "Bundler" }, "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, diff --git a/packages/angular-query-devtools-experimental/tsconfig.json b/packages/angular-query-devtools-experimental/tsconfig.json index 00a7ed1be5..f4fb148c0a 100644 --- a/packages/angular-query-devtools-experimental/tsconfig.json +++ b/packages/angular-query-devtools-experimental/tsconfig.json @@ -1,16 +1,15 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "declarationMap": true, - "useDefineForClassFields": false, - "target": "es2022", - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noFallthroughCasesInSwitch": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "importHelpers": true, - "module": "esnext" + "moduleResolution": "Bundler", + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noFallthroughCasesInSwitch": true, + "useDefineForClassFields": false, + "target": "ES2022" }, "include": ["src", ".eslintrc.cjs", "vite.config.ts"] } diff --git a/packages/angular-query-experimental/tsconfig.build.json b/packages/angular-query-experimental/tsconfig.build.json index 426b01e33b..ca4b454102 100644 --- a/packages/angular-query-experimental/tsconfig.build.json +++ b/packages/angular-query-experimental/tsconfig.build.json @@ -1,10 +1,10 @@ { "extends": "./node_modules/ng-packagr/lib/ts/conf/tsconfig.ngc.json", "compilerOptions": { - "moduleResolution": "bundler", "allowJs": true, + "module": "ESNext", "moduleDetection": "force", - "module": "ESNext" + "moduleResolution": "Bundler" }, "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, diff --git a/packages/angular-query-experimental/tsconfig.json b/packages/angular-query-experimental/tsconfig.json index 6b797b0475..e4db098afa 100644 --- a/packages/angular-query-experimental/tsconfig.json +++ b/packages/angular-query-experimental/tsconfig.json @@ -1,16 +1,15 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "declarationMap": true, - "useDefineForClassFields": false, - "target": "es2022", - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noFallthroughCasesInSwitch": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "importHelpers": true, - "module": "ES2022", + "moduleResolution": "Bundler", + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noFallthroughCasesInSwitch": true, + "useDefineForClassFields": false, + "target": "ES2022", "types": ["vitest/globals"] }, "include": ["src", ".eslintrc.cjs", "vite.config.ts"] diff --git a/packages/eslint-plugin-query/tsconfig.json b/packages/eslint-plugin-query/tsconfig.json index f7da7bc640..4c5ba76c2e 100644 --- a/packages/eslint-plugin-query/tsconfig.json +++ b/packages/eslint-plugin-query/tsconfig.json @@ -1,4 +1,7 @@ { "extends": "../../tsconfig.json", + "compilerOptions": { + "moduleResolution": "Bundler" + }, "include": ["src", ".eslintrc.cjs", "vite.config.ts"] } diff --git a/packages/query-async-storage-persister/tsconfig.json b/packages/query-async-storage-persister/tsconfig.json index 26c7b2ae22..cecbd8eb05 100644 --- a/packages/query-async-storage-persister/tsconfig.json +++ b/packages/query-async-storage-persister/tsconfig.json @@ -1,4 +1,7 @@ { "extends": "../../tsconfig.json", + "compilerOptions": { + "moduleResolution": "Bundler" + }, "include": ["src", ".eslintrc.cjs", "tsup.config.js", "vite.config.ts"] } diff --git a/packages/query-broadcast-client-experimental/tsconfig.json b/packages/query-broadcast-client-experimental/tsconfig.json index 4c168389bc..507e36b485 100644 --- a/packages/query-broadcast-client-experimental/tsconfig.json +++ b/packages/query-broadcast-client-experimental/tsconfig.json @@ -1,4 +1,7 @@ { "extends": "../../tsconfig.json", + "compilerOptions": { + "moduleResolution": "Bundler" + }, "include": ["src", ".eslintrc.cjs", "tsup.config.js"] } diff --git a/packages/query-codemods/tsconfig.json b/packages/query-codemods/tsconfig.json index f7da7bc640..4c5ba76c2e 100644 --- a/packages/query-codemods/tsconfig.json +++ b/packages/query-codemods/tsconfig.json @@ -1,4 +1,7 @@ { "extends": "../../tsconfig.json", + "compilerOptions": { + "moduleResolution": "Bundler" + }, "include": ["src", ".eslintrc.cjs", "vite.config.ts"] } diff --git a/packages/query-core/package.json b/packages/query-core/package.json index d7574d1c07..1302a129de 100644 --- a/packages/query-core/package.json +++ b/packages/query-core/package.json @@ -40,6 +40,9 @@ "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts47": "node ../../node_modules/typescript47/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts48": "node ../../node_modules/typescript48/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts49": "node ../../node_modules/typescript49/lib/tsc.js -p tsconfig.legacy.json", "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", diff --git a/packages/query-core/tsconfig.json b/packages/query-core/tsconfig.json index 26c7b2ae22..cecbd8eb05 100644 --- a/packages/query-core/tsconfig.json +++ b/packages/query-core/tsconfig.json @@ -1,4 +1,7 @@ { "extends": "../../tsconfig.json", + "compilerOptions": { + "moduleResolution": "Bundler" + }, "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 index 6ec5a57577..ead51ccf4e 100644 --- a/packages/query-core/tsconfig.legacy.json +++ b/packages/query-core/tsconfig.legacy.json @@ -1,8 +1,5 @@ { "extends": "../../tsconfig.json", - "compilerOptions": { - "jsx": "react-jsx" - }, "include": ["src"], "exclude": ["src/__tests__"] } diff --git a/packages/query-devtools/tsconfig.json b/packages/query-devtools/tsconfig.json index e53c4dc8ef..bcb804e6ff 100644 --- a/packages/query-devtools/tsconfig.json +++ b/packages/query-devtools/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js" + "jsxImportSource": "solid-js", + "moduleResolution": "Bundler" }, "include": ["src", ".eslintrc.cjs", "tsup.config.js", "vite.config.ts"] } diff --git a/packages/query-persist-client-core/tsconfig.json b/packages/query-persist-client-core/tsconfig.json index 26c7b2ae22..cecbd8eb05 100644 --- a/packages/query-persist-client-core/tsconfig.json +++ b/packages/query-persist-client-core/tsconfig.json @@ -1,4 +1,7 @@ { "extends": "../../tsconfig.json", + "compilerOptions": { + "moduleResolution": "Bundler" + }, "include": ["src", ".eslintrc.cjs", "tsup.config.js", "vite.config.ts"] } diff --git a/packages/query-sync-storage-persister/tsconfig.json b/packages/query-sync-storage-persister/tsconfig.json index 26c7b2ae22..cecbd8eb05 100644 --- a/packages/query-sync-storage-persister/tsconfig.json +++ b/packages/query-sync-storage-persister/tsconfig.json @@ -1,4 +1,7 @@ { "extends": "../../tsconfig.json", + "compilerOptions": { + "moduleResolution": "Bundler" + }, "include": ["src", ".eslintrc.cjs", "tsup.config.js", "vite.config.ts"] } diff --git a/packages/react-query-devtools/tsconfig.json b/packages/react-query-devtools/tsconfig.json index 93bb3c708b..efe7f2d3f8 100644 --- a/packages/react-query-devtools/tsconfig.json +++ b/packages/react-query-devtools/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "jsx": "react-jsx" + "jsx": "react-jsx", + "moduleResolution": "Bundler" }, "include": [ "src", diff --git a/packages/react-query-next-experimental/tsconfig.json b/packages/react-query-next-experimental/tsconfig.json index 42b4581d3c..01502df4d9 100644 --- a/packages/react-query-next-experimental/tsconfig.json +++ b/packages/react-query-next-experimental/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "jsx": "react-jsx" + "jsx": "react-jsx", + "moduleResolution": "Bundler" }, "include": ["src", ".eslintrc.cjs", "tsup.config.js", "vite.config.ts"] } diff --git a/packages/react-query-persist-client/tsconfig.json b/packages/react-query-persist-client/tsconfig.json index 93bb3c708b..efe7f2d3f8 100644 --- a/packages/react-query-persist-client/tsconfig.json +++ b/packages/react-query-persist-client/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "jsx": "react-jsx" + "jsx": "react-jsx", + "moduleResolution": "Bundler" }, "include": [ "src", diff --git a/packages/react-query/package.json b/packages/react-query/package.json index 3055eea395..786b75f64f 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -36,6 +36,9 @@ "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts47": "node ../../node_modules/typescript47/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts48": "node ../../node_modules/typescript48/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts49": "node ../../node_modules/typescript49/lib/tsc.js -p tsconfig.legacy.json", "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", diff --git a/packages/react-query/tsconfig.json b/packages/react-query/tsconfig.json index 93bb3c708b..efe7f2d3f8 100644 --- a/packages/react-query/tsconfig.json +++ b/packages/react-query/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "jsx": "react-jsx" + "jsx": "react-jsx", + "moduleResolution": "Bundler" }, "include": [ "src", diff --git a/packages/solid-query-devtools/tsconfig.json b/packages/solid-query-devtools/tsconfig.json index e53c4dc8ef..bcb804e6ff 100644 --- a/packages/solid-query-devtools/tsconfig.json +++ b/packages/solid-query-devtools/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js" + "jsxImportSource": "solid-js", + "moduleResolution": "Bundler" }, "include": ["src", ".eslintrc.cjs", "tsup.config.js", "vite.config.ts"] } diff --git a/packages/solid-query-persist-client/tsconfig.json b/packages/solid-query-persist-client/tsconfig.json index e092a123e6..9137b8e8a8 100644 --- a/packages/solid-query-persist-client/tsconfig.json +++ b/packages/solid-query-persist-client/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js" + "jsxImportSource": "solid-js", + "moduleResolution": "Bundler" }, "include": [ "src", diff --git a/packages/solid-query/package.json b/packages/solid-query/package.json index 4f02394eb5..d294e3ed37 100644 --- a/packages/solid-query/package.json +++ b/packages/solid-query/package.json @@ -43,6 +43,7 @@ "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts49": "node ../../node_modules/typescript49/lib/tsc.js -p tsconfig.legacy.json", "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", diff --git a/packages/solid-query/tsconfig.json b/packages/solid-query/tsconfig.json index e092a123e6..9137b8e8a8 100644 --- a/packages/solid-query/tsconfig.json +++ b/packages/solid-query/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js" + "jsxImportSource": "solid-js", + "moduleResolution": "Bundler" }, "include": [ "src", diff --git a/packages/svelte-query-devtools/tsconfig.json b/packages/svelte-query-devtools/tsconfig.json index f66c3c7586..fe2eac28c7 100644 --- a/packages/svelte-query-devtools/tsconfig.json +++ b/packages/svelte-query-devtools/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "../../tsconfig.json", + "compilerOptions": { + "moduleResolution": "Bundler" + }, "include": [ "src/**/*.js", "src/**/*.ts", diff --git a/packages/svelte-query-persist-client/tsconfig.json b/packages/svelte-query-persist-client/tsconfig.json index 39f22d0c42..7c4465627a 100644 --- a/packages/svelte-query-persist-client/tsconfig.json +++ b/packages/svelte-query-persist-client/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "../../tsconfig.json", + "compilerOptions": { + "moduleResolution": "Bundler" + }, "include": [ "src/**/*.js", "src/**/*.ts", diff --git a/packages/svelte-query/tsconfig.json b/packages/svelte-query/tsconfig.json index 8e3d54e736..16fff9b5c9 100644 --- a/packages/svelte-query/tsconfig.json +++ b/packages/svelte-query/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "../../tsconfig.json", + "compilerOptions": { + "moduleResolution": "Bundler" + }, "include": [ "src/**/*.js", "src/**/*.ts", diff --git a/packages/vue-query-devtools/tsconfig.json b/packages/vue-query-devtools/tsconfig.json index beeb3dd018..f2eb6a2e90 100644 --- a/packages/vue-query-devtools/tsconfig.json +++ b/packages/vue-query-devtools/tsconfig.json @@ -1,4 +1,7 @@ { "extends": "../../tsconfig.json", + "compilerOptions": { + "moduleResolution": "Bundler" + }, "include": ["src/**/*.ts", "src/**/*.vue", ".eslintrc.cjs", "vite.config.ts"] } diff --git a/packages/vue-query/package.json b/packages/vue-query/package.json index c42970b0c7..e1bfd46330 100644 --- a/packages/vue-query/package.json +++ b/packages/vue-query/package.json @@ -36,6 +36,9 @@ "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", "test:types": "vue-demi-switch 3 && pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts47": "node ../../node_modules/typescript47/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts48": "node ../../node_modules/typescript48/lib/tsc.js -p tsconfig.legacy.json", + "test:types:ts49": "node ../../node_modules/typescript49/lib/tsc.js -p tsconfig.legacy.json", "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", diff --git a/packages/vue-query/tsconfig.json b/packages/vue-query/tsconfig.json index 57d67eb217..d8eb3d10bb 100644 --- a/packages/vue-query/tsconfig.json +++ b/packages/vue-query/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "../../tsconfig.json", + "compilerOptions": { + "moduleResolution": "Bundler" + }, "include": [ "src", ".eslintrc.cjs", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 322feba361..0e111ad0e2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -123,6 +123,15 @@ importers: typescript: specifier: 5.3.3 version: 5.3.3 + typescript47: + specifier: npm:typescript@4.7 + version: typescript@4.7.4 + typescript48: + specifier: npm:typescript@4.8 + version: typescript@4.8.4 + typescript49: + specifier: npm:typescript@4.9 + version: typescript@4.9.5 typescript50: specifier: npm:typescript@5.0 version: typescript@5.0.4 @@ -17125,6 +17134,21 @@ packages: typescript-auto-import-cache@0.3.2: resolution: {integrity: sha512-+laqe5SFL1vN62FPOOJSUDTZxtgsoOXjneYOXIpx5rQ4UMiN89NAtJLpqLqyebv9fgQ/IMeeTX+mQyRnwvJzvg==} + typescript@4.7.4: + resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} + engines: {node: '>=4.2.0'} + hasBin: true + + typescript@4.8.4: + resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} + engines: {node: '>=4.2.0'} + hasBin: true + + typescript@4.9.5: + resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} + engines: {node: '>=4.2.0'} + hasBin: true + typescript@5.0.4: resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} engines: {node: '>=12.20'} @@ -22272,7 +22296,11 @@ snapshots: jest-runner: 26.6.3 jest-runtime: 26.6.3 transitivePeerDependencies: + - bufferutil + - canvas - supports-color + - ts-node + - utf-8-validate '@jest/test-sequencer@27.5.1': dependencies: @@ -30821,7 +30849,11 @@ snapshots: stack-utils: 2.0.6 throat: 5.0.0 transitivePeerDependencies: + - bufferutil + - canvas - supports-color + - ts-node + - utf-8-validate jest-circus@27.5.1: dependencies: @@ -31116,11 +31148,7 @@ snapshots: pretty-format: 26.6.2 throat: 5.0.0 transitivePeerDependencies: - - bufferutil - - canvas - supports-color - - ts-node - - utf-8-validate jest-jasmine2@27.5.1: dependencies: @@ -38201,6 +38229,12 @@ snapshots: dependencies: semver: 7.6.2 + typescript@4.7.4: {} + + typescript@4.8.4: {} + + typescript@4.9.5: {} + typescript@5.0.4: {} typescript@5.1.6: {} diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json new file mode 100644 index 0000000000..8ddb546901 --- /dev/null +++ b/scripts/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "moduleResolution": "Bundler" + }, + "include": ["**/*"] +} diff --git a/tsconfig.json b/tsconfig.json index a048db5588..042a1245e4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,7 @@ "isolatedModules": true, "lib": ["DOM", "DOM.Iterable", "ES2022"], "module": "ES2022", - "moduleResolution": "Bundler", + "moduleResolution": "Node", "noEmit": true, "noImplicitReturns": true, "noUncheckedIndexedAccess": true, @@ -23,5 +23,5 @@ "strict": true, "target": "ES2020" }, - "include": [".eslintrc.cjs", "prettier.config.js", "scripts"] + "include": [".eslintrc.cjs", "prettier.config.js"] }