diff --git a/.gitignore b/.gitignore index 310be7ef939d6..7dde7625b6e00 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,5 @@ yarn-error.log* .nvmrc .idea/ + +*.tsbuildinfo \ No newline at end of file diff --git a/_templates/package/new/tsconfig.json.ejs.t b/_templates/package/new/tsconfig.json.ejs.t index 1b5cbc20b8ed1..41293b7cd7b8e 100644 --- a/_templates/package/new/tsconfig.json.ejs.t +++ b/_templates/package/new/tsconfig.json.ejs.t @@ -5,7 +5,8 @@ to: packages/<%= name %>/tsconfig.json "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist" + "outDir": "./dist", + "composite": true }, "include": ["./src/**/*"] } diff --git a/package.json b/package.json index 4ad871604c5ea..571c696c05cab 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "build:services": "turbo run build --filter=rocketchat-services...", "build:ci": "turbo run build:ci", "testunit": "turbo run testunit", - "dev": "turbo run dev --parallel --filter=@rocket.chat/meteor...", + "dev:root": "tsc -b --watch --preserveWatchOutput", + "dev": "turbo run //#dev:root dev --parallel --filter=@rocket.chat/meteor...", "dsv": "turbo run dsv --filter=@rocket.chat/meteor...", "lint": "turbo run lint", "storybook": "yarn workspace @rocket.chat/meteor run storybook" @@ -19,7 +20,8 @@ "@types/chart.js": "^2.9.37", "@types/js-yaml": "^4.0.5", "husky": "^7.0.4", - "turbo": "1.2.5" + "turbo": "^1.2.16", + "typescript": "~4.3.4" }, "workspaces": [ "apps/*", diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 6cfbc434909bb..2100aaa8b0e11 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -14,8 +14,7 @@ "lint": "eslint --ext .js,.jsx,.ts,.tsx .", "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", "jest": "jest", - "build": "tsc -p tsconfig.json", - "dev": "tsc --watch --preserveWatchOutput -p tsconfig.json" + "build": "tsc -p tsconfig.json" }, "main": "./dist/index.js", "typings": "./dist/index.d.ts", diff --git a/packages/api-client/tsconfig.json b/packages/api-client/tsconfig.json index 455edb8149c4a..904561f5966c9 100644 --- a/packages/api-client/tsconfig.json +++ b/packages/api-client/tsconfig.json @@ -2,6 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "./src", + "composite": true, "outDir": "./dist" }, "include": ["./src/**/*"] diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index 8a89b54d48564..a5ceaceb65188 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -13,7 +13,6 @@ "lint": "eslint --ext .js,.jsx,.ts,.tsx .", "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", "test": "echo \"Error: no test specified\" && exit 1", - "dev": "tsc --watch --preserveWatchOutput -p tsconfig.json", "build": "rm -rf dist && tsc -p tsconfig.json" }, "main": "./dist/index.js", diff --git a/packages/core-typings/tsconfig.json b/packages/core-typings/tsconfig.json index 455edb8149c4a..904561f5966c9 100644 --- a/packages/core-typings/tsconfig.json +++ b/packages/core-typings/tsconfig.json @@ -2,6 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "./src", + "composite": true, "outDir": "./dist" }, "include": ["./src/**/*"] diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index f4490e940749b..c6d7839ce989e 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -15,7 +15,6 @@ "lint": "eslint --ext .js,.jsx,.ts,.tsx .", "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", "jest": "jest", - "dev": "tsc --watch --preserveWatchOutput -p tsconfig.json", "build": "rm -rf dist && tsc -p tsconfig.json" }, "main": "./dist/index.js", diff --git a/packages/rest-typings/tsconfig.json b/packages/rest-typings/tsconfig.json index 455edb8149c4a..904561f5966c9 100644 --- a/packages/rest-typings/tsconfig.json +++ b/packages/rest-typings/tsconfig.json @@ -2,6 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "./src", + "composite": true, "outDir": "./dist" }, "include": ["./src/**/*"] diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index 6ad0d35404f82..43ed6c22889ea 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -30,7 +30,6 @@ "lint": "eslint --ext .js,.jsx,.ts,.tsx .", "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", "jest": "jest", - "dev": "tsc --watch --preserveWatchOutput -p tsconfig.json", "build": "rm -rf dist && tsc -p tsconfig.json" }, "main": "./dist/index.js", diff --git a/packages/ui-contexts/tsconfig.json b/packages/ui-contexts/tsconfig.json index 010aef9ff7de8..33478773e5777 100644 --- a/packages/ui-contexts/tsconfig.json +++ b/packages/ui-contexts/tsconfig.json @@ -4,7 +4,8 @@ "rootDir": "./src", "outDir": "./dist", "resolveJsonModule": true, + "composite": true, "esModuleInterop": true, }, - "include": ["./src/**/*"] + "include": ["./src/**/*", "./src/en.json"] } diff --git a/tsconfig.base.json b/tsconfig.base.json index 44fa2e47d0ccd..8c301a95a67d7 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -12,7 +12,7 @@ "moduleResolution": "node", "resolveJsonModule": true, "jsx": "react-jsx", - "importsNotUsedAsValues": "error" + "importsNotUsedAsValues": "error", }, "exclude": ["node_modules", "**/*.spec.ts"] } diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000000000..513a69ef36974 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "skipLibCheck": true + }, + "exclude": ["*/**"], + "references": [ + { "path": "./packages/core-typings" }, + { "path": "./packages/rest-typings" }, + { "path": "./packages/api-client" }, + { "path": "./packages/ui-client" }, + { "path": "./packages/ui-contexts" }, + // { "path": "./packages/livechat" }, + ] +} diff --git a/turbo.json b/turbo.json index c12232840f71f..a07f82dc76c90 100644 --- a/turbo.json +++ b/turbo.json @@ -24,6 +24,9 @@ "dependsOn": ["build"], "outputs": [] }, + "//#dev:root": { + "cache": false + }, "dev": { "dependsOn": ["^dev"], "cache": false diff --git a/yarn.lock b/yarn.lock index 4db0518df3b56..3fa8a860f5d14 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28898,7 +28898,8 @@ __metadata: "@types/chart.js": ^2.9.37 "@types/js-yaml": ^4.0.5 husky: ^7.0.4 - turbo: 1.2.5 + turbo: ^1.2.16 + typescript: ~4.3.4 languageName: unknown linkType: soft @@ -31980,106 +31981,114 @@ __metadata: languageName: node linkType: hard -"turbo-darwin-64@npm:1.2.5": - version: 1.2.5 - resolution: "turbo-darwin-64@npm:1.2.5" +"turbo-darwin-64@npm:1.2.16": + version: 1.2.16 + resolution: "turbo-darwin-64@npm:1.2.16" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"turbo-darwin-arm64@npm:1.2.5": - version: 1.2.5 - resolution: "turbo-darwin-arm64@npm:1.2.5" +"turbo-darwin-arm64@npm:1.2.16": + version: 1.2.16 + resolution: "turbo-darwin-arm64@npm:1.2.16" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"turbo-freebsd-64@npm:1.2.5": - version: 1.2.5 - resolution: "turbo-freebsd-64@npm:1.2.5" +"turbo-freebsd-64@npm:1.2.16": + version: 1.2.16 + resolution: "turbo-freebsd-64@npm:1.2.16" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"turbo-freebsd-arm64@npm:1.2.5": - version: 1.2.5 - resolution: "turbo-freebsd-arm64@npm:1.2.5" +"turbo-freebsd-arm64@npm:1.2.16": + version: 1.2.16 + resolution: "turbo-freebsd-arm64@npm:1.2.16" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"turbo-linux-32@npm:1.2.5": - version: 1.2.5 - resolution: "turbo-linux-32@npm:1.2.5" +"turbo-linux-32@npm:1.2.16": + version: 1.2.16 + resolution: "turbo-linux-32@npm:1.2.16" conditions: os=linux & cpu=ia32 languageName: node linkType: hard -"turbo-linux-64@npm:1.2.5": - version: 1.2.5 - resolution: "turbo-linux-64@npm:1.2.5" +"turbo-linux-64@npm:1.2.16": + version: 1.2.16 + resolution: "turbo-linux-64@npm:1.2.16" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"turbo-linux-arm64@npm:1.2.5": - version: 1.2.5 - resolution: "turbo-linux-arm64@npm:1.2.5" +"turbo-linux-arm64@npm:1.2.16": + version: 1.2.16 + resolution: "turbo-linux-arm64@npm:1.2.16" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"turbo-linux-arm@npm:1.2.5": - version: 1.2.5 - resolution: "turbo-linux-arm@npm:1.2.5" +"turbo-linux-arm@npm:1.2.16": + version: 1.2.16 + resolution: "turbo-linux-arm@npm:1.2.16" conditions: os=linux & cpu=arm languageName: node linkType: hard -"turbo-linux-mips64le@npm:1.2.5": - version: 1.2.5 - resolution: "turbo-linux-mips64le@npm:1.2.5" +"turbo-linux-mips64le@npm:1.2.16": + version: 1.2.16 + resolution: "turbo-linux-mips64le@npm:1.2.16" conditions: os=linux & cpu=mips64el languageName: node linkType: hard -"turbo-linux-ppc64le@npm:1.2.5": - version: 1.2.5 - resolution: "turbo-linux-ppc64le@npm:1.2.5" +"turbo-linux-ppc64le@npm:1.2.16": + version: 1.2.16 + resolution: "turbo-linux-ppc64le@npm:1.2.16" conditions: os=linux & cpu=ppc64 languageName: node linkType: hard -"turbo-windows-32@npm:1.2.5": - version: 1.2.5 - resolution: "turbo-windows-32@npm:1.2.5" +"turbo-windows-32@npm:1.2.16": + version: 1.2.16 + resolution: "turbo-windows-32@npm:1.2.16" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"turbo-windows-64@npm:1.2.5": - version: 1.2.5 - resolution: "turbo-windows-64@npm:1.2.5" +"turbo-windows-64@npm:1.2.16": + version: 1.2.16 + resolution: "turbo-windows-64@npm:1.2.16" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"turbo@npm:1.2.5": - version: 1.2.5 - resolution: "turbo@npm:1.2.5" - dependencies: - turbo-darwin-64: 1.2.5 - turbo-darwin-arm64: 1.2.5 - turbo-freebsd-64: 1.2.5 - turbo-freebsd-arm64: 1.2.5 - turbo-linux-32: 1.2.5 - turbo-linux-64: 1.2.5 - turbo-linux-arm: 1.2.5 - turbo-linux-arm64: 1.2.5 - turbo-linux-mips64le: 1.2.5 - turbo-linux-ppc64le: 1.2.5 - turbo-windows-32: 1.2.5 - turbo-windows-64: 1.2.5 +"turbo-windows-arm64@npm:1.2.16": + version: 1.2.16 + resolution: "turbo-windows-arm64@npm:1.2.16" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"turbo@npm:^1.2.16": + version: 1.2.16 + resolution: "turbo@npm:1.2.16" + dependencies: + turbo-darwin-64: 1.2.16 + turbo-darwin-arm64: 1.2.16 + turbo-freebsd-64: 1.2.16 + turbo-freebsd-arm64: 1.2.16 + turbo-linux-32: 1.2.16 + turbo-linux-64: 1.2.16 + turbo-linux-arm: 1.2.16 + turbo-linux-arm64: 1.2.16 + turbo-linux-mips64le: 1.2.16 + turbo-linux-ppc64le: 1.2.16 + turbo-windows-32: 1.2.16 + turbo-windows-64: 1.2.16 + turbo-windows-arm64: 1.2.16 dependenciesMeta: turbo-darwin-64: optional: true @@ -32105,9 +32114,11 @@ __metadata: optional: true turbo-windows-64: optional: true + turbo-windows-arm64: + optional: true bin: turbo: bin/turbo - checksum: cba41a5c0e586f47f30e37424a112923fab5b29fda84bf6e28dfd56e981babc3787b3c1ce487bcff1feb828045ea0369f9ec5b32b495778285aa0983d417693c + checksum: 245b1b28af153edd14ab35a4812a8651b1e7cbae44ce3f15b53e0a73a3cc9c4ea39734f18c966403496c37876dd57053070b5b7eb736a14f1bc7e1bfd36566f3 languageName: node linkType: hard