Skip to content

Commit 88b3643

Browse files
committed
misc: Use TS shared for whole monorepo
1 parent 118232f commit 88b3643

File tree

14 files changed

+141
-133
lines changed

14 files changed

+141
-133
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
"watch-local": "CUBEJS_API_URL=http://localhost:6020/cubejs-api/v1 rollup -c -w",
1010
"lint": "lerna run lint",
1111
"lint:fix": "lerna run lint:fix",
12-
"tsc": "lerna run tsc",
13-
"tsc:watch": "lerna run watch"
12+
"tsc": "tsc --build",
13+
"tsc:watch": "tsc --build --watch",
14+
"tsc:clean": "rm -rf packages/*/dist"
1415
},
1516
"author": "Cube Dev, Inc.",
1617
"dependencies": {
@@ -56,7 +57,7 @@
5657
"lerna": "^3.13.1",
5758
"prettier": "^2.0.5",
5859
"rollup": "^2.25.0",
59-
"typescript": "~4.1.2"
60+
"typescript": "^4.1.3"
6061
},
6162
"repository": {
6263
"type": "git",
Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
{
22
"extends": "../../tsconfig.base.json",
3+
"include": [
4+
"src",
5+
"test"
6+
],
37
"compilerOptions": {
4-
"outDir": "./dist", /* Redirect output structure to the directory. */
5-
"strict": true, /* Enable all strict type-checking options. */
8+
"outDir": "dist",
9+
"rootDir": ".",
10+
"baseUrl": ".",
611
"allowJs": true,
7-
"noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */
8-
"strictNullChecks": true, /* Enable strict null checks. */
9-
"strictFunctionTypes": true, /* Enable strict checking of function types. */
10-
"strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
11-
"strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
12-
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
13-
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
14-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
15-
"allowSyntheticDefaultImports": true,
16-
"skipLibCheck": true, /* Skip type checking of declaration files. */
17-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
18-
}
12+
"noImplicitAny": false,
13+
},
1914
}
Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
{
2+
"extends": "../../tsconfig.base.json",
3+
"include": [
4+
"src",
5+
"test"
6+
],
27
"compilerOptions": {
3-
"lib": ["es2017"],
4-
"target": "es2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
5-
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
6-
"declaration": true,
7-
"declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
8-
"sourceMap": true, /* Generates corresponding '.map' file. */
9-
"outDir": "./dist", /* Redirect output structure to the directory. */
10-
"strict": true, /* Enable all strict type-checking options. */
11-
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
12-
"strictNullChecks": true, /* Enable strict null checks. */
13-
"strictFunctionTypes": true, /* Enable strict checking of function types. */
14-
"strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
15-
"strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
16-
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
17-
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
18-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
19-
"allowSyntheticDefaultImports": true,
20-
"skipLibCheck": true, /* Skip type checking of declaration files. */
21-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
8+
"outDir": "dist",
9+
"rootDir": ".",
10+
"baseUrl": ".",
2211
}
2312
}

packages/cubejs-cli/tsconfig.json

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
{
22
"extends": "../../tsconfig.base.json",
3+
"include": [
4+
"src",
5+
"test"
6+
],
37
"compilerOptions": {
4-
"outDir": "./dist", /* Redirect output structure to the directory. */
5-
"strict": true, /* Enable all strict type-checking options. */
8+
"outDir": "dist",
9+
"rootDir": ".",
10+
"baseUrl": ".",
611
"allowJs": true,
712
"checkJs": true,
8-
"declaration": false,
9-
"declarationMap": false,
10-
"noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */
11-
"strictNullChecks": true, /* Enable strict null checks. */
12-
"strictFunctionTypes": true, /* Enable strict checking of function types. */
13-
"strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
14-
"strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
15-
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
16-
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
17-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
18-
"allowSyntheticDefaultImports": true,
19-
"skipLibCheck": true, /* Skip type checking of declaration files. */
20-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
13+
"noImplicitAny": false,
14+
"strictNullChecks": true,
15+
"strictFunctionTypes": true,
16+
"strictBindCallApply": true,
17+
"strictPropertyInitialization": true,
2118
}
2219
}

packages/cubejs-druid-driver/custom.d.ts

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

packages/cubejs-druid-driver/src/DruidDriver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ export class DruidDriver extends BaseDriver {
1111

1212
protected readonly client: DruidClient;
1313

14-
static dialectClass() {
14+
public static dialectClass() {
1515
return DruidQuery;
1616
}
1717

18-
constructor(config?: DruidDriverConfiguration) {
18+
public constructor(config?: DruidDriverConfiguration) {
1919
super();
2020

2121
let url = config?.url || process.env.CUBEJS_DB_URL;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
declare module '@cubejs-backend/schema-compiler/adapter/BaseQuery' {
2+
declare var BaseQuery: any;
3+
4+
export default BaseQuery;
5+
}
Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
{
22
"extends": "../../tsconfig.base.json",
3+
"include": [
4+
"src",
5+
"test"
6+
],
37
"compilerOptions": {
4-
"outDir": "./dist", /* Redirect output structure to the directory. */
5-
"strict": true, /* Enable all strict type-checking options. */
6-
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
7-
"strictNullChecks": true, /* Enable strict null checks. */
8-
"strictFunctionTypes": true, /* Enable strict checking of function types. */
9-
"strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
10-
"strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
11-
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
12-
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
13-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
14-
"allowSyntheticDefaultImports": true,
15-
"skipLibCheck": true, /* Skip type checking of declaration files. */
16-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
8+
"outDir": "dist",
9+
"rootDir": ".",
10+
"baseUrl": ".",
1711
}
1812
}
Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
{
22
"extends": "../../tsconfig.base.json",
3-
"compilerOptions": {
4-
"allowJs": true,
5-
"checkJs": false,
6-
"outDir": "./dist", /* Redirect output structure to the directory. */
7-
"strict": true, /* Enable all strict type-checking options. */
8-
"noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */
9-
"strictNullChecks": false, /* Enable strict null checks. */
10-
"strictFunctionTypes": false, /* Enable strict checking of function types. */
11-
"strictBindCallApply": false, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
12-
"strictPropertyInitialization": false, /* Enable strict checking of property initialization in classes. */
13-
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
14-
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
15-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
16-
"allowSyntheticDefaultImports": true,
17-
"skipLibCheck": true, /* Skip type checking of declaration files. */
18-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
19-
},
203
"include": [
214
"src",
225
"test"
23-
]
6+
],
7+
"compilerOptions": {
8+
"outDir": "dist",
9+
"rootDir": ".",
10+
"baseUrl": ".",
11+
"allowJs": true,
12+
"noImplicitAny": false,
13+
"strictNullChecks": false,
14+
"strictFunctionTypes": false,
15+
"strictBindCallApply": false,
16+
"strictPropertyInitialization": false,
17+
},
2418
}
Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
{
22
"extends": "../../tsconfig.base.json",
3-
"compilerOptions": {
4-
"allowJs": true,
5-
"checkJs": false,
6-
"outDir": "./dist", /* Redirect output structure to the directory. */
7-
"strict": true, /* Enable all strict type-checking options. */
8-
"noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */
9-
"strictNullChecks": false, /* Enable strict null checks. */
10-
"strictFunctionTypes": false, /* Enable strict checking of function types. */
11-
"strictBindCallApply": false, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
12-
"strictPropertyInitialization": false, /* Enable strict checking of property initialization in classes. */
13-
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
14-
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
15-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
16-
"allowSyntheticDefaultImports": true,
17-
"skipLibCheck": true, /* Skip type checking of declaration files. */
18-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
19-
},
203
"include": [
214
"src",
225
"test"
23-
]
6+
],
7+
"compilerOptions": {
8+
"outDir": "dist",
9+
"rootDir": ".",
10+
"baseUrl": ".",
11+
"allowJs": true,
12+
"noImplicitAny": false,
13+
"strictNullChecks": false,
14+
"strictFunctionTypes": false,
15+
"strictBindCallApply": false,
16+
"strictPropertyInitialization": false,
17+
},
2418
}

packages/cubejs-server/tsconfig.json

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
11
{
22
"extends": "../../tsconfig.base.json",
3+
"include": [
4+
"src",
5+
"test"
6+
],
37
"compilerOptions": {
8+
"outDir": "dist",
9+
"rootDir": ".",
10+
"baseUrl": ".",
411
"allowJs": true,
512
"resolveJsonModule": true,
6-
"outDir": "./dist", /* Redirect output structure to the directory. */
7-
"strict": true, /* Enable all strict type-checking options. */
8-
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
9-
"strictNullChecks": true, /* Enable strict null checks. */
10-
"strictFunctionTypes": true, /* Enable strict checking of function types. */
11-
"strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
12-
"strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
13-
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
14-
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
15-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
16-
"allowSyntheticDefaultImports": true,
17-
"skipLibCheck": true, /* Skip type checking of declaration files. */
18-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
1913
},
20-
"include": [
21-
"src"
22-
]
2314
}

tsconfig.base.json

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,42 @@
11
{
2+
"exclude": [
3+
"node_modules",
4+
"dist",
5+
],
6+
"files": [],
27
"compilerOptions": {
8+
"incremental": true,
39
"lib": ["es2017"],
410
"target": "es2017",
511
"module": "commonjs",
12+
"baseUrl": ".",
13+
"paths": {
14+
"@cubejs-backend/*": [
15+
"packages/cubejs-api-gateway/src",
16+
"packages/cubejs-cli/src",
17+
"packages/cubejs-query-orchestrator/src",
18+
"packages/cubejs-schema-compiler/",
19+
"packages/cubejs-server/src",
20+
"packages/cubejs-server-core/src",
21+
]
22+
},
23+
"composite": true,
624
"declaration": true,
725
"declarationMap": true,
826
"sourceMap": true,
9-
"esModuleInterop": true
27+
//
28+
"strict": true,
29+
"noImplicitAny": true,
30+
"strictNullChecks": true,
31+
"strictFunctionTypes": true,
32+
"strictBindCallApply": true,
33+
"strictPropertyInitialization": true,
34+
"noImplicitThis": true,
35+
"alwaysStrict": true,
36+
"moduleResolution": "node",
37+
"esModuleInterop": true,
38+
"allowSyntheticDefaultImports": true,
39+
"skipLibCheck": true,
40+
"forceConsistentCasingInFileNames": true
1041
}
1142
}

tsconfig.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"references": [
4+
{
5+
"path": "packages/cubejs-backend-shared"
6+
},
7+
{
8+
"path": "packages/cubejs-api-gateway"
9+
},
10+
{
11+
"path": "packages/cubejs-query-orchestrator"
12+
},
13+
{
14+
"path": "packages/cubejs-druid-driver"
15+
},
16+
{
17+
"path": "packages/cubejs-server-core"
18+
},
19+
{
20+
"path": "packages/cubejs-server"
21+
},
22+
{
23+
"path": "packages/cubejs-cli"
24+
}
25+
]
26+
}

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@
952952
to-fast-properties "^2.0.0"
953953

954954
"@cubejs-backend/linter@file:./packages/cubejs-linter":
955-
version "0.24.3"
955+
version "0.25.0"
956956
dependencies:
957957
"@typescript-eslint/eslint-plugin" "^4.8.2"
958958
"@typescript-eslint/parser" "^4.8.2"
@@ -7466,10 +7466,10 @@ typedarray@^0.0.6:
74667466
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
74677467
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
74687468

7469-
typescript@~4.1.2:
7470-
version "4.1.2"
7471-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9"
7472-
integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==
7469+
typescript@^4.1.3:
7470+
version "4.1.3"
7471+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7"
7472+
integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==
74737473

74747474
uglify-js@^3.1.4:
74757475
version "3.12.0"

0 commit comments

Comments
 (0)