Releases: purescript-node/purescript-node-streams
v9.0.0
Breaking changes:
- Correct type signature for
pipeline(#55 by @JordanMartinez)
Bugfixes:
- Fix FFI for
isPausedandpause(#55 by @JordanMartinez)
v8.0.0
Breaking changes:
-
Update
node-buffertov9.0.0(#48 by @JordanMartinez) -
Reimplement event handlers using
eventNameH-style API (#49 by @JordanMartinez)Previously, one would write something like the following, and be unable to remove
the resulting listener.Stream.onData stream \buffer -> do ...
Now, one writes such a thing via
on(or a similar function) fromnode-event-emitter:-- if the listener should be removed later, use `on`. removeListener <- stream # on dataH \buffer -> do ... -- if it doesn't need to be removed, use `on_`. stream # on_ dataH \buffer -> do ...
-
Renamed functions to better adhere to naming consistency (#50 by @JordanMartinez)
All functions that take an optional callback are now
named using the following schema:- no callback:
functionName - with callback:
functionName'
Thus, the following were renamed:
writewas renamed towrite'writeStringwas renamed towriteString'endwas renamed toend'destroyWithErrorwas renamed todestroy'
write,writeString, andendnow refer to their non-callback versions. - no callback:
New features:
-
Added event handlers for
Writeablestreams (#49 by @JordanMartinez) -
Added missing APIs (#51, #53 by @JordanMartinez)
- readable, readableEnded, readableFlowing, readableHighWaterMark, readableLength
- pipe'
- writeable, writeableEnded, writeableCorked, errored, writeableFinished, writeableHighWaterMark, writeableLength, writeableNeedDrain
- closed, destroyed
- allowHalfOpen
- pipeline
- readableFromString, readableFromBuffer
- newPassThrough
-
Integrated
node-streams-affinto library (#52 by @JordanMartinez)Convenience APIs added for readable streams in "paused" mode:
- readSome
- readAll
- readN
Convenience APIs for writeable streams:
- write
- end
Convenience APIs for converting
Strings from/toArray Buffer- toStringUTF8
- fromStringUTF8
The only APIs from the library not added were
newReadableandpush. -
Added convenience API for converting
ReadabletoStringorBuffer(#53 by @JordanMartinez)readableToStringUtf8readableToStringreadableToBuffers
Bugfixes:
-
Drop misleading comment for
setEncoding(#51 by @JordanMartinez)For context, see #37.
Other improvements:
-
Bumped CI's node version to
lts/*(#48 by @JordanMartinez) -
Updated CI
actions/checkoutandactions/setup-nodeetov3(#48 by @JordanMartinez) -
Format code via purs-tidy; enforce formatting via CI (#48 by @JordanMartinez)
-
Refactor tests using
passThroughstreams (#49 by @JordanMartinez) -
Updated FFI to use uncurried functions (#50 by @JordanMartinez)
-
Relocated
setEncoding,Read, andWritefor better locality in docs (#51 by @JordanMartinez) -
Added
node-streams-afftests (#52 by @JordanMartinez) -
Updated
spectov7.5.3to addressbowerdep issue (#54 by @JordanMartinez)See purescript-spec/purescript-spec#142 for more context.
v7.0.0
Breaking changes:
- Update project and deps to PureScript v0.15.0 (#39 by @nwolverson, @JordanMartinez, @sigma-andex)
- Update
write/writeString/endcallbacks to includeMaybe Errorarg (#40 and #43 by @JordanMartinez)
Bugfixes:
- Exported
destroyWithError(#43 by @JordanMartinez)
Other improvements:
- Fix
Gzipexample (#17, #36 by @matthewleon and @JordanMartinez)
v6.0.0
Due to an incorrectly-made breaking change, please use v7.0.0 instead.
v5.0.0
v4.0.1
v4.0.0
v3.3.0
Add unpipe and destroy functions (@matthewleon)
v3.2.0
- Allow
onCloseto be used on writable streams (@matthewleon)
v3.1.0
Add onFinish event (@felixSchl)