Skip to content

build: migrate to TypeScript 7.0#9575

Open
nazarhussain wants to merge 2 commits into
unstablefrom
nh/ts7
Open

build: migrate to TypeScript 7.0#9575
nazarhussain wants to merge 2 commits into
unstablefrom
nh/ts7

Conversation

@nazarhussain

@nazarhussain nazarhussain commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates the toolchain from the tsgo native-preview to the TypeScript 7.0 RC, which ships the native (Go) compiler as the standard typescript package with the standard tsc binary (no more tsgo).

Changes

  • Replace @typescript/native-preview + typescript@6 with typescript@7.0.2.
  • Add @typescript/typescript6 (exposes the tsc6 binary) for side-by-side TS6 fallback/comparison during the RC period.
  • Convert all tsgotsc in build / build:watch / check-types scripts across every package.
  • Refresh workaround comments that referenced the native compiler (import-elision #2212, StrictEventEmitter overload cast).

Verification

  • pnpm check-types passes across all 17 workspace packages (exit 0, no type errors).
  • pnpm install --frozen-lockfile passes — lockfile is in sync.
  • No remaining tsgo / @typescript/native-preview references in the repo.
  • tsconfig.common.json was already compatible with TS7 (explicit target: es2023, module/moduleResolution: nodenext, explicit strict and types, no baseUrl) — no config changes needed.

Notes

  • tsc6 is installed but not yet wired into any script — kept for manual TS6↔TS7 comparison compatibility issues if encountered.

AI disclosure

Reviewed and committed with assistance from Claude Code.

🤖 Generated with Claude Code

Switch the toolchain from the tsgo native-preview to the TypeScript 7.0
RC, which ships the native (Go) compiler as the standard `typescript`
package with the standard `tsc` binary.

- Replace `@typescript/native-preview` + `typescript@6` with
  `typescript@7.0.1-rc`.
- Add `@typescript/typescript6` (exposes `tsc6`) for side-by-side TS6
  fallback/comparison during the RC period.
- Convert all `tsgo` build/check-types scripts to `tsc` across every
  package.
- Refresh workaround comments referencing the native compiler.

Verified: `pnpm check-types` passes across all 17 packages; lockfile in
sync with `--frozen-lockfile`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the tsgo compiler tool with the standard TypeScript compiler (tsc) across all packages, updating the build and type-checking scripts accordingly. Additionally, it upgrades the main typescript dependency to 7.0.1-rc and introduces @typescript/typescript6 to replace @typescript/native-preview. Comments referencing tsgo workarounds have also been updated to reference tsc. There are no review comments to address, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@nazarhussain nazarhussain changed the title build: migrate to TypeScript 7.0 RC build: migrate to TypeScript 7.0 Jul 9, 2026
@nazarhussain
nazarhussain marked this pull request as ready for review July 9, 2026 08:29
@nazarhussain
nazarhussain requested a review from a team as a code owner July 9, 2026 08:29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ced0bbaf59

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json
"semver": "^7.7.3",
"ts-node": "^11.0.0-beta.1",
"typescript": "^6.0.1-rc",
"typescript": "7.0.2",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep TypeScript API consumers on the TS6 alias

When any existing ts-node-based script runs (for example each package's check-readme calls scripts/check_readme.ts, which imports typescript and uses createProgram), Node now resolves that import to typescript@7.0.2. TypeScript 7.0 only provides the native CLI and does not ship the stable compiler API that ts-node and check_readme.ts need; the TS6 API is installed as @typescript/typescript6, but tools that import the peer name typescript will never see it. This makes docs/readme/spec-download scripts fail even though tsc itself works; alias typescript to @typescript/typescript6 and install the TS7 package under a separate alias for its tsc binary.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants