proxy-agents icon indicating copy to clipboard operation
proxy-agents copied to clipboard

feat(https-proxy-agent): add esm support to https-proxy-agent

Open ryanleecode opened this issue 6 months ago • 6 comments

Currently every package is outputting CJS. This adds support for ESM and CJS output for the https-proxy-agent package. if accepted, this approach can be used for other packages.

ryanleecode avatar Jun 02 '25 23:06 ryanleecode

🦋 Changeset detected

Latest commit: 561d6669f025f4f6cc764ccd641fb3667f91685b

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

This PR includes changesets to release 1 package
Name Type
https-proxy-agent Patch

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

changeset-bot[bot] avatar Jun 02 '25 23:06 changeset-bot[bot]

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

Name Status Preview Updated (UTC)
proxy-agents ✅ Ready (Inspect) Visit Preview Jun 3, 2025 0:04am

vercel[bot] avatar Jun 02 '25 23:06 vercel[bot]

Curious - what is the issue with CJS?

TooTallNate avatar Jul 07 '25 16:07 TooTallNate

Cannot be dynamically imported

On Mon, Jul 7, 2025, 12:35 p.m. Nathan Rajlich @.***> wrote:

TooTallNate left a comment (TooTallNate/proxy-agents#375) https://github.com/TooTallNate/proxy-agents/pull/375#issuecomment-3045860856

Curious - what is the issue with CJS?

— Reply to this email directly, view it on GitHub https://github.com/TooTallNate/proxy-agents/pull/375#issuecomment-3045860856, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFDCXUCFNBOG2IIEK2HEKBL3HKOU7AVCNFSM6AAAAAB6OH7GYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANBVHA3DAOBVGY . You are receiving this because you authored the thread.Message ID: @.***>

ryanleecode avatar Jul 07 '25 17:07 ryanleecode

Not sure what you mean. As in await import('https-proxy-agent')? Or can you show me code that doesn't work?

TooTallNate avatar Jul 07 '25 17:07 TooTallNate

Curious - what is the issue with CJS?

I'm migrating my package to ESM and wanna be able to just import it in the ESM context like so

import { HttpsProxyAgent } from 'https-proxy-agent';

bashmish avatar Aug 14 '25 16:08 bashmish