-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Avoid recursively calling a plugin's resolveId hook with same id and importer #5945
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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5945 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 270 270
Lines 8727 8731 +4
Branches 1505 1507 +2
=======================================
+ Hits 8620 8624 +4
Misses 73 73
Partials 34 34 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 a lot! Two comments from my side, but in general I agree this is the correct solution and I do not see how we could easily achieve the same effect extending the existing logic.
Sorry for the long wait. I kept pondering if another approach would be less surprising where we skip plugin hooks for extended criteria, but I still keep coming back that your solution is probably the best compromise, so I will merge it now. |
This PR has been released as part of [email protected]. You can test it via |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
skipSelf: true
does not skip the plugin if it has been called before with the same id and importer #5768Description
#5768 describes why we need to do this.
If chaining plugin hooks' call occurs,
skip
will record called plugins, thus we can break the infinity loop by find matching skippedCall inskip