Releases: purescript-node/purescript-node-streams
v9.0.0
Breaking changes:
- Correct type signature for
pipeline
(#55 by @JordanMartinez)
Bugfixes:
- Fix FFI for
isPaused
andpause
(#55 by @JordanMartinez)
v8.0.0
Breaking changes:
-
Update
node-buffer
tov9.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:
write
was renamed towrite'
writeString
was renamed towriteString'
end
was renamed toend'
destroyWithError
was renamed todestroy'
write
,writeString
, andend
now refer to their non-callback versions. - no callback:
New features:
-
Added event handlers for
Writeable
streams (#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-aff
into 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
String
s from/toArray Buffer
- toStringUTF8
- fromStringUTF8
The only APIs from the library not added were
newReadable
andpush
. -
Added convenience API for converting
Readable
toString
orBuffer
(#53 by @JordanMartinez)readableToStringUtf8
readableToString
readableToBuffers
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/checkout
andactions/setup-nodee
tov3
(#48 by @JordanMartinez) -
Format code via purs-tidy; enforce formatting via CI (#48 by @JordanMartinez)
-
Refactor tests using
passThrough
streams (#49 by @JordanMartinez) -
Updated FFI to use uncurried functions (#50 by @JordanMartinez)
-
Relocated
setEncoding
,Read
, andWrite
for better locality in docs (#51 by @JordanMartinez) -
Added
node-streams-aff
tests (#52 by @JordanMartinez) -
Updated
spec
tov7.5.3
to addressbower
dep 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
/end
callbacks to includeMaybe Error
arg (#40 and #43 by @JordanMartinez)
Bugfixes:
- Exported
destroyWithError
(#43 by @JordanMartinez)
Other improvements:
- Fix
Gzip
example (#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
onClose
to be used on writable streams (@matthewleon)
v3.1.0
Add onFinish
event (@felixSchl)