-
Notifications
You must be signed in to change notification settings - Fork 20
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
Stream Promises API? #44
Comments
Can the functionality be made in aff without going through promises, just using the callback api this library already provides? |
Yes, I'm working on that now... https://github.com/jamesdbrock/purescript-node-streams-aff |
Node.js seems to have three stream APIs. https://nodejs.org/api/stream.html
These three APIs were added in chronological order. When API 1 proved to not work, they added API 2, right on top of it in the same namespace. API 1 and 2 are mutually incompatible, and users are admonished to “choose one API style.” API 2 has proven to not work. It doesn’t work in a specific case which I need: a program which writes to stdout and then exits. nodejs/node#6456 Now there is API 3, the Promise API, which was added right on top of the other APIs in the same namespace but is incompatible with the first two APIs. There are hints on the internet that API 3 might actually be able to write to stdout and then exit. sparksuite/waterfall-cli#258 So I think I want a PureScript wrapper for the Streams Promises API https://nodejs.org/api/stream.html#streams-promises-api |
I take it back, I think the Stream Promises API is also rubbish and cannot write to stdout and then exit. |
I published https://pursuit.purescript.org/packages/purescript-node-streams-aff which I think solves the problem. |
Starting in Node.js v15, there is a “Stream Promises API”. Do we want to support that in this package?
Would we use the
Promise
type from aff-promise or web-promise?From web-promise, I assume. But then we would probably want to settle this issue to make the Stream Promises API useful: nwolverson/purescript-aff-promise#24
The text was updated successfully, but these errors were encountered: