TooTallNate / proxy-agents

Node.js HTTP Proxy Agents Monorepo
https://proxy-agents.n8.io
918 stars 238 forks source link

Lazily load agents in proxy-agent #327

Open addaleax opened 1 month ago

addaleax commented 1 month ago

Some of the references packages can be quite expensive to instantiate (e.g. pac-proxy-agent and its custom JS runtime), so lazily loading them enables fast loading times for the more common cases.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: bce985e3c97fc0a00af6d8d7414a394490883364

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------- | ----- | | proxy-agent | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
proxy-agents ✅ Ready (Inspect) Visit Preview Aug 7, 2024 1:42pm
developit commented 1 week ago

Just wanted to give a major thumbs up to this - proxy-agents is a dependency of Puppeteer, which is used in CI a lot. In our setup, we actually went to the length of stubbing pac-proxy-agent via require.cache to prevent it from being loaded (the entire proxy-agent setup is unused by puppeteer for anyone not using a proxy).