chore: upgrade TypeScript to v7 - #1426
Open
dannyhw wants to merge 1 commit into
Open
Conversation
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.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps the workspace TypeScript catalog from
^5.9.3to^7.0.2(the native compiler) and adapts configs to the TS 6/7 breaking changes.Config changes
typesno longer auto-includesnode_modules/@types(microsoft/TypeScript#62195): declared"types": ["node"]intsconfig.base.json, addedjestforpackages/repack, and addednodetoplugin-reanimated's existingtypesoverride which was shadowing the base.rootDiris now the config directory:plugin-reanimatedthrew TS6059 for the cross-package sources it pulls in viapaths; pinned an explicitrootDirin its typecheck config.tsconfig.build.jsonstill overridesrootDirtosrc, so build output is unchanged.moduleResolution: node10was removed:tests/metro-compatswitched tonodenext.No impact on published packages
typescriptremains a devDependency in all published packages — never a runtime or peer dependency.distoutput 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.tsfiles differ only cosmetically (property ordering in inferred types, quote style).repack-initdoes not pin a TypeScript version for scaffolded projects.enginesisnode >=16.20, compatible with the Node 18–26 CI matrix.Test plan
pnpm lint:ci— cleanpnpm install --frozen-lockfile— lockfile consistentpnpm build— 7/7 tasks (declaration emit spot-checked)pnpm typecheck— 11/11 taskspnpm test— 10/10 tasks (jest + vitest suites)