-
-
Notifications
You must be signed in to change notification settings - Fork 55
fix: accept non-array resolver in resolver-next
setting
#321
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
🦋 Changeset detectedLatest commit: d703942 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
""" WalkthroughThe changes update the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant fullResolve
participant Resolver(s)
User->>fullResolve: Call with settings['resolver-next']
fullResolve->>fullResolve: Check if resolver-next is array
alt resolver-next is array
fullResolve->>Resolver(s): Iterate over array
else resolver-next is single object
fullResolve->>Resolver(s): Wrap in array and iterate
end
Resolver(s)-->>fullResolve: Processed results
fullResolve-->>User: Return result
Assessment against linked issues
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
test/utils/resolve.spec.tsOops! Something went wrong! :( ESLint: 9.26.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/lib/index.js' imported from /eslint.config.js Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code Graph Analysis (1)test/utils/resolve.spec.ts (3)
⏰ Context from checks skipped due to timeout of 90000ms (21)
🔇 Additional comments (1)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
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.
Important
Looks good to me! 👍
Reviewed everything up to ae66788 in 34 seconds. Click for details.
- Reviewed
30
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
4
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/types.ts:104
- Draft comment:
Good change—accepting a single resolver object improves usability. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
2. src/utils/resolve.ts:148
- Draft comment:
Wrapping non-array resolvers in an array is correctly handled. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
3. src/types.ts:104
- Draft comment:
Updated 'resolver-next' type to accept both a single NewResolver and an array. This properly resolves #320. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
4. src/utils/resolve.ts:150
- Draft comment:
Properly casts non-array resolver to an array for uniform iteration. This change meets the requirements for #320. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
Workflow ID: wflow_YqaN9bqbXDi69pAT
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
commit: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #321 +/- ##
=======================================
Coverage 96.02% 96.02%
=======================================
Files 92 92
Lines 4756 4758 +2
Branches 1791 1768 -23
=======================================
+ Hits 4567 4569 +2
Misses 188 188
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
A new test case is needed. |
resolver-next
resolver-next
setting
resolver-next
settingresolver-next
setting
|
Fixes #320. Accept non-array
resolver-next
and cast to array ourselves.Important
Allow
resolver-next
to accept non-array inputs by casting them to arrays infullResolve()
.resolver-next
inImportSettings
now acceptsNewResolver[]
orNewResolver
insrc/types.ts
.fullResolve()
insrc/utils/resolve.ts
, non-arrayresolver-next
is cast to an array.resolver-next
should support single object resolver #320 by handling non-arrayresolver-next
.This description was created by
for ae66788. You can customize this summary. It will automatically update as commits are pushed.
Summary by CodeRabbit