-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Make available on Windows, revert previous changes #20136
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
base: main
Are you sure you want to change the base?
Conversation
Thank you for the update! 🎉 You can expect an initial review within five business days. |
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.
PR Summary
Major update to the URL Unshortener extension making it Windows-compatible and fixing URL unshortening functionality for services like t.co.
- The CHANGELOG.md entry needs the required
{PR_MERGE_DATE}
template string in its title - Major version bump of
@raycast/api
from ^1.62.2 to ~1.100.3 inextensions/url-unshortener/package.json
- Simplified URL unshortening logic in
extensions/url-unshortener/src/utils.tsx
by removing complex retry mechanisms - Added Windows platform support while maintaining macOS compatibility
3 files reviewed, 3 comments
Edit PR Review Bot Settings | Greptile
|
||
while (redirectCount < maxRedirects) { | ||
while (response.url) { |
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.
logic: response.url will always be defined as we're passing a URL. Use a counter or check response.headers.get('location') to control the loop
while (response.url) { | |
while (response.status >= 300 && response.status < 400) { |
} catch (redirectError) { | ||
break; | ||
} | ||
response = await fetch(nextUrl, { method: "HEAD", redirect: "manual" }); |
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.
style: Use new URL(nextUrl, url).toString() to handle relative redirect URLs
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Description
Screencast
No visual changes.
Checklist
npm run build
and tested this distribution build in Raycastassets
folder are used by the extension itselfREADME
are located outside the metadata folder if they were not generated with our metadata tool