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

Use an alternative to got #574

Closed
fengkx opened this issue Nov 18, 2021 · 2 comments · Fixed by #615
Closed

Use an alternative to got #574

fengkx opened this issue Nov 18, 2021 · 2 comments · Fixed by #615

Comments

@fengkx
Copy link
Owner

fengkx commented Nov 18, 2021

Why

We are fetching feed using got, But in new lts docker which use Node 16, got@11 has some bug. When I upgrade to got@12 beta using got-cjs package, because we can't upgrade to esm module for some reason, got start to throw unhandledrejection on its beforeError function.

https://sentry.io/share/issue/fc3100c57306493ca2809a91397b808f/
https://sentry.io/share/issue/7f246477131040e687fe8ef2f968d693/
https://sentry.io/share/issue/6ef2f4a57d55423681aa136cf16ceec9/

and we don't need much function got provided, so we can move to an alternative. Currently I want to switch to undici

Some function we need and provided by got.

  1. agent to support http proxy
  2. retry on some error
  3. encoding convert with got-iconv
@fengkx
Copy link
Owner Author

fengkx commented Jan 6, 2022

https://github.com/npm/make-fetch-happen is another option

@fengkx fengkx linked a pull request Jan 12, 2022 that will close this issue
@fengkx
Copy link
Owner Author

fengkx commented Jan 12, 2022

I choose make-fetch-happen at last.
It fully satisfies the above three conditions.

  1. proxy options
  2. retry options
  3. textConverted function supported by encoding package

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

Successfully merging a pull request may close this issue.

1 participant