feat(migration): rewrite tsdown/client and vite/client in tsconfig compilerOptions.types#1542
feat(migration): rewrite tsdown/client and vite/client in tsconfig compilerOptions.types#1542naokihaba wants to merge 6 commits intovoidzero-dev:mainfrom
Conversation
✅ Deploy Preview for viteplus-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 299a3f8bd0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| const REPLACEMENTS: Record<string, string> = { | ||
| 'tsdown/client': 'vite-plus/pack/client', |
There was a problem hiding this comment.
Do not rewrite tsdown/client to an unexported subpath
When a project has compilerOptions.types: ["tsdown/client"], this rewrites it to vite-plus/pack/client, but the CLI package only exports ./pack and not ./pack/client (packages/cli/package.json lines 78-80), so TypeScript reports TS2688: Cannot find type definition file for 'vite-plus/pack/client' and migrated projects lose typechecking. The existing Rust reference-type migrator also documents this exact case as not rewritten because vite-plus has no tsdown subpath export (crates/vite_migration/src/import_rewriter.rs lines 2466-2471).
Useful? React with 👍 / 👎.
299a3f8 to
d01b647
Compare
resolves #1502
This PR depends on #1501. When merging, #1501, #1541, and #1542 must be merged together.
I considered consolidating this into #1501, but I have separated it into a different PR because the scope of concerns would become too broad. I can make adjustments if this is not ideal from a merge strategy perspective.
I have separated these to reduce the review burden that would result from mixing Rust and TypeScript concerns in a single PR.