-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
fix: circular import in SapDriver.ts #11750
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
WalkthroughAn import in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
pkuczynski
left a comment
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.
I am approving since this change is harmless, but bear in mind deep imports are strongly discouraged, especially same thing is exported from the main index file.
In the future paths might change and since the only officially supported interface for any package is the index file, this would be considered non breaking change, yet it would brake your code...
gioboa
left a comment
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.
Thanks for your help @abendi
commit: |
sgarner
left a comment
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.
Thanks for your contribution @abendi 💜
Description of change
Deep-importing
import { DataSource } from 'typeorm/data-source/DataSource.js'fails since 0.3.25 due to circular dependencies inSapDriver.ts. Runtime error looks like this:I have created a minimal reproduction example with some explanations: https://github.com/abendi/typeorm-circular-import.
Pull-Request Checklist
masterbranchFixes #00000Summary by CodeRabbit