Skip to content

[Deps] TypeScript 7.0.2 everywhere (drop native-preview), esbuild 0.28.2 - #1302

Merged
Aymericr merged 3 commits into
mainfrom
cursor/deps-typescript-7-d3d2
Nov 21, 2026
Merged

Aymericr merged 3 commits into
mainfrom
cursor/deps-typescript-7-d3d2

Conversation

@Aymericr

@Aymericr Aymericr commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Moves every compile and typecheck onto the stable TypeScript 7 native compiler and removes the @typescript/native-preview dev build. TS 6 stays only where a tool needs the JavaScript compiler API. Also bumps esbuild, whose new versions are trivially compatible with how this repo uses it.

Versions

Package Old New
@typescript/native-preview (root, provided tsgo) 7.0.0-dev.20260707.2 removed
tsc used by dev / check-types in core, editor, ui, geometry-script, viewer, nodes, mcp, ifc-converter tsgo from the July dev build (in dev and some check-types) tsc from typescript@7.0.2 (already declared by each package)
root typescript npm:@typescript/typescript6@6.0.2 unchanged (see below)
@typescript/typescript6 (root, core) 6.0.2 unchanged; root scripts now import it explicitly
@repo/eslint-config → typescript 6.0.3 unchanged
esbuild (root) ^0.25.12 ^0.28.2

End state for TS 7, and why one TS 6 alias stays

  • typescript@7.0.2 has no classic JS API. Its root export is only lib/version.cjs, plus typescript/unstable/* IPC APIs. Its only binary is tsc (the Go compiler), and there is no tsgo and no tsserver.js.
  • @typescript/native-preview is no longer needed. Every package already depends on typescript@7.0.2, so the tsgo … scripts now call tsc …, which resolves to that package's own TS 7 binary.
  • Root scripts that use the compiler API (ts.createSourceFile, forEachChild, …) now import @typescript/typescript6 directly, as scripts/fix-node-esm-imports.ts and packages/core already did. The affected scripts are i18n-literals(.test).ts, i18n-codemod.ts and check-render-bundle.ts. They no longer rely on the root alias.
  • The root typescript → @typescript/typescript6 alias stays, only for typescript-eslint. typescript-eslint 8.72 requires typescript >=4.8.4 <6.1.0 (used by packages/ui eslint). With bun's hoisted linker, its transitive dependency ts-api-utils is hoisted to the root and resolves the root typescript. I tried pointing the root at 7.0.2. ESLint then crashed in ts-api-utils (Cannot read properties of undefined (reading 'Intrinsic')). Declaring ts-api-utils in @repo/eslint-config did not change bun's hoisting, and bun has no nested overrides. The alias can go once typescript-eslint supports TS 7, or if the repo moves to bun's isolated linker. That is out of scope here.
  • Biome / ultracite don't load TypeScript, so they are unaffected.

Breaking changes and code changes

  • TS 7.0 (native Go compiler; the JS API is removed, as are legacy options such as moduleResolution: node10, baseUrl path lookup and ES5 targets): source and tsconfigs needed no changes. turbo check-types and turbo build were already running TS 7.0.2 tsc for builds, and they pass with the stable compiler for the packages that used tsgo. The only code change is the explicit @typescript/typescript6 import in the four scripts above, with Biome's import reordering.
  • esbuild 0.26 / 0.27 / 0.28: 0.27 makes the binary loader use Uint8Array.fromBase64 and raises the minimum OS to Linux 3.2 and macOS 12. 0.28 adds integrity checks to the fallback binary download and moves to Go 1.26. The repo only calls the build() JS API in scripts/check-render-bundle.ts (plugins, splitting, metafile, no binary loader), so no code changes were needed. @lingui/cli already requires esbuild ^0.28.1 and now shares the root copy.
  • bun.lock: removes the native-preview packages and moves esbuild with its platform binaries to 0.28.2. No other dependency changed.

How to test

  1. bun install --frozen-lockfile
  2. bun run check: no errors.
  3. bun run check-types: all 14 turbo tasks pass (run locally with --force).
  4. bun run test: turbo tests and root script tests pass (81 root tests).
  5. bun run build && bun run check:render-bundle: the build succeeds and the render-boundary check passes on esbuild 0.28.2.
  6. bun run i18n:check: catalogs in sync (uses the TS 6 API through i18n-literals.ts).
  7. cd packages/ui && bun run lint: ESLint with typescript-eslint passes, as on main.

Screenshots / screen recording

N/A — non-visual change

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch
Open in Web Open in Cursor 

Note

Medium Risk
Swaps the primary typecheck/build dev loop from experimental tsgo to stable TS 7 tsc and upgrades esbuild across the build pipeline; low runtime risk but could surface compiler or bundle-check differences.

Reviewed by Cursor Bugbot for commit c13bdd8. Bugbot is set up for automated code reviews on this repo. Configure here.

@Aymericr Aymericr added the bot:deps label Nov 21, 2026 — with Cursor
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T08:19:02.668361Z a9a2fcf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…ywhere

tsgo scripts now use the typescript@7.0.2 tsc each package already
declares. Root scripts that need the JS compiler API import
@typescript/typescript6 explicitly; the root typescript alias stays on
TS 6 for typescript-eslint's hoisted dependencies.
@cursor
cursor Bot force-pushed the cursor/deps-typescript-7-d3d2 branch from a9a2fcf to 828b39a Compare November 21, 2026 08:23
@Aymericr
Aymericr merged commit 8d30333 into main Nov 21, 2026
12 checks passed
@Aymericr
Aymericr deleted the cursor/deps-typescript-7-d3d2 branch November 21, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants