-
Notifications
You must be signed in to change notification settings - Fork 645
refactor(imports): update circular import references #2314
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
|
size-limit report 📦
|
colebemis
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.
Looks great. Thanks for cleaning this up! ✨
Update circular imports in the project by either updating specific import statements or moving shared code into dedicated modules.
Generally, import statements were rewritten from importing directly from the
index.tsfile and instead import from the module directly.There were a handful of scenarios where a cycle was created from the following situation:
In these situations, I moved the shared code into a discrete module. I'd love feedback on what the best way to group or name these types of code would be 👀 For shared context values, I ended up creating a standalone file for the context. For ActionList, I ended up just using a
shared.tsfile but it feels like a mixed bag of exports that aren't really related.Note: these changes only include circular dependencies for code and does not include types
List of circular imports
Testing & Reviewing
One can verify that there are no circular dependencies by running rollup (
$(npm bin)/rollup -c). There should be no reported warnings for circular dependencies