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

Remove undici dependency when minimum supported Node.js version is 22.3.0 #516

Open
wojtekmaj opened this issue Jul 11, 2024 · 1 comment

Comments

@wojtekmaj
Copy link
Contributor

wojtekmaj commented Jul 11, 2024

It seems like the only reason undici is our dependency is to support proxy env variables. Direct support for these env variables (NO_PROXY, HTTP_PROXY...) has been implemented in undici in nodejs/undici#2994 and released in version v6.14.0 (nodejs/undici#3147). undici has been updated to version beyond 6.14.0 in Node.js v22.3.0 (nodejs/node#53379). So, once minimum supported Node.js version is 22.3.0, we can remove all custom proxy logic and rely on global fetch entirely.

In the meantime, we could drop custom proxy logic and proxy-from-env dependency, provided that we DON'T use global fetch -but the one imported from undici, which is >6.14.0.

@merceyz
Copy link
Member

merceyz commented Jul 16, 2024

It's still experimental so we should wait until the minimum supported version of Node.js ships with a version of Undici with stable and enabled by default support.
https://github.com/nodejs/undici/blob/d61af698dc50234289621c3613be9a8e42bf8e1f/lib/dispatcher/env-http-proxy-agent.js#L26-L28

Or once it's marked as stable we can use the EnvHttpProxyAgent from Undici and drop our logic around proxy support.

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

No branches or pull requests

2 participants