Lazily load agents in proxy-agent
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 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
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 |
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).
Nice stuff Anna, thank you!
pac-proxy-agent similarly depends on the other proxy agent classes, perhaps we should take a similar approach there as well.