| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
`ctx.fetch` is no longer part of `ProviderContext`. The `apiBase`-aware fetcher is now attached to the context under an internal symbol and reached through `fetchAPI(ctx, url, init)`, which only the built-in providers use. Custom providers request their own endpoints with the global `fetch`; those URLs were never rewritten to `apiBase` anyway. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Fi53GTT12xDNYxQLQAdc7
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Sorry, something went wrong.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 9e3ee030-705f-4c78-bc9f-4f7b946d83ae 📥 CommitsReviewing files that changed from the base of the PR and between ce39a5e and 0c5c7fd. 📒 Files selected for processing (12)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 Walkthrough WalkthroughChangesAPI Fetch Routing
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to 0c5c7 The PR makes the provider fetcher internal without any identified current-head correctness, security, availability, or deployment risk; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant Built-in provider
participant fetchAPI
participant InternalProviderContext
participant apiFetch
Built-in provider->>fetchAPI: Request provider API URL
fetchAPI->>InternalProviderContext: Read API_FETCH
InternalProviderContext->>apiFetch: Forward URL and request options
apiFetch-->>Built-in provider: Return Response
Suggested reviewers: danielroe 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
Explanation Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 10 files. (1 skipped: 1 unsupported.)
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. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #489 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 18 19 +1
Lines 1142 1144 +2
Branches 285 285
=========================================
+ Hits 1142 1144 +2 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
There was a problem hiding this comment.
this is meant to be a useful tool for providers to use in the same way that storage is- it handles retries (and replaced our old fetchWithRetries function) - and might do more in the future ...
if you want to drop it at the type leve, you could do Omit<UnifontOptions>?
or do you have another concern about exposing it on the ctx?
Sorry, something went wrong.
|
I'm afraid of scope creep for fetch(). For example the proxy makes sense...but only for the buit-in providers. Yet it's part of a public API. So removing may not be the right solution, I think retries are nice to have. Do you think it'd be acceptable to make the proxy logic internal instead? |
Sorry, something went wrong.
|
what do you mean the proxy is part of a public API? it's internal code, not exposed via a user option, it only applies if the apiBase is set, and the URL being fetched is one of these: Lines 15 to 25 in 153e39e we could remove it and there would be no breaking change for consumers, so I regard it as internal. (I'm more than happy to refactor how the proxy works; as it's not a breaking change we can do so at any time. the reason it's built the way it is, is just that I wanted to have one source of truth rather than doing so in each provider) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Removes fetch from ProviderContext and keeps it as an internal concern. It is an implementation detail of built-in providers.
When working on withastro/astro#17830 I found this new thing which would leak in Astro. I could workaround it in Astro but I figured it'd be better to fix in unifont directly.
🤖 Generated with Claude Code
Summary by CodeRabbit