Don't depend on vfstest for transpile - #64009
Open
Jake Bailey (jakebailey) wants to merge 1 commit into
Open
Conversation
Jake Bailey (jakebailey)
requested review from
Andrew Branch (andrewbranch)
and
a balanced review from Copilot
August 25, 2026 18:01
Contributor
There was a problem hiding this comment.
Pull request overview
Replaces the test-only virtual filesystem dependency with a lightweight transpilation filesystem to reduce binary size.
Changes:
- Removes the
vfstestdependency. - Adds a map-backed filesystem for synthesized input and library files.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tsc/internal/transpile/transpile.go |
Uses the local transpilation filesystem. |
tsc/internal/transpile/fs.go |
Implements required filesystem operations. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| func (fs *transpileFS) DirectoryExists(path string) bool { | ||
| for file := range fs.files { | ||
| if tspath.ContainsPath(path, file, tspath.ComparePathsOptions{UseCaseSensitiveFileNames: true}) { |
Comment on lines
+17
to
+19
| func (fs *transpileFS) UseCaseSensitiveFileNames() bool { | ||
| return true | ||
| } |
Member
|
Ah, I had a fix for this locally, but mine is broader than it needs to be. I didn't think about how little of a FS surface transpile needs. If you fix the Copilot comments, I'll see if I can make module resolution not occur at all in a follow-up. |
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.
The transpile package used the test FS as a VFS, but this brings in all of the testing code.
Use a local FS for this instead, which saves something like 100KB of binary.