-
Notifications
You must be signed in to change notification settings - Fork 21
ESM config compatibility for vitest #1397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
⚡️ Codeflash found optimizations for this PR📄 11% (0.11x) speedup for
|
PR Review SummaryPrek Checks✅ All checks pass — Mypy
Code ReviewKey changes in this PR:
Outstanding issue (from previous review):
No new critical issues found. Test Coverage
Notes:
Last updated: 2026-02-09T15:15Z |
| return True | ||
| if import_path.endswith((source_name, "/" + source_name)): | ||
| return True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Low risk, but worth noting: The endswith(source_name) match on the stem alone is quite broad. If the source file is named something common like utils.ts or index.ts, this could match unrelated imports (e.g., some/other/utils would also get rewritten to the relative path of this source file).
Consider either:
- Adding a check that the import path shares more path segments with the source, or
- Requiring a stricter match (e.g., matching the last 2 path segments)
No description provided.