Repository navigation
fix(typescript): resolve relative imports from transpiled .ts test files - #452
Merged
Merged
Conversation
…ve imports resolve Closes #450 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Current Aviator status
This PR was merged manually (without Aviator). Merging manually can negatively impact the performance of the queue. Consider using Aviator next time.
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Closes #450
Problem
Since 8.1.0 the transpiled copy of a
.tstest was written to<cwd>/.testy-cache/and imported from there, so relative specifiers like./suma.tsresolved against.testy-cache/and failed withERR_MODULE_NOT_FOUND.Fix
The temporary JS file is now written next to the original (
<name>.ts.testy-tmp.js), so relative imports resolve against the same directory. It is still deleted after loading..testy-cacheis no longer created; the.gitignoreentry is kept and the new temp pattern added.The
.tsextension in specifiers is not rewritten: it relies on Node's native type stripping (>= 22.18) to load the imported.tsmodules, as in 8.0.0.Tests
New TestFileLoader test with fixtures: a
.tsfile importing a sibling.tsmodule (failed before the fix).npm test,npm run lintand the Simplicity Guardian pass locally.🤖 Generated with Claude Code