From d76e474c572e73f0d1f72f088f72615b81ba3368 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Thu, 1 Jun 2023 15:52:49 +1000 Subject: [PATCH] chore: Make test:types have no Nx output (#5500) --- nx.json | 20 ++++++++----------- packages/codemods/tsconfig.json | 4 +--- packages/eslint-plugin-query/package.json | 2 +- packages/eslint-plugin-query/tsconfig.json | 2 -- .../package.json | 2 +- .../tsconfig.json | 2 -- .../package.json | 2 +- .../tsconfig.json | 4 +--- packages/query-core/package.json | 2 +- packages/query-core/tsconfig.json | 2 -- packages/query-devtools/package.json | 2 +- packages/query-devtools/tsconfig.json | 2 -- .../query-persist-client-core/package.json | 2 +- .../query-persist-client-core/tsconfig.json | 2 -- .../query-sync-storage-persister/package.json | 2 +- .../tsconfig.json | 2 -- packages/react-query-devtools/package.json | 2 +- packages/react-query-devtools/tsconfig.json | 2 -- .../react-query-persist-client/package.json | 2 +- .../react-query-persist-client/tsconfig.json | 2 -- packages/react-query/package.json | 2 +- packages/react-query/tsconfig.json | 2 -- packages/solid-query/package.json | 2 +- packages/solid-query/tsconfig.json | 2 -- packages/svelte-query/package.json | 2 +- packages/vue-query/package.json | 2 +- packages/vue-query/tsconfig.json | 2 -- 27 files changed, 23 insertions(+), 53 deletions(-) diff --git a/nx.json b/nx.json index fd730deef1..4897461535 100644 --- a/nx.json +++ b/nx.json @@ -51,26 +51,22 @@ }, "targetDefaults": { "test:lib": { - "outputs": ["{projectRoot}/coverage"], + "dependsOn": ["^build"], "inputs": ["default", "^public"], - "dependsOn": ["^build"] + "outputs": ["{projectRoot}/coverage"] }, "test:eslint": { - "inputs": ["default", "^public"], - "dependsOn": ["^build"] + "dependsOn": ["^build"], + "inputs": ["default", "^public"] }, "test:types": { - "outputs": [ - "{projectRoot}/build/**/*.d.ts", - "{projectRoot}/build/.tsbuildinfo" - ], - "inputs": ["default", "^public"], - "dependsOn": ["^test:types"] + "dependsOn": ["^build"], + "inputs": ["default", "^public"] }, "build": { - "outputs": ["{projectRoot}/build/**/*"], + "dependsOn": ["^build"], "inputs": ["default", "^public"], - "dependsOn": ["^build"] + "outputs": ["{projectRoot}/build/**/*"] }, "test:build": { "dependsOn": ["build"], diff --git a/packages/codemods/tsconfig.json b/packages/codemods/tsconfig.json index 7ad1f18205..51ae19fce8 100644 --- a/packages/codemods/tsconfig.json +++ b/packages/codemods/tsconfig.json @@ -1,10 +1,8 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "composite": true, "outDir": "./build/lib", - "rootDir": "./src", - "tsBuildInfoFile": "./build/.tsbuildinfo" + "rootDir": "./src" }, "include": ["src"] } diff --git a/packages/eslint-plugin-query/package.json b/packages/eslint-plugin-query/package.json index aad6d17e34..aca2539c09 100644 --- a/packages/eslint-plugin-query/package.json +++ b/packages/eslint-plugin-query/package.json @@ -22,7 +22,7 @@ "clean": "rimraf ./build && rimraf ./coverage", "dev": "tsup --watch --sourcemap", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "tsc --emitDeclarationOnly", + "test:types": "tsc --noEmit", "test:lib": "vitest run --coverage", "test:lib:dev": "pnpm run test:lib --watch", "build": "tsup --minify" diff --git a/packages/eslint-plugin-query/tsconfig.json b/packages/eslint-plugin-query/tsconfig.json index 4025cec0e4..bd42af09e7 100644 --- a/packages/eslint-plugin-query/tsconfig.json +++ b/packages/eslint-plugin-query/tsconfig.json @@ -1,10 +1,8 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "composite": true, "outDir": "./build/lib", "rootDir": "./src", - "tsBuildInfoFile": "./build/.tsbuildinfo", "types": ["vitest/globals"] }, "include": ["src"] diff --git a/packages/query-async-storage-persister/package.json b/packages/query-async-storage-persister/package.json index 7553db020e..e61748c371 100644 --- a/packages/query-async-storage-persister/package.json +++ b/packages/query-async-storage-persister/package.json @@ -30,7 +30,7 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "pnpm build:types", + "test:types": "tsc --noEmit", "test:lib": "vitest run --coverage", "test:lib:dev": "pnpm run test:lib --watch", "build": "pnpm build:rollup && pnpm build:types", diff --git a/packages/query-async-storage-persister/tsconfig.json b/packages/query-async-storage-persister/tsconfig.json index 4025cec0e4..bd42af09e7 100644 --- a/packages/query-async-storage-persister/tsconfig.json +++ b/packages/query-async-storage-persister/tsconfig.json @@ -1,10 +1,8 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "composite": true, "outDir": "./build/lib", "rootDir": "./src", - "tsBuildInfoFile": "./build/.tsbuildinfo", "types": ["vitest/globals"] }, "include": ["src"] diff --git a/packages/query-broadcast-client-experimental/package.json b/packages/query-broadcast-client-experimental/package.json index ffe07dbe0a..4fa3b037cb 100644 --- a/packages/query-broadcast-client-experimental/package.json +++ b/packages/query-broadcast-client-experimental/package.json @@ -30,7 +30,7 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "pnpm build:types", + "test:types": "tsc --noEmit", "build": "pnpm build:rollup && pnpm build:types", "build:rollup": "rollup --config rollup.config.mjs", "build:types": "tsc --emitDeclarationOnly" diff --git a/packages/query-broadcast-client-experimental/tsconfig.json b/packages/query-broadcast-client-experimental/tsconfig.json index 7ad1f18205..51ae19fce8 100644 --- a/packages/query-broadcast-client-experimental/tsconfig.json +++ b/packages/query-broadcast-client-experimental/tsconfig.json @@ -1,10 +1,8 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "composite": true, "outDir": "./build/lib", - "rootDir": "./src", - "tsBuildInfoFile": "./build/.tsbuildinfo" + "rootDir": "./src" }, "include": ["src"] } diff --git a/packages/query-core/package.json b/packages/query-core/package.json index e574e00f36..9e5f5a78c8 100644 --- a/packages/query-core/package.json +++ b/packages/query-core/package.json @@ -30,7 +30,7 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "pnpm build:types", + "test:types": "tsc --noEmit", "test:lib": "vitest run --coverage", "test:lib:dev": "pnpm run test:lib --watch", "build": "pnpm build:rollup && pnpm build:types", diff --git a/packages/query-core/tsconfig.json b/packages/query-core/tsconfig.json index 4025cec0e4..bd42af09e7 100644 --- a/packages/query-core/tsconfig.json +++ b/packages/query-core/tsconfig.json @@ -1,10 +1,8 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "composite": true, "outDir": "./build/lib", "rootDir": "./src", - "tsBuildInfoFile": "./build/.tsbuildinfo", "types": ["vitest/globals"] }, "include": ["src"] diff --git a/packages/query-devtools/package.json b/packages/query-devtools/package.json index a1d39bc839..8bc8f93647 100644 --- a/packages/query-devtools/package.json +++ b/packages/query-devtools/package.json @@ -25,7 +25,7 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "pnpm build:types", + "test:types": "tsc --noEmit", "test:lib": "vitest run --coverage", "test:lib:dev": "pnpm run test:lib --watch", "build": "pnpm build:rollup && pnpm build:types", diff --git a/packages/query-devtools/tsconfig.json b/packages/query-devtools/tsconfig.json index 7ed094575a..0647f54fa1 100644 --- a/packages/query-devtools/tsconfig.json +++ b/packages/query-devtools/tsconfig.json @@ -1,13 +1,11 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "composite": true, "declarationDir": "./build/types", "jsx": "preserve", "jsxImportSource": "solid-js", "outDir": "./build/source", "rootDir": "./src", - "tsBuildInfoFile": "./build/.tsbuildinfo", "types": ["vitest/globals"] }, "include": ["src"] diff --git a/packages/query-persist-client-core/package.json b/packages/query-persist-client-core/package.json index c12931c1c8..e157c2ff80 100644 --- a/packages/query-persist-client-core/package.json +++ b/packages/query-persist-client-core/package.json @@ -30,7 +30,7 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "pnpm build:types", + "test:types": "tsc --noEmit", "test:lib": "vitest run --coverage", "test:lib:dev": "pnpm run test:lib --watch", "build": "pnpm build:rollup && pnpm build:types", diff --git a/packages/query-persist-client-core/tsconfig.json b/packages/query-persist-client-core/tsconfig.json index 4025cec0e4..bd42af09e7 100644 --- a/packages/query-persist-client-core/tsconfig.json +++ b/packages/query-persist-client-core/tsconfig.json @@ -1,10 +1,8 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "composite": true, "outDir": "./build/lib", "rootDir": "./src", - "tsBuildInfoFile": "./build/.tsbuildinfo", "types": ["vitest/globals"] }, "include": ["src"] diff --git a/packages/query-sync-storage-persister/package.json b/packages/query-sync-storage-persister/package.json index e2aaaa708a..12d33aa2b4 100644 --- a/packages/query-sync-storage-persister/package.json +++ b/packages/query-sync-storage-persister/package.json @@ -30,7 +30,7 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "pnpm build:types", + "test:types": "tsc --noEmit", "test:lib": "vitest run --coverage", "test:lib:dev": "pnpm run test:lib --watch", "build": "pnpm build:rollup && pnpm build:types", diff --git a/packages/query-sync-storage-persister/tsconfig.json b/packages/query-sync-storage-persister/tsconfig.json index 4025cec0e4..bd42af09e7 100644 --- a/packages/query-sync-storage-persister/tsconfig.json +++ b/packages/query-sync-storage-persister/tsconfig.json @@ -1,10 +1,8 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "composite": true, "outDir": "./build/lib", "rootDir": "./src", - "tsBuildInfoFile": "./build/.tsbuildinfo", "types": ["vitest/globals"] }, "include": ["src"] diff --git a/packages/react-query-devtools/package.json b/packages/react-query-devtools/package.json index 6aab825af2..d343bcb2ec 100644 --- a/packages/react-query-devtools/package.json +++ b/packages/react-query-devtools/package.json @@ -40,7 +40,7 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "pnpm build:types", + "test:types": "tsc --noEmit", "test:lib": "vitest run --coverage", "test:lib:dev": "pnpm run test:lib --watch", "build": "pnpm build:rollup && pnpm build:types", diff --git a/packages/react-query-devtools/tsconfig.json b/packages/react-query-devtools/tsconfig.json index fe5606acab..6d40a82a85 100644 --- a/packages/react-query-devtools/tsconfig.json +++ b/packages/react-query-devtools/tsconfig.json @@ -1,11 +1,9 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "composite": true, "jsx": "react", "outDir": "./build/lib", "rootDir": "./src", - "tsBuildInfoFile": "./build/.tsbuildinfo", "types": ["vitest/globals"] }, "include": ["src"] diff --git a/packages/react-query-persist-client/package.json b/packages/react-query-persist-client/package.json index 5915cba679..157cca7890 100644 --- a/packages/react-query-persist-client/package.json +++ b/packages/react-query-persist-client/package.json @@ -30,7 +30,7 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "pnpm build:types", + "test:types": "tsc --noEmit", "test:lib": "vitest run --coverage", "test:lib:dev": "pnpm run test:lib --watch", "build": "pnpm build:rollup && pnpm build:types", diff --git a/packages/react-query-persist-client/tsconfig.json b/packages/react-query-persist-client/tsconfig.json index fe5606acab..6d40a82a85 100644 --- a/packages/react-query-persist-client/tsconfig.json +++ b/packages/react-query-persist-client/tsconfig.json @@ -1,11 +1,9 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "composite": true, "jsx": "react", "outDir": "./build/lib", "rootDir": "./src", - "tsBuildInfoFile": "./build/.tsbuildinfo", "types": ["vitest/globals"] }, "include": ["src"] diff --git a/packages/react-query/package.json b/packages/react-query/package.json index e83a29c5ee..13b8a5a276 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -25,7 +25,7 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "pnpm build:types", + "test:types": "tsc --noEmit", "test:lib": "vitest run --coverage", "test:lib:dev": "pnpm run test:lib --watch", "build": "pnpm build:rollup && pnpm build:codemods && pnpm build:types", diff --git a/packages/react-query/tsconfig.json b/packages/react-query/tsconfig.json index fe5606acab..6d40a82a85 100644 --- a/packages/react-query/tsconfig.json +++ b/packages/react-query/tsconfig.json @@ -1,11 +1,9 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "composite": true, "jsx": "react", "outDir": "./build/lib", "rootDir": "./src", - "tsBuildInfoFile": "./build/.tsbuildinfo", "types": ["vitest/globals"] }, "include": ["src"] diff --git a/packages/solid-query/package.json b/packages/solid-query/package.json index 2dfeb5d438..c2e7bd0120 100644 --- a/packages/solid-query/package.json +++ b/packages/solid-query/package.json @@ -34,7 +34,7 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "pnpm build:types", + "test:types": "tsc --noEmit", "test:lib": "vitest run --coverage", "test:lib:dev": "pnpm run test:lib --watch", "build": "pnpm build:rollup && pnpm build:types", diff --git a/packages/solid-query/tsconfig.json b/packages/solid-query/tsconfig.json index 0b7fabce33..0f95676e15 100644 --- a/packages/solid-query/tsconfig.json +++ b/packages/solid-query/tsconfig.json @@ -1,13 +1,11 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "composite": true, "declarationDir": "./build/types", "jsx": "preserve", "jsxImportSource": "solid-js", "outDir": "./build/source", "rootDir": "./src", - "tsBuildInfoFile": "./build/.tsbuildinfo", "types": ["vitest/globals"] }, "include": ["src", "createInfiniteQuery.test.tsx", "suspense.test.tsx"] diff --git a/packages/svelte-query/package.json b/packages/svelte-query/package.json index ca5894d1b3..e8116c03b6 100644 --- a/packages/svelte-query/package.json +++ b/packages/svelte-query/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "rimraf ./build && rimraf ./coverage", - "test:types": "svelte-check --tsconfig ./tsconfig.json && pnpm build", + "test:types": "svelte-check --tsconfig ./tsconfig.json", "test:eslint": "eslint --ext .svelte,.ts ./src", "test:lib": "vitest run --coverage", "test:lib:dev": "pnpm run test:lib --watch", diff --git a/packages/vue-query/package.json b/packages/vue-query/package.json index bcf76423d2..0dd172c96e 100644 --- a/packages/vue-query/package.json +++ b/packages/vue-query/package.json @@ -29,7 +29,7 @@ "scripts": { "clean": "rimraf ./build && rimraf ./coverage", "test:eslint": "eslint --ext .ts,.tsx ./src", - "test:types": "pnpm build:types", + "test:types": "tsc --noEmit", "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", diff --git a/packages/vue-query/tsconfig.json b/packages/vue-query/tsconfig.json index 4025cec0e4..bd42af09e7 100644 --- a/packages/vue-query/tsconfig.json +++ b/packages/vue-query/tsconfig.json @@ -1,10 +1,8 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "composite": true, "outDir": "./build/lib", "rootDir": "./src", - "tsBuildInfoFile": "./build/.tsbuildinfo", "types": ["vitest/globals"] }, "include": ["src"]