You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove undici dependency when minimum supported Node.js version is 22.3.0 #516
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.
Activity
merceyz commentedon 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
EnvHttpProxyAgentfrom Undici and drop our logic around proxy support.