Skip to content

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

Open

Description

@wojtekmaj

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

  1. merceyz commented on Jul 16, 2024

    @merceyz
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions