From 21f08887dd19f934e091a48c0c6d5e091c80fe2e Mon Sep 17 00:00:00 2001 From: Mikael Rinne <40919111+rorychatt@users.noreply.github.com> Date: Fri, 10 Jul 2026 20:49:24 +0200 Subject: [PATCH 1/3] feat: support TypeScript 7 (tsc 7) --- packages/cli/templates/monorepo/_yarnrc.yml | 2 +- .../templates/monorepo/pnpm-workspace.yaml | 2 +- packages/core/build.ts | 4 + packages/core/package.json | 2 +- pnpm-lock.yaml | 239 +++++++++++++++++- 5 files changed, 239 insertions(+), 10 deletions(-) diff --git a/packages/cli/templates/monorepo/_yarnrc.yml b/packages/cli/templates/monorepo/_yarnrc.yml index 3f2226d6f8..930667321b 100644 --- a/packages/cli/templates/monorepo/_yarnrc.yml +++ b/packages/cli/templates/monorepo/_yarnrc.yml @@ -1,4 +1,4 @@ nodeLinker: node-modules catalog: '@types/node': ^24 - typescript: ^5 + typescript: ^5 || ^6 || ^7 diff --git a/packages/cli/templates/monorepo/pnpm-workspace.yaml b/packages/cli/templates/monorepo/pnpm-workspace.yaml index 81d0fef3a9..1e7f0827d4 100644 --- a/packages/cli/templates/monorepo/pnpm-workspace.yaml +++ b/packages/cli/templates/monorepo/pnpm-workspace.yaml @@ -7,4 +7,4 @@ catalogMode: prefer catalog: '@types/node': ^24 - typescript: ^5 + typescript: ^5 || ^6 || ^7 diff --git a/packages/core/build.ts b/packages/core/build.ts index 1e74e73440..e828c817da 100644 --- a/packages/core/build.ts +++ b/packages/core/build.ts @@ -771,6 +771,10 @@ async function mergePackageJson() { ...vitePkg.peerDependencies, }; + if (destPkg.peerDependencies.typescript) { + destPkg.peerDependencies.typescript = `${destPkg.peerDependencies.typescript} || ^7.0.0`; + } + // Merge peerDependenciesMeta from tsdown and vite destPkg.peerDependenciesMeta = { ...tsdownPkg.peerDependenciesMeta, diff --git a/packages/core/package.json b/packages/core/package.json index ed74723ec1..e00442996e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -149,7 +149,7 @@ "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", - "typescript": "^5.0.0 || ^6.0.0", + "typescript": "^5.0.0 || ^6.0.0 || ^7.0.0", "unplugin-unused": "^0.5.0", "unrun": "*", "yaml": "^2.4.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 76ae25d8df..f8e59b23eb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -746,10 +746,10 @@ importers: version: 19.2.0(react@19.2.0) vue: specifier: 'catalog:' - version: 3.5.39(typescript@6.0.2) + version: 3.5.39(typescript@7.0.2) vue-router: specifier: ^5.0.0 - version: 5.0.2(@vue/compiler-sfc@3.5.39)(vue@3.5.39(typescript@6.0.2)) + version: 5.0.2(@vue/compiler-sfc@3.5.39)(vue@3.5.39(typescript@7.0.2)) devDependencies: '@babel/core': specifier: 'catalog:' @@ -4696,6 +4696,126 @@ packages: engines: {node: '>=16.20.0'} hasBin: true + '@typescript/typescript-aix-ppc64@7.0.2': + resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [aix] + + '@typescript/typescript-darwin-arm64@7.0.2': + resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/typescript-darwin-x64@7.0.2': + resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/typescript-freebsd-arm64@7.0.2': + resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [freebsd] + + '@typescript/typescript-freebsd-x64@7.0.2': + resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [freebsd] + + '@typescript/typescript-linux-arm64@7.0.2': + resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/typescript-linux-arm@7.0.2': + resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/typescript-linux-loong64@7.0.2': + resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} + engines: {node: '>=16.20.0'} + cpu: [loong64] + os: [linux] + + '@typescript/typescript-linux-mips64el@7.0.2': + resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} + engines: {node: '>=16.20.0'} + cpu: [mips64el] + os: [linux] + + '@typescript/typescript-linux-ppc64@7.0.2': + resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [linux] + + '@typescript/typescript-linux-riscv64@7.0.2': + resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} + engines: {node: '>=16.20.0'} + cpu: [riscv64] + os: [linux] + + '@typescript/typescript-linux-s390x@7.0.2': + resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} + engines: {node: '>=16.20.0'} + cpu: [s390x] + os: [linux] + + '@typescript/typescript-linux-x64@7.0.2': + resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/typescript-netbsd-arm64@7.0.2': + resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [netbsd] + + '@typescript/typescript-netbsd-x64@7.0.2': + resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [netbsd] + + '@typescript/typescript-openbsd-arm64@7.0.2': + resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [openbsd] + + '@typescript/typescript-openbsd-x64@7.0.2': + resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [openbsd] + + '@typescript/typescript-sunos-x64@7.0.2': + resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [sunos] + + '@typescript/typescript-win32-arm64@7.0.2': + resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/typescript-win32-x64@7.0.2': + resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + '@unrs/resolver-binding-android-arm-eabi@1.11.1': resolution: {integrity: sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==} cpu: [arm] @@ -8265,6 +8385,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@7.0.2: + resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} + engines: {node: '>=16.20.0'} + hasBin: true + ufo@1.6.4: resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==} @@ -11744,6 +11869,66 @@ snapshots: '@typescript/native-preview-win32-arm64': 7.0.0-dev.20260605.1 '@typescript/native-preview-win32-x64': 7.0.0-dev.20260605.1 + '@typescript/typescript-aix-ppc64@7.0.2': + optional: true + + '@typescript/typescript-darwin-arm64@7.0.2': + optional: true + + '@typescript/typescript-darwin-x64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-x64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm@7.0.2': + optional: true + + '@typescript/typescript-linux-loong64@7.0.2': + optional: true + + '@typescript/typescript-linux-mips64el@7.0.2': + optional: true + + '@typescript/typescript-linux-ppc64@7.0.2': + optional: true + + '@typescript/typescript-linux-riscv64@7.0.2': + optional: true + + '@typescript/typescript-linux-s390x@7.0.2': + optional: true + + '@typescript/typescript-linux-x64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-sunos-x64@7.0.2': + optional: true + + '@typescript/typescript-win32-arm64@7.0.2': + optional: true + + '@typescript/typescript-win32-x64@7.0.2': + optional: true + '@unrs/resolver-binding-android-arm-eabi@1.11.1': optional: true @@ -12041,7 +12226,7 @@ snapshots: '@voidzero-dev/vite-task-client@0.2.0': {} - '@vue-macros/common@3.1.2(vue@3.5.39(typescript@6.0.2))': + '@vue-macros/common@3.1.2(vue@3.5.39(typescript@7.0.2))': dependencies: '@vue/compiler-sfc': 3.5.39 ast-kit: 2.2.0 @@ -12049,7 +12234,7 @@ snapshots: magic-string-ast: 1.0.3 unplugin-utils: 0.3.1 optionalDependencies: - vue: 3.5.39(typescript@6.0.2) + vue: 3.5.39(typescript@7.0.2) '@vue/compiler-core@3.5.39': dependencies: @@ -12121,6 +12306,12 @@ snapshots: '@vue/shared': 3.5.39 vue: 3.5.39(typescript@6.0.2) + '@vue/server-renderer@3.5.39(vue@3.5.39(typescript@7.0.2))': + dependencies: + '@vue/compiler-ssr': 3.5.39 + '@vue/shared': 3.5.39 + vue: 3.5.39(typescript@7.0.2) + '@vue/shared@3.5.39': {} '@wdio/config@9.20.1': @@ -15554,6 +15745,30 @@ snapshots: typescript@6.0.2: {} + typescript@7.0.2: + optionalDependencies: + '@typescript/typescript-aix-ppc64': 7.0.2 + '@typescript/typescript-darwin-arm64': 7.0.2 + '@typescript/typescript-darwin-x64': 7.0.2 + '@typescript/typescript-freebsd-arm64': 7.0.2 + '@typescript/typescript-freebsd-x64': 7.0.2 + '@typescript/typescript-linux-arm': 7.0.2 + '@typescript/typescript-linux-arm64': 7.0.2 + '@typescript/typescript-linux-loong64': 7.0.2 + '@typescript/typescript-linux-mips64el': 7.0.2 + '@typescript/typescript-linux-ppc64': 7.0.2 + '@typescript/typescript-linux-riscv64': 7.0.2 + '@typescript/typescript-linux-s390x': 7.0.2 + '@typescript/typescript-linux-x64': 7.0.2 + '@typescript/typescript-netbsd-arm64': 7.0.2 + '@typescript/typescript-netbsd-x64': 7.0.2 + '@typescript/typescript-openbsd-arm64': 7.0.2 + '@typescript/typescript-openbsd-x64': 7.0.2 + '@typescript/typescript-sunos-x64': 7.0.2 + '@typescript/typescript-win32-arm64': 7.0.2 + '@typescript/typescript-win32-x64': 7.0.2 + optional: true + ufo@1.6.4: {} uglify-js@3.19.3: @@ -15785,10 +16000,10 @@ snapshots: transitivePeerDependencies: - msw - vue-router@5.0.2(@vue/compiler-sfc@3.5.39)(vue@3.5.39(typescript@6.0.2)): + vue-router@5.0.2(@vue/compiler-sfc@3.5.39)(vue@3.5.39(typescript@7.0.2)): dependencies: '@babel/generator': 7.29.7 - '@vue-macros/common': 3.1.2(vue@3.5.39(typescript@6.0.2)) + '@vue-macros/common': 3.1.2(vue@3.5.39(typescript@7.0.2)) '@vue/devtools-api': 8.0.5 ast-walker-scope: 0.8.3 chokidar: 5.0.0 @@ -15803,7 +16018,7 @@ snapshots: tinyglobby: 0.2.17 unplugin: 3.0.0 unplugin-utils: 0.3.1 - vue: 3.5.39(typescript@6.0.2) + vue: 3.5.39(typescript@7.0.2) yaml: 2.9.0 optionalDependencies: '@vue/compiler-sfc': 3.5.39 @@ -15822,6 +16037,16 @@ snapshots: optionalDependencies: typescript: 6.0.2 + vue@3.5.39(typescript@7.0.2): + dependencies: + '@vue/compiler-dom': 3.5.39 + '@vue/compiler-sfc': 3.5.39 + '@vue/runtime-dom': 3.5.39 + '@vue/server-renderer': 3.5.39(vue@3.5.39(typescript@7.0.2)) + '@vue/shared': 3.5.39 + optionalDependencies: + typescript: 7.0.2 + w3c-xmlserializer@5.0.0: dependencies: xml-name-validator: 5.0.0 From 3774607916228f07508df92e5f4257cde4116da0 Mon Sep 17 00:00:00 2001 From: Mikael Rinne <40919111+rorychatt@users.noreply.github.com> Date: Fri, 10 Jul 2026 22:00:09 +0200 Subject: [PATCH 2/3] build: update lockfile specifier for core peer dependency --- pnpm-lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f8e59b23eb..e5f65b5fe8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -553,7 +553,7 @@ importers: specifier: ^4.8.1 version: 4.22.4 typescript: - specifier: ^5.0.0 || ^6.0.0 + specifier: ^5.0.0 || ^6.0.0 || ^7.0.0 version: 6.0.2 unplugin-unused: specifier: ^0.5.0 From 8ff089c92b5147cb97cb732f8f3cb52dace47d32 Mon Sep 17 00:00:00 2001 From: Mikael Rinne <40919111+rorychatt@users.noreply.github.com> Date: Fri, 10 Jul 2026 22:35:13 +0200 Subject: [PATCH 3/3] test: update monorepo template typescript version snapshot --- .../fixtures/new_vite_monorepo/snapshots/new_vite_monorepo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/new_vite_monorepo/snapshots/new_vite_monorepo.md b/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/new_vite_monorepo/snapshots/new_vite_monorepo.md index a611f3d79b..fb6eafa4dc 100644 --- a/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/new_vite_monorepo/snapshots/new_vite_monorepo.md +++ b/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/new_vite_monorepo/snapshots/new_vite_monorepo.md @@ -89,7 +89,7 @@ catalogMode: prefer catalog: "@types/node": ^24 - typescript: ^5 + typescript: ^5 || ^6 || ^7 vite: npm:@voidzero-dev/vite-plus-core@ vite-plus: overrides: