node-serialport icon indicating copy to clipboard operation
node-serialport copied to clipboard

Fix encoding for stream _write

Open GazHank opened this issue 1 year ago • 3 comments

Fix per https://github.com/serialport/node-serialport/issues/2566

This matches the definition of _write definition for Duplex streams

Signed-off-by: Gareth Hancock [email protected]

GazHank avatar Jun 27 '23 14:06 GazHank

Hmm, do we need to look at changing the _writev function too?

https://github.com/serialport/node-serialport/blob/0585e64b7b3a353f6d5427c405ba4a0dd989563a/packages/stream/lib/index.ts#L275

GazHank avatar Jul 22 '23 12:07 GazHank

I'm suspect that this is the correct type as nodejs used to pass undefined there all the time. Curious how that's been upgraded for older libraries and packages. Whatever type changes make us look like a stream are fine by me.

reconbot avatar Jul 23 '23 16:07 reconbot