Skip to content

Upgrade to TypeScript 7.0.2#31

Merged
Bartek532 merged 6 commits into
mainfrom
cursor/typescript-v7-a5e8
Jul 9, 2026
Merged

Upgrade to TypeScript 7.0.2#31
Bartek532 merged 6 commits into
mainfrom
cursor/typescript-v7-a5e8

Conversation

@Bartek532

@Bartek532 Bartek532 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades to TypeScript 7.0.2 with only the config that is actually required.

Required

Change Why
typescript@7.0.2 The TypeScript 7 compiler
@typescript/native-preview Next.js checks for lib/typescript.js, which TS7 removed. This package tells Next.js to use the native compiler path so postinstall and next build don't fail or loop

Not needed (verified by testing)

Change Why removed
typescript.ignoreBuildErrors Build passes without it when native-preview is present
tsconfig types: ["node"] build, lint, and tsc --noEmit all pass without it

Also fixed package.json devDependency ordering for oxfmt.

Validation

  • bun run format
  • bun run lint
  • bun run build
  • postinstall
Open in Web Open in Cursor 

TypeScript 7 is a native rewrite that no longer ships lib/typescript.js,
which Next.js and ts-morph still require for programmatic API access.

- Add typescript-7 (7.0.2) for the native tsc compiler via typecheck script
- Keep typescript (^6.0.2) for Next.js build type-checking and ts-morph
- Set explicit types: ["node"] in tsconfig for TS7 default behavior
- Add typecheck script and CI job using the TS7 compiler
- Remove stale pnpm-lock.yaml (project uses bun.lock)

Co-authored-by: Bartosz Zagrodzki <Bartek532@users.noreply.github.com>
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
loading-ui Ready Ready Preview, Comment Jul 9, 2026 6:54pm

Request Review

Co-authored-by: Bartosz Zagrodzki <Bartek532@users.noreply.github.com>
TypeScript 7 cannot replace the main typescript package yet because
Next.js requires lib/typescript.js for build-time type checking.

- Pin typescript-7 to 7.0.2 for the native TS7 compiler
- Keep typescript@^6.0.2 for Next.js and ts-morph API access

Co-authored-by: Bartosz Zagrodzki <Bartek532@users.noreply.github.com>
@Bartek532 Bartek532 marked this pull request as ready for review July 9, 2026 17:56
TypeScript 7 cannot be the sole dependency yet because Next.js
requires lib/typescript.js during build. The typescript-7 alias was
unused after dropping the typecheck script.

Co-authored-by: Bartosz Zagrodzki <Bartek532@users.noreply.github.com>
@cursor cursor Bot changed the title Upgrade to TypeScript 7 Prepare for TypeScript 7 defaults Jul 9, 2026
- Set typescript to 7.0.2 (native compiler)
- Add @typescript/native-preview for Next.js compatibility
- Enable typescript.ignoreBuildErrors until Next.js supports TS7 API

Co-authored-by: Bartosz Zagrodzki <Bartek532@users.noreply.github.com>
@cursor cursor Bot changed the title Prepare for TypeScript 7 defaults Upgrade to TypeScript 7.0.2 Jul 9, 2026
Verified by testing each piece individually:
- @typescript/native-preview: required (Next.js postinstall/build)
- typescript.ignoreBuildErrors: not needed with native-preview
- tsconfig types: ["node"]: not needed for this project

Fix oxfmt ordering in package.json devDependencies.

Co-authored-by: Bartosz Zagrodzki <Bartek532@users.noreply.github.com>
@Bartek532 Bartek532 merged commit 8d6dc5c into main Jul 9, 2026
5 checks passed
@Bartek532 Bartek532 deleted the cursor/typescript-v7-a5e8 branch July 9, 2026 18:59
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.

2 participants