Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https.globalAgent exists on default export but not on module namespace #21080

Closed
jcbhmr opened this issue Nov 3, 2023 · 1 comment · Fixed by #21081
Closed

https.globalAgent exists on default export but not on module namespace #21080

jcbhmr opened this issue Nov 3, 2023 · 1 comment · Fixed by #21081
Labels
bug Something isn't working correctly node compat

Comments

@jcbhmr
Copy link
Contributor

jcbhmr commented Nov 3, 2023

jcbhmr@PIG-2016:~$ deno
Deno 1.38.0
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> let m = await import("node:https")
undefined
> Object.keys(m)
[ "Agent", "Server", "createServer", "default", "get", "request" ]
> Object.keys(m.default)
[ "Agent", "Server", "createServer", "get", "globalAgent", "request" ]
> m.globalAgent
undefined
>
jcbhmr@PIG-2016:~$ node
Welcome to Node.js v20.8.0.
Type ".help" for more information.
> let m = await import("node:https")
undefined
> Object.keys(m)
[
  'Agent',
  'Server',
  'createServer',
  'default',
  'get',
  'globalAgent',
  'request'
]
> Object.keys(m.default)
[ 'Agent', 'globalAgent', 'Server', 'createServer', 'get', 'request' ]
>
Node.js https module namespace has: Agent, Server, createServer, get, globalAgent, request
Deno https module namespace has   : Agent, Server, createServer, get,              request
Node.js https default export has  : Agent, Server, createServer, get, globalAgent, request
Deno https default export has     : Agent, Server, createServer, get, globalAgent, request

in summary: pls export the globalAgent on the main module namespace thx

@jcbhmr
Copy link
Contributor Author

jcbhmr commented Nov 3, 2023

related to #18312

@lucacasonato lucacasonato added bug Something isn't working correctly node compat labels Nov 7, 2023
littledivy pushed a commit that referenced this issue Nov 11, 2023
Fixes #21080 
Fixes #18312

---------

Signed-off-by: Jacob Hummer <[email protected]>
kt3k pushed a commit that referenced this issue Nov 17, 2023
Fixes #21080 
Fixes #18312

---------

Signed-off-by: Jacob Hummer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants