Skip to content

chore: upgrade TypeScript to v7 - #1426

Open
dannyhw wants to merge 1 commit into
mainfrom
dannyhw/typescript-v7-upgrade-bd8f19
Open

chore: upgrade TypeScript to v7#1426
dannyhw wants to merge 1 commit into
mainfrom
dannyhw/typescript-v7-upgrade-bd8f19

Conversation

@dannyhw

@dannyhw dannyhw commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Bumps the workspace TypeScript catalog from ^5.9.3 to ^7.0.2 (the native compiler) and adapts configs to the TS 6/7 breaking changes.

Config changes

  • types no longer auto-includes node_modules/@types (microsoft/TypeScript#62195): declared "types": ["node"] in tsconfig.base.json, added jest for packages/repack, and added node to plugin-reanimated's existing types override which was shadowing the base.
  • Inferred rootDir is now the config directory: plugin-reanimated threw TS6059 for the cross-package sources it pulls in via paths; pinned an explicit rootDir in its typecheck config. tsconfig.build.json still overrides rootDir to src, so build output is unchanged.
  • moduleResolution: node10 was removed: tests/metro-compat switched to nodenext.

No impact on published packages

  • typescript remains a devDependency in all published packages — never a runtime or peer dependency.
  • Compared full dist output built with 5.9.3 vs 7.0.2: runtime JS is byte-identical (including the tsc-emitted dev-server and plugin builds); 8 .d.ts files differ only cosmetically (property ordering in inferred types, quote style).
  • repack-init does not pin a TypeScript version for scaffolded projects.
  • Package engines is node >=16.20, compatible with the Node 18–26 CI matrix.

Test plan

  • pnpm lint:ci — clean
  • pnpm install --frozen-lockfile — lockfile consistent
  • pnpm build — 7/7 tasks (declaration emit spot-checked)
  • pnpm typecheck — 11/11 tasks
  • pnpm test — 10/10 tasks (jest + vitest suites)

Bump the workspace catalog from ^5.9.3 to ^7.0.2 and adapt configs to
the TS 6/7 breaking changes:

- types no longer defaults to auto-including all node_modules/@types:
  declare "types": ["node"] in tsconfig.base.json, add jest for
  packages/repack, and add node to plugin-reanimated's existing
  override which was shadowing the base
- plugin-reanimated: set an explicit rootDir for typechecking since
  TS7 infers rootDir as the config directory, which broke the
  cross-package sources pulled in via paths (build config still
  overrides rootDir to src, emit is unaffected)
- tests/metro-compat: moduleResolution node10 was removed, switch to
  nodenext

typescript remains a devDependency everywhere, and published dist
output is unaffected: runtime JS is byte-identical between 5.9.3 and
7.0.2 builds, with only cosmetic formatting differences in a handful
of emitted .d.ts files.
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2f3a574

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
repack-website Ready Ready Preview Jul 30, 2026 1:38pm

Request Review

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.

1 participant