Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ Bugfixes:

Other improvements:

## Next

Breaking changes:
- Correct type signature for `pipeline`

Bugfixes:
- Fix FFI for `isPaused` and `pause`

## [v8.0.0](https://github.com/purescript-node/purescript-node-streams/releases/tag/v8.0.0) - 2022-07-19

Breaking changes:
Expand Down
4 changes: 2 additions & 2 deletions src/Node/Stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export const readableLengthImpl = (r) => r.readableLength;

export const resumeImpl = (r) => r.resume();

export const pauseImpl = (r) => r.pause;
export const pauseImpl = (r) => r.pause();

export const isPausedImpl = (r) => r.isPaused;
export const isPausedImpl = (r) => r.isPaused();

export const pipeImpl = (r, w) => r.pipe(w);

Expand Down
6 changes: 3 additions & 3 deletions src/Node/Stream.purs
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,10 @@ allowHalfOpen d = runEffectFn1 allowHalfOpenImpl d

foreign import allowHalfOpenImpl :: EffectFn1 (Duplex) (Boolean)

pipeline :: forall w r. Readable w -> Array Duplex -> Writable r -> (Error -> Effect Unit) -> Effect Unit
pipeline src transforms dest cb = runEffectFn4 pipelineImpl src transforms dest cb
pipeline :: forall w r. Readable w -> Array Duplex -> Writable r -> (Maybe Error -> Effect Unit) -> Effect Unit
pipeline src transforms dest cb = runEffectFn4 pipelineImpl src transforms dest $ mkEffectFn1 \err -> cb (toMaybe err)

foreign import pipelineImpl :: forall w r. EffectFn4 (Readable w) (Array Duplex) (Writable r) ((Error -> Effect Unit)) (Unit)
foreign import pipelineImpl :: forall w r. EffectFn4 (Readable w) (Array Duplex) (Writable r) (EffectFn1 (Nullable Error) Unit) (Unit)

readableFromString :: String -> Encoding -> Effect (Readable ())
readableFromString str enc = runEffectFn2 readableFromStrImpl str (encodingToNode enc)
Expand Down