From 3544ed0a73fcd9674943e63a20dda862e8552540 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Thu, 30 Jun 2022 01:07:54 -0300 Subject: [PATCH] Chore: Revert `yarn dev` implementation (#26075) --- .gitignore | 2 - _templates/package/new/package.json.ejs.t | 1 + _templates/package/new/tsconfig.json.ejs.t | 3 +- package.json | 6 +- packages/api-client/package.json | 3 +- packages/api-client/tsconfig.json | 1 - packages/core-typings/package.json | 1 + packages/core-typings/tsconfig.json | 1 - packages/favicon/package.json | 3 +- packages/favicon/tsconfig.json | 1 - packages/gazzodown/package.json | 1 + packages/gazzodown/tsconfig.json | 3 +- packages/model-typings/tsconfig.json | 3 +- packages/models/tsconfig.json | 1 - packages/rest-typings/package.json | 1 + packages/rest-typings/tsconfig.json | 1 - packages/ui-client/package.json | 3 +- packages/ui-client/tsconfig.json | 3 +- packages/ui-contexts/package.json | 1 + packages/ui-contexts/tsconfig.json | 3 +- tsconfig.base.json | 2 +- tsconfig.json | 20 ---- turbo.json | 3 - yarn.lock | 117 ++++++++++----------- 24 files changed, 72 insertions(+), 112 deletions(-) delete mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index 7dde7625b6e..310be7ef939 100644 --- a/.gitignore +++ b/.gitignore @@ -43,5 +43,3 @@ yarn-error.log* .nvmrc .idea/ - -*.tsbuildinfo \ No newline at end of file diff --git a/_templates/package/new/package.json.ejs.t b/_templates/package/new/package.json.ejs.t index 22226230f31..5e3461b6c18 100644 --- a/_templates/package/new/package.json.ejs.t +++ b/_templates/package/new/package.json.ejs.t @@ -18,6 +18,7 @@ to: packages/<%= name %>/package.json "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", "jest": "jest", "build": "rm -rf dist && tsc -p tsconfig.json", + "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput" }, "main": "./dist/index.js", "typings": "./dist/index.d.ts", diff --git a/_templates/package/new/tsconfig.json.ejs.t b/_templates/package/new/tsconfig.json.ejs.t index 41293b7cd7b..1b5cbc20b8e 100644 --- a/_templates/package/new/tsconfig.json.ejs.t +++ b/_templates/package/new/tsconfig.json.ejs.t @@ -5,8 +5,7 @@ to: packages/<%= name %>/tsconfig.json "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "composite": true + "outDir": "./dist" }, "include": ["./src/**/*"] } diff --git a/package.json b/package.json index 571c696c05c..4ad871604c5 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,7 @@ "build:services": "turbo run build --filter=rocketchat-services...", "build:ci": "turbo run build:ci", "testunit": "turbo run testunit", - "dev:root": "tsc -b --watch --preserveWatchOutput", - "dev": "turbo run //#dev:root dev --parallel --filter=@rocket.chat/meteor...", + "dev": "turbo run 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" @@ -20,8 +19,7 @@ "@types/chart.js": "^2.9.37", "@types/js-yaml": "^4.0.5", "husky": "^7.0.4", - "turbo": "^1.2.16", - "typescript": "~4.3.4" + "turbo": "1.2.5" }, "workspaces": [ "apps/*", diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 2100aaa8b0e..6cfbc434909 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -14,7 +14,8 @@ "lint": "eslint --ext .js,.jsx,.ts,.tsx .", "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", "jest": "jest", - "build": "tsc -p tsconfig.json" + "build": "tsc -p tsconfig.json", + "dev": "tsc --watch --preserveWatchOutput -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 904561f5966..455edb8149c 100644 --- a/packages/api-client/tsconfig.json +++ b/packages/api-client/tsconfig.json @@ -2,7 +2,6 @@ "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 a5ceaceb651..8a89b54d485 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -13,6 +13,7 @@ "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 904561f5966..455edb8149c 100644 --- a/packages/core-typings/tsconfig.json +++ b/packages/core-typings/tsconfig.json @@ -2,7 +2,6 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "./src", - "composite": true, "outDir": "./dist" }, "include": ["./src/**/*"] diff --git a/packages/favicon/package.json b/packages/favicon/package.json index e6a0e442fd1..359853747b2 100644 --- a/packages/favicon/package.json +++ b/packages/favicon/package.json @@ -9,7 +9,8 @@ "scripts": { "lint": "eslint --ext .js,.jsx,.ts,.tsx .", "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", - "build": "rm -rf dist && tsc -p tsconfig.json" + "build": "rm -rf dist && tsc -p tsconfig.json", + "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput" }, "main": "./dist/index.js", "typings": "./dist/index.d.ts", diff --git a/packages/favicon/tsconfig.json b/packages/favicon/tsconfig.json index b772957cc6d..b16dc6107ab 100644 --- a/packages/favicon/tsconfig.json +++ b/packages/favicon/tsconfig.json @@ -4,7 +4,6 @@ "rootDir": "./src", "outDir": "./dist", "lib": ["DOM"], - "composite": true }, "include": ["./src/**/*"] } diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index 7af07fa5343..c612fb754e6 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -48,6 +48,7 @@ "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", "test": "jest", "build": "rm -rf dist && tsc -p tsconfig.json", + "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "typecheck": "tsc -p tsconfig.json --noEmit", "storybook": "start-storybook -p 6006", "build-storybook": "build-storybook" diff --git a/packages/gazzodown/tsconfig.json b/packages/gazzodown/tsconfig.json index 4cf6a20bc60..455edb8149c 100644 --- a/packages/gazzodown/tsconfig.json +++ b/packages/gazzodown/tsconfig.json @@ -2,8 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "composite": true + "outDir": "./dist" }, "include": ["./src/**/*"] } diff --git a/packages/model-typings/tsconfig.json b/packages/model-typings/tsconfig.json index 4cf6a20bc60..455edb8149c 100644 --- a/packages/model-typings/tsconfig.json +++ b/packages/model-typings/tsconfig.json @@ -2,8 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "composite": true + "outDir": "./dist" }, "include": ["./src/**/*"] } diff --git a/packages/models/tsconfig.json b/packages/models/tsconfig.json index a2424e02b7b..010aef9ff7d 100644 --- a/packages/models/tsconfig.json +++ b/packages/models/tsconfig.json @@ -5,7 +5,6 @@ "outDir": "./dist", "resolveJsonModule": true, "esModuleInterop": true, - "composite": true }, "include": ["./src/**/*"] } diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index c6d7839ce98..f4490e94074 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -15,6 +15,7 @@ "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 904561f5966..455edb8149c 100644 --- a/packages/rest-typings/tsconfig.json +++ b/packages/rest-typings/tsconfig.json @@ -2,7 +2,6 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "./src", - "composite": true, "outDir": "./dist" }, "include": ["./src/**/*"] diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index 6c0c88dee0c..618e9258951 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -29,7 +29,8 @@ "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", "jest": "jest", "build": "rm -rf dist && tsc -p tsconfig.json", - "storybook": "start-storybook -p 6006" + "storybook": "start-storybook -p 6006", + "dev": "tsc -p --watch --preserveWatchOutput tsconfig.json" }, "main": "./dist/index.js", "typings": "./dist/index.d.ts", diff --git a/packages/ui-client/tsconfig.json b/packages/ui-client/tsconfig.json index cbea51d230c..ac08f2d674f 100644 --- a/packages/ui-client/tsconfig.json +++ b/packages/ui-client/tsconfig.json @@ -3,8 +3,7 @@ "compilerOptions": { "rootDir": "./src", "outDir": "./dist", - "importsNotUsedAsValues": "preserve", - "composite": true + "importsNotUsedAsValues": "preserve" }, "include": ["./src/**/*"], "exclude": ["**/*.stories.tsx", "**/*.stories.js"] diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index 43ed6c22889..6ad0d35404f 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -30,6 +30,7 @@ "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 33478773e57..010aef9ff7d 100644 --- a/packages/ui-contexts/tsconfig.json +++ b/packages/ui-contexts/tsconfig.json @@ -4,8 +4,7 @@ "rootDir": "./src", "outDir": "./dist", "resolveJsonModule": true, - "composite": true, "esModuleInterop": true, }, - "include": ["./src/**/*", "./src/en.json"] + "include": ["./src/**/*"] } diff --git a/tsconfig.base.json b/tsconfig.base.json index 8c301a95a67..44fa2e47d0c 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 deleted file mode 100644 index 7c251c9ec24..00000000000 --- a/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "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/favicon" }, - { "path": "./packages/gazzodown" }, - { "path": "./packages/ui-client" }, - { "path": "./packages/models" }, - { "path": "./packages/model-typings" }, - // { "path": "./packages/livechat" }, - ] -} diff --git a/turbo.json b/turbo.json index a07f82dc76c..c12232840f7 100644 --- a/turbo.json +++ b/turbo.json @@ -24,9 +24,6 @@ "dependsOn": ["build"], "outputs": [] }, - "//#dev:root": { - "cache": false - }, "dev": { "dependsOn": ["^dev"], "cache": false diff --git a/yarn.lock b/yarn.lock index 751e513c2dd..fa43793c916 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28937,8 +28937,7 @@ __metadata: "@types/chart.js": ^2.9.37 "@types/js-yaml": ^4.0.5 husky: ^7.0.4 - turbo: ^1.2.16 - typescript: ~4.3.4 + turbo: 1.2.5 languageName: unknown linkType: soft @@ -32020,114 +32019,106 @@ __metadata: languageName: node linkType: hard -"turbo-darwin-64@npm:1.2.16": - version: 1.2.16 - resolution: "turbo-darwin-64@npm:1.2.16" +"turbo-darwin-64@npm:1.2.5": + version: 1.2.5 + resolution: "turbo-darwin-64@npm:1.2.5" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"turbo-darwin-arm64@npm:1.2.16": - version: 1.2.16 - resolution: "turbo-darwin-arm64@npm:1.2.16" +"turbo-darwin-arm64@npm:1.2.5": + version: 1.2.5 + resolution: "turbo-darwin-arm64@npm:1.2.5" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"turbo-freebsd-64@npm:1.2.16": - version: 1.2.16 - resolution: "turbo-freebsd-64@npm:1.2.16" +"turbo-freebsd-64@npm:1.2.5": + version: 1.2.5 + resolution: "turbo-freebsd-64@npm:1.2.5" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"turbo-freebsd-arm64@npm:1.2.16": - version: 1.2.16 - resolution: "turbo-freebsd-arm64@npm:1.2.16" +"turbo-freebsd-arm64@npm:1.2.5": + version: 1.2.5 + resolution: "turbo-freebsd-arm64@npm:1.2.5" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"turbo-linux-32@npm:1.2.16": - version: 1.2.16 - resolution: "turbo-linux-32@npm:1.2.16" +"turbo-linux-32@npm:1.2.5": + version: 1.2.5 + resolution: "turbo-linux-32@npm:1.2.5" conditions: os=linux & cpu=ia32 languageName: node linkType: hard -"turbo-linux-64@npm:1.2.16": - version: 1.2.16 - resolution: "turbo-linux-64@npm:1.2.16" +"turbo-linux-64@npm:1.2.5": + version: 1.2.5 + resolution: "turbo-linux-64@npm:1.2.5" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"turbo-linux-arm64@npm:1.2.16": - version: 1.2.16 - resolution: "turbo-linux-arm64@npm:1.2.16" +"turbo-linux-arm64@npm:1.2.5": + version: 1.2.5 + resolution: "turbo-linux-arm64@npm:1.2.5" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"turbo-linux-arm@npm:1.2.16": - version: 1.2.16 - resolution: "turbo-linux-arm@npm:1.2.16" +"turbo-linux-arm@npm:1.2.5": + version: 1.2.5 + resolution: "turbo-linux-arm@npm:1.2.5" conditions: os=linux & cpu=arm languageName: node linkType: hard -"turbo-linux-mips64le@npm:1.2.16": - version: 1.2.16 - resolution: "turbo-linux-mips64le@npm:1.2.16" +"turbo-linux-mips64le@npm:1.2.5": + version: 1.2.5 + resolution: "turbo-linux-mips64le@npm:1.2.5" conditions: os=linux & cpu=mips64el languageName: node linkType: hard -"turbo-linux-ppc64le@npm:1.2.16": - version: 1.2.16 - resolution: "turbo-linux-ppc64le@npm:1.2.16" +"turbo-linux-ppc64le@npm:1.2.5": + version: 1.2.5 + resolution: "turbo-linux-ppc64le@npm:1.2.5" conditions: os=linux & cpu=ppc64 languageName: node linkType: hard -"turbo-windows-32@npm:1.2.16": - version: 1.2.16 - resolution: "turbo-windows-32@npm:1.2.16" +"turbo-windows-32@npm:1.2.5": + version: 1.2.5 + resolution: "turbo-windows-32@npm:1.2.5" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"turbo-windows-64@npm:1.2.16": - version: 1.2.16 - resolution: "turbo-windows-64@npm:1.2.16" +"turbo-windows-64@npm:1.2.5": + version: 1.2.5 + resolution: "turbo-windows-64@npm:1.2.5" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"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" +"turbo@npm:1.2.5": + version: 1.2.5 + resolution: "turbo@npm:1.2.5" 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 + 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 dependenciesMeta: turbo-darwin-64: optional: true @@ -32153,11 +32144,9 @@ __metadata: optional: true turbo-windows-64: optional: true - turbo-windows-arm64: - optional: true bin: turbo: bin/turbo - checksum: 245b1b28af153edd14ab35a4812a8651b1e7cbae44ce3f15b53e0a73a3cc9c4ea39734f18c966403496c37876dd57053070b5b7eb736a14f1bc7e1bfd36566f3 + checksum: cba41a5c0e586f47f30e37424a112923fab5b29fda84bf6e28dfd56e981babc3787b3c1ce487bcff1feb828045ea0369f9ec5b32b495778285aa0983d417693c languageName: node linkType: hard