Skip to content

Commit 85f5b37

Browse files
chore: upgrade to TypeScript 7 (#4318)
## Summary Upgrade the monorepo to TypeScript 7.0.2 and update package build tooling for compatibility with the native compiler. ## Design Package builds now use `tshy` 4, while the packages still using `tsup` move to `tsdown`. The few scripts that depend on the legacy TypeScript compiler API use an explicit TypeScript 6 alias; declaration portability coverage invokes the TypeScript 7 CLI directly. Turbo is updated so workspace tasks can read the regenerated pnpm lockfile. --------- Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent c01a4f1 commit 85f5b37

30 files changed

Lines changed: 1492 additions & 705 deletions
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"trigger.dev": patch
3+
"@trigger.dev/build": patch
4+
"@trigger.dev/core": patch
5+
"@trigger.dev/python": patch
6+
"@trigger.dev/react-hooks": patch
7+
"@trigger.dev/redis-worker": patch
8+
"@trigger.dev/rsc": patch
9+
"@trigger.dev/schema-to-json": patch
10+
"@trigger.dev/sdk": patch
11+
---
12+
13+
Refresh package builds for TypeScript 7 compatibility while preserving existing runtime entry points. TypeScript remains an optional peer for the decorator metadata build extension, so installing the Trigger.dev CLI does not install an additional compiler.

apps/webapp/app/utils/searchParams.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export function createSearchParams<TParams extends ParamType>(
104104
return { success: true, params: new SearchParams<TParams>(parsed.params as TParams, schema) };
105105
}
106106

107-
function parseSearchParams<TParams extends ParamType>(params: TParams, schema: ZodType<TParams>) {
107+
function parseSearchParams<TParams>(params: unknown, schema: ZodType<TParams>) {
108108
const parsedParams = schema.safeParse(params);
109109

110110
if (!parsedParams.success) {

apps/webapp/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@
269269
"tailwindcss": "^4.3.1",
270270
"tsconfig-paths": "^3.14.1",
271271
"tsx": "^4.20.6",
272+
"typescript": "catalog:",
273+
"typescript-legacy-api": "npm:typescript@6.0.3",
272274
"vite-tsconfig-paths": "^5.1.4",
273275
"vite": "^6.4.2"
274276
},

apps/webapp/scripts/runOpsLegacyGuard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* pnpm --filter webapp run guard:runops-legacy # regenerate baseline
1313
* pnpm --filter webapp run guard:runops-legacy -- --check # CI gate
1414
*/
15-
import ts from "typescript";
15+
import ts from "typescript-legacy-api";
1616
import * as fs from "node:fs";
1717
import * as path from "node:path";
1818

internal-packages/observability-map/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
"main": "./dist/src/index.js",
77
"types": "./dist/src/index.d.ts",
88
"dependencies": {
9-
"typescript": "catalog:"
9+
"@typescript/typescript6": "6.0.2"
1010
},
1111
"devDependencies": {
1212
"@types/node": "^24.13.3",
1313
"rimraf": "6.0.1",
1414
"tsx": "^4.19.2",
15+
"typescript": "catalog:",
1516
"vitest": "4.1.7"
1617
},
1718
"scripts": {

internal-packages/observability-map/src/docstringReferences.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ts from "typescript";
1+
import ts from "@typescript/typescript6";
22
import { readFileSync, readdirSync } from "node:fs";
33
import { join, resolve } from "node:path";
44
import { CHECKS } from "./checks/index.js";

internal-packages/observability-map/src/mutations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ts from "typescript";
1+
import ts from "@typescript/typescript6";
22

33
/**
44
* Source-to-source mutations for the tree-scale corpus in `mutationCorpus.test.ts`. Why they are text

internal-packages/observability-map/src/scan.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ts from "typescript";
1+
import ts from "@typescript/typescript6";
22
import { readdirSync, readFileSync } from "node:fs";
33
import { join } from "node:path";
44
import type { CatchEvidence, EntryPoint, LogCall } from "./types.js";

internal-packages/observability-map/src/suppression.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ts from "typescript";
1+
import ts from "@typescript/typescript6";
22
import { CHECKS } from "./checks/index.js";
33

44
const KNOWN_CHECK_IDS = new Set(CHECKS.map((c) => c.id));

internal-packages/observability-map/src/webappSymbols.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ts from "typescript";
1+
import ts from "@typescript/typescript6";
22
import { readdirSync, readFileSync } from "node:fs";
33
import { join, resolve } from "node:path";
44
import { AUDIT_SYMBOLS } from "./checks/auditTrail.js";

0 commit comments

Comments
 (0)