feat: support TypeScript 7 (tsc 7)#2147
Closed
rorychatt wants to merge 3 commits into
Closed
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
4 tasks
Member
|
@rorychatt Thank you for reporting and fixing the issue. While reviewing it I found the peer range turns out to be only part of the problem: TypeScript 7 removed the old compiler API that our bundled tsdown used for Both parts are now fixed in #2168: the newer tsdown allows TS7 in its peer range and generates declarations with the TS7 native compiler. So we'll close this PR in favor of that one. Thanks again for raising the issue and getting the work started. The fix will be in the next release. |
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.
Description
This PR adds support for TypeScript 7 (
tsc 7) tovite-plus.Currently,
vite-plusonly lists^5.0.0 || ^6.0.0in its peer dependencies, which causes installation warnings/errors in projects that upgraded to TypeScript 7.Closes #2148
Changes
packages/core/build.ts): Updated themergePackageJson()build step to append|| ^7.0.0to the typescript peer dependency of@voidzero-dev/vite-plus-core.packages/cli/templates/monorepo/): Updated the generatedpnpm-workspace.yamland_yarnrc.ymltemplates to support^5 || ^6 || ^7.pnpm-lock.yaml): Regenerated the workspace lockfile after resolving dependencies.Note: The workspace devDependencies of the
vite-pluscodebase itself remain pinned to TypeScript^6.0.0for development, as upstream packages (likerolldownandtsdown) currently rely on programmatic compiler APIs that are not yet compatible with the TypeScript 7 API.Verification
All 870 unit/integration tests in
vite-pluscompile and pass successfully under the updated configurations.