:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
perf(ci): replace tsc with tsgo as primary type checker (#62183)
mendral-app[bot]d1fc76df8ff1
diff --git a/.github/workflows/ci-frontend.yml b/.github/workflows/ci-frontend.ymlindex 8487b9449d6e..da7add8bde90 100644--- a/.github/workflows/ci-frontend.yml+++ b/.github/workflows/ci-frontend.yml@@ -496,14 +496,8 @@ jobs:path: .typegenkey: ${{ runner.os }}-typegen-${{ hashFiles('pnpm-lock.yaml') }}- - name: Run typescript with strict+ - name: Run typescript check (tsgo)run: pnpm --filter=@posthog/frontend typescript:check- env:- NODE_OPTIONS: --max-old-space-size=16384-- - name: Run tsgo (shadow, non-blocking)- run: pnpm --filter=@posthog/frontend typescript:check:tsgo- continue-on-error: true- name: Check if schema.json and validators.js are up to daterun: pnpm --filter=@posthog/frontend schema:build:json && git diff --exit-codediff --git a/.github/workflows/ci-mcp.yml b/.github/workflows/ci-mcp.ymlindex d4bb53424e94..8eb3041ca266 100644--- a/.github/workflows/ci-mcp.yml+++ b/.github/workflows/ci-mcp.yml@@ -144,13 +144,9 @@ jobs:- name: Build packagerun: cd services/mcp && pnpm build- - name: Type check+ - name: Type check (tsgo)run: cd services/mcp && pnpm typecheck- - name: Type check (tsgo, shadow, non-blocking)- run: cd services/mcp && pnpm typecheck:tsgo- continue-on-error: true-- name: Check MCP schema is up to daterun: |./bin/hogli build:schema-mcpdiff --git a/.github/workflows/ci-oauth-proxy.yml b/.github/workflows/ci-oauth-proxy.ymlindex a35ea3a40ba5..8e0835209349 100644--- a/.github/workflows/ci-oauth-proxy.yml+++ b/.github/workflows/ci-oauth-proxy.yml@@ -62,13 +62,9 @@ jobs:- name: Install dependenciesrun: pnpm --filter=@posthog/auth-proxy... install --frozen-lockfile- - name: Type check+ - name: Type check (tsgo)run: cd services/oauth-proxy && pnpm typecheck- - name: Type check (tsgo, shadow, non-blocking)- run: cd services/oauth-proxy && pnpm typecheck:tsgo- continue-on-error: true-- name: Run testsrun: cd services/oauth-proxy && pnpm testdiff --git a/frontend/package.json b/frontend/package.jsonindex 1b6484236c16..2460c554e92f 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -36,10 +36,8 @@"schema:build:json": "ts-node ./bin/build-schema-json.mjs && oxfmt ./src/queries/schema.json && ts-node ./bin/build-validators.mjs && oxfmt ./src/queries/validators.js","test": "SHARD_IDX=${SHARD_INDEX:-1}; SHARD_TOTAL=${SHARD_COUNT:-1}; echo $SHARD_IDX/$SHARD_TOTAL; pnpm build:products && jest --testPathPattern='(frontend/|products/|common/)' --forceExit --shard=$SHARD_IDX/$SHARD_TOTAL","jest": "pnpm build:products && jest",- "typescript:check": "tsc --noEmit && echo \"No errors reported by tsc.\"",- "typescript:check:tsgo": "tsgo --noEmit && echo \"No errors reported by tsgo.\"",- "typescript:version": "tsc --version",- "typescript:version:tsgo": "tsgo --version",+ "typescript:check": "tsgo --noEmit && echo \"No errors reported by tsgo.\"",+ "typescript:version": "tsgo --version","lint": "cd .. && oxlint --quiet","format": "cd .. && oxlint --fix --fix-suggestions --fix-dangerously --quiet && oxfmt \"./{products,frontend/src,docs}/**/*.{js,mjs,ts,tsx,json,yaml,yml,css,scss}\"","visualize-toolbar-bundle": "pnpm exec esbuild-visualizer --metadata ./toolbar-esbuild-meta.json --filename=toolbar-esbuild-bundle-visualization.html",diff --git a/services/mcp/package.json b/services/mcp/package.jsonindex 453d873e0d7e..3407de9a8af2 100644--- a/services/mcp/package.json+++ b/services/mcp/package.json@@ -32,8 +32,7 @@"test:hono": "vitest run --config vitest.hono.config.mts","test:perf": "vitest run --config vitest.perf.config.mts","test:watch": "vitest watch",- "typecheck": "tsc --noEmit",- "typecheck:tsgo": "tsgo --noEmit",+ "typecheck": "tsgo --noEmit","generate-mcp-types": "node scripts/generate-mcp-types.mjs","generate-orval-schemas": "node scripts/generate-orval-schemas.mjs","generate-tools": "tsx scripts/generate-tools.ts",diff --git a/services/oauth-proxy/package.json b/services/oauth-proxy/package.jsonindex d6e8b11eea70..fb2fa816632f 100644--- a/services/oauth-proxy/package.json+++ b/services/oauth-proxy/package.json@@ -17,8 +17,7 @@"cf-typegen": "wrangler types","test": "vitest","test:watch": "vitest watch",- "typecheck": "tsc --noEmit",- "typecheck:tsgo": "tsgo --noEmit"+ "typecheck": "tsgo --noEmit"},"devDependencies": {"@cloudflare/workers-types": "^4.20260120.0",