feat: refactor useCustomFetch to use createUseFetch#207
feat: refactor useCustomFetch to use createUseFetch#207maximepvrt wants to merge 2 commits intonuxt:mainfrom
Conversation
|
@maximepvrt is attempting to deploy a commit to the Nuxt Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughRefactors the custom fetch composable: replaces the explicit Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@examples/advanced/use-custom-fetch-composable/composables/useCustomFetch.ts`:
- Around line 1-4: The factory callback in useCustomFetch currently spreads
callerOptions into the returned object which allows a caller-provided $fetch to
override the intended useNuxtApp().$customFetch; update the callback for
createUseFetch (in useCustomFetch) to return only $fetch:
useNuxtApp().$customFetch (and any other fixed defaults) and remove the
...callerOptions spread so $customFetch is enforced via the callback override
mechanism (keep callerOptions passed to createUseFetch as-is but do not merge it
into the factory return), ensuring plugins/customFetch.ts auth/401 handling
remains in effect.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9f8f0b69-f8b7-46d2-8e88-d970edb0031c
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
examples/advanced/use-custom-fetch-composable/composables/useCustomFetch.tspackage.jsonshared/package.json
use the new
createUseFetch🔗 Linked issue
📚 Description