Scheduling infrastructure for absolutely everyone.
Improves reported type errors on CI (#7813)
Omar Lópezcee905bc5a12
diff --git a/.github/matchers/tsc-absolute.json b/.github/matchers/tsc-absolute.jsonnew file mode 100644index 00000000000..aa36217b417--- /dev/null+++ b/.github/matchers/tsc-absolute.json@@ -0,0 +1,18 @@+{+ "problemMatcher": [+ {+ "owner": "tsc-absolute",+ "pattern": [+ {+ "regexp": "(?:^|\\s)([^\\s].*)[\\(:](\\d+)[,:](\\d+)(?:\\):\\s+|\\s+-\\s+)(error|warning|info)\\s+(TS\\d+)\\s*:\\s*(.*)$",+ "file": 1,+ "line": 2,+ "column": 3,+ "severity": 4,+ "code": 5,+ "message": 6+ }+ ]+ }+ ]+}diff --git a/.github/workflows/check-types.yml b/.github/workflows/check-types.ymlindex ec165d261bb..1628003b6c2 100644--- a/.github/workflows/check-types.yml+++ b/.github/workflows/check-types.yml@@ -10,8 +10,10 @@ jobs:- uses: actions/checkout@v3- uses: ./.github/actions/dangerous-git-checkout- uses: ./.github/actions/yarn-install-- name: Show inforun: node -e "console.log(require('v8').getHeapStatistics())"-- - run: yarn type-check+ - name: Configure TSC problem matcher+ run: |+ echo "::remove-matcher owner=tsc::"+ echo "::add-matcher::.github/matchers/tsc-absolute.json"+ - run: yarn type-check:cidiff --git a/apps/docs/package.json b/apps/docs/package.jsonindex db0193d0554..19b87989d36 100644--- a/apps/docs/package.json+++ b/apps/docs/package.json@@ -11,7 +11,8 @@"lint:fix": "eslint . --ext .ts,.js,.tsx,.jsx --fix","lint:report": "eslint . --format json --output-file ../../lint-results/docs.json","start": "PORT=4000 next start",- "type-check": "tsc --pretty --noEmit"+ "type-check": "tsc --pretty --noEmit",+ "type-check:ci": "tsc-absolute --pretty --noEmit"},"author": "Cal.com, Inc.","license": "MIT",diff --git a/apps/web/package.json b/apps/web/package.jsonindex 0f9ae44fd3f..c81914821b2 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -11,6 +11,7 @@"dx": "yarn dev","test-codegen": "yarn playwright codegen http://localhost:3000","type-check": "tsc --pretty --noEmit",+ "type-check:ci": "tsc-absolute --pretty --noEmit","build": "next build","start": "next start","lint": "eslint . --ignore-path .gitignore",diff --git a/package.json b/package.jsonindex 24d5dbb1588..6284c3bd83d 100644--- a/package.json+++ b/package.json@@ -70,6 +70,7 @@"test-playwright": "yarn playwright test --config=playwright.config.ts","test": "jest","type-check": "turbo run type-check",+ "type-check:ci": "turbo run type-check:ci --log-prefix=none","web": "yarn workspace @calcom/web"},"devDependencies": {@@ -88,6 +89,7 @@"lint-staged": "^12.5.0","prettier": "^2.8.6","ts-jest": "^28.0.8",+ "tsc-absolute": "^1.0.0","typescript": "^4.9.4"},"dependencies": {diff --git a/packages/app-store/package.json b/packages/app-store/package.jsonindex 5b341868787..bc34fa030d0 100644--- a/packages/app-store/package.json+++ b/packages/app-store/package.json@@ -8,6 +8,7 @@],"scripts": {"type-check": "tsc --pretty --noEmit",+ "type-check:ci": "tsc-absolute --pretty --noEmit","lint": "eslint . --ext .ts,.js,.tsx,.jsx","lint:fix": "eslint . --ext .ts,.js,.tsx,.jsx --fix","lint:report": "eslint . --format json --output-file ../../lint-results/app-store.json"diff --git a/packages/embeds/embed-core/package.json b/packages/embeds/embed-core/package.jsonindex 847c001da0e..948bd273b91 100644--- a/packages/embeds/embed-core/package.json+++ b/packages/embeds/embed-core/package.json@@ -23,6 +23,7 @@"dev": "yarn tailwind && run-p 'tailwind --watch' 'buildWatchAndServer'","dev-real": "vite dev --port 3100","type-check": "tsc --pretty --noEmit",+ "type-check:ci": "tsc-absolute --pretty --noEmit","lint": "eslint --ext .ts,.js src","lint:fix": "eslint --ext .ts,.js src --fix","embed-tests": "yarn playwright test --config=playwright/config/playwright.config.ts",diff --git a/packages/embeds/embed-react/package.json b/packages/embeds/embed-react/package.jsonindex 5e26c924b27..0c5c2409177 100644--- a/packages/embeds/embed-react/package.json+++ b/packages/embeds/embed-react/package.json@@ -15,6 +15,7 @@"preview": "vite preview","prepare": "NEXT_PUBLIC_EMBED_LIB_URL='https://app.cal.com/embed/embed.js' NEXT_PUBLIC_WEBAPP_URL='https://app.cal.com' yarn build","type-check": "tsc --pretty --noEmit",+ "type-check:ci": "tsc-absolute --pretty --noEmit","lint": "eslint --ext .ts,.js,.tsx,.jsx ./src","embed-tests": "yarn playwright test --config=./playwright/config/playwright.config.ts","embed-tests-quick": "QUICK=true yarn embed-tests",diff --git a/packages/embeds/embed-snippet/package.json b/packages/embeds/embed-snippet/package.jsonindex 02ba2531c4b..57096b0199c 100644--- a/packages/embeds/embed-snippet/package.json+++ b/packages/embeds/embed-snippet/package.json@@ -14,6 +14,7 @@"scripts": {"build": "vite build && tsc --emitDeclarationOnly --declarationDir dist","type-check": "tsc --pretty --noEmit",+ "type-check:ci": "tsc-absolute --pretty --noEmit","lint": "eslint --ext .ts,.js src","prepare": "NEXT_PUBLIC_EMBED_LIB_URL='https://app.cal.com/embed/embed.js' NEXT_PUBLIC_WEBAPP_URL='https://app.cal.com' yarn build","publish-prod:patch": "yarn publish --access public --patch",diff --git a/packages/ui/package.json b/packages/ui/package.jsonindex 0c0db245156..d23f0c86376 100644--- a/packages/ui/package.json+++ b/packages/ui/package.json@@ -12,6 +12,7 @@"scripts": {"lint": "eslint .","type-check": "tsc --pretty --noEmit",+ "type-check:ci": "tsc-absolute --pretty --noEmit","lint:fix": "eslint . --fix","lint:report": "eslint . --format json --output-file ../../lint-results/ui.json"},diff --git a/turbo.json b/turbo.jsonindex 935c872aba2..32a84e2e422 100644--- a/turbo.json+++ b/turbo.json@@ -128,6 +128,9 @@"type-check": {"cache": false},+ "type-check:ci": {+ "cache": false+ },"@calcom/prisma#db-reset": {"cache": false,"outputs": ["dist/**", "build/**"]diff --git a/yarn.lock b/yarn.lockindex e2ca01c027d..529e02f7350 100644--- a/yarn.lock+++ b/yarn.lock@@ -16620,6 +16620,7 @@ __metadata:lint-staged: ^12.5.0prettier: ^2.8.6ts-jest: ^28.0.8+ tsc-absolute: ^1.0.0turbo: ^1.8.3typescript: ^4.9.4languageName: unknown@@ -31905,6 +31906,13 @@ __metadata:languageName: nodelinkType: hard+"process-wrapper@npm:^1.0.0":+ version: 1.0.0+ resolution: "process-wrapper@npm:1.0.0"+ checksum: 442371ccb9b2a2104cc5cdfb6e14a993f726ec3a9540d6a757c964ed2593ffc40c7fa1d0f66eecee6b07e0c107a25c74708d97cc8b9fc7dc3920e769c05ba29b+ languageName: node+ linkType: hard+"process@npm:^0.11.10":version: 0.11.10resolution: "process@npm:0.11.10"@@ -37403,6 +37411,19 @@ __metadata:languageName: nodelinkType: hard+"tsc-absolute@npm:^1.0.0":+ version: 1.0.0+ resolution: "tsc-absolute@npm:1.0.0"+ dependencies:+ process-wrapper: ^1.0.0+ peerDependencies:+ typescript: ">=4.6"+ bin:+ tsc-absolute: dist/index.js+ checksum: fe8308f7addddce83012bc1451f7009ae37771b08a9972370b7a46eb63e3dc919783ea3894c06101459335fdb275eda8de300498894e55d460408991f97f5409+ languageName: node+ linkType: hard+"tsconfig-paths-webpack-plugin@npm:^4.0.0":version: 4.0.0resolution: "tsconfig-paths-webpack-plugin@npm:4.0.0"