Skip to content
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

feat(server): replace axios dependency by fetch #7018

Merged
merged 2 commits into from Feb 11, 2024

Conversation

martabal
Copy link
Member

Replace axios dependency by fetch

Copy link

cloudflare-pages bot commented Feb 10, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 62c646f
Status: ✅  Deploy successful!
Preview URL: https://e83175a8.immich.pages.dev
Branch Preview URL: https://feat-replace-axios-with-fetc.immich.pages.dev

View logs

async getGitHubRelease(): Promise<GitHubRelease> {
const response = await fetch('https://api.github.com/repos/immich-app/immich/releases/latest');
if (!response.ok) {
throw new Error('Failed to fetch GitHub release');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you log or throw the actual details of the failure? otherwise it's extremely frustrating to troubleshoot

Copy link
Contributor

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@jrasm91 jrasm91 merged commit 4e31d82 into main Feb 11, 2024
24 checks passed
@jrasm91 jrasm91 deleted the feat/replace-axios-with-fetch branch February 11, 2024 16:15
@benmccann
Copy link
Contributor

Amazing! Thank you!

I had an issue for this in #6647 and managed to remove axios from the CLI. Great to see the server done now as well. Let me know if you have any interest in helping to do it in the web project as well 😄

@martabal
Copy link
Member Author

martabal commented Feb 11, 2024

Amazing! Thank you!

I had an issue for this in #6647 and managed to remove axios from the CLI. Great to see the server done now as well. Let me know if you have any interest in helping to do it in the web project as well 😄

Ahah, I tried to migrate from axios to typescript-fetch 1-2 weeks ago right before your changes, I will resume this work next week. Help is always welcome 😄

@benmccann
Copy link
Contributor

Cool. I just added some details of where I left off here: #6647 (comment). I was using oazapfts rather than typescript-fetch because it's tree shakable and results in much smaller output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants