-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: node compat #10
fix: node compat #10
Conversation
968dd64
to
4786da1
Compare
The popular stream-shift library accesses internal Readable state which has been modified. Refs: googleapis/nodejs-storage#2391 Refs: mafintosh/stream-shift#10
The popular stream-shift library accesses internal Readable state which has been modified. Refs: googleapis/nodejs-storage#2391 Refs: mafintosh/stream-shift#10
The popular stream-shift library accesses internal Readable state which has been modified. Refs: googleapis/nodejs-storage#2391 Refs: mafintosh/stream-shift#10 PR-URL: nodejs#51470
The popular stream-shift library accesses internal Readable state which has been modified. Refs: googleapis/nodejs-storage#2391 Refs: mafintosh/stream-shift#10 PR-URL: nodejs#51470
The popular stream-shift library accesses internal Readable state which has been modified. Refs: googleapis/nodejs-storage#2391 Refs: mafintosh/stream-shift#10 PR-URL: nodejs#51470
The popular stream-shift library accesses internal Readable state which has been modified. Refs: googleapis/nodejs-storage#2391 Refs: mafintosh/stream-shift#10 PR-URL: nodejs#51470
The popular stream-shift library accesses internal Readable state which has been modified. Refs: googleapis/nodejs-storage#2391 Refs: mafintosh/stream-shift#10 PR-URL: nodejs#51470
The popular stream-shift library accesses internal Readable state which has been modified. Refs: googleapis/nodejs-storage#2391 Refs: mafintosh/stream-shift#10 PR-URL: nodejs#51470
The popular stream-shift library accesses internal Readable state which has been modified. Refs: googleapis/nodejs-storage#2391 Refs: mafintosh/stream-shift#10 PR-URL: nodejs#51470
The popular stream-shift library accesses internal Readable state which has been modified. Refs: googleapis/nodejs-storage#2391 Refs: mafintosh/stream-shift#10 PR-URL: nodejs#51470
The popular stream-shift library accesses internal Readable state which has been modified. Refs: googleapis/nodejs-storage#2391 Refs: mafintosh/stream-shift#10 PR-URL: nodejs#51470
The popular stream-shift library accesses internal Readable state which has been modified. Refs: googleapis/nodejs-storage#2391 Refs: mafintosh/stream-shift#10 PR-URL: nodejs#51470
The popular stream-shift library accesses internal Readable state which has been modified. Refs: googleapis/nodejs-storage#2391 Refs: mafintosh/stream-shift#10 PR-URL: nodejs#51470
I'm actually unsure what this module does differently from just doing a |
@ronag docs say it returns all the data concatted if no size is provided (havent tested myself in a while so unsure). The point of this is to return the next buffer chunk that was pushed to the stream. if thats what the stream does indeed then yea obvs easier to do that.
ie stream.push(Buffer.from('a'))
stream.push(Buffer.from('b'))
shift(stream) // buffer('a')
shift(stream) // buffer('b') |
I will double-check and get back to you! |
As far as i can tell, if you don't pass anything into read it will give you the first buffer: https://github.com/nodejs/node/blob/main/lib/internal/streams/readable.js#L634 But it's not entirely clear. I think it only applies if it's "flowing". |
This really needs some review, either way, in my opinion |
It doesnt for me in node 20. ie const { Readable } = require('stream')
const rs = new Readable({ read () { } })
rs.push(Buffer.from('a'))
rs.push(Buffer.from('b'))
console.log(rs.read()) Prints |
Thanks though @ronag , merging this for now. |
1.0.3 |
@mafintosh any chance you bumping https://github.com/mafintosh/duplexify to use |
No description provided.