Skip to content

Commit

Permalink
ci: Add TS version tests (#7605)
Browse files Browse the repository at this point in the history
* Simplify implementation

* Add to remaining packages
  • Loading branch information
lachlancollins committed Jun 23, 2024
1 parent 32bce35 commit 8253a80
Show file tree
Hide file tree
Showing 43 changed files with 171 additions and 110 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
"solid-js": "^1.8.17",
"tsup": "^8.0.2",
"typescript": "5.3.3",
"typescript50": "npm:[email protected]",
"typescript51": "npm:[email protected]",
"typescript52": "npm:[email protected]",
"vite": "^5.2.11",
"vitest": "^1.6.0"
},
Expand Down
5 changes: 4 additions & 1 deletion packages/angular-query-devtools-experimental/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"strictInjectionParameters": true,
"strictInputAccessModifiers": true
},
"include": ["src/**/*.ts", ".eslintrc.cjs"]
"include": ["src"]
}
13 changes: 1 addition & 12 deletions packages/angular-query-devtools-experimental/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"]
}
6 changes: 5 additions & 1 deletion packages/angular-query-experimental/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/angular-query-experimental/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"strictInjectionParameters": true,
"strictInputAccessModifiers": true
},
"include": ["src/**/*.ts", ".eslintrc.cjs"]
"include": ["src"]
}
12 changes: 1 addition & 11 deletions packages/angular-query-experimental/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
{
"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": "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"]
}
6 changes: 5 additions & 1 deletion packages/eslint-plugin-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-query/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.json",
"include": ["src/**/*.ts", "src/**/*.tsx", ".eslintrc.cjs", "vite.config.ts"]
"include": ["src", ".eslintrc.cjs", "vite.config.ts"]
}
6 changes: 5 additions & 1 deletion packages/query-async-storage-persister/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 1 addition & 7 deletions packages/query-async-storage-persister/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"]
}
6 changes: 5 additions & 1 deletion packages/query-broadcast-client-experimental/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/query-broadcast-client-experimental/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.json",
"include": ["src/**/*.ts", "src/**/*.tsx", ".eslintrc.cjs", "tsup.config.js"]
"include": ["src", ".eslintrc.cjs", "tsup.config.js"]
}
2 changes: 1 addition & 1 deletion packages/query-codemods/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.json",
"include": ["src/**/*.ts", "src/**/*.tsx", ".eslintrc.cjs", "vite.config.ts"]
"include": ["src", ".eslintrc.cjs", "vite.config.ts"]
}
6 changes: 5 additions & 1 deletion packages/query-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 1 addition & 7 deletions packages/query-core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"]
}
8 changes: 8 additions & 0 deletions packages/query-core/tsconfig.legacy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"jsx": "react-jsx"
},
"include": ["src"],
"exclude": ["src/__tests__"]
}
6 changes: 5 additions & 1 deletion packages/query-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 1 addition & 7 deletions packages/query-devtools/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
6 changes: 5 additions & 1 deletion packages/query-persist-client-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 1 addition & 7 deletions packages/query-persist-client-core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"]
}
6 changes: 5 additions & 1 deletion packages/query-sync-storage-persister/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 1 addition & 7 deletions packages/query-sync-storage-persister/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"]
}
6 changes: 5 additions & 1 deletion packages/react-query-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions packages/react-query-devtools/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"jsx": "react-jsx"
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src",
".eslintrc.cjs",
"test-setup.ts",
"tsup.config.js",
Expand Down
6 changes: 5 additions & 1 deletion packages/react-query-next-experimental/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 1 addition & 7 deletions packages/react-query-next-experimental/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
6 changes: 5 additions & 1 deletion packages/react-query-persist-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions packages/react-query-persist-client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"jsx": "react-jsx"
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src",
".eslintrc.cjs",
"test-setup.ts",
"tsup.config.js",
Expand Down
6 changes: 5 additions & 1 deletion packages/react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions packages/react-query/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"jsx": "react-jsx"
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src",
".eslintrc.cjs",
"test-setup.ts",
"tsup.config.js",
Expand Down
8 changes: 8 additions & 0 deletions packages/react-query/tsconfig.legacy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"jsx": "react-jsx"
},
"include": ["src"],
"exclude": ["src/__tests__"]
}
Loading

0 comments on commit 8253a80

Please sign in to comment.