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

Add Node.js native module polyfills to std/node #3403

Closed
6 of 18 tasks
kevinkassimo opened this issue Nov 25, 2019 · 17 comments
Closed
6 of 18 tasks

Add Node.js native module polyfills to std/node #3403

kevinkassimo opened this issue Nov 25, 2019 · 17 comments
Labels

Comments

@kevinkassimo
Copy link
Contributor

kevinkassimo commented Nov 25, 2019

Many Node.js native module polyfills are needed in std/node, to support loading npm packages (such that we are able to leverage some of the tools while Deno specific versions are not available yet).

Note some of the modules might not yet have a corresponding Deno API available. In that case, adding a new native binding for Deno or adding a new module in std modules might be reasonable.

#3382 is an example how to inject a polyfill for require().

Some of the polyfill tasks can be Good First Issue.

  • buffer
  • child_process
  • cluster (maybe low priority?)
  • crypto
  • dns
  • events
  • fs (partially, high priority)
  • http/https/http2/dgram/net/tls (maybe low priority?)
  • modules
  • os (more bindings needed, #3802)
  • path
  • querystring Add node querystring polyfill #4370
  • readline
  • repl
  • stream
  • tty
  • url
  • util (partially)
@cknight
Copy link
Contributor

cknight commented Jan 27, 2020

I'm working on the 'os' polyfill, though as discussed in #3802 there's a lot of functionality Deno is missing.

@cknight
Copy link
Contributor

cknight commented Jan 30, 2020

@kevinkassimo - That's the 'os' polyfill taken as far as I can, so please mark this as partly completed. Now moving onto 'events'.

@kevinkassimo
Copy link
Contributor Author

@cknight Thanks so much! Marked

@cknight
Copy link
Contributor

cknight commented Feb 17, 2020

@kevinkassimo - That's the 'events' polyfill complete now (#3944, #3960, #4016). I'm going to attempt to pick up fs next, though will progress this in small chunks due to its large size.

@dubiousjim
Copy link
Contributor

@cknight see #4017, will bring us closer to being able to polyfill Node's fs

@cknight
Copy link
Contributor

cknight commented Feb 17, 2020

Nice one @dubiousjim. I've not yet looked at detail into what Deno can offer, but at a glance it looks like your pending PRs will get us a lot closer to a full polyfill.

@bnoordhuis
Copy link
Contributor

Is there consensus on if or how much of node's crypto module to reimplement?

It's got a pretty big API surface and openssl-isms leak through in many places but it should be possible to make basic functionality (cipher/decipher/hash/hmac/sign/verify) work for the most common ciphers and hashes using RustCrypto.

@ecyrbe
Copy link
Contributor

ecyrbe commented Feb 29, 2020

currently working on os stuff impl.

@crowlKats
Copy link
Member

@kevinkassimo #4370 took care of querystring

@acconrad
Copy link
Contributor

@kevinkassimo i'm diving back into Deno after not working on it for a while (and I've only really contributed to the TypeScript portion). Which of these would be a good first issues?

@Soremwar
Copy link
Contributor

@acconrad Good for starters would be url or dns
Most useful would be probably crypto(though in my opinion better handler by the API implementation that's in development)

@acconrad
Copy link
Contributor

@Soremwar cool! url is massive and feels a bit over my head for the first one. dns seems pretty reasonable as does crypto (though would I also need to build out all of the helper classes like Hash, Sign, and Cipher?) if so I could just start with dns and see how that goes.

@stale
Copy link

stale bot commented Jan 15, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 15, 2021
@stale stale bot closed this as completed Jan 22, 2021
@lygstate
Copy link

lygstate commented Feb 4, 2021

assert?

@Soremwar
Copy link
Contributor

Soremwar commented Feb 4, 2021

Assert will be there as well @lygstate denoland/std#705

@lygstate
Copy link

lygstate commented Feb 4, 2021

Good to see

@pavel-kolesnikov
Copy link

net is required by rethinkdb (via https://cdn.skypack.dev/rethinkdb)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants