Describe the bug
vp pack --dts crashes when the project uses typescript@7.0.2.
The declaration-generation code reads ts.sys.useCaseSensitiveFileNames, but the typescript package in TypeScript 7 does not expose the legacy Compiler API from its package root, so ts.sys is undefined.
@voidzero-dev/vite-plus-core@0.2.4 also currently declares the peer range typescript: "^5.0.0 || ^6.0.0".
Reproduction
Minimal files:
package.json
{
"name": "vite-plus-ts7-repro",
"private": true,
"type": "module"
}
tsconfig.json
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "bundler",
"strict": true,
"declaration": true
},
"include": ["src/**/*.ts"]
}
src/index.ts
Run:
pnpm --package vite-plus@0.2.4 \
--package typescript@7.0.2 \
--package esbuild@0.28.1 \
dlx vp pack src/index.ts --dts
Steps to reproduce
- Create the three files above.
- Run the provided command.
- Observe that the JavaScript build begins, but declaration generation crashes.
Expected behavior
Vite+ should support declaration generation with TypeScript 7, or report a clear compatibility error instead of crashing while accessing the legacy Compiler API.
Actual behavior
WARN Issues with peer dependencies found
└─┬ vite-plus 0.2.4
└─┬ @voidzero-dev/vite-plus-core 0.2.4
└── ✕ unmet peer typescript@"^5.0.0 || ^6.0.0": found 7.0.2
[plugin rolldown-plugin-dts:generate]
TypeError: Cannot read properties of undefined (reading 'useCaseSensitiveFileNames')
at @voidzero-dev/vite-plus-core/dist/tsdown/tsc-CdZE7QwS.js:60:31
The failing bundled code reads:
ts.sys.useCaseSensitiveFileNames
System Info
- vite-plus: 0.2.4
- TypeScript: 7.0.2
- esbuild: 0.28.1
- Node.js: 24.6.0
- pnpm: 11.13.1
- OS: macOS arm64
Additional context
TypeScript 7 type checking itself works in the project. The incompatibility is specifically triggered by Vite+'s declaration-generation path (vp pack --dts).
Validations
Describe the bug
vp pack --dtscrashes when the project usestypescript@7.0.2.The declaration-generation code reads
ts.sys.useCaseSensitiveFileNames, but thetypescriptpackage in TypeScript 7 does not expose the legacy Compiler API from its package root, sots.sysisundefined.@voidzero-dev/vite-plus-core@0.2.4also currently declares the peer rangetypescript: "^5.0.0 || ^6.0.0".Reproduction
Minimal files:
package.json{ "name": "vite-plus-ts7-repro", "private": true, "type": "module" }tsconfig.json{ "compilerOptions": { "target": "esnext", "module": "esnext", "moduleResolution": "bundler", "strict": true, "declaration": true }, "include": ["src/**/*.ts"] }src/index.tsRun:
Steps to reproduce
Expected behavior
Vite+ should support declaration generation with TypeScript 7, or report a clear compatibility error instead of crashing while accessing the legacy Compiler API.
Actual behavior
The failing bundled code reads:
System Info
Additional context
TypeScript 7 type checking itself works in the project. The incompatibility is specifically triggered by Vite+'s declaration-generation path (
vp pack --dts).Validations