nodejs / readable-stream

Node-core streams for userland
https://nodejs.org/api/stream.html
Other
1.03k stars 227 forks source link

Build for Deno #452

Closed Soremwar closed 3 years ago

Soremwar commented 3 years ago

Discussion in #451

This needs some polishing, namely:

Soremwar commented 3 years ago

Anyone that can help me debug this fails? I tried to test them on Node 6.17.1 and they all passed

mcollina commented 3 years ago

(Unfortunately I do not have time to debug the build right now, I'm going for some extended leave and I'll be back full time next year).

benjamingr commented 3 years ago

@mcollina can you point me at the code that generates readable-stream from Node core? I'm not actually familiar with it :]?

targos commented 3 years ago

@benjamingr https://github.com/nodejs/readable-stream/blob/master/build/build.js

Soremwar commented 3 years ago

Someone knows what version of Node the last build of readable stream is using? The README points out to it being Node 10 but I can't really tell (needed for running the build script)

benjamingr commented 3 years ago

Looking at the issue I think it's v10.18.1

Soremwar commented 3 years ago

Thanks @benjamingr

mcollina commented 3 years ago

This seems pretty amazing! Are there any tests for this?

Soremwar commented 3 years ago

@mcollina Actually...that's the main reason why there's been so little activity in this since it was created. The build has been working for a while, but making the tests work has proven to be a major headache due to the differences between the Deno test suite and something like tap

More progress to follow though, I'm on vacations so I am putting some effort into landing this

mcollina commented 3 years ago

You can also write a few high level tests. We run separate tests for the browser for this reason, see https://github.com/nodejs/readable-stream/tree/master/test/browser for more details.

mcollina commented 3 years ago

FYI: check out https://github.com/nodejs/readable-stream/pull/454.

jimmywarting commented 3 years ago

I doubt that Deno won't get much traction for node streams, they are mostly just focused on web standarder, meaning: whatwg streams. Node also recently got them.

I always try to avoid core builtin's when i develop anything for cross platform that runs in Deno, Browser and Node. I never want to bundle the hole readable-stream into the browser, it cost too much, I always try to make my page score 100% in lighthouse i got a own size limit to somewhere like < 100 kb when i develop a js library for browser and node:stream can easily break that threshold