-
Notifications
You must be signed in to change notification settings - Fork 418
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
fix: remove circular reference to usePaneRouter
#6664
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
No changes to documentation |
Component Testing Report Updated May 16, 2024 9:55 AM (UTC)
|
Great catch cody, thanks! I will see if we can add an eslint to complain about this so you can't import |
7043956
to
61ea7ea
Compare
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, Cody!
Description
When running
sanity build
this annoying warning happens:Turns out the root cause is that inside
node_modules/sanity/lib/_chunks-es/StructureToolProvider.mjs
there's this import:That's a problem, because
sanity/lib/structure.mjs
is re-exporting from./_chunks-es/StructureToolProvider.mjs
.This PR solves it by changing the import to the same relative imports used by other components that use
usePaneRouter
.What to review
If it builds it works, moving forward we should be careful not to introduce new circular references.
git blame
shows that this circular import were added less than a month ago.Testing
Existing tests are sufficient
Notes for release
Fixes a circular import inside
sanity/structure
forusePaneRouter